From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 38598-done@debbugs.gnu.org
Subject: bug#38598: 26.3; Document relation between `make-symbol` and `gensym`
Date: Sat, 14 Dec 2019 11:30:00 +0200 [thread overview]
Message-ID: <83blsb6yqv.fsf@gnu.org> (raw)
In-Reply-To: <c31206cd-2b80-427f-8f23-1032e8ab2f36@default> (message from Drew Adams on Fri, 13 Dec 2019 12:35:13 -0800 (PST))
> Date: Fri, 13 Dec 2019 12:35:13 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
>
> (See https://emacs.stackexchange.com/a/54361/105.)
>
> The Common-Lisp doc is clear about the similarity and difference between
> `make-symbol` and `gensym`. The Emacs-Lisp doc says nothing about this.
>
> Please consider mentioning this in (elisp) `Creating Symbols'. Such
> info can help users better understand when they might want to use one or
> the other of these functions.
>
> Yes, this info can be gleaned by carefully reading their individual
> descriptions (how the symbol-naming is done). But it would help users
> to state it clearly.
Thanks, but I find the current documentation clear enough:
-- Function: make-symbol name
This function returns a newly-allocated, uninterned symbol whose
name is NAME (which must be a string). Its value and function
definition are void, and its property list is ‘nil’. In the
example below, the value of ‘sym’ is not ‘eq’ to ‘foo’ because it
is a distinct uninterned symbol whose name is also ‘foo’.
(setq sym (make-symbol "foo"))
⇒ foo
(eq sym 'foo)
⇒ nil
-- Function: gensym &optional prefix
This function returns a symbol using ‘make-symbol’, whose name is
made by appending ‘gensym-counter’ to PREFIX. The prefix defaults
to ‘"g"’.
I see nothing that could be gained by adding any explicit sentence
about the difference, since that would simply be a rewording of what
is already said right there.
So I'm closing this bug report.
prev parent reply other threads:[~2019-12-14 9:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 20:35 bug#38598: 26.3; Document relation between `make-symbol` and `gensym` Drew Adams
2019-12-14 9:30 ` Eli Zaretskii [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83blsb6yqv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=38598-done@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/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 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).