emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r118329: * lisp/simple.el (shell-command): Use buffe


From: Juri Linkov
Subject: [Emacs-diffs] trunk r118329: * lisp/simple.el (shell-command): Use buffer-name when output-buffer is a buffer.
Date: Sat, 08 Nov 2014 23:53:04 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118329
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18096
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Sun 2014-11-09 01:52:59 +0200
message:
  * lisp/simple.el (shell-command): Use buffer-name when output-buffer is a 
buffer.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-11-08 22:56:37 +0000
+++ b/lisp/ChangeLog    2014-11-08 23:52:59 +0000
@@ -1,5 +1,10 @@
 2014-11-08  Juri Linkov  <address@hidden>
 
+       * simple.el (shell-command): Use buffer-name when output-buffer is
+       a buffer.  (Bug#18096)
+
+2014-11-08  Juri Linkov  <address@hidden>
+
        * minibuffer.el (minibuffer-completion-help): Compare this-command
        with completion-at-point.  (Bug#17809)
 

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2014-11-03 22:27:26 +0000
+++ b/lisp/simple.el    2014-11-08 23:52:59 +0000
@@ -3077,12 +3077,14 @@
                    ;; 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? ")


reply via email to

[Prev in Thread] Current Thread [Next in Thread]