aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-18 22:41:49 +0000
committerRichard M. Stallman1994-04-18 22:41:49 +0000
commit3886f8e2299a4e31477af502210ebd7c2fac1bb6 (patch)
treea42e064a30555ff91109a6080532a98891e25ba1
parent64b25365bebe1d4f47994b2141ce8115301c34b5 (diff)
downloademacs-3886f8e2299a4e31477af502210ebd7c2fac1bb6.tar.gz
emacs-3886f8e2299a4e31477af502210ebd7c2fac1bb6.zip
(shell-command-filter): If point was at end, leave it at end.
-rw-r--r--lisp/simple.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index aec30025f35..f8f676e59b0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -732,13 +732,15 @@ This cannot be done asynchronously."
732 (unwind-protect 732 (unwind-protect
733 (progn 733 (progn
734 (set-buffer buffer) 734 (set-buffer buffer)
735 (setq opoint (point)) 735 (or (= (point) (point-max))
736 (setq opoint (point)))
736 (goto-char (point-max)) 737 (goto-char (point-max))
737 (insert-before-markers string)) 738 (insert-before-markers string))
738 ;; insert-before-markers moved this marker: set it back. 739 ;; insert-before-markers moved this marker: set it back.
739 (set-window-start window pos) 740 (set-window-start window pos)
740 ;; Finish our save-excursion. 741 ;; Finish our save-excursion.
741 (goto-char opoint) 742 (if opoint
743 (goto-char opoint))
742 (set-buffer obuf)))) 744 (set-buffer obuf))))
743 745
744(defun shell-command-on-region (start end command &optional flag interactive) 746(defun shell-command-on-region (start end command &optional flag interactive)