[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

defsubst in Maclisp



Has anyone written a DEFSUBST for Maclisp (or a similar dialect)?  (See
the Chineual for a description of DEFSUBST.)  I have been trying to
write one for several days, mostly just as an academic exercise.  I
managed to implement a pretty simple one, which doesn't handle &keywords
(&optional, &rest, etc) pretty quickly (it expands into an equivalent
DEFUN at (load eval) time, and a DEFMACRO at compile-time).  I was in
the process of modifying it to deal with &keywords when I realized that
it should then also do destructuring, in order to be completely
compatible with DEFUN.  At this point I gave up.

I don't really need this, but I am curious whether anyone has done it,
and what the compile-time code looks like.
                                        barmar