aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Aranda2019-04-08 20:24:32 -0300
committerEli Zaretskii2019-04-21 14:58:56 +0300
commit9d7e08dd8f28b1c62dfdff592ba92e8d2fa14726 (patch)
treecf8bff158edefce04e2c1d0692c5639a72108dc8
parent75b589c7d2ebbe9e7048341cf666c185c07ec680 (diff)
downloademacs-9d7e08dd8f28b1c62dfdff592ba92e8d2fa14726.tar.gz
emacs-9d7e08dd8f28b1c62dfdff592ba92e8d2fa14726.zip
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'."
4262;; We deliberately fontify only ‘..’ quoting, and not `..', because 4262;; We deliberately fontify only ‘..’ quoting, and not `..', because
4263;; the former can be done much more reliably, i.e. without risking 4263;; the former can be done much more reliably, i.e. without risking
4264;; false positives. 4264;; false positives.
4265;; FIXME: It doesn't handle nested quotes.
4265(defvar Info-mode-font-lock-keywords 4266(defvar Info-mode-font-lock-keywords
4266 '(("‘\\([^’]*\\)’" (1 'Info-quoted)))) 4267 '(("‘\\([‘’]\\|[^‘’]*\\)’" (1 'Info-quoted))))
4267 4268
4268;; Autoload cookie needed by desktop.el 4269;; Autoload cookie needed by desktop.el
4269;;;###autoload 4270;;;###autoload