unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Generating an unique symbol in elisp
@ 2010-12-03 21:19 Alin Soare
  2010-12-03 21:30 ` Edward O'Connor
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Alin Soare @ 2010-12-03 21:19 UTC (permalink / raw)
  To: Emacs Dev

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

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
*
*

[-- Attachment #2: Type: text/html, Size: 620 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-12-03 22:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03 21:19 Generating an unique symbol in elisp Alin Soare
2010-12-03 21:30 ` Edward O'Connor
2010-12-03 21:33   ` Alin Soare
2010-12-03 22:03     ` Edward O'Connor
2010-12-03 22:12       ` Alin Soare
2010-12-03 22:23         ` Drew Adams
2010-12-03 22:38           ` Alin Soare
2010-12-03 22:46         ` Stefan Monnier
2010-12-03 21:41 ` Andreas Schwab
2010-12-03 21:44   ` Alin Soare
2010-12-03 22:34 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).