From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16439: [feature request] Highlighting of strings within Info buffers Date: Mon, 20 Jan 2014 09:10:28 -0500 Message-ID: References: <86lhyic1ik.fsf@somewhere.org> <1394187.cuqsIWxxGs@descartes> <27136a64-176c-4312-a2aa-c86e81091a76@default> <874n4z3tb7.fsf@mail.jurta.org> 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 1390227425 24600 80.91.229.3 (20 Jan 2014 14:17:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jan 2014 14:17:05 +0000 (UTC) Cc: ruediger@c-plusplus.de, 16439@debbugs.gnu.org, sva-news@mygooglest.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 20 15:17:10 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1W5Ff3-00017X-LR for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jan 2014 15:17:09 +0100 Original-Received: from localhost ([::1]:52267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5Ff3-00052j-3y for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jan 2014 09:17:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5FZG-0005At-F8 for bug-gnu-emacs@gnu.org; Mon, 20 Jan 2014 09:11:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5FZ9-0003fT-20 for bug-gnu-emacs@gnu.org; Mon, 20 Jan 2014 09:11:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5FZ8-0003fK-Ud for bug-gnu-emacs@gnu.org; Mon, 20 Jan 2014 09:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W5FZ8-0002US-F1 for bug-gnu-emacs@gnu.org; Mon, 20 Jan 2014 09:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jan 2014 14:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16439 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16439-submit@debbugs.gnu.org id=B16439.13902270329530 (code B ref 16439); Mon, 20 Jan 2014 14:11:02 +0000 Original-Received: (at 16439) by debbugs.gnu.org; 20 Jan 2014 14:10:32 +0000 Original-Received: from localhost ([127.0.0.1]:57947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5FYd-0002Td-U3 for submit@debbugs.gnu.org; Mon, 20 Jan 2014 09:10:32 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:20300) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5FYb-0002TU-Ih for 16439@debbugs.gnu.org; Mon, 20 Jan 2014 09:10:30 -0500 Original-Received: from 69-165-163-162.dsl.teksavvy.com (HELO pastel.home) ([69.165.163.162]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Jan 2014 09:10:28 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 9523A60094; Mon, 20 Jan 2014 09:10:28 -0500 (EST) In-Reply-To: <874n4z3tb7.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 20 Jan 2014 11:18:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83769 Archived-At: > The problem is how to highlight strings only in code samples > because in other places highlighting "..." makes no sense. > Look for example in the node (info "(emacs) Package Keywords"): > Most optional features in Emacs are grouped into "packages". > Should "packages" be highlighted as a string. Of course not. > There is no additional emphasis on quotations in books. Indeed. The "right answer" is to move away from the Info format and rely on something more structured that we could render in a much more pretty way, using bold, italics, and friends. In the mean time, I use the patch below. Stefan --- lisp/info.el 2014-01-17 20:33:22 +0000 +++ lisp/info.el 2014-01-17 22:51:46 +0000 @@ -4193,5 +4192,12 @@ st) "Syntax table used in `Info-mode'.") =20 +(defface Info-quoted + '((t :family "courier")) + "Face used for quoted elements.") + +(defvar Info-mode-font-lock-keywords + '(("=E2=80=98\\([^=E2=80=99]*\\)=E2=80=99" (1 'Info-quoted)))) + ;; Autoload cookie needed by desktop.el ;;;###autoload @@ -4296,1 +4291,2 @@ + (setq-local font-lock-defaults '(Info-mode-font-lock-keywords t t)) (Info-set-mode-line)