GNU bug report logs - #41271
[PATCH 7/9] Cosmetic changes to epa libraries

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Jonas Bernoulli <jonas@HIDDEN>; Keywords: patch; merged with #41268, #41269, #41270, #41272, #41273, #41274, #41275, #41276, #41277; dated Thu, 14 May 2020 19:14:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 41268 41269 41270 41271 41272 41273 41274 41275 41276 41277. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 41268 41269 41270 41271 41272 41273 41274 41275 41276. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 41268 41269 41270 41271 41272 41273 41274 41276. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 41268 41269 41270 41271 41272 41273 41276. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 41268 41269 41270 41271 41272 41276. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 41268 41269 41270 41271 41276. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 May 2020 19:13:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 14 15:13:40 2020
Received: from localhost ([127.0.0.1]:34884 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jZJIZ-0001Rf-UH
	for submit <at> debbugs.gnu.org; Thu, 14 May 2020 15:13:40 -0400
Received: from lists.gnu.org ([209.51.188.17]:49240)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1jZJIY-0001RJ-7a
 for submit <at> debbugs.gnu.org; Thu, 14 May 2020 15:13:38 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56346)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jonas@HIDDEN>) id 1jZJIY-0005pE-3d
 for bug-gnu-emacs@HIDDEN; Thu, 14 May 2020 15:13:38 -0400
Received: from mail.hostpark.net ([212.243.197.30]:50328)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jonas@HIDDEN>) id 1jZJIV-0005PN-E3
 for bug-gnu-emacs@HIDDEN; Thu, 14 May 2020 15:13:37 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id 80E52166BF
 for <bug-gnu-emacs@HIDDEN>; Thu, 14 May 2020 21:13:27 +0200 (CEST)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id 5Ash_LgffqTj for <bug-gnu-emacs@HIDDEN>;
 Thu, 14 May 2020 21:13:27 +0200 (CEST)
Received: from customer (localhost [127.0.0.1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id BA7D7166C0
 for <bug-gnu-emacs@HIDDEN>; Thu, 14 May 2020 21:13:26 +0200 (CEST)
From: Jonas Bernoulli <jonas@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH 7/9] Cosmetic changes to epa libraries
Date: Thu, 14 May 2020 21:13:23 +0200
Message-Id: <20200514191325.22061-8-jonas@HIDDEN>
X-Mailer: git-send-email 2.26.0
In-Reply-To: <20200514191325.22061-1-jonas@HIDDEN>
References: <20200514191325.22061-1-jonas@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: none client-ip=212.243.197.30; envelope-from=jonas@HIDDEN;
 helo=mail.hostpark.net
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/14 15:13:27
X-ACL-Warn: Detected OS   = ???
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* lisp/epa-dired.el (epa-dired-do-decrypt, epa-dired-do-verify
epa-dired-do-sign, epa-dired-do-encrypt): Use dolist instead of while.

* lisp/epa-file.el (epa-file-passphrase-callback-function): Set just
  one variable per setq call.
---
 lisp/epa-dired.el | 44 ++++++++++++++++++--------------------------
 lisp/epa-file.el  |  4 ++--
 2 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el
index 1bcfb758ed..4ff1ba3394 100644
--- a/lisp/epa-dired.el
+++ b/lisp/epa-dired.el
@@ -30,48 +30,40 @@
 (defun epa-dired-do-decrypt ()
   "Decrypt marked files."
   (interactive)
-  (let ((file-list (dired-get-marked-files)))
-    (while file-list
-      (epa-decrypt-file (expand-file-name (car file-list)))
-      (setq file-list (cdr file-list)))
-    (revert-buffer)))
+  (dolist (file (dired-get-marked-files))
+    (epa-decrypt-file (expand-file-name file)))
+  (revert-buffer))
 
 ;;;###autoload
 (defun epa-dired-do-verify ()
   "Verify marked files."
   (interactive)
-  (let ((file-list (dired-get-marked-files)))
-    (while file-list
-      (epa-verify-file (expand-file-name (car file-list)))
-      (setq file-list (cdr file-list)))))
+  (dolist (file (dired-get-marked-files))
+    (epa-verify-file (expand-file-name file))))
 
 ;;;###autoload
 (defun epa-dired-do-sign ()
   "Sign marked files."
   (interactive)
-  (let ((file-list (dired-get-marked-files)))
-    (while file-list
-      (epa-sign-file
-       (expand-file-name (car file-list))
-       (epa-select-keys (epg-make-context) "Select keys for signing.
+  (dolist (file (dired-get-marked-files))
+    (epa-sign-file
+     (expand-file-name file)
+     (epa-select-keys (epg-make-context) "Select keys for signing.
 If no one is selected, default secret key is used.  "
-			nil t)
-       (y-or-n-p "Make a detached signature? "))
-      (setq file-list (cdr file-list)))
-    (revert-buffer)))
+		      nil t)
+     (y-or-n-p "Make a detached signature? ")))
+  (revert-buffer))
 
 ;;;###autoload
 (defun epa-dired-do-encrypt ()
   "Encrypt marked files."
   (interactive)
-  (let ((file-list (dired-get-marked-files)))
-    (while file-list
-      (epa-encrypt-file
-       (expand-file-name (car file-list))
-       (epa-select-keys (epg-make-context) "Select recipients for encryption.
-If no one is selected, symmetric encryption will be performed.  "))
-      (setq file-list (cdr file-list)))
-    (revert-buffer)))
+  (dolist (file (dired-get-marked-files))
+    (epa-encrypt-file
+     (expand-file-name file)
+     (epa-select-keys (epg-make-context) "Select recipients for encryption.
+If no one is selected, symmetric encryption will be performed.  ")))
+  (revert-buffer))
 
 (provide 'epa-dired)
 
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index 3e23c09a51..de51c59c34 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -66,8 +66,8 @@ epa-file-passphrase-callback-function
 	  (or (copy-sequence (cdr entry))
 	      (progn
 		(unless entry
-		  (setq entry (list file)
-			epa-file-passphrase-alist
+		  (setq entry (list file))
+		  (setq epa-file-passphrase-alist
 			(cons entry
 			      epa-file-passphrase-alist)))
 		(setq passphrase (epa-passphrase-callback-function context
-- 
2.26.0





Acknowledgement sent to Jonas Bernoulli <jonas@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#41271; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 14 May 2020 22:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.