From: Luc Teirlinck Date: Thu, 9 Jun 2005 21:08:13 +0000 (+0000) Subject: (comint-send-input): Bind `inhibit-read-only' around call to `delete-region'. X-Git-Tag: emacs-pretest-22.0.90~9171 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=754dc10d38308ef9c1fa9e7b766da5efe675307c;p=emacs.git (comint-send-input): Bind `inhibit-read-only' around call to `delete-region'. --- 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.