emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/shell.el,v
Date: Thu, 13 Sep 2007 07:21:48 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/09/13 07:21:48

Index: shell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/shell.el,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -b -r1.154 -r1.155
--- shell.el    29 Aug 2007 13:34:42 -0000      1.154
+++ shell.el    13 Sep 2007 07:21:47 -0000      1.155
@@ -808,7 +808,9 @@
 command again."
   (interactive)
   (let* ((proc (get-buffer-process (current-buffer)))
-        (pmark (process-mark proc)))
+        (pmark (process-mark proc))
+        (started-at-pmark (= (point) (marker-position pmark))))
+    (save-excursion
     (goto-char pmark)
     ;; If the process echoes commands, don't insert a fake command in
     ;; the buffer or it will appear twice.
@@ -852,7 +854,8 @@
                   (setq shell-dirstack (cdr ds)
                         shell-last-dir (car shell-dirstack))
                   (shell-dirstack-message))
-         (error (message "Couldn't cd")))))))
+           (error (message "Couldn't cd"))))))
+    (if started-at-pmark (goto-char (marker-position pmark)))))
 
 ;; For your typing convenience:
 (defalias 'dirs 'shell-resync-dirs)




reply via email to

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