Commit 939ac10c authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(shell-command, display-message-or-buffer)

(shell-command-on-region): Mention resize-mini-windows in the doc
string.
(display-message-or-buffer): Take the value of resize-mini-windows
into account.
parent 619a6b30
...@@ -1112,14 +1112,14 @@ If COMMAND ends in ampersand, execute it asynchronously. ...@@ -1112,14 +1112,14 @@ If COMMAND ends in ampersand, execute it asynchronously.
The output appears in the buffer `*Async Shell Command*'. The output appears in the buffer `*Async Shell Command*'.
That buffer is in shell mode. That buffer is in shell mode.
Otherwise, COMMAND is executed synchronously. The output appears in the Otherwise, COMMAND is executed synchronously. The output appears in
buffer `*Shell Command Output*'. If the output is short enough to the buffer `*Shell Command Output*'. If the output is short enough to
display in the echo area (which is determined by the variable display in the echo area (which is determined by the variables
`max-mini-window-height'), it is shown there, but it is nonetheless `resize-mini-windows' and `max-mini-window-height'), it is shown
available in buffer `*Shell Command Output*' even though that buffer is there, but it is nonetheless available in buffer `*Shell Command
not automatically displayed. If there is no output, or if output is Output*' even though that buffer is not automatically displayed. If
inserted in the current buffer, then `*Shell Command Output*' is there is no output, or if output is inserted in the current buffer,
deleted. then `*Shell Command Output*' is deleted.
To specify a coding system for converting non-ASCII characters To specify a coding system for converting non-ASCII characters
in the shell command output, use \\[universal-coding-system-argument] in the shell command output, use \\[universal-coding-system-argument]
...@@ -1230,7 +1230,8 @@ specifies the value of ERROR-BUFFER." ...@@ -1230,7 +1230,8 @@ specifies the value of ERROR-BUFFER."
MESSAGE may be either a string or a buffer. MESSAGE may be either a string or a buffer.
A buffer is displayed using `display-buffer' if MESSAGE is too long for A buffer is displayed using `display-buffer' if MESSAGE is too long for
the maximum height of the echo area, as defined by `max-mini-window-height'. the maximum height of the echo area, as defined by `max-mini-window-height'
if `resize-mini-windows' is non-nil.
Returns either the string shown in the echo area, or when a pop-up Returns either the string shown in the echo area, or when a pop-up
buffer is used, the window used to display it. buffer is used, the window used to display it.
...@@ -1267,12 +1268,15 @@ and only used if a buffer is displayed." ...@@ -1267,12 +1268,15 @@ and only used if a buffer is displayed."
(count-lines (point-min) (point-max))))) (count-lines (point-min) (point-max)))))
(cond ((or (<= lines 1) (cond ((or (<= lines 1)
(<= lines (<= lines
(cond ((floatp max-mini-window-height) (if resize-mini-windows
(* (frame-height) max-mini-window-height)) (cond ((floatp max-mini-window-height)
((integerp max-mini-window-height) (* (frame-height)
max-mini-window-height) max-mini-window-height))
(t ((integerp max-mini-window-height)
1)))) max-mini-window-height)
(t
1))
1)))
;; Echo area ;; Echo area
(goto-char (point-max)) (goto-char (point-max))
(when (bolp) (when (bolp)
...@@ -1313,11 +1317,12 @@ systems by binding `coding-system-for-read' and ...@@ -1313,11 +1317,12 @@ systems by binding `coding-system-for-read' and
`coding-system-for-write'. `coding-system-for-write'.
If the output is short enough to display in the echo area (which is If the output is short enough to display in the echo area (which is
determined by the variable `max-mini-window-height'), it is shown there, determined by the variable `max-mini-window-height' if
but it is nonetheless available in buffer `*Shell Command Output*' even `resize-mini-windows' is non-nil), it is shown there, but it is
though that buffer is not automatically displayed. If there is no nonetheless available in buffer `*Shell Command Output*' even though
output, or if output is inserted in the current buffer, then `*Shell that buffer is not automatically displayed. If there is no output, or
Command Output*' is deleted. if output is inserted in the current buffer, then `*Shell Command
Output*' is deleted.
If the optional fourth argument OUTPUT-BUFFER is non-nil, If the optional fourth argument OUTPUT-BUFFER is non-nil,
that says to put the output in some other buffer. that says to put the output in some other buffer.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment