From: Dmitry Gutov Date: Fri, 5 Apr 2013 22:22:12 +0000 (+0400) Subject: * lisp/whitespace.el (whitespace-color-on, whitespace-color-off): Only X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~523 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d695cb94fb71c8c8d4822fbf9d702dbda3252aac;p=emacs.git * lisp/whitespace.el (whitespace-color-on, whitespace-color-off): Only call `font-lock-fontify-buffer' when `font-lock-mode' is on. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b3073dd9499..1af9905c7e3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,11 @@ * emacs-lisp/package.el (package-compute-transaction): Fix last fix. Suggested by Donald Curtis (bug#14082). +2013-04-05 Dmitry Gutov + + * 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 (tiny change) * ispell.el (ispell-set-spellchecker-params): diff --git a/lisp/whitespace.el b/lisp/whitespace.el index c32155f5430..68625e06acb 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -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)