[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v |
Date: |
Wed, 13 Aug 2008 19:09:14 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Andreas Schwab <schwab> 08/08/13 19:09:13
Index: net/tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -b -r1.208 -r1.209
--- net/tramp.el 28 Jul 2008 03:47:00 -0000 1.208
+++ net/tramp.el 13 Aug 2008 19:09:13 -0000 1.209
@@ -3846,11 +3846,14 @@
;; We cannot use `shell-file-name' and `shell-command-switch',
;; they are variables of the local host.
(args (list "/bin/sh" "-c" (substring command 0 asynchronous)))
+ current-buffer-p
(output-buffer
(cond
((bufferp output-buffer) output-buffer)
((stringp output-buffer) (get-buffer-create output-buffer))
- (output-buffer (current-buffer))
+ (output-buffer
+ (setq current-buffer-p t)
+ (current-buffer))
(t (get-buffer-create
(if asynchronous
"*Async Shell Command*"
@@ -3875,12 +3878,12 @@
(error nil))
(error "Shell command in progress")))
+ (unless current-buffer-p
(with-current-buffer output-buffer
- (setq buffer-read-only nil
- buffer-undo-list t)
- (erase-buffer))
+ (setq buffer-read-only nil)
+ (erase-buffer)))
- (if (integerp asynchronous)
+ (if (and (not current-buffer-p) (integerp asynchronous))
(prog1
;; Run the process.
(apply 'start-file-process "*Async Shell*" buffer args)
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v,
Andreas Schwab <=