4

I found this when playing at *ielm*:

ELISP> `(emacs-version \, emacs-version)
(emacs-version . "28.2")

ELISP> `(emacs-version . ,emacs-version)
(emacs-version . "28.2")

ELISP> 

I have never heard of this usage of \,, is it a feature or bug?


OP reported this as Emacs bug #61281.

shynur
  • 4,065
  • 1
  • 3
  • 23

1 Answers1

1

It looks like a bug to me. It's certainly not documented, as far as I can tell. And I haven't seen it in other Lisps.

And I see the same behavior back through Emacs 20! That's a long way back.

If you don't get a contrary opinion with an explanation then consider doing M-x report-emacs-bug. Emacs developers will tell you whether it's a bug.


I'd actually expect the behavior of \, within a backquoted list to just insert the symbol ,. In other words, I'd expect `(a \, 42) to return this list of three elements: (a \, 42).


The code in backquote.el that causes this is this bit of the definition of function backquote-process: (eq (car s) backquote-unquote-symbol), where backquote-unquote-symbol is the symbol \,.

Drew
  • 75,699
  • 9
  • 109
  • 225