GNU bug report logs - #16439
[feature request] Highlighting of strings within Info buffers

Previous Next

Package: emacs;

Reported by: "Sebastien Vauban" <sva-news <at> mygooglest.com>

Date: Tue, 14 Jan 2014 10:18:01 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: ruediger <at> c-plusplus.de, 16439 <at> debbugs.gnu.org, sva-news <at> mygooglest.com, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#16439: [feature request] Highlighting of strings within Info buffers
Date: Mon, 20 Jan 2014 09:10:28 -0500
> 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'.")
 
+(defface Info-quoted
+  '((t :family "courier"))
+  "Face used for quoted elements.")
+
+(defvar Info-mode-font-lock-keywords
+  '(("‘\\([^’]*\\)’" (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)




This bug report was last modified 4 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.