[Top][All Lists]

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

bug#20385: [PATCH] Support curved quotes in doc strings

From: Dmitry Gutov
Subject: bug#20385: [PATCH] Support curved quotes in doc strings
Date: Fri, 22 May 2015 06:41:01 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

On 05/21/2015 05:58 PM, Paul Eggert wrote:

I originally wrote it that way, but it was harder for me to read.

Two functions each doing less work is harder to read than one?

(Also slower, though that doesn't matter these days.)

Still matters, but for larger inputs. Calling the quote substitution function before the keymaps-and-keys one should be fast enough, though.

How about if we rename substitute-command-keys to describe it better?
substitute-doc-string, perhaps?

format-doc-string? Anyway, a rename with an obsolete-alias should work, too.

Yes, I originally wrote it in Lisp too, but found that it was too
tempting to implement complicated heuristics that would have been a pain
to document.

It's up to you. I think the handling of quasiquotes isn't hard to explain in writing, but in the end those snippets of code would be better surrounded with quotes after rendering, and then the quasiquote would simply need to be escaped.

I'd rather keep the simple rules
now, even if we go back to Lisp (but why bother?).

Having an Elisp implementation might be helpful if we want to apply a similar transformation via font-lock rules in the source buffers (I believe you expressed that interest). There will be some difference due to escaping, but some part might be reusable.

reply via email to

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