1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Use insert to preserve marker positions (pmark) and delete last.

This commit is contained in:
Simon Marshall 1997-05-26 09:53:59 +00:00
parent eddd51c280
commit ff6318be1f

View File

@ -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))