|
From: | Paul Eggert |
Subject: | bug#20385: [PATCH] Support curved quotes in doc strings |
Date: | Thu, 21 May 2015 07:58:57 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
Dmitry Gutov wrote:
I'd make it a new function (the name doesn't fit), and pass the docstring contents through it, before giving them to substitute-command-keys.
I originally wrote it that way, but it was harder for me to read. (Also slower, though that doesn't matter these days.) I couldn't find anybody that would want to call one function but not the other. Plus, having them be separate functions introduces more opportunity for error, e.g., it wouldn't be correct to call the new function after calling substitute-command-keys. So I figured we might as well leave them combined.
How about if we rename substitute-command-keys to describe it better? substitute-doc-string, perhaps?
And if you write it in Lisp, you could incorporate the special handling of quasiquotes relatively easily.
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. (I even defended some of those heuristics in previous emails -- sorry!) Doing it in C forced me to come up with something really simple and easy to explain. I'd rather keep the simple rules now, even if we go back to Lisp (but why bother?).
[Prev in Thread] | Current Thread | [Next in Thread] |