From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: managing my keybindings
Date: Mon, 10 May 2010 10:10:10 -0400 [thread overview]
Message-ID: <jwvhbmfetnt.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 9129c243-472e-4cd4-9c89-f017db8ea5b2@o14g2000yqb.googlegroups.com
> (let (my-func)
> (setq my-func (intern (concat "my-" (symbol-name func))))
This is kind of like:
int my-func = 0;
my-func = <somethingelse>;
except that Elisp's semantics make it harder for the (byte-)compiler to
eliminate the redundant initialization.
A generally good rule of thumb is "setq (aka assignment) is bad for your
karma". So just write:
(let ((my-func (intern (concat "my-" (symbol-name func)))))
-- Stefan
next prev parent reply other threads:[~2010-05-10 14:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-08 0:38 managing my keybindings LanX
2010-05-08 2:09 ` Lennart Borgman
2010-05-08 12:22 ` LanX
[not found] ` <mailman.0.1273284589.603.help-gnu-emacs@gnu.org>
2010-05-09 11:29 ` Andreas Politz
2010-05-09 11:55 ` Lennart Borgman
2010-05-09 18:21 ` LanX
2010-05-09 19:12 ` LanX
2010-05-10 14:10 ` Stefan Monnier [this message]
2010-05-10 14:25 ` LanX
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=jwvhbmfetnt.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/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.