mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
* lisp/hi-lock.el (hi-lock-set-pattern): Check for `font-lock-specified-p'.
Fixes: debbugs:14179
This commit is contained in:
parent
3fbba716fb
commit
137f57c81e
2 changed files with 6 additions and 1 deletions
|
|
@ -719,7 +719,7 @@ Otherwise, read face name from minibuffer with completion and history."
|
|||
;; Refuse to highlight a text that is already highlighted.
|
||||
(unless (assoc regexp hi-lock-interactive-patterns)
|
||||
(push pattern hi-lock-interactive-patterns)
|
||||
(if font-lock-mode
|
||||
(if (and font-lock-mode (font-lock-specified-p major-mode))
|
||||
(progn
|
||||
(font-lock-add-keywords nil (list pattern) t)
|
||||
(font-lock-fontify-buffer))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue