From: Richard M. Stallman Date: Mon, 18 Apr 1994 22:41:49 +0000 (+0000) Subject: (shell-command-filter): If point was at end, leave it at end. X-Git-Tag: emacs-19.34~8902 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3886f8e2299a4e31477af502210ebd7c2fac1bb6;p=emacs.git (shell-command-filter): If point was at end, leave it at end. --- 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)