diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2013-04-06 02:22:12 +0400 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-04-06 02:22:12 +0400 |
commit | d695cb94fb71c8c8d4822fbf9d702dbda3252aac (patch) | |
tree | d626a770c08ba7aa1c6ba96a810ce44c849ca960 /lisp/whitespace.el | |
parent | 134abf1faef6596a62d3c04769e212b99f621d49 (diff) | |
download | emacs-d695cb94fb71c8c8d4822fbf9d702dbda3252aac.tar.gz |
* lisp/whitespace.el (whitespace-color-on, whitespace-color-off): Only
call `font-lock-fontify-buffer' when `font-lock-mode' is on.
Diffstat (limited to 'lisp/whitespace.el')
-rw-r--r-- | lisp/whitespace.el | 6 |
1 files changed, 4 insertions, 2 deletions
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) |