emacs-devel
[Top][All Lists]
Advanced

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

Re: Buffer menu fix


From: Kevin Rodgers
Subject: Re: Buffer menu fix
Date: Tue, 06 Sep 2005 15:41:51 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]