emacs-devel
[Top][All Lists]
Advanced

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

Re: Upcoming loss of usability of Emacs source files and Emacs.


From: Paul Eggert
Subject: Re: Upcoming loss of usability of Emacs source files and Emacs.
Date: Tue, 30 Jun 2015 08:54:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Dmitry Gutov wrote:
However, if we change \= to \ as the quoting method in substitute-command-keys
as well, that will be less of a problem. Backward compatibility might be, but
I've seen no evidence thus far, of \= being used anywhere outside of Emacs core.

The problem with using \\ to quote in docstring sources is not that \\= is rarely used; it's that \\X is reasonably commonly used for lots of different values of X, and it's expected that \\X normally displays as \X. If we decide to change the meaning of \\` and \\' (but not of \\ followed by other chars), then we'll have to change maybe 20 docstrings in the Emacs source code, and a few similar changes will no doubt be needed in 3rd-party packages. This is why the current master uses \\= to quote quotes (as \\= has always worked so this is compatible with older Emacs). And it's partly why I originally objected to \\` and \\'.

That being said, Stefan is right that \\` and \\' are shorter than \\=` and \\=' and in that sense are nicer.

A couple more downsides of \\` should be mentioned, though, before making this not-quite-compatible change.


First, \` and \' already have a special meaning in docstring sources (unrelated to this issue) and it will be confusing for people to read docstring source code like this:

"LISTIFIED is a list representing each topic header and body:

 \`(depth prefix text)'

or \`(depth prefix text bullet-plus)'"

if people know that backslash before grave accent means a grave accent, as in the above examples \` would still mean left quote, not grave accent.


Second and more important, here's an example of a docstring that would need to be changed:

"Face for characters displayed as sequences using `^' or `\\'."

Presumably this would be changed to:

"Face for characters displayed as sequences using `^' or `\\\\'."

But this would mean that we need to change the meaning of \\\\ in docstring sources too, and that's a bigger deal and would affect more than 20 or so docstrings. For example, we'd need to change this docstring source:

"REGEXP must contain at least one parenthesized subexpression, typically
whitespace of the form \"\\\\(\\\\s-*\\\\)\"."

to this:

"REGEXP must contain at least one parenthesized subexpression, typically
whitespace of the form \"\\\\\\\\(\\\\\\\\s-*\\\\\\\\)\"."

I'm not sure this is a good idea.




reply via email to

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