branch: externals/autocrypt
commit 8bdddf38ffcd1a28c208624526c0e14434917022
Author: Philip K <[email protected]>
Commit: Philip K <[email protected]>
Save autocrypt data when modified
---
autocrypt.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/autocrypt.el b/autocrypt.el
index ef65a0f603..0fbd85893a 100644
--- a/autocrypt.el
+++ b/autocrypt.el
@@ -300,7 +300,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-peers)))))))
+ (autocrypt-save-data))
;; https://autocrypt.org/level1.html#updating-autocrypt-peer-state
(defun autocrypt-process-header ()
@@ -333,7 +334,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))))))
+ (push (cons addr peer) autocrypt-peers)))))
+ (autocrypt-save-data))
(defun autocrypt-insert-keydata (data)
"Insert raw keydata DATA as base64 at point."
@@ -483,13 +485,11 @@ Will handle and remove \"Do-(Discourage-)Autocrypt\" if
found."
(let ((res (epg-context-result-for ctx 'generate-key)))
(unless res
(error "Could not determine fingerprint"))
- (customize-save-variable
- 'autocrypt-accounts
- (cons (list email (cdr (assq 'fingerprint (car res))) 'none)
- autocrypt-accounts)
- "Customized by autocrypt.el"))
+ (push (list email (cdr (assq 'fingerprint (car res))) 'none)
+ autocrypt-accounts))
(message "Successfully generated key for %s, and added to key chain."
- email)))
+ email))
+ (autocrypt-save-data))
;;; MINOR MODES