From: Stefan Monnier <monnier@iro.umontreal.ca>
To: David Ponce <david@dponce.com>
Cc: emacs-devel@gnu.org
Subject: Old-style backquote and ,@ in *.by files
Date: Mon, 09 Oct 2017 20:41:41 -0400 [thread overview]
Message-ID: <jwv376ram8r.fsf-monnier+emacs@gnu.org> (raw)
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
reply other threads:[~2017-10-10 0:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv376ram8r.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=david@dponce.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.