all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why is ,. (comma-dot) treated specially?
@ 2015-01-21 23:58 Artur Malabarba
  2015-01-22 13:54 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Artur Malabarba @ 2015-01-21 23:58 UTC (permalink / raw)
  To: emacs-devel

I ran into a problem the other day where writing
    `(message ,.some-var)
unexpectedly split the .some-var symbol without evaluating anything:
    (message (\,\. some-var))

Meanwhile, adding a space after the comma:
    `(message , .some-var)
yielded the expected result:
    (message [value of .some-var])

Upon inspecting `lread.c', I see that indeed ",." is treated specially
(look for references to Qcomma_dot), similarly to how ",@" is special.
On the other hand, I can find no mention of this "comma-dot" anywhere
inside backquote.el.

Is this a feature that was planned but is not yet finished? Why is the
dot handled specially after a comma if we don't do anything with it?



Cheers



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why is ,. (comma-dot) treated specially?
  2015-01-21 23:58 Why is ,. (comma-dot) treated specially? Artur Malabarba
@ 2015-01-22 13:54 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2015-01-22 13:54 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: emacs-devel

> Is this a feature that was planned but is not yet finished? Why is the
> dot handled specially after a comma if we don't do anything with it?

Using special characters (like dot) in symbols is risky.  Always has
been always will be.

> I ran into a problem the other day where writing
>     `(message ,.some-var)
> unexpectedly split the .some-var symbol without evaluating anything:
>     (message (\,\. some-var))

I'm not surprised it doesn't do what you expected, but I'm admittedly
surprised of the actual behavior.  In any case, this looks like
a plain bug.


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-22 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-21 23:58 Why is ,. (comma-dot) treated specially? Artur Malabarba
2015-01-22 13:54 ` Stefan Monnier

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.