diff options
| author | Juri Linkov | 2014-11-09 01:52:59 +0200 |
|---|---|---|
| committer | Juri Linkov | 2014-11-09 01:52:59 +0200 |
| commit | 6f443e47ac2ac9f8b44834efc6af4c9eb6ac226f (patch) | |
| tree | 56f0ee024dcbe8b6f51bd2bb1515a99f77334c6d | |
| parent | 8958d7da7879b876d5513084a97ceb49d6d7ad7d (diff) | |
| download | emacs-6f443e47ac2ac9f8b44834efc6af4c9eb6ac226f.tar.gz emacs-6f443e47ac2ac9f8b44834efc6af4c9eb6ac226f.zip | |
* lisp/simple.el (shell-command): Use buffer-name when output-buffer is a buffer.
Fixes: debbugs:18096
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/simple.el | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e2bf6bdeeae..0aa7f04fecc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2014-11-08 Juri Linkov <juri@jurta.org> | 1 | 2014-11-08 Juri Linkov <juri@jurta.org> |
| 2 | 2 | ||
| 3 | * simple.el (shell-command): Use buffer-name when output-buffer is | ||
| 4 | a buffer. (Bug#18096) | ||
| 5 | |||
| 6 | 2014-11-08 Juri Linkov <juri@jurta.org> | ||
| 7 | |||
| 3 | * minibuffer.el (minibuffer-completion-help): Compare this-command | 8 | * minibuffer.el (minibuffer-completion-help): Compare this-command |
| 4 | with completion-at-point. (Bug#17809) | 9 | with completion-at-point. (Bug#17809) |
| 5 | 10 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 08374c4ed65..203ea514e15 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3077,12 +3077,14 @@ the use of a shell (with its need to quote arguments)." | |||
| 3077 | ;; If will create a new buffer, query first. | 3077 | ;; If will create a new buffer, query first. |
| 3078 | (if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ") | 3078 | (if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ") |
| 3079 | (setq buffer (generate-new-buffer | 3079 | (setq buffer (generate-new-buffer |
| 3080 | (or output-buffer "*Async Shell Command*"))) | 3080 | (or (and (bufferp output-buffer) (buffer-name output-buffer)) |
| 3081 | output-buffer "*Async Shell Command*"))) | ||
| 3081 | (error "Shell command in progress"))) | 3082 | (error "Shell command in progress"))) |
| 3082 | ((eq async-shell-command-buffer 'new-buffer) | 3083 | ((eq async-shell-command-buffer 'new-buffer) |
| 3083 | ;; It will create a new buffer. | 3084 | ;; It will create a new buffer. |
| 3084 | (setq buffer (generate-new-buffer | 3085 | (setq buffer (generate-new-buffer |
| 3085 | (or output-buffer "*Async Shell Command*")))) | 3086 | (or (and (bufferp output-buffer) (buffer-name output-buffer)) |
| 3087 | output-buffer "*Async Shell Command*")))) | ||
| 3086 | ((eq async-shell-command-buffer 'confirm-rename-buffer) | 3088 | ((eq async-shell-command-buffer 'confirm-rename-buffer) |
| 3087 | ;; If will rename the buffer, query first. | 3089 | ;; If will rename the buffer, query first. |
| 3088 | (if (yes-or-no-p "A command is running in the default buffer. Rename it? ") | 3090 | (if (yes-or-no-p "A command is running in the default buffer. Rename it? ") |