unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Xu Chunyang <mail@xuchunyang.me>
Cc: 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: Sun, 24 Mar 2019 16:16:02 +0100	[thread overview]
Message-ID: <87sgvcxpzh.fsf@web.de> (raw)
In-Reply-To: <m2zhpkxskz.fsf@xuchunyang.me> (Xu Chunyang's message of "Sun, 24 Mar 2019 22:19:56 +0800")

Xu Chunyang <mail@xuchunyang.me> writes:

> For example,
>
> (let ((.foo 42))
>   (list .foo))
> ;; => (42)
>
> (let ((.foo 42))
>   `(,.foo))
> ;; => ((\,\. foo))
>
> I expect both of them returns (42). is it a bug?

AFAIU ,. is a reader macro:

(car (read ",.foo"))

  ==> \,\.

I dunno or have forgotten for what it had been intended, there are no
real uses in the Emacs Elisp sources.

> (let ((.foo 42))
>   `(,.foo))

You would have to write it differently, e.g.

(let ((.foo 42))
  `((\, .foo)))

  ==> (42)


Michael.





  reply	other threads:[~2019-03-24 15:16 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 [this message]
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
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=87sgvcxpzh.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=34975@debbugs.gnu.org \
    --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).