Matthieu Moy <[EMAIL PROTECTED]> writes: > Mark Triggs <[EMAIL PROTECTED]> writes: > >> Miles Bader <[EMAIL PROTECTED]> writes: >> >>> (defmacro lambda-with-constant-bindings (constants args &rest body) >>> "Like `lambda', with constant bindings for variables in CONSTANTS. >>> Any references in BODY to a variable listed in CONSTANTS will evaulate >>> to the binding in effect when the lambda was created, rather than at >>> the time it is called." >>> ``(lambda ,',args >>> (let (,,@(mapcar (lambda (var) ``(,',var ',,var)) constants)) >>> (funcall ,(lambda () ,@body))))) >> >> This looks like a good solution, thanks. Does anyone else have any >> opinions on this? > > 1) I didn't know that elisp programs could become as unreadable as a > sed script ;-)
Heh :o) Backquote's a bit like that. A quote from comp.lang.lisp: > This isn't all that easy to understand at first. In fact, if we > search old Usenet archives, we find that around 1980 this double > evaluation managed to trip up a certain bright gentleman by the name > of Ronald Rivest, who had to hit Usenet to learn about the ,', > trick. Mark -- Mark Triggs <[EMAIL PROTECTED]>
