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

Full log


View this message in rfc822 format

From: Taylan Kammer <taylan.kammer <at> gmail.com>
To: 39221 <at> debbugs.gnu.org
Cc: John Cowan <cowan <at> ccil.org>
Subject: bug#39221: 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)]

This bug report was last modified 4 years and 31 days ago.

Previous Next


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