Mercurial > emacs
diff lisp/progmodes/compile.el @ 67112:146389d32df6
* 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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 24 Nov 2005 20:52:16 +0000 |
parents | 11893f0cbfb1 |
children | ed2c1481cde9 |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Thu Nov 24 20:45:50 2005 +0000 +++ b/lisp/progmodes/compile.el Thu Nov 24 20:52:16 2005 +0000 @@ -1335,19 +1335,17 @@ ;; 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