diff options
author | Dan Nicolaescu <[email protected]> | 2008-02-24 20:44:24 +0000 |
---|---|---|
committer | Dan Nicolaescu <[email protected]> | 2008-02-24 20:44:24 +0000 |
commit | a8bdd228f8663936fbcd378928dacefefc49b7ad (patch) | |
tree | 213ec2dc8c4fc31737cf775a82c2ef8ab893a707 /lisp/progmodes/compile.el | |
parent | 9d2818d67690523a462696ccef3e1376a57dbf43 (diff) |
(compilation-start): Specify a face for
mode-line-process.
(compilation-handle-exit): Specify a face and a tooltip for
mode-line-process.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index e68441547b..456f92f9be 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1248,7 +1248,8 @@ Returns the compilation buffer created." (start-file-process-shell-command (downcase mode-name) outbuf command)))) ;; Make the buffer's mode line show process state. - (setq mode-line-process '(":%s")) + (setq mode-line-process + (list (propertize ":%s" 'face 'compilation-warning))) (set-process-sentinel proc 'compilation-sentinel) (set-process-filter proc 'compilation-filter) ;; Use (point-max) here so that output comes in @@ -1546,7 +1547,15 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'." ;; Prevent that message from being recognized as a compilation error. (add-text-properties omax (point) (append '(compilation-handle-exit t) nil)) - (setq mode-line-process (format ":%s [%s]" process-status (cdr status))) + (setq mode-line-process + (let ((out-string (format ":%s [%s]" process-status (cdr status))) + (tooltip (buffer-substring-no-properties (1+ omax) (point)))) + (propertize + out-string + 'help-echo tooltip + 'face + (if (> exit-status 0) 'font-lock-warning-face 'compilation-info)))) + (message (format "exit status: %s %s" exit-status (> 0 exit-status))) ;; Force mode line redisplay soon. (force-mode-line-update) (if (and opoint (< opoint omax)) |