emacs-devel
[Top][All Lists]
Advanced

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

Re: Escaping quotes in docstrings, Was: A simple solution to "Upcoming l


From: Paul Eggert
Subject: Re: Escaping quotes in docstrings, Was: A simple solution to "Upcoming loss of usability ..."
Date: Tue, 07 Jul 2015 00:54:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Dmitry Gutov wrote:

That doesn't sound right to me. `key-description' should continue returning a
plain string.

Perhaps you're right, I haven't looked into key-description carefully enough. I gave it only as an example of the sorts of problems we'd run into.

since when do button labels have quotes in them?

In customization buffers.

In contrast, it's much easier to look through the code for ` inside a
string, and mark the exceptional characters that are intended to be
quotes and that are not automatically translated already.

Sorry, I don't understand this either. Mark? Automatically translated?

I meant that although normally doc strings are translated and one can quote with either grave accent and apostrophe or curved quotation marks and they will be translated automatically to the user preferred style, occasionally one wants an actual grave accent or curved quotation mark to be output as-is regardless of user preference and these exceptional cases need to be marked in the doc strings.

That would be closer, but the current master implements more in C, which means
fewer people who can change or maintain the code. And it complicates the API of
a low-level function (substitute-command-keys), in a way that seems incompatible
with radically changing the output later.

We can't anticipate radical changes that future maintainers might want to do. Worrying about that is likely to lead to overengineering and wasted effort. We'll have enough trouble just solving today's problems.

As for whether the implementation should be in C -- some parts have to be used by C, since C code generates quoted strings on occasion. How much should be in C vs Lisp is an implementation detail that is no big deal.



reply via email to

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