all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alin Soare <as1789@gmail.com>
To: Emacs Dev <emacs-devel@gnu.org>
Subject: Generating an unique symbol in elisp
Date: Fri, 3 Dec 2010 23:19:41 +0200	[thread overview]
Message-ID: <AANLkTin43EwQ6_nD6-aZOxfez+--7s1QAN=dTvGa3hPe@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2010-12-03 21:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03 21:19 Alin Soare [this message]
2010-12-03 21:30 ` Generating an unique symbol in elisp 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

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='AANLkTin43EwQ6_nD6-aZOxfez+--7s1QAN=dTvGa3hPe@mail.gmail.com' \
    --to=as1789@gmail.com \
    --cc=emacs-devel@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.