From 754dc10d38308ef9c1fa9e7b766da5efe675307c Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 9 Jun 2005 21:08:13 +0000 Subject: [PATCH] (comint-send-input): Bind `inhibit-read-only' around call to `delete-region'. --- lisp/comint.el | 8 ++++++-- 1 file 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." nil comint-last-input-start comint-last-input-end nil comint-last-input-end (+ comint-last-input-end echo-len)))) - (delete-region comint-last-input-end - (+ comint-last-input-end echo-len))))) + ;; Certain parts of the text to be deleted may have + ;; been mistaken for prompts. We have to prevent + ;; problems when `comint-prompt-read-only' is non-nil. + (let ((inhibit-read-only t)) + (delete-region comint-last-input-end + (+ comint-last-input-end echo-len)))))) ;; This used to call comint-output-filter-functions, ;; but that scrolled the buffer in undesirable ways. -- 2.39.5