]> code.delx.au - gnu-emacs/commitdiff
* net/tramp.el (tramp-handle-shell-command): Preserve current-buffer.
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 2 Jul 2006 20:29:20 +0000 (20:29 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 2 Jul 2006 20:29:20 +0000 (20:29 +0000)
lisp/ChangeLog
lisp/net/tramp.el

index 7202c93ab23ab6724f4bcd63a12e097750417ead..966e139b086e5a4cc8f16c1a071a47fa23b4b71c 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-02  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-handle-shell-command): Preserve current-buffer.
+
 2006-07-02  Daniel Pfeiffer  <occitan@esperanto.org>
 
        * progmodes/make-mode.el (makefile-macroassign-regex): Accept
index c94ec48b76de4f34405d27a318a3f714fdb67150..cb5a6d753310c51c7caffe526201e19c54d2deba 100644 (file)
@@ -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.