summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-04-18 22:41:49 +0000
committerRichard M. Stallman <rms@gnu.org>1994-04-18 22:41:49 +0000
commit4482fc6f0bb38cb2675b5510cf251a9db12bf472 (patch)
tree9d5992ce15aed711ea81aab19f8180c2ab89e041
parentdcb3594ba1c76f3fb70089dbbaa50351b166a882 (diff)
downloademacs-4482fc6f0bb38cb2675b5510cf251a9db12bf472.tar.gz
(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."
(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)