From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: [bug] read-passwd of CVS Emacs Date: Wed, 24 May 2006 18:35:05 +0200 Message-ID: <85u07f2xfq.fsf@lola.goethe.zz> References: <20060524.123750.178780620.kazu@iij.ad.jp> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1148488574 18266 80.91.229.2 (24 May 2006 16:36:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 May 2006 16:36:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 24 18:36:12 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FiwL3-0007CI-Hn for ged-emacs-devel@m.gmane.org; Wed, 24 May 2006 18:36:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiwL3-0002Dl-22 for ged-emacs-devel@m.gmane.org; Wed, 24 May 2006 12:36:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiwKc-000277-Ai for emacs-devel@gnu.org; Wed, 24 May 2006 12:35:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiwKb-00026f-8o for emacs-devel@gnu.org; Wed, 24 May 2006 12:35:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiwKb-00026Z-2C for emacs-devel@gnu.org; Wed, 24 May 2006 12:35:33 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FiwP4-0001nK-F9 for emacs-devel@gnu.org; Wed, 24 May 2006 12:40:10 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FiwKa-0008SH-34; Wed, 24 May 2006 12:35:32 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 0F87A1CE3148; Wed, 24 May 2006 18:35:06 +0200 (CEST) Original-To: Kevin Rodgers In-Reply-To: (Kevin Rodgers's message of "Wed, 24 May 2006 10:08:46 -0600") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55204 Archived-At: Kevin Rodgers writes: > Kazu Yamamoto (=E5=B1=B1=E6=9C=AC=E5=92=8C=E5=BD=A6) wrote: >> If the CONFIRM argument is specified to read-passwd of CVS Emacs, it >> causes an error after a user type a first password. >> >> (read-passwd "password: " t) > > The error is "Attempt to modify read-only object" and is somehow caused > by a string indexing bug. Here's a patch: > > 2006-05-24 Kevin Rodgers > > * subr.el (read-passwd): Fix END argument to add-text-properties. > > > *** lisp/subr.el~ 2006-04-22 06:42:24.750000000 -0600 > --- lisp/subr.el 2006-05-24 09:56:54.555250000 -0600 > *************** > *** 1542,1548 **** > (echo-keystrokes 0) > (cursor-in-echo-area t) > (message-log-max nil)) > ! (add-text-properties 0 (length prompt) > minibuffer-prompt-properties prompt) > (while (progn (message "%s%s" > prompt > --- 1542,1548 ---- > (echo-keystrokes 0) > (cursor-in-echo-area t) > (message-log-max nil)) > ! (add-text-properties 0 (1- (length prompt)) > minibuffer-prompt-properties prompt) > (while (progn (message "%s%s" > prompt Looks like causing trouble when the prompt is an empty string. And it looks like it would leave the properties off the last character of the prompt. Correct? --=20 David Kastrup, Kriemhildstr. 15, 44793 Bochum