]> git.eshelyaron.com Git - emacs.git/commitdiff
(shell-command-filter): If point was at end, leave it at end.
authorRichard M. Stallman <rms@gnu.org>
Mon, 18 Apr 1994 22:41:49 +0000 (22:41 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 18 Apr 1994 22:41:49 +0000 (22:41 +0000)
lisp/simple.el

index aec30025f35051034b34de2daf7012ca8ace53b8..f8f676e59b0d78b440178e40f174277bd3319143 100644 (file)
@@ -732,13 +732,15 @@ This cannot be done asynchronously."
     (unwind-protect
        (progn
          (set-buffer buffer)
-         (setq opoint (point))
+         (or (= (point) (point-max))
+             (setq opoint (point)))
          (goto-char (point-max))
          (insert-before-markers string))
       ;; insert-before-markers moved this marker: set it back.
       (set-window-start window pos)
       ;; Finish our save-excursion.
-      (goto-char opoint)
+      (if opoint
+         (goto-char opoint))
       (set-buffer obuf))))
 
 (defun shell-command-on-region (start end command &optional flag interactive)