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:
parent
303481b4ec
commit
22ebde63c9
1 changed files with 3 additions and 1 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue