changeset 92170:cdf4278cefa8

(compilation-handle-exit): Use compilation-error face instead of font-lock-warning-face. Display the same message in the minibuffer as is inserted at the end of the compilation buffer.
author Juri Linkov <juri@jurta.org>
date Sun, 24 Feb 2008 23:21:39 +0000
parents 6509935ff29d
children c06259187010
files lisp/progmodes/compile.el
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Sun Feb 24 23:08:00 2008 +0000
+++ b/lisp/progmodes/compile.el	Sun Feb 24 23:21:39 2008 +0000
@@ -1549,13 +1549,13 @@
 			 (append '(compilation-handle-exit t) nil))
     (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)))
+		(msg (format "%s %s" mode-name
+			     (replace-regexp-in-string "\n?$" "" (car status)))))
+	    (message "%s" msg)
+	    (propertize out-string
+			'help-echo msg 'face (if (> exit-status 0)
+						 'compilation-error
+					       'compilation-info))))
     ;; Force mode line redisplay soon.
     (force-mode-line-update)
     (if (and opoint (< opoint omax))