From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#22027: 25.1.50; Return uncorrupted default string Date: Sat, 03 Jun 2017 23:51:13 -0400 Message-ID: <87poekz9zi.fsf@users.sourceforge.net> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1496548210 28388 195.159.176.226 (4 Jun 2017 03:50:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Jun 2017 03:50:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 22027@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 04 05:50:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHMYH-00076U-Bj for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Jun 2017 05:50:05 +0200 Original-Received: from localhost ([::1]:55680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHMYM-0002V3-R4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Jun 2017 23:50:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHMYH-0002Uq-Fp for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 23:50:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHMYE-0006KN-Az for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 23:50:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51811) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHMYE-0006K6-6K for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 23:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHMYE-0005ZX-0E for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 23:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Jun 2017 03:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22027 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22027-submit@debbugs.gnu.org id=B22027.149654818421389 (code B ref 22027); Sun, 04 Jun 2017 03:50:01 +0000 Original-Received: (at 22027) by debbugs.gnu.org; 4 Jun 2017 03:49:44 +0000 Original-Received: from localhost ([127.0.0.1]:54488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHMXw-0005Yv-74 for submit@debbugs.gnu.org; Sat, 03 Jun 2017 23:49:44 -0400 Original-Received: from mail-it0-f44.google.com ([209.85.214.44]:36741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHMXt-0005Yf-PX for 22027@debbugs.gnu.org; Sat, 03 Jun 2017 23:49:42 -0400 Original-Received: by mail-it0-f44.google.com with SMTP id m47so36967200iti.1 for <22027@debbugs.gnu.org>; Sat, 03 Jun 2017 20:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=/L1Xz7rGt3JH5+okYefuZaLqP8fYwQKaWex9nekXeZk=; b=vInfOob2y2MWSQ0Oi8x6b/vWo7Gg8BpdNSy2Jto2sGsEo8QZOwrXW7bimiEQdR2LAI 4QGNxx5m6+1/vghCU0nl0x47yqL+7Il/jz4H0fs1ZvQAp4VsXsnEI2iAZE6usbeVlJU5 7GKCUcLvMn/I5tyWM0OvqlnVu/Sasv4tlYo6c5nQs+RnZCnIP0RAmMqfLsvuUdQNG5kK GalfznN48CF6/0vC7/xPcMHtW12OxQektB815n1CtRbJCBjiXwLfu2AT55WHseSh9F86 Mk8viP+eGRsgoji3pyMQu/kA41NYqQazanTioGhdfJbG08PgU+9HBdFNx8/G5MZ8gPAk IEtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=/L1Xz7rGt3JH5+okYefuZaLqP8fYwQKaWex9nekXeZk=; b=UTN9t746D3jpXXojIN4bkGRYpG8Al3F5nejxuFEtFnOxlJLt6NVPFM7gfbTjN6wiGC L4ok75iM7Ccx5jw1QwfdY/u2bK6erIydL0Kjtj7sY4/1oZQw8ijbwdyNVDMFJX+G9b3l pxe6yjcSBdiNVYAZkMLnTjRjL7D0U/zu2y3RU1pOAGCfdiEW52ImvK0pn4KLFdyxpvh9 OBu3maBv5qFshz0GjIUn7CczTV4t6is1//wc1vilEkoamS1Wfj5Yl3oA5WJ4mZG2taVq +Q2Gh9eMo4z7cNece6wHOfoMVnLwUw6mZC4I++MMpCHBJODnhuSDpNlaGlFuD98Or3O3 RQGg== X-Gm-Message-State: AODbwcB9uFLDzdiUe7nmuxgRKzKLdE0hNjgQTmEh2Oo/B+16X76hs59P qNMuQgTbB+p5d7q/ X-Received: by 10.36.122.196 with SMTP id a187mr6825121itc.16.1496548176162; Sat, 03 Jun 2017 20:49:36 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id u140sm5154683ita.0.2017.06.03.20.49.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Jun 2017 20:49:35 -0700 (PDT) In-Reply-To: (Tino Calancha's message of "Mon, 9 May 2016 12:26:13 +0900 (JST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133244 Archived-At: --=-=-= Content-Type: text/plain Tino Calancha writes: > + (setq success (copy-sequence first)) > + (when (and (arrayp first) > + (not (string= first ""))) > + (clear-string first) > + (clear-string second))) I think that is too complicated, how about this instead: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-lisp-subr.el-read-passwd-Don-t-delete-return-valu.patch Content-Description: patch >From 739ab77ca99a57f10088aa8a9f2c079c1727a071 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 3 Jun 2017 23:41:53 -0400 Subject: [PATCH v1] * lisp/subr.el (read-passwd): Don't delete return value (Bug#22027). --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 9b3e53b70b..76c13a8d23 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2268,7 +2268,7 @@ (defun read-passwd (prompt &optional confirm default) (second (read-passwd "Confirm password: " nil default))) (if (equal first second) (progn - (and (arrayp second) (clear-string second)) + (and (arrayp second) (not (eq first second)) (clear-string second)) (setq success first)) (and (arrayp first) (clear-string first)) (and (arrayp second) (clear-string second)) -- 2.11.1 --=-=-=--