emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/autocrypt 72c903656e 50/94: Attempt to only save autocr


From: ELPA Syncer
Subject: [elpa] externals/autocrypt 72c903656e 50/94: Attempt to only save autocrypt file if necessary
Date: Sun, 26 Mar 2023 07:58:00 -0400 (EDT)

branch: externals/autocrypt
commit 72c903656e349d55532b65cf7f60fccb3f8b3460
Author: Philip K <philipk@posteo.net>
Commit: Philip K <philipk@posteo.net>

    Attempt to only save autocrypt file if necessary
---
 autocrypt.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/autocrypt.el b/autocrypt.el
index 3ed7489d0c..e96c6e799a 100644
--- a/autocrypt.el
+++ b/autocrypt.el
@@ -298,8 +298,8 @@ Argument DATE contains the time value of the \"From\" tag."
               (push (cons addr (make-autocrypt-peer
                                 :gossip-timestamp date
                                 :gossip-key (caddr datum)))
-                    autocrypt-peers)))))))
-  (autocrypt-save-data))
+                    autocrypt-peers))))
+        (autocrypt-save-data)))))
 
 ;; https://autocrypt.org/level1.html#updating-autocrypt-peer-state
 (defun autocrypt-process-header ()
@@ -332,8 +332,8 @@ Argument DATE contains the time value of the \"From\" tag."
                   (autocrypt-peer-pubkey peer) keydata)
           (setf (autocrypt-peer-deactivated peer) t))
         (unless (assoc addr autocrypt-peers)
-          (push (cons addr peer) autocrypt-peers)))))
-  (autocrypt-save-data))
+          (push (cons addr peer) autocrypt-peers))
+        (autocrypt-save-data)))))
 
 (defun autocrypt-insert-keydata (data)
   "Insert raw keydata DATA as base64 at point."
@@ -485,9 +485,9 @@ Will handle and remove \"Do-(Discourage-)Autocrypt\" if 
found."
         (error "Could not determine fingerprint"))
       (push (list email (cdr (assq 'fingerprint (car res))) 'none)
             autocrypt-accounts))
+    (autocrypt-save-data)
     (message "Successfully generated key for %s, and added to key chain."
-             email))
-  (autocrypt-save-data))
+             email)))
 
 
 ;;; MINOR MODES



reply via email to

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