Skip to content

Commit 05c3090

Browse files
author
Bozhidar Batsov
committed
[Fix #669] Suppress major mode hooks in cider-font-lock-as
1 parent 7725275 commit 05c3090

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cider-util.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ PROP is the name of a text property."
9696
"Use MODE to font-lock the STRING."
9797
(with-temp-buffer
9898
(insert string)
99-
(funcall mode)
100-
;; prevent whitespace mode from obscuring the output
101-
(whitespace-mode -1)
99+
;; suppress major mode hooks as we care only about their font-locking
100+
;; otherwise modes like whitespace-mode and paredit might interfere
101+
(let ((delay-mode-hooks t)
102+
(delayed-mode-hooks nil))
103+
(funcall mode))
102104
(font-lock-fontify-buffer)
103105
(buffer-string)))
104106

0 commit comments

Comments
 (0)