emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v


From: Andreas Schwab
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
Date: Wed, 13 Aug 2008 19:33:39 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Andreas Schwab <schwab> 08/08/13 19:33:38

Index: net/tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -b -r1.209 -r1.210
--- net/tramp.el        13 Aug 2008 19:09:13 -0000      1.209
+++ net/tramp.el        13 Aug 2008 19:33:37 -0000      1.210
@@ -3878,7 +3878,10 @@
            (error nil))
        (error "Shell command in progress")))
 
-    (unless current-buffer-p
+    (if current-buffer-p
+       (progn
+         (barf-if-buffer-read-only)
+         (push-mark nil t))
       (with-current-buffer output-buffer
        (setq buffer-read-only nil)
        (erase-buffer)))
@@ -3900,12 +3903,20 @@
          (with-current-buffer error-buffer
            (insert-file-contents (cadr buffer)))
          (delete-file (cadr buffer)))
+       (if current-buffer-p
+           ;; This is like exchange-point-and-mark, but doesn't
+           ;; activate the mark.  It is cleaner to avoid activation,
+           ;; even though the command loop would deactivate the mark
+           ;; because we inserted text.
+           (goto-char (prog1 (mark t)
+                        (set-marker (mark-marker) (point)
+                                    (current-buffer))))
        ;; There's some output, display it.
        (when (with-current-buffer output-buffer (> (point-max) (point-min)))
          (if (functionp 'display-message-or-buffer)
              (funcall (symbol-function 'display-message-or-buffer)
                       output-buffer)
-           (pop-to-buffer output-buffer)))))))
+             (pop-to-buffer output-buffer))))))))
 
 ;; File Editing.
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]