[slime-devel] buffer readtables

Helmut Eller heller at common-lisp.net
Sun Sep 27 18:21:21 UTC 2009


* Tobias C. Rittweiler [2009-09-27 19:43+0200] writes:

> I want to introduce the concept of buffer-readtables so C-c C-c and
> other commands will be able to process source strings with the right
> readtable being active.

First let me say that I have little sympathy for custom readtables.
People who use custom syntax are fighting their tools.

> For that, the :EMACS-REX event has to be adapted. At the moment, it
> looks as follows
>
>   (:emacs-rex rpc-sexp buffer-package buffer-thread cont-id)
>
> My plan is to change it to
>
>   (:emacs-rex rpc-sexp cont-id buffer-context)
>
> where buffer-context is a plist of form
>
>   (&key buffer-package buffer-thread &allow-other-keys)
>
> so that a contrib can extend what constitutes a buffer-context.
>
> Are you ok with this?

Well, no.

> Or is it too general? Should I instead add just another parameter
> specifically for buffer-readtables?

I would prefer to fold the context arguments into the sexp and pass them
down to the with-buffer-syntax macro.  The thread is needed for
dispatching and should stay easily accessible.  Something like

(:emacs-rex sexp thread-id reply-id)

And a typical use would look like:

(defslimefun foo (some-string buffer-context)
  (with-buffer-syntax (buffer-context) 
     ... (read-from-string some-string) ... ))


Helmut





More information about the slime-devel mailing list