# HG changeset patch # User Michael Albinus # Date 1151872160 0 # Node ID 21a427e4868adae1525e303ab2ad6ff43eef2432 # Parent 0cfdb902c3181f893c2284e790a3af5b3f18e046 * net/tramp.el (tramp-handle-shell-command): Preserve current-buffer. diff -r 0cfdb902c318 -r 21a427e4868a lisp/ChangeLog --- a/lisp/ChangeLog Sun Jul 02 19:05:49 2006 +0000 +++ b/lisp/ChangeLog Sun Jul 02 20:29:20 2006 +0000 @@ -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 -r 0cfdb902c318 -r 21a427e4868a lisp/net/tramp.el --- 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.