]> git.eshelyaron.com Git - emacs.git/commitdiff
(comint-snapshot-last-prompt): Bind `inhibit-read-only' to t to support
authorJuanma Barranquero <lekktu@gmail.com>
Fri, 14 Jun 2002 09:41:35 +0000 (09:41 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Fri, 14 Jun 2002 09:41:35 +0000 (09:41 +0000)
read-only prompts.
(comint-output-filter): Likewise.

lisp/ChangeLog
lisp/comint.el

index 47b0bbe8d1afe40c5cb8d5cf8ab561be57318985..6f8eb87a388221293ee923773931b6c18708928d 100644 (file)
@@ -1,3 +1,9 @@
+2002-06-14  Juanma Barranquero  <lektu@terra.es>
+
+       * comint.el (comint-snapshot-last-prompt): Bind
+       `inhibit-read-only' to t to support read-only prompts.
+       (comint-output-filter): Likewise.
+
 2002-06-14  Miles Bader  <miles@gnu.org>
 
        * subr.el (copy-tree): Use `nconc' and `nreverse' instead of `nreconc'.
index ea06ab4ac5f5f3a29968dbc663913cbb18cc208a..6840e4d6c5addcb659a5312249e4132e1f889051 100644 (file)
@@ -1535,9 +1535,10 @@ either globally or locally.")
 ;; prompt overlay.
 (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)
   "Handle carriage control characters in comint output.
@@ -1661,10 +1662,11 @@ This function should be in the list `comint-output-filter-functions'."
            (set-marker (process-mark process) (point))
 
            (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
            ;; the most recent output that doesn't end with a newline.