From: Simon Marshall Date: Mon, 26 May 1997 09:53:59 +0000 (+0000) Subject: Use insert to preserve marker positions (pmark) and delete last. X-Git-Tag: emacs-20.1~1989 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ff6318be1ff2ce70ce28b78d315d5a2cb7648bef;p=emacs.git Use insert to preserve marker positions (pmark) and delete last. --- diff --git a/lisp/comint.el b/lisp/comint.el index 8ae8787d2e3..6e6691dea87 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1218,9 +1218,10 @@ Similarly for Soar, Scheme, etc." ;; functions used do insertion, rather than return ;; strings. We have to expand, then insert back. (comint-replace-by-expanded-history t) - (let ((copy (buffer-substring pmark (point)))) - (delete-region pmark (point)) - (insert-before-markers input) + (let ((copy (buffer-substring pmark (point))) + (start (point))) + (insert input) + (delete-region pmark start) copy)))) (if comint-process-echoes (delete-region pmark (point))