]> git.eshelyaron.com Git - emacs.git/commitdiff
(comint-send-input): Bind `inhibit-read-only' around call to `delete-region'.
authorLuc Teirlinck <teirllm@auburn.edu>
Thu, 9 Jun 2005 21:08:13 +0000 (21:08 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Thu, 9 Jun 2005 21:08:13 +0000 (21:08 +0000)
lisp/comint.el

index 37550b7b6d9c5c00ac63c89e79fd3fb99b90a2f5..0158aa5a2df4901e65ba2f4b59a5d9ccb5e522e2 100644 (file)
@@ -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.