diff lisp/progmodes/compile.el @ 91005:424b655804ca

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 846-851) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 88-92) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 242-244) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-246
author Miles Bader <miles@gnu.org>
date Mon, 13 Aug 2007 13:48:35 +0000
parents cd5e99697764 e5a68f18fcb9
children aaccdab0ee26
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Wed Aug 08 16:39:00 2007 +0000
+++ b/lisp/progmodes/compile.el	Mon Aug 13 13:48:35 2007 +0000
@@ -170,7 +170,7 @@
     (maven
      ;; Maven is a popular build tool for Java.  Maven is Free Software.
      "\\(.*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]" 1 2 3)
-    
+
     (bash
      "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2)
 
@@ -979,8 +979,7 @@
 	 (funcall name-function mode-name))
 	(compilation-buffer-name-function
 	 (funcall compilation-buffer-name-function mode-name))
-	((and (eq mode-command major-mode)
-	      (eq major-mode (nth 1 compilation-arguments)))
+	((eq mode-command major-mode)
 	 (buffer-name))
 	(t
 	 (concat "*" (downcase mode-name) "*"))))
@@ -1032,7 +1031,7 @@
     (with-current-buffer
 	(setq outbuf
 	      (get-buffer-create
-	       (compilation-buffer-name name-of-mode mode name-function)))
+               (compilation-buffer-name name-of-mode mode name-function)))
       (let ((comp-proc (get-buffer-process (current-buffer))))
 	(if comp-proc
 	    (if (or (not (eq (process-status comp-proc) 'run))
@@ -1136,7 +1135,7 @@
 		       (if (file-remote-p default-directory)
 			   "/bin/sh"
 			 shell-file-name)
-		       `("-c" ,command))))
+		       nil `("-c" ,command))))
 		 (start-file-process-shell-command (downcase mode-name)
 						   outbuf command))))
 	  ;; Make the buffer's mode line show process state.
@@ -1164,7 +1163,7 @@
   "Set the height of WINDOW according to `compilation-window-height'."
   (let ((height (buffer-local-value 'compilation-window-height (window-buffer window))))
     (and height
-	 (= (window-width window) (frame-width (window-frame window)))
+	 (window-full-width-p window)
 	 ;; If window is alone in its frame, aside from a minibuffer,
 	 ;; don't change its height.
 	 (not (eq window (frame-root-window (window-frame window))))
@@ -1624,12 +1623,10 @@
 
 (defun compilation-find-buffer (&optional avoid-current)
   "Return a compilation buffer.
-If AVOID-CURRENT is nil, and
-the current buffer is a compilation buffer, return it.
-If AVOID-CURRENT is non-nil, return the current buffer
-only as a last resort."
-  (if (and (compilation-buffer-internal-p (current-buffer))
-	   (not avoid-current))
+If AVOID-CURRENT is nil, and the current buffer is a compilation buffer,
+return it.  If AVOID-CURRENT is non-nil, return the current buffer only
+as a last resort."
+  (if (and (compilation-buffer-internal-p) (not avoid-current))
       (current-buffer)
     (next-error-find-buffer avoid-current 'compilation-buffer-internal-p)))