unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Info-mode-font-lock-keywords: Fix-regexp
Date: Mon, 01 Jun 2015 00:27:57 -0400	[thread overview]
Message-ID: <jwvy4k4oyfp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <556A8A1F.4040303@gmail.com> (Vaidheeswaran C.'s message of "Sun,  31 May 2015 09:42:15 +0530")

>>> > -  '(("€˜\\([^€™]*\\)€™" (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.


        Stefan



  reply	other threads:[~2015-06-01  4:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  6:57 [PATCH] Info-mode-font-lock-keywords: Fix-regexp Vaidheeswaran C
2015-05-26 17:08 ` Stefan Monnier
2015-05-31  4:12   ` Vaidheeswaran C
2015-06-01  4:27     ` Stefan Monnier [this message]
2015-06-01  7:28       ` Vaidheeswaran C
2015-05-31  4:21   ` Vaidheeswaran C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy4k4oyfp.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=vaidheeswaran.chinnaraju@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).