mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 19:07:34 +00:00
(shell-command): Match & only at end of whole command.
(display-message-or-buffer): Don't use echo area if output buffer is visible.
This commit is contained in:
parent
37a29d4617
commit
aab5d2c5d9
1 changed files with 15 additions and 12 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue