unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: "Kazu Yamamoto (山本和彦)" <kazu@iij.ad.jp>, emacs-devel@gnu.org
Subject: Re: [bug] read-passwd of CVS Emacs
Date: Wed, 24 May 2006 20:37:05 -0400	[thread overview]
Message-ID: <E1Fj3qb-0000M3-86@fencepost.gnu.org> (raw)
In-Reply-To: <e520fo$ama$1@sea.gmane.org> (message from Kevin Rodgers on Wed,  24 May 2006 10:08:46 -0600)

    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))))
  	  success)
        (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)

  parent reply	other threads:[~2006-05-25  0:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24  3:37 [bug] read-passwd of CVS Emacs Kazu Yamamoto
2006-05-24 16:08 ` Kevin Rodgers
2006-05-24 16:35   ` David Kastrup
2006-05-24 18:29     ` Kevin Rodgers
2006-05-24 21:09       ` Johan Bockgård
2006-05-24 22:08       ` David Kastrup
2006-05-25  0:37   ` Richard Stallman [this message]
2006-05-25 16:31     ` Kevin Rodgers

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=E1Fj3qb-0000M3-86@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kazu@iij.ad.jp \
    /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).