bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61281: “`(a \, b)” equals to “`(a . , b)”


From: Michael Heerdegen
Subject: bug#61281: “`(a \, b)” equals to “`(a . , b)”
Date: Mon, 06 Feb 2023 01:13:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Jim Porter <jporterbugs@gmail.com> writes:

> What about emitting a warning? That shouldn't break anything, and it
> might catch some bugs. (I'm not sure if a warning is easy to add for
> this though...)

You mean the reader should emit a warning?  Note that at least
expressions printed by Emacs itself might be printed like this, e.g.

  (nth 1 '`(a . ,b)) ==> (a \, b)

so you would get warnings for automatically generated code.

OTOH, is it that likely that people write something like the above by
accident?  If the symbol "," (with read syntax "\,") appears outside
backquote or pcase patterns at a place where it is funcalled or
referenced as a variable you already get a compiler warning.  And are we
sure that nobody ever wants to use that syntax by purpose?


BTW, if you are working with backquote expressions a lot you are seeing
such commas in apparently "normal" (undotted) lists regularly (because
the printer seems to prefer that syntax over using a dotted list, like
in the above example).  It surprises you only once or twice.


Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]