diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2006-07-02 20:29:20 +0000 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2006-07-02 20:29:20 +0000 |
commit | d163f71e8671ad901f563c435fb4741d9d81303a (patch) | |
tree | d3b680044b8eacaf0d28a23c76059dc1810dc0ac /lisp/net | |
parent | 88983f8c8f1074a4155afb46a22e9577082fad3c (diff) | |
download | emacs-d163f71e8671ad901f563c435fb4741d9d81303a.tar.gz |
* net/tramp.el (tramp-handle-shell-command): Preserve current-buffer.
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/tramp.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index c94ec48b76d..cb5a6d75331 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3572,7 +3572,8 @@ This will break if COMMAND prints a newline, followed by the value of ;; for `find-grep-dired' and `find-name-dired' in Emacs 22. (if (tramp-tramp-file-p default-directory) (with-parsed-tramp-file-name default-directory nil - (let ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) + (let ((curbuf (current-buffer)) + (asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) status) (unless output-buffer (setq output-buffer @@ -3674,6 +3675,7 @@ This will break if COMMAND prints a newline, followed by the value of (unless (zerop (buffer-size)) (when tramp-display-shell-command-buffer (display-buffer output-buffer))) + (set-buffer curbuf) status)) ;; The following is only executed if something strange was ;; happening. Emit a helpful message and do it anyway. |