From: chris@grierwhite.com (Christopher J. White)
Subject: Re: Binding functions and parameters
Date: Tue, 28 Jan 2003 09:56:49 -0500 [thread overview]
Message-ID: <m2y955fhla.fsf@bluesteel.grierwhite.com> (raw)
In-Reply-To: mailman.1080.1043762793.21513.help-gnu-emacs@gnu.org
>>>>> "bruce" == Bruce Ashfield <bruce@zedd.org> writes:
bruce> What I'd like to do is create a series of menu entries (or toolbar
bruce> buttons) that trigger different actions. It's no problem creating
bruce> the entries, it's the binding of the function I'd like them to call
bruce> that is causing the problem. I don't know how many entries I'll have
bruce> so I'm creating a single function that takes one argument. I'm
bruce> triggering on the argument to figure out what to do.
By way of example, here's a way to set a key...
(let ((msg "Hello"))
(local-set-key [f12] `(lambda() (interactive) (message ,msg))))
The backquote says there are variables inside that need to
be replaced (prefixed by ,), namely msg. lambda makes it an
argumentless interactive function.
...cj
--
------------------------------------------------------------------------------
Christopher J. White chris@grierwhite.com
------------------------------------------------------------------------------
next parent reply other threads:[~2003-01-28 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1080.1043762793.21513.help-gnu-emacs@gnu.org>
2003-01-28 14:56 ` Christopher J. White [this message]
2003-01-28 14:05 Binding functions and parameters Bruce Ashfield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2y955fhla.fsf@bluesteel.grierwhite.com \
--to=chris@grierwhite.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.