all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juri Linkov <juri@jurta.org>
Cc: ruediger@c-plusplus.de, 16439@debbugs.gnu.org, sva-news@mygooglest.com
Subject: bug#16439: [feature request] Highlighting of strings within Info buffers
Date: Mon, 20 Jan 2014 09:10:28 -0500	[thread overview]
Message-ID: <jwvppnmags6.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <874n4z3tb7.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 20 Jan 2014 11:18:20 +0200")

> 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)





  reply	other threads:[~2014-01-20 14:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 10:15 bug#16439: [feature request] Highlighting of strings within Info buffers Sebastien Vauban
2014-01-14 14:34 ` Rüdiger Sonderfeld
2014-01-14 20:05   ` Drew Adams
2014-01-20  9:18     ` Juri Linkov
2014-01-20 14:10       ` Stefan Monnier [this message]
2020-09-18 14:03         ` Lars Ingebrigtsen
2014-01-20 15:17       ` Eli Zaretskii
2014-01-21  7:54         ` Juri Linkov
2014-01-21 15:53           ` Eli Zaretskii
2014-01-22  8:09             ` Juri Linkov
2014-01-22 15:42               ` Eli Zaretskii
2014-01-20 18:06       ` Drew Adams

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

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

  git send-email \
    --in-reply-to=jwvppnmags6.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=16439@debbugs.gnu.org \
    --cc=juri@jurta.org \
    --cc=ruediger@c-plusplus.de \
    --cc=sva-news@mygooglest.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.