summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index a158ad3f4e0..4147190f515 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1335,19 +1335,17 @@ Optional argument MINOR indicates this is called from
;; jit-lock might fontify some things too late.
(set (make-local-variable 'font-lock-support-mode) nil)
(set (make-local-variable 'font-lock-maximum-size) nil)
- (let ((fld font-lock-defaults))
- (if (and minor fld)
+ (if minor
+ (let ((fld font-lock-defaults))
(font-lock-add-keywords nil (compilation-mode-font-lock-keywords))
- (setq font-lock-defaults '(compilation-mode-font-lock-keywords t)))
- (if minor
(if font-lock-mode
(if fld
(font-lock-fontify-buffer)
(font-lock-change-mode)
(turn-on-font-lock))
- (turn-on-font-lock))
- ;; maybe defer font-lock till after derived mode is set up
- (run-mode-hooks 'compilation-turn-on-font-lock))))
+ (turn-on-font-lock)))
+ ;; maybe defer font-lock till after derived mode is set up
+ (run-mode-hooks 'compilation-turn-on-font-lock)))
;;;###autoload
(define-minor-mode compilation-shell-minor-mode