unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62020: Lisp reader: dotted pair notation not working when initial elements are omitted
@ 2023-03-07  1:14 Federico Tedin
  2023-03-07 12:53 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Federico Tedin @ 2023-03-07  1:14 UTC (permalink / raw)
  To: 62020

According to the Elisp docs
(https://www.gnu.org/software/emacs/manual/html_node/elisp/Dotted-Pair-Notation.html),
one should be able to evaluate e.g.:
    (. 1)
to:
    1

This works correctly in Emacs 28.1 However, in the emacs-29 branch
(bd07cec) this results in:
    *** Read error ***  Invalid read syntax: "."

Since the description in the docs are the same in the emacs-29 I
assume this is a bug.
I believe this may have been caused by the changes implementing the
nonrecursive Lisp reader.
I believe the fix would be roughly:
- in read0 (lread.c), when handling c == '.', ensure we handle not
only the case where the top of the read stack is RE_list but *also*
RE_list_start.
- if the top of the stack was effectively RE_list_start, then the top
of the stack needs to be manipulated somehow so that at the end of
read0 the correct value is returned, when emptying the stack.





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-03-12 20:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07  1:14 bug#62020: Lisp reader: dotted pair notation not working when initial elements are omitted Federico Tedin
2023-03-07 12:53 ` Eli Zaretskii
2023-03-07 13:31   ` Mattias Engdegård
2023-03-07 17:24     ` Federico Tedin
2023-03-08 10:37       ` Mattias Engdegård
2023-03-08 14:01         ` Eli Zaretskii
2023-03-10 10:11           ` Mattias Engdegård
2023-03-10 11:55             ` Eli Zaretskii
2023-03-11  9:32               ` Mattias Engdegård
2023-03-11 12:19                 ` Eli Zaretskii
2023-03-12 17:10                   ` Mattias Engdegård
2023-03-12 20:35                     ` Federico Tedin

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).