diff options
author | Mauro Aranda <maurooaranda@gmail.com> | 2019-04-08 20:24:32 -0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2019-04-21 14:58:56 +0300 |
commit | 9d7e08dd8f28b1c62dfdff592ba92e8d2fa14726 (patch) | |
tree | cf8bff158edefce04e2c1d0692c5639a72108dc8 | |
parent | 75b589c7d2ebbe9e7048341cf666c185c07ec680 (diff) | |
download | emacs-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.el | 3 |
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 |