summaryrefslogtreecommitdiff
path: root/cider-util.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2016-05-31 11:21:03 -0300
committerArtur Malabarba <bruce.connor.am@gmail.com>2016-05-31 11:21:29 -0300
commit29cba99b335b978b8b837a339416e9ec33240e34 (patch)
tree917dc3436e85f4d617d12332992369660bdb9a32 /cider-util.el
parent7eebb18cb4f29b0bd3a5b1d534ce9d274f4aadbc (diff)
[Fix #1768] Don't font-lock buffers if font-lock-mode is off
Diffstat (limited to 'cider-util.el')
-rw-r--r--cider-util.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/cider-util.el b/cider-util.el
index 7c33a8d2..735ef51a 100644
--- a/cider-util.el
+++ b/cider-util.el
@@ -208,14 +208,18 @@ PROP is the name of a text property."
(defalias 'cider--font-lock-ensure
(if (fboundp 'font-lock-ensure)
#'font-lock-ensure
- #'font-lock-fontify-buffer))
+ (with-no-warnings
+ (lambda (&optional _beg _end)
+ (when font-lock-mode
+ (font-lock-fontify-buffer))))))
(defalias 'cider--font-lock-flush
(if (fboundp 'font-lock-flush)
#'font-lock-flush
(with-no-warnings
(lambda (&optional _beg _end)
- (font-lock-fontify-buffer)))))
+ (when font-lock-mode
+ (font-lock-fontify-buffer))))))
(defvar cider--mode-buffers nil
"A list of buffers for different major modes.")