]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/hi-lock.el (hi-lock-set-pattern): Check for `font-lock-specified-p'.
authorE Sabof <esabof@gmail.com>
Fri, 20 Dec 2013 19:47:01 +0000 (21:47 +0200)
committerJuri Linkov <juri@jurta.org>
Fri, 20 Dec 2013 19:47:01 +0000 (21:47 +0200)
Fixes: debbugs:14179
lisp/ChangeLog
lisp/hi-lock.el

index 3286c90caed934c6cf7d7b9c87d6b1633c8b8392..a5447fb56240347f3b4ccff2bead373e433080cc 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-20  E Sabof  <esabof@gmail.com>  (tiny change)
+
+       * hi-lock.el (hi-lock-set-pattern): Check for `font-lock-specified-p'.
+       (Bug#14179)
+
 2013-12-20  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el: New implementation of item insertion
index 37ca83cba31bcba3a2e11249a1a1cacd8b87af8f..bb5c54e715216b1debddb003c882545c1619c8ad 100644 (file)
@@ -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))