aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-02-24 20:44:24 +0000
committerDan Nicolaescu2008-02-24 20:44:24 +0000
commita8bdd228f8663936fbcd378928dacefefc49b7ad (patch)
tree213ec2dc8c4fc31737cf775a82c2ef8ab893a707
parent9d2818d67690523a462696ccef3e1376a57dbf43 (diff)
downloademacs-a8bdd228f8663936fbcd378928dacefefc49b7ad.tar.gz
emacs-a8bdd228f8663936fbcd378928dacefefc49b7ad.zip
(compilation-start): Specify a face for
mode-line-process. (compilation-handle-exit): Specify a face and a tooltip for mode-line-process.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/compile.el13
2 files changed, 18 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b659a3923c1..e7f16811201 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12008-02-24 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * progmodes/compile.el (compilation-start): Specify a face for
4 mode-line-process.
5 (compilation-handle-exit): Specify a face and a tooltip for
6 mode-line-process.
7
12008-02-24 Stefan Monnier <monnier@iro.umontreal.ca> 82008-02-24 Stefan Monnier <monnier@iro.umontreal.ca>
2 9
3 * hilit-chg.el: Remove spurious * in defcustom docstrings. 10 * hilit-chg.el: Remove spurious * in defcustom docstrings.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index e68441547b6..456f92f9be2 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1248,7 +1248,8 @@ Returns the compilation buffer created."
1248 (start-file-process-shell-command (downcase mode-name) 1248 (start-file-process-shell-command (downcase mode-name)
1249 outbuf command)))) 1249 outbuf command))))
1250 ;; Make the buffer's mode line show process state. 1250 ;; Make the buffer's mode line show process state.
1251 (setq mode-line-process '(":%s")) 1251 (setq mode-line-process
1252 (list (propertize ":%s" 'face 'compilation-warning)))
1252 (set-process-sentinel proc 'compilation-sentinel) 1253 (set-process-sentinel proc 'compilation-sentinel)
1253 (set-process-filter proc 'compilation-filter) 1254 (set-process-filter proc 'compilation-filter)
1254 ;; Use (point-max) here so that output comes in 1255 ;; 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'."
1546 ;; Prevent that message from being recognized as a compilation error. 1547 ;; Prevent that message from being recognized as a compilation error.
1547 (add-text-properties omax (point) 1548 (add-text-properties omax (point)
1548 (append '(compilation-handle-exit t) nil)) 1549 (append '(compilation-handle-exit t) nil))
1549 (setq mode-line-process (format ":%s [%s]" process-status (cdr status))) 1550 (setq mode-line-process
1551 (let ((out-string (format ":%s [%s]" process-status (cdr status)))
1552 (tooltip (buffer-substring-no-properties (1+ omax) (point))))
1553 (propertize
1554 out-string
1555 'help-echo tooltip
1556 'face
1557 (if (> exit-status 0) 'font-lock-warning-face 'compilation-info))))
1558 (message (format "exit status: %s %s" exit-status (> 0 exit-status)))
1550 ;; Force mode line redisplay soon. 1559 ;; Force mode line redisplay soon.
1551 (force-mode-line-update) 1560 (force-mode-line-update)
1552 (if (and opoint (< opoint omax)) 1561 (if (and opoint (< opoint omax))