]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/whitespace.el (whitespace-color-on, whitespace-color-off): Only
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 5 Apr 2013 22:22:12 +0000 (02:22 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 5 Apr 2013 22:22:12 +0000 (02:22 +0400)
call `font-lock-fontify-buffer' when `font-lock-mode' is on.

lisp/ChangeLog
lisp/whitespace.el

index b3073dd9499676c55b5a898f0b18f221276f7a72..1af9905c7e33cd00f2932240e596fabf3399e0fa 100644 (file)
@@ -3,6 +3,11 @@
        * emacs-lisp/package.el (package-compute-transaction): Fix last fix.
        Suggested by Donald Curtis <dcurtis@coe.edu> (bug#14082).
 
+2013-04-05  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * whitespace.el (whitespace-color-on, whitespace-color-off): Only
+       call `font-lock-fontify-buffer' when `font-lock-mode' is on.
+
 2013-04-05  Jacek ChrzÄ…szcz  <chrzaszcz@mimuw.edu.pl> (tiny change)
 
        * ispell.el (ispell-set-spellchecker-params):
index c32155f54302d3e0ac7aa848e217b4b9fbda9279..68625e06acbd3dff4208df16771f4ef2a9084528 100644 (file)
@@ -2243,7 +2243,8 @@ resultant list will be returned."
                  (whitespace-space-after-tab-regexp 'space)))
               1 whitespace-space-after-tab t)))))
     (font-lock-add-keywords nil whitespace-font-lock-keywords t)
-    (font-lock-fontify-buffer)))
+    (when font-lock-mode
+      (font-lock-fontify-buffer))))
 
 
 (defun whitespace-color-off ()
@@ -2253,7 +2254,8 @@ resultant list will be returned."
     (remove-hook 'post-command-hook #'whitespace-post-command-hook t)
     (remove-hook 'before-change-functions #'whitespace-buffer-changed t)
     (font-lock-remove-keywords nil whitespace-font-lock-keywords)
-    (font-lock-fontify-buffer)))
+    (when font-lock-mode
+      (font-lock-fontify-buffer))))
 
 
 (defun whitespace-trailing-regexp (limit)