summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Aranda <maurooaranda@gmail.com>2019-04-08 20:24:32 -0300
committerEli Zaretskii <eliz@gnu.org>2019-04-21 14:58:56 +0300
commit9d7e08dd8f28b1c62dfdff592ba92e8d2fa14726 (patch)
treecf8bff158edefce04e2c1d0692c5639a72108dc8
parent75b589c7d2ebbe9e7048341cf666c185c07ec680 (diff)
downloademacs-9d7e08dd8f28b1c62dfdff592ba92e8d2fa14726.tar.gz
Avoid false positives and false negatives of Info-quoted face
* 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)
-rw-r--r--lisp/info.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 301f6ece145..94b0ef6ce75 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -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