GNU bug report logs -
#20385
Support curved quotes in doc strings
Previous Next
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
On 05/20/2015 02:27 AM, Paul Eggert wrote:
> OK, I tried that, but it didn't work for me. The attached patch works
> much of the time, but it causes annoying glitches on the screen (for an
> example see attached, created by "emacs -Q" and 'C-h b'; note the red
> color glitch after the double-quote).
That's how a string is highlighted. :) You can press C-u C-x = to see
which face is used there.
So apparently, font-lock-add-keywords turns on font-lock-mode, and since
it's never set up in help-mode otherwise, syntactic fontification is
used (and " is a string delimiter in the standard syntax table). Adding
this (t is the key) before the call resolves that:
(setq font-lock-defaults '(nil t))
But in a major mode, I think you're expected to apply all font-lock
settings via setting font-lock-defaults, not by using
font-lock-add-keywords (the format of keywords is the same).
> Even if I ignore the glitches, I found it disconcerting that the "wrong"
> characters were used to display text characters (or, from another point
> of view, that the buffer's contents were "wrong" compared to what was on
> the screen).
That shouldn't matter much in a read-only buffer...
> So I'm inclined to do something less tricky, e.g., simply
> replace characters in the *Help* buffer before displaying the buffer. I
> plan to look into that next.
...but indeed, this approach could be the simpler one.
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.