GNU bug report logs - #20385
Support curved quotes in doc strings

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Mon, 20 Apr 2015 18:40:04 UTC

Severity: wishlist

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Paul Eggert <eggert <at> cs.ucla.edu>, 20385 <at> debbugs.gnu.org
Subject: bug#20385: [PATCH] Support curved quotes in doc strings
Date: Fri, 22 May 2015 06:41:01 +0300
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.




This bug report was last modified 9 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.