* bug#38598: 26.3; Document relation between `make-symbol` and `gensym`
@ 2019-12-13 20:35 Drew Adams
2019-12-14 9:30 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2019-12-13 20:35 UTC (permalink / raw)
To: 38598
(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. The Common-Lisp doc does this simply, with a
single parenthetical sentence:
(The only difference between gensym and make-symbol is in how the
new-symbol's name is determined.)
http://clhs.lisp.se/Body/f_gensym.htm
In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.17763
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#38598: 26.3; Document relation between `make-symbol` and `gensym`
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
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2019-12-14 9:30 UTC (permalink / raw)
To: Drew Adams; +Cc: 38598-done
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-14 9:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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).