Commit 6f443e47 authored by Juri Linkov's avatar Juri Linkov

* lisp/simple.el (shell-command): Use buffer-name when output-buffer is a buffer.

Fixes: debbugs:18096
parent 8958d7da
2014-11-08 Juri Linkov <juri@jurta.org>
* simple.el (shell-command): Use buffer-name when output-buffer is
a buffer. (Bug#18096)
2014-11-08 Juri Linkov <juri@jurta.org>
* minibuffer.el (minibuffer-completion-help): Compare this-command
......
......@@ -3077,12 +3077,14 @@ the use of a shell (with its need to quote arguments)."
;; If will create a new buffer, query first.
(if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ")
(setq buffer (generate-new-buffer
(or output-buffer "*Async Shell Command*")))
(or (and (bufferp output-buffer) (buffer-name output-buffer))
output-buffer "*Async Shell Command*")))
(error "Shell command in progress")))
((eq async-shell-command-buffer 'new-buffer)
;; It will create a new buffer.
(setq buffer (generate-new-buffer
(or output-buffer "*Async Shell Command*"))))
(or (and (bufferp output-buffer) (buffer-name output-buffer))
output-buffer "*Async Shell Command*"))))
((eq async-shell-command-buffer 'confirm-rename-buffer)
;; If will rename the buffer, query first.
(if (yes-or-no-p "A command is running in the default buffer. Rename it? ")
......
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