From: E Sabof Date: Fri, 20 Dec 2013 19:47:01 +0000 (+0200) Subject: * lisp/hi-lock.el (hi-lock-set-pattern): Check for `font-lock-specified-p'. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~286 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=137f57c81e368013e62fcd6f0c6489e6363f65e7;p=emacs.git * lisp/hi-lock.el (hi-lock-set-pattern): Check for `font-lock-specified-p'. Fixes: debbugs:14179 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3286c90caed..a5447fb5624 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-12-20 E Sabof (tiny change) + + * hi-lock.el (hi-lock-set-pattern): Check for `font-lock-specified-p'. + (Bug#14179) + 2013-12-20 Stephen Berman * calendar/todo-mode.el: New implementation of item insertion diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 37ca83cba31..bb5c54e7152 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -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))