* Old-style backquote and ,@ in *.by files
@ 2017-10-10 0:41 Stefan Monnier
0 siblings, 0 replies; only message in thread
From: Stefan Monnier @ 2017-10-10 0:41 UTC (permalink / raw)
To: David Ponce; +Cc: emacs-devel
Hi,
We're in the process of getting rid of support for old-style backquote
(of the form (` e) and (, e)) and we bumped into the following situation
(which triggered some signal on our side):
In admin/grammars/make.by (and other grammar files) we find things like:
Makefile : bol newline (nil)
| bol variable
( ,@$2 )
as well as
targets: target opt-whitespace targets
( (car ,$1) (car ,@$3) )
But in Emacs-25, the above "(car ,@$3)" was read assuming the ,@ is
a new-style unquote, i.e. it's read as "(car (\,@ $3))", whereas the
earlier "( ,@$2 )" was read as "(\,@$2)", i.e. as a single list
containing a funny symbol named ",@$2".
I think this was a bug, which would be fixed by dropping support for
old-style backquotes, so that "( ,@$2 )" would now be read as "((\,@
$2))".
But I'm not sufficiently familiar with the bovine code to be sure
(especially since misinterpreting "( ,@$2 )" as "(\,@$2)" would likely
have been noticed, so either it's really what was intended, or else
there's presumably somewhere some hack that tries to work around this
quirk). In bovine-grammar-expand-form, I see:
(when (and (>= emacs-major-version 24)
(listp first)
(or (equal (car first) '\,)
(equal (car first) '\,@)))
(if (listp (cadr first))
(setq form (append (cdr first) form)
first (car first))
(setq first (intern (concat (symbol-name (car first))
(symbol-name (cadr first)))))))
which makes me think that maybe "(\,@$2)" is indeed what was intended,
and this code is designed to turn "(car (\,@ $3))" into "(car \,@$3)",
so that both ways to read work (the new-style reading is transformed
into the old-style reading).
Could you shine some light for us?
Stefan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-10 0:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-10 0:41 Old-style backquote and ,@ in *.by files Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.