[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: Paul Eggert
Subject: Re: Change of Lisp syntax for "fancy" quotes in Emacs 27?
Date: Sat, 3 Feb 2018 20:51:06 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Aaron Ecay wrote:
I was surprised to learn that this is the case, in light of what is
said in the Elisp reference about symbol names

Good point; thanks. In the spirit of "be strict about what you generate", the Emacs printer should escape any character that is not in the list of characters documented in the Elisp manual as being safe (i.e., as not requiring escaping). This is elementary future-proofing, and is independent of whether we want Emacs to warn about or disallow confusable chars in symbols.

Proposed patches against 'master' attached. The first merely simplifes the code without changing its effect. The second fixes a bug in the manual, which incorrectly states that '?' never needs escaping in symbol names. These two patches are routine. (I assume the second one should be applied to emacs26 instead of to master.)

The third patch changes the Lisp printer to escape characters as suggested 

The fourth patch changes the Lisp printer to escape '?' only at the start of a symbol. This is nicer for programs using Scheme-style naming conventions in Emacs Lisp, e.g., 'fooish?' rather than 'fooishp'. I discovered the need for this patch when I wrote the second patch.

Attachment: 0001-Simplify-print_object-a-bit.patch
Description: Text Data

Attachment: 0002-Say-needs-escaping-at-start-of-symbol.patch
Description: Text Data

Attachment: 0003-prin1-etc.-now-escape-more-chars-in-symbols.patch
Description: Text Data

Attachment: 0004-Escape-only-at-start-of-symbol.patch
Description: Text Data

reply via email to

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