From: Mauro Aranda Date: Mon, 8 Apr 2019 23:24:32 +0000 (-0300) Subject: Avoid false positives and false negatives of Info-quoted face X-Git-Tag: emacs-26.2.90~87 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9d7e08d;p=emacs.git 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) --- 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