[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: From menu button, how run more than one command?
From: |
Johan Bockgård |
Subject: |
Re: From menu button, how run more than one command? |
Date: |
Thu, 02 Mar 2006 17:01:52 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> Mathias Dahl wrote:
>> (defvar my-menu (make-sparse-keymap))
>>
>> (define-key my-menu [rmx1]
>> `(menu-item "Find file on c:/"
>> ,(lambda ()
>> (interactive)
>> (abc "c:/"))))
[...]
> (lambda ...) is a self-evaluating form, so the backquote/comma
> syntax is completely extraneous and can be replaced with a simple
> quote: '(menu-item ...)
Having `lambda' in a non-quoted context has the advantage that the
byte-compiler can process it.
--
Johan Bockgård