joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.27k stars 145 forks source link

sly-eval-last-expression breaks on complex numbers and multidimensional arrays #284

Open Zulu-Inuoe opened 4 years ago

Zulu-Inuoe commented 4 years ago

In a buffer with

#C(0.0 0.0)

Placing the cursor after the closing parens and C-x C-e will land me in the debugger with:

Execution of a form compiled with errors.
Form:
  (0.0 0.0)
Compile-time error:
  illegal function call

Similar results for

#2A((1 2) (3 4))

with

Execution of a form compiled with errors.
Form:
  ((1 2) (3 4))
Compile-time error:
  illegal function call

Seems to me it's not correctly grabbing the last expression

joaotavora commented 4 years ago

Seems to me it's not correctly grabbing the last expression

Yes this is probably a bug. I wonder if SLIME doesn't have the same problem. If it doesn't, we should just copy it solution. But I'm 90% sure it does.

This is tricky, it has to do with the "syntax" of the Lisp-mode buffer. There are some overrides possible, with forward-sexp-function, but it would need a great load of testing to be sure we aren't breaking anything.

Anyway, thanks for reporting this.