[Top][All Lists]

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

Re: [PATCH] Info-mode-font-lock-keywords: Fix-regexp

From: Stefan Monnier
Subject: Re: [PATCH] Info-mode-font-lock-keywords: Fix-regexp
Date: Mon, 01 Jun 2015 00:27:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>>> > -  '(("€˜\\([^€™]*\\)€™" (1 'Info-quoted))))
>>> > +  '(("`\\([^€™]*\\)€™" (1 'Info-quoted))))
>>> > Fontification happens fine with the attached change.
>> What exactly do you mean by that?  Which problem is that supposed
>> to fix?
> It is a feature.
> With this change, commands, variables and keystrokes in the Emacs
> Manual get highlighted.

I'm having trouble reading your patch because of mis-encoding issues,
but `...' is the quoting used with Texinfo-4, whereas Texinfo uses the
curly quotes.  The current code recognizes the curly quotes because that
can be done much more reliably, whereas trying to highlight `...' is
fraught with too many risks of either false positives or false negatives.

While Texinfo 5's performance sucks rocks, the curly quotes output is
The Right Way, in my opinion, so I don't think it's terribly important
to highlight the old-style quotes: if you like this highlighting, then
use Texinfo-5.

> PS:   Mixing "courier" fonts with the default font seems
> is...Uhh (atleast to my eyes)

Using font-lock-function-name-face would be a mistake since those quoted
elements aren't function names (in general).  So Info-quoted is the
right face to use.  Of course maybe this face's default isn't perfect,
but we've discussed changing it already and didn't make much progress.
FWIW, the face's default was chosen to mimick the LaTeX "verbatim
environment" output, which I think makes a lot of sense for
"quoted" text.  Of course, it depends on taste, on the set of fonts you
have installed, and on your choice of default font.  If this default
looks particularly bad in your case, report it as a bug.  Sometimes the
problem is that "courier" does not map to any font, so if you have
a good (and non-proprietary) font to recommend instead, we could add it
to face-font-family-alternatives.


reply via email to

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