# HG changeset patch # User Juanma Barranquero # Date 1024047680 0 # Node ID ffa13f09e36de180e73dca9f21efc42c94a1751a # Parent 35938e94ade96722d8286659241bc21420ea7903 (comint-snapshot-last-prompt): Bind `inhibit-read-only' to t to support read-only prompts. (comint-output-filter): Likewise. diff -r 35938e94ade9 -r ffa13f09e36d lisp/comint.el --- a/lisp/comint.el Fri Jun 14 08:28:35 2002 +0000 +++ b/lisp/comint.el Fri Jun 14 09:41:20 2002 +0000 @@ -1535,9 +1535,10 @@ ;; 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 @@ (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.