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)
This commit is contained in:
Mauro Aranda 2019-04-08 20:24:32 -03:00 committed by Eli Zaretskii
parent 75b589c7d2
commit 9d7e08dd8f

View file

@ -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