]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid false positives and false negatives of Info-quoted face
authorMauro Aranda <maurooaranda@gmail.com>
Mon, 8 Apr 2019 23:24:32 +0000 (20:24 -0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 21 Apr 2019 11:58:56 +0000 (14:58 +0300)
* lisp/info.el (Info-mode-font-lock-keywords): Modify the regexp, for
matching single quotes of opening single quote and closing single
quote, and avoid matching text followed by a curly quote when it is
not quoting. (Bug#35202)

lisp/info.el

index 301f6ece145ece2f93967fad8bb143258be46348..94b0ef6ce75f42928f05bf7ca8984f6221ccf2bb 100644 (file)
@@ -4262,8 +4262,9 @@ With a zero prefix arg, put the name inside a function call to `info'."
 ;; We deliberately fontify only ‘..’ quoting, and not `..', because
 ;; the former can be done much more reliably, i.e. without risking
 ;; false positives.
+;; FIXME: It doesn't handle nested quotes.
 (defvar Info-mode-font-lock-keywords
-  '(("‘\\([^’]*\\)’" (1 'Info-quoted))))
+  '(("‘\\([‘’]\\|[^‘’]*\\)’" (1 'Info-quoted))))
 
 ;; Autoload cookie needed by desktop.el
 ;;;###autoload