From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vaidheeswaran C Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Info-mode-font-lock-keywords: Fix-regexp Date: Sun, 31 May 2015 09:42:15 +0530 Message-ID: <556A8A1F.4040303@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050102060803050403020006" X-Trace: ger.gmane.org 1433045582 26754 80.91.229.3 (31 May 2015 04:13:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 May 2015 04:13:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 31 06:12:56 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 1YyucJ-0004jp-6g for ged-emacs-devel@m.gmane.org; Sun, 31 May 2015 06:12:55 +0200 Original-Received: from localhost ([::1]:41090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyucI-000313-GG for ged-emacs-devel@m.gmane.org; Sun, 31 May 2015 00:12:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyucF-0002y3-8F for emacs-devel@gnu.org; Sun, 31 May 2015 00:12:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyucC-0007R6-2m for emacs-devel@gnu.org; Sun, 31 May 2015 00:12:51 -0400 Original-Received: from mail-pd0-x236.google.com ([2607:f8b0:400e:c02::236]:32912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyucB-0007R0-Qt for emacs-devel@gnu.org; Sun, 31 May 2015 00:12:48 -0400 Original-Received: by pdbqa5 with SMTP id qa5so82910449pdb.0 for ; Sat, 30 May 2015 21:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=ZgGzy7TCEThDdm+NzXs28tVvQZtbyp6YGJ9iLEHxNx8=; b=k2P04HJBKyZOL0nxqW8ne7ePyiKxxpdctNZ7O5OyicqUu11fBoirruMkGwvwYR1KIN hFlfQbqBWy4tSDwaB9yOi9rhRyzJbc3wtoQZlGHgkpEzQmLasUf/QizpxDmoYOyfk9dj SSEpTJ9n12SgrgflWYDxeFDMiCymNWt+UtDFB9TjCIXjcrtnFugYnuMSUuS+3wSpjGgZ a0KJ1vlxv5rdttScGtbc7YB/3ZUHgADdRdVXGGeeO7587W6lZi9k+8/J0kNoZkwKiVJq inw5DXoz9C4auzScjtqAvbabGIVYKMQrSzvQV1SneFKqY7OKC/1l1WQQN8xvAHilMHeJ 9WTw== X-Received: by 10.66.65.200 with SMTP id z8mr23456085pas.16.1433045566092; Sat, 30 May 2015 21:12:46 -0700 (PDT) Original-Received: from [192.168.43.83] ([223.180.98.51]) by mx.google.com with ESMTPSA id nz2sm10140889pbb.40.2015.05.30.21.12.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 May 2015 21:12:44 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::236 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:186962 Archived-At: This is a multi-part message in MIME format. --------------050102060803050403020006 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit On Tuesday 26 May 2015 10:38 PM, Stefan Monnier wrote: >> (defvar Info-mode-font-lock-keywords >> > - '(("€˜\\([^€™]*\\)€™" (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 believe experienced users usually "skim" the manual for customizable variables and commands. This fontification help with skimming. `font-lock-function-name-face' is what I would personally recommend. It close to the `info-xref' face. Screenshots are available are here: http://en.zimagez.com/zimage/info-mode-font-lock-keywords.php http://en.zimagez.com/zimage/info-mode-font-lock-keywords-1.php I am recirculating an updated patch. ---------------- PS: Mixing "courier" fonts with the default font seems is...Uhh (atleast to my eyes) --------------050102060803050403020006 Content-Type: text/x-patch; name="0001-lisp-info.el-Info-mode-font-lock-keywords-Add-a-keyw.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename*0="0001-lisp-info.el-Info-mode-font-lock-keywords-Add-a-keyw.pa"; filename*1="tch" >From 0cdbf4e42aeceff1f3abb0d88ee2d4ad08023a7b Mon Sep 17 00:00:00 2001 From: Vaidheeswaran C Date: Sun, 31 May 2015 09:23:41 +0530 Subject: [PATCH] lisp/info.el (Info-mode-font-lock-keywords): Add a keyword * lisp/info.el (Info-mode-font-lock-keywords): Fontify text rendered with @code, @kbd etc. --- lisp/info.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/info.el b/lisp/info.el index 80428e7..1add13c 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4219,7 +4219,8 @@ With a zero prefix arg, put the name inside a function call to `info'." "Face used for quoted elements.") (defvar Info-mode-font-lock-keywords - '(("‘\\([^’]*\\)’" (1 'Info-quoted)))) + '(("‘\\([^’]*\\)’" (1 'Info-quoted)) + ("`\\([^']*\\)'" (1 'font-lock-function-name-face)))) ;; Autoload cookie needed by desktop.el ;;;###autoload -- 1.7.10.4 --------------050102060803050403020006--