GNU bug report logs - #38598
26.3; Document relation between `make-symbol` and `gensym`

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 13 Dec 2019 20:38:02 UTC

Severity: normal

Found in version 26.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38598 in the body.
You can then email your comments to 38598 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38598; Package emacs. (Fri, 13 Dec 2019 20:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 13 Dec 2019 20:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; Document relation between `make-symbol` and `gensym`
Date: Fri, 13 Dec 2019 12:35:13 -0800 (PST)
(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''




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 14 Dec 2019 09:31:01 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Sat, 14 Dec 2019 09:31:02 GMT) Full text and rfc822 format available.

Message #10 received at 38598-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 38598-done <at> debbugs.gnu.org
Subject: Re: bug#38598: 26.3;
 Document relation between `make-symbol` and `gensym`
Date: Sat, 14 Dec 2019 11:30:00 +0200
> Date: Fri, 13 Dec 2019 12:35:13 -0800 (PST)
> From: Drew Adams <drew.adams <at> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Jan 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.