emacs-devel
[Top][All Lists]
Advanced

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

Generating an unique symbol in elisp


From: Alin Soare
Subject: Generating an unique symbol in elisp
Date: Fri, 3 Dec 2010 23:19:41 +0200

A very useful function for generating private environments is the (gensym&optional x) in common lisp. It can replace in some places the closures.


In Clisp it is defined in C something like this:

char*
gensym (char *x)
{
 static int x;
 char a[100];
 snprintf(a, 100, "%s%d", x? x:"G",  x++);
 return strdup (a);
}

Does this function already exist in elisp ? I looked in the manual and did not find it...


Alin


---

Wenn ich 'Kultur' höre, nehme ich meine Pistole
Hermann Göring


reply via email to

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