summaryrefslogtreecommitdiff
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2005-11-24 20:52:16 +0000
committerChong Yidong <cyd@stupidchicken.com>2005-11-24 20:52:16 +0000
commit963b20402dd726ecdf6747c91391e60e36b056fe (patch)
tree2b11563db5fe814135e65ea0c6f179f9bd761572 /lisp/progmodes/compile.el
parentf3220d3a39b4a04e15ea387166d804e3b61f1e2a (diff)
downloademacs-963b20402dd726ecdf6747c91391e60e36b056fe.tar.gz
* hi-lock.el (hi-lock-buffer-mode): Renamed from `hi-lock-mode'.
Use define-minor-mode, and make it a local mode. (hi-lock-mode): New global minor mode. (turn-on-hi-lock-if-enabled): New function. (hi-lock-line-face-buffer, hi-lock-face-buffer) (hi-lock-set-pattern): Changed arguments to regexp and face instead of a font-lock pattern. Directly set face property, instead of refontifying. (hi-lock-font-lock-hook): Check if font-lock is being turned on. (hi-lock-find-patterns): Use line-number-at-pos. (hi-lock-face-phrase-buffer): Call hi-lock-buffer-mode. Use new arguments for hi-lock-set-pattern. (hi-lock-find-file-hook, hi-lock-current-line) (hi-lock-set-patterns): Deleted unused functions. * progmodes/compile.el (compilation-setup): Don't fiddle with font-lock-defaults.
Diffstat (limited to 'lisp/progmodes/compile.el')
-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