aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2005-06-09 21:08:13 +0000
committerLuc Teirlinck2005-06-09 21:08:13 +0000
commit754dc10d38308ef9c1fa9e7b766da5efe675307c (patch)
tree06642f1226a4a184cdfd55ee8fc9e9bc9137c610
parentfd8529d0a1e651aa096def7978cf323514abee91 (diff)
downloademacs-754dc10d38308ef9c1fa9e7b766da5efe675307c.tar.gz
emacs-754dc10d38308ef9c1fa9e7b766da5efe675307c.zip
(comint-send-input): Bind `inhibit-read-only' around call to `delete-region'.
-rw-r--r--lisp/comint.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 37550b7b6d9..0158aa5a2df 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1547,8 +1547,12 @@ Similarly for Soar, Scheme, etc."
1547 nil comint-last-input-start comint-last-input-end 1547 nil comint-last-input-start comint-last-input-end
1548 nil comint-last-input-end 1548 nil comint-last-input-end
1549 (+ comint-last-input-end echo-len)))) 1549 (+ comint-last-input-end echo-len))))
1550 (delete-region comint-last-input-end 1550 ;; Certain parts of the text to be deleted may have
1551 (+ comint-last-input-end echo-len))))) 1551 ;; been mistaken for prompts. We have to prevent
1552 ;; problems when `comint-prompt-read-only' is non-nil.
1553 (let ((inhibit-read-only t))
1554 (delete-region comint-last-input-end
1555 (+ comint-last-input-end echo-len))))))
1552 1556
1553 ;; This used to call comint-output-filter-functions, 1557 ;; This used to call comint-output-filter-functions,
1554 ;; but that scrolled the buffer in undesirable ways. 1558 ;; but that scrolled the buffer in undesirable ways.