From fe255c115680339fcfd59000cfc867abcf6995bd Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Mon, 8 Apr 2019 20:24:32 -0300 Subject: [PATCH] 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) --- lisp/info.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/info.el b/lisp/info.el index f3b413a..9a8c82e 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4268,8 +4268,9 @@ Info-quoted ;; 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 -- 2.7.4