[Top][All Lists]

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

Re: [bug] read-passwd of CVS Emacs

From: Richard Stallman
Subject: Re: [bug] read-passwd of CVS Emacs
Date: Wed, 24 May 2006 20:37:05 -0400

    The error is "Attempt to modify read-only object" and is somehow caused
    by a string indexing bug.  Here's a patch:

There is no indexing bug.  The bug is that it modifies the string
that was passed in by the caller.

This seems to fix it for me.  But I see that you proposed
another change, putting various other properties on the prompt.
Is that still necessary, when this is done?  I think it won't
be needed, because this prompt doesn't go in the minibuffer,
so you can't move point over it or insert other text after it.

Index: subr.el
RCS file: /cvsroot/emacs/emacs/lisp/subr.el,v
retrieving revision 1.511
diff -c -c -r1.511 subr.el
*** subr.el     24 May 2006 13:22:12 -0000      1.511
--- subr.el     24 May 2006 22:06:17 -0000
*** 1637,1642 ****
--- 1637,1645 ----
                (sit-for 1))))
        (let ((pass nil)
+           ;; Copy it so that add-text-properties won't modify
+           ;; the object that was passed in by the caller.
+           (prompt (copy-sequence prompt))
            (c 0)
            (echo-keystrokes 0)
            (cursor-in-echo-area t)

reply via email to

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