[slime-devel] #;

Helmut Eller heller at common-lisp.net
Thu May 5 19:19:32 UTC 2005


Harald Hanche-Olsen <hanche at math.ntnu.no> writes:

> This is perhaps really a problem with forward-sexp, not so much a
> slime issue, but I'll bring it up here anyway:
>
> I recently played around with creating a reader macro for the #;
> combination.  But then I found that trying for example
>
> (foo #;bar)
>
> then I would only get [input not complete] in the minibuffer.
> Perhaps forward-sexp should be taught that a semicolon after a
> sharpsign doesn't start a comment?  This can get tricky if someone
> were to write #1#; of course. ...

In theory you could use syntax properties for this.  E.g., 

 (setq font-lock-syntactic-keywords '(("\\(#;\\)" 1 "'")))
 (setq parse-sexp-lookup-properties t)

tells emacs that #; should be treated like ' for parsing.

In practice this doesn't work so well because it relies on font-lock
mode and the SLIME REPL doesn't use font-lock.  

If this is very important, you could modify slime-repl-return so that
it adds the syntax-table property to occurrences of #; before testing
whether the expression is complete.

Helmut.



More information about the slime-devel mailing list