Tomas Zerolo wrote:
> Can't you attach a doc-string to an anonymous function, like so?
>
>     `lambda (e)
>       ,(concat "Sort buffer by " column)
>       ...

Obviously you can include a doc string in a lambda form.  The real
question is, will Emacs do the right thing with it?  It looks pretty
good to me in Emacs 21:

(documentation (lambda (foo)
                 "*Grok FOO."
                 (interactive "sGrok: ")
                 (grok foo)))
returns:
"*Grok FOO."

And given:
(global-set-key "\C-cz"
                (lambda (foo)
                  "*Grok FOO."
                  (interactive "sGrok: ")
                  (grok foo)))

,----[ C-h k C-c z ]
| C-c z runs the command (lambda (foo) "*Grok FOO." (interactive "sGrok: ") (grok foo))
|    which is an interactive Lisp function.
| (anonymous FOO)
|
| *Grok FOO.
`----

--
Kevin Rodgers



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to