]> git.eshelyaron.com Git - emacs.git/commitdiff
(shell-command): Match & only at end of whole command.
authorRichard M. Stallman <rms@gnu.org>
Wed, 26 Jun 2002 08:59:32 +0000 (08:59 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 26 Jun 2002 08:59:32 +0000 (08:59 +0000)
(display-message-or-buffer): Don't use echo area if output buffer is visible.

lisp/simple.el

index 14d1670b6ba67330f21c9128d3b2bbbea9f9724b..32f38790b38968a9a89777847e48e5fbaab6bdd7 100644 (file)
@@ -1264,7 +1264,7 @@ specifies the value of ERROR-BUFFER."
        ;; Output goes in a separate buffer.
        ;; Preserve the match data in case called from a program.
        (save-match-data
-         (if (string-match "[ \t]*&[ \t]*$" command)
+         (if (string-match "[ \t]*&[ \t]*\\'" command)
              ;; Command ending with ampersand means asynchronous.
              (let ((buffer (get-buffer-create
                             (or output-buffer "*Async Shell Command*")))
@@ -1335,17 +1335,20 @@ and only used if a buffer is displayed."
                  (if (= (buffer-size) 0)
                      0
                    (count-lines (point-min) (point-max)))))
-            (cond ((or (<= lines 1)
-                       (<= lines
-                           (if resize-mini-windows
-                               (cond ((floatp max-mini-window-height)
-                                      (* (frame-height)
-                                         max-mini-window-height))
-                                     ((integerp max-mini-window-height)
-                                      max-mini-window-height)
-                                     (t
-                                      1))
-                             1)))
+            (cond ((and (or (<= lines 1)
+                            (<= lines
+                                (if resize-mini-windows
+                                    (cond ((floatp max-mini-window-height)
+                                           (* (frame-height)
+                                              max-mini-window-height))
+                                          ((integerp max-mini-window-height)
+                                           max-mini-window-height)
+                                          (t
+                                           1))
+                                  1)))
+                        ;; Don't use the echo area if the output buffer is
+                        ;; already dispayed in the selected frame.
+                        (not (get-buffer-window buffer)))
                    ;; Echo area
                    (goto-char (point-max))
                    (when (bolp)