From: Richard M. Stallman Date: Wed, 26 Jun 2002 08:59:32 +0000 (+0000) Subject: (shell-command): Match & only at end of whole command. X-Git-Tag: ttn-vms-21-2-B4~14436 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aab5d2c5d91129adc193f679e8f3ceeb2e0d2d2a;p=emacs.git (shell-command): Match & only at end of whole command. (display-message-or-buffer): Don't use echo area if output buffer is visible. --- diff --git a/lisp/simple.el b/lisp/simple.el index 14d1670b6ba..32f38790b38 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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)