From: Teemu Likonen <tlikonen@iki.fi>
To: tomas@tuxteam.de
Cc: help-gnu-emacs@gnu.org
Subject: Re: Replacement for Common Lisp's GENSYM in Emacs Lisp
Date: Sun, 07 Mar 2010 08:13:27 +0200 [thread overview]
Message-ID: <87r5nw64mw.fsf@mithlond.arda> (raw)
In-Reply-To: <20100307054835.GB13731@tomas> (tomas@tuxteam.de's message of "Sun, 7 Mar 2010 06:48:35 +0100")
* 2010-03-07 06:48 (+0100), tomas@tuxteam.de wrote:
> On Sat, Mar 06, 2010 at 05:19:43PM +0200, Teemu Likonen wrote:
>> In Common Lisp GENSYM function generates unique symbol names. It
>> seems that Emacs Lisp does not have similar function (unless with CL
>> extension). In plain Emacs Lisp code and macros, what would you
>> suggest as a replacement for GENSYM? Just some very unlikely names?
>
> It seems `make-symbol' is what you are looking for. It generates an
> uninterned symbol. Cf. Emacs Lisp manual "13.6.3 Local Variables in
> Macro Expansions" to find an usage example.
That's right. My question was rather stupid, or at least asked too
hastily. It was in my mental patterns that I need GENSYM to create
symbols for macros. So I immediately thought I need to write a GENSYM
replacement for Emacs Lisp. But as you and David pointed out, the point
wasn't really unique print names but uninterned symbols. So make-symbol
is often sufficient. Thanks.
next prev parent reply other threads:[~2010-03-07 6:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 15:19 Replacement for Common Lisp's GENSYM in Emacs Lisp Teemu Likonen
2010-03-07 5:48 ` tomas
2010-03-07 6:13 ` Teemu Likonen [this message]
[not found] ` <mailman.2390.1267942438.14305.help-gnu-emacs@gnu.org>
2010-03-11 22:48 ` Pascal J. Bourguignon
[not found] <mailman.2359.1267888813.14305.help-gnu-emacs@gnu.org>
2010-03-06 16:10 ` David Kastrup
2010-03-06 16:35 ` Teemu Likonen
2010-03-07 7:07 ` Tim X
2010-03-07 19:06 ` Stefan Monnier
2010-03-07 22:07 ` Helmut Eller
2010-03-08 4:55 ` Stefan Monnier
2010-03-08 7:01 ` Helmut Eller
2010-03-09 2:33 ` Stefan Monnier
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=87r5nw64mw.fsf@mithlond.arda \
--to=tlikonen@iki.fi \
--cc=help-gnu-emacs@gnu.org \
--cc=tomas@tuxteam.de \
/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.