From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Info-mode-font-lock-keywords: Fix-regexp Date: Mon, 01 Jun 2015 00:27:57 -0400 Message-ID: References: <556A8A1F.4040303@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1433132908 14712 80.91.229.3 (1 Jun 2015 04:28:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 04:28:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vaidheeswaran C Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 01 06:28:19 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YzHKl-0005dG-FG for ged-emacs-devel@m.gmane.org; Mon, 01 Jun 2015 06:28:19 +0200 Original-Received: from localhost ([::1]:44106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzHKk-0005ZV-A1 for ged-emacs-devel@m.gmane.org; Mon, 01 Jun 2015 00:28:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzHKY-0005ZQ-T5 for emacs-devel@gnu.org; Mon, 01 Jun 2015 00:28:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzHKQ-0008AE-Sr for emacs-devel@gnu.org; Mon, 01 Jun 2015 00:28:04 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:37251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzHKQ-0008A6-P4 for emacs-devel@gnu.org; Mon, 01 Jun 2015 00:27:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A5FgA731xV/3K9xEVcgxCEAk6FB7tAh0sEAgKBPDsSAQEBAQEBAYEKQQWDXQEBAwEjMyMFCwkCGgIYDgICFBgNJIg3CI18nRCkFwEBCAIBH4EhihmEUjMHgmiBRQEEi0STU5IUghSBRSNhgQWCLiKCeAEBAQ X-IPAS-Result: A0A5FgA731xV/3K9xEVcgxCEAk6FB7tAh0sEAgKBPDsSAQEBAQEBAYEKQQWDXQEBAwEjMyMFCwkCGgIYDgICFBgNJIg3CI18nRCkFwEBCAIBH4EhihmEUjMHgmiBRQEEi0STU5IUghSBRSNhgQWCLiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="123697177" Original-Received: from 69-196-189-114.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.189.114]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Jun 2015 00:27:57 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 704F5AE6BD; Mon, 1 Jun 2015 00:27:57 -0400 (EDT) In-Reply-To: <556A8A1F.4040303@gmail.com> (Vaidheeswaran C.'s message of "Sun, 31 May 2015 09:42:15 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186969 Archived-At: >>> > - '(("=E2=82=AC=CB=9C\\([^=E2=82=AC=E2=84=A2]*\\)=E2=82=AC=E2=84=A2"= (1 'Info-quoted)))) >>> > + '(("`\\([^=E2=82=AC=E2=84=A2]*\\)=E2=82=AC=E2=84=A2" (1 'Info-quot= ed)))) >>> > 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