]> git.eshelyaron.com Git - emacs.git/commitdiff
Use insert to preserve marker positions (pmark) and delete last.
authorSimon Marshall <simon@gnu.org>
Mon, 26 May 1997 09:53:59 +0000 (09:53 +0000)
committerSimon Marshall <simon@gnu.org>
Mon, 26 May 1997 09:53:59 +0000 (09:53 +0000)
lisp/comint.el

index 8ae8787d2e3ad7c1acd850c97b3d5de820284010..6e6691dea876f6166fa3711a7da99467b2d046e7 100644 (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))