[Top][All Lists]

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

RE: Change of Lisp syntax for "fancy" quotes in Emacs 27?

From: Drew Adams
Subject: RE: Change of Lisp syntax for "fancy" quotes in Emacs 27?
Date: Sat, 3 Feb 2018 18:05:42 -0800 (PST)

> I was surprised to learn that this is the case, in light of what is
> said in the Elisp reference about symbol names:
> “A symbol name can
> contain any characters whatever. Most symbol names are written with
> letters, digits, and the punctuation characters ‘-+=*/’. Such names
> require no special punctuation; the characters of the name suffice as
> long as the name does not look like a number. (If it does, write a ‘\’
> at the beginning of the name to force interpretation as a symbol.) The
> characters address@hidden&:<>{}?’  are less often used but also require no
> special punctuation. Any other characters may be included in a symbol's
> name by escaping them with a backslash.”  (info "(elisp) Symbol Type")

Thank you very much for that.  I guess I wasn't aware of
that text.  I thought that there were only a very few
chars that needed to be escaped in symbol names - `,',
`(', etc.: only chars that have special syntactic
meaning in Lisp.

I suppose that invalidates my objection, though I wonder
_why_ we would require escaping so many ordinary chars.

And like you I wonder whether that text is accurate.
I wonder whether that is the intended design (why?) or it
is just an inaccurate description of the real behavior.

Trying various chars from confusables.txt, it does not
seem like they require escaping (at least not yet).
That text appears to be wrong.

I'd prefer it if escaping was _not_ required for chars
other than those mentioned in that text, including
chars in confusables.txt.  I think it makes more sense
to require escaping only for characters that have
special Lisp significance, syntactically.

IOW, I prefer the actual behavior to the behavior
described in that text.  I don't think someone using
Hebrew or Arabic or Chinese or Korean letters in a
symbol name should need to escape each one (or any
of them).

But if the design described there has already been
decided on then as best for Emacs then I guess my
argument is moot.  In that case, the implementation
is currently waaaaaay out of whack wrt the design.

And if that's the design to be implemented then I
agree with you that implementing it as described
in that text would at least have an advantage of

> Would it be worth considering making the reader enforce this fully
> specification, as an alternative to your patch?  That would solve
> this problem with curly quotes in symbol names (which also bit me at
> one point), as well as the potential problems with other confusable
> characters raised by Paul.
> (It might still be desirable to add a special user-friendly error
> message when the illegal characters are confusable with an ASCII
> single quote, as an additional user-friendliness measure.)
> if this approach is not taken, the manual should at least
> be changed to match the actual behavior of the reader.

That's the approach I'd prefer.  Let chars be used in
symbol names without escaping, except for those with
special Lisp syntax.

But add warnings in contexts where we think someone
might have inadvertently used a confusable in place
of a common character.

reply via email to

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