unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lektu@terra.es>
Subject: comint doesn't like read-only prompts
Date: Thu, 13 Jun 2002 10:35:41 +0200	[thread overview]
Message-ID: <20020613103231.CD52.LEKTU@terra.es> (raw)

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	other threads:[~2002-06-13  8:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-13  8:35 Juanma Barranquero [this message]
2002-06-13  8:51 ` comint doesn't like read-only prompts Miles Bader
2002-06-13  9:04   ` Juanma Barranquero
2002-06-13  9:12     ` Miles Bader
2002-06-13 10:04       ` Juanma Barranquero
2002-06-13 21:47 ` Richard Stallman
2002-06-14  8:43   ` Juanma Barranquero
2002-06-14  9:13     ` Miles Bader
2002-06-14  9:32       ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020613103231.CD52.LEKTU@terra.es \
    --to=lektu@terra.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).