From: Michael Heerdegen <michael_heerdegen@web.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: Xu Chunyang <mail@xuchunyang.me>, 34975@debbugs.gnu.org
Subject: bug#34975: 26.1.92; In backquote, the comma marker does not work with variable name started with dot
Date: Tue, 26 Mar 2019 01:03:54 +0100 [thread overview]
Message-ID: <87wokmh579.fsf@web.de> (raw)
In-Reply-To: <fe98d13b-1fbf-4f90-b262-98331db03d9b@default> (Drew Adams's message of "Mon, 25 Mar 2019 07:21:11 -0700 (PDT)")
Drew Adams <drew.adams@oracle.com> writes:
> What it does in Emacs Lisp is _completely_ wrong, IMO.
>
> (setq c 42) ; c = 42
> (setq a `(b ,. c)) ; a = (b (\,\. c))
Well, apart from the reader macro part, is has just never been
implemented.
I would already be happier if the current semantics of backquote would
be specified clearer in the docs: What happens with unquoted lists?
E.g.
(macroexpand '`(1 ,@x 3 ,@y))
==>
(cons 1
(append x
'(3)
y))
X is copied when evalling that, so the list stored in X is not modified
(good). OTOH Y is not copied. It's not necessary to copy the list
stored in Y to compute the value of the backquote expression without
modifying Y, so that's also ok.
But if you destructively modify the result of the backquote expression,
you may also change Y destructively (but not X). Things like these
might be clear if you come from Common Lisp, but it's all not obvious
IMHO.
Michael.
next prev parent reply other threads:[~2019-03-26 0:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-24 14:19 bug#34975: 26.1.92; In backquote, the comma marker does not work with variable name started with dot Xu Chunyang
2019-03-24 15:16 ` Michael Heerdegen
2019-03-25 0:06 ` Drew Adams
2019-03-25 1:33 ` Michael Heerdegen
2019-03-25 14:21 ` Drew Adams
2019-03-26 0:03 ` Michael Heerdegen [this message]
2019-03-26 9:49 ` Andreas Schwab
2019-03-27 1:50 ` Michael Heerdegen
2019-04-04 3:31 ` Noam Postavsky
2019-04-04 13:10 ` Eli Zaretskii
2019-04-04 13:25 ` Noam Postavsky
2019-04-04 22:28 ` Basil L. Contovounesios
2019-04-04 23:37 ` Noam Postavsky
2019-04-05 1:15 ` Basil L. Contovounesios
2019-04-05 6:21 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wokmh579.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=34975@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
--cc=mail@xuchunyang.me \
/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 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).