1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

Store the regexp just when there are matches

* lisp/hi-lock.el (hi-lock-set-pattern): When font-lock-mode is
disabled and there are no matches do not store REGEXP
in hi-lock-interactive-patterns.
This commit is contained in:
Tino Calancha 2017-08-25 00:24:59 +09:00
parent 303481b4ec
commit 22ebde63c9

View file

@ -721,7 +721,9 @@ with completion and history."
(overlay-put overlay 'face face))
(goto-char (match-end 0)))
(when no-matches
(add-to-list 'hi-lock--unused-faces (face-name face)))))))))
(add-to-list 'hi-lock--unused-faces (face-name face))
(setq hi-lock-interactive-patterns
(cdr hi-lock-interactive-patterns)))))))))
(defun hi-lock-set-file-patterns (patterns)
"Replace file patterns list with PATTERNS and refontify."