Mercurial > emacs
diff lisp/net/tramp.el @ 71561:21a427e4868a
* net/tramp.el (tramp-handle-shell-command): Preserve current-buffer.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Sun, 02 Jul 2006 20:29:20 +0000 |
parents | 5b1bf37e044d |
children | 7457615d594a 138ce2701550 |
line wrap: on
line diff
--- a/lisp/net/tramp.el Sun Jul 02 19:05:49 2006 +0000 +++ b/lisp/net/tramp.el Sun Jul 02 20:29:20 2006 +0000 @@ -3572,7 +3572,8 @@ ;; 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 @@ (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.