Mercurial > emacs
changeset 46026:312f417a8513
(shell-command): Match & only at end of whole command.
(display-message-or-buffer): Don't use echo area if output buffer is visible.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 26 Jun 2002 08:59:32 +0000 |
parents | ce0d438fe05e |
children | 38072df535c8 |
files | lisp/simple.el |
diffstat | 1 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Wed Jun 26 08:52:31 2002 +0000 +++ b/lisp/simple.el Wed Jun 26 08:59:32 2002 +0000 @@ -1264,7 +1264,7 @@ ;; 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 @@ (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)