changeset 63170:14aba7b7076a

(comint-send-input): Bind `inhibit-read-only' around call to `delete-region'.
author Luc Teirlinck <teirllm@auburn.edu>
date Thu, 09 Jun 2005 21:08:13 +0000
parents dd314823ab7d
children 59d16dccffc5
files lisp/comint.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Thu Jun 09 14:04:18 2005 +0000
+++ b/lisp/comint.el	Thu Jun 09 21:08:13 2005 +0000
@@ -1547,8 +1547,12 @@
 		     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.