[Top][All Lists]

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

Re: Replacement for Common Lisp's GENSYM in Emacs Lisp

From: Teemu Likonen
Subject: Re: Replacement for Common Lisp's GENSYM in Emacs Lisp
Date: Sun, 07 Mar 2010 08:13:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux)

* 2010-03-07 06:48 (+0100), address@hidden 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.

reply via email to

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