[slime-devel] Slime macroexpansion breaks on xemacs.

This issue is 100% reproducible. In a file, put some form like: (loop for k from 1 to 10 do (print i)) Make sure the file ends at the closing paren; no newline or anything. Put the cursor after the closing paren, and press C-c C-m to have slime macroexpand it. This causes xemacs to crash (due to a bug in xemacs). But the issue is this in slime-sexp-at-point-for-macroexpansion: (let ((string (slime-sexp-at-point-or-error)) (bounds (bounds-of-thing-at-point 'sexp)) (char-at-point (substring-no-properties (thing-at-point 'char)))) In xemacs, (thing-at-point 'char) returns nil. Then (substring-no-properties nil) crashes xemacs. But if the obvious fix is applied to xemacs, slime would just signal an error about nil not being a string. My workaround for this is (char-at-point (substring-no-properties (or (thing-at-point 'char) "\n"))) Not great, but solves the problem. I'm not sure what the right solution would be. Ray

* Raymond Toy [2011-03-04 18:39] writes:
My workaround for this is
(char-at-point (substring-no-properties (or (thing-at-point 'char) "\n")))
Not great, but solves the problem. I'm not sure what the right solution would be.
I committed some stuff to get rid of the strange (thing-at-point 'char). It also seems to work in XEmacs now. Helmut

On 3/9/11 2:58 PM, Helmut Eller wrote:
* Raymond Toy [2011-03-04 18:39] writes:
My workaround for this is
(char-at-point (substring-no-properties (or (thing-at-point 'char) "\n")))
Not great, but solves the problem. I'm not sure what the right solution would be.
I committed some stuff to get rid of the strange (thing-at-point 'char). It also seems to work in XEmacs now.
Thanks for the update. It works very nicely now for me. Ray
participants (2)
-
Helmut Eller
-
Raymond Toy