emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

comint doesn't like read-only prompts


From: Juanma Barranquero
Subject: comint doesn't like read-only prompts
Date: Thu, 13 Jun 2002 10:35:41 +0200

This patch to HEAD is needed to make ielm work again. The problem is
that the new handling of text-properties/attributes in comint.el is
choking while dealing with ielm's read-only prompt.

I've not installed the patch, so people more knowledgeable than me about
comint can take a look at it or suggest a better approach.


                                                           /L/e/k/t/u



Index: comint.el
===================================================================
RCS file: /cvs/emacs/lisp/comint.el,v
retrieving revision 1.273
diff -u -2 -r1.273 comint.el
--- comint.el   12 Jun 2002 09:16:51 -0000      1.273
+++ comint.el   13 Jun 2002 08:32:17 -0000
@@ -1538,7 +1538,8 @@
 (defun comint-snapshot-last-prompt ()
   (when comint-last-prompt-overlay
-    (add-text-properties (overlay-start comint-last-prompt-overlay)
-                        (overlay-end comint-last-prompt-overlay)
-                        (overlay-properties comint-last-prompt-overlay))))
+    (let ((inhibit-read-only t))
+      (add-text-properties (overlay-start comint-last-prompt-overlay)
+                           (overlay-end comint-last-prompt-overlay)
+                           (overlay-properties comint-last-prompt-overlay)))))
 
 (defun comint-carriage-motion (string)
@@ -1664,8 +1665,9 @@
 
            (unless comint-use-prompt-regexp-instead-of-fields
-             (add-text-properties comint-last-output-start (point)
-                                  '(rear-nonsticky t
-                                    field output
-                                    inhibit-line-move-field-capture t)))
+              (let ((inhibit-read-only t))
+                (add-text-properties comint-last-output-start (point)
+                                     '(rear-nonsticky t
+                                       field output
+                                       inhibit-line-move-field-capture t))))
 
            ;; Highlight the prompt, where we define `prompt' to mean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]