GNU bug report logs - #39221
Elisp nil is not a symbol in Elisp

Previous Next

Package: guile;

Reported by: John Cowan <cowan <at> ccil.org>

Date: Tue, 21 Jan 2020 17:53:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 39221 AT debbugs.gnu.org.

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-guile <at> gnu.org:
bug#39221; Package guile. (Tue, 21 Jan 2020 17:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Cowan <cowan <at> ccil.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Tue, 21 Jan 2020 17:53:02 GMT) Full text and rfc822 format available.

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

From: John Cowan <cowan <at> ccil.org>
To: bug-guile <at> gnu.org
Subject: Elisp nil is not a symbol in Elisp
Date: Tue, 21 Jan 2020 12:52:30 -0500
[Message part 1 (text/plain, inline)]
Elisp symbolp does not think nil is a symbol, which it is in Emacs Elisp.
Fixing this should not affect Scheme's symbol? predicate.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#39221; Package guile. (Thu, 13 May 2021 10:23:02 GMT) Full text and rfc822 format available.

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

From: Taylan Kammer <taylan.kammer <at> gmail.com>
To: 39221 <at> debbugs.gnu.org
Cc: John Cowan <cowan <at> ccil.org>
Subject: Elisp nil is not a symbol in Elisp
Date: Thu, 13 May 2021 12:22:37 +0200
[Message part 1 (text/plain, inline)]
Interesting issue.  Was also not fixed in bipt's wip-elisp branch.

Attached is a patch that attempts to fix this, and some related
issues, both for nil and for t.

The strategy is:

1. All Elisp functions we implement in terms of Scheme must be written
   to special-handle #nil and #t if they accept symbols as arguments.
   (Examples: symbolp, symbol-name, set, makunbound)

2. The Elisp function 'intern' must special-handle "nil" and "t".

This patch, to realize nr. 1, turns #nil and #t into the Scheme
symbols 'nil and 't internally in some situations, but makes sure
not to return those symbols, which are of course not equivalent to 
the #nil and #t values.

The Elisp reader already turns nil and t into #nil and #t, but we
should probably also write a custom Elisp writer that writes them
back as nil and t.  I see you have a separate bug report open for
that issue (https://bugs.gnu.org/39220) and I think we can keep the
two issues separate so no attempt to touch on that in this patch.


- Taylan
[0001-In-elisp-nil-and-t-are-symbols.patch (text/plain, attachment)]

Added tag(s) patch. Request was from Taylan Kammer <taylan.kammer <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 15 May 2021 17:48:01 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 356 days ago.

Previous Next


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