From: Michael Albinus Date: Sun, 2 Jul 2006 20:29:20 +0000 (+0000) Subject: * net/tramp.el (tramp-handle-shell-command): Preserve current-buffer. X-Git-Tag: emacs-pretest-22.0.90~1762 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d163f71e8671ad901f563c435fb4741d9d81303a;p=emacs.git * net/tramp.el (tramp-handle-shell-command): Preserve current-buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7202c93ab23..966e139b086 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-07-02 Michael Albinus + + * net/tramp.el (tramp-handle-shell-command): Preserve current-buffer. + 2006-07-02 Daniel Pfeiffer * progmodes/make-mode.el (makefile-macroassign-regex): Accept 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.