---
autocrypt.el | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/autocrypt.el b/autocrypt.el
index 965f661..5fd6b6f 100644
--- a/autocrypt.el
+++ b/autocrypt.el
@@ -510,11 +510,8 @@ 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)
+ (autocrypt-save-data))
(message "Successfully generated key for %s, and added to key chain."
email)))
--
2.29.2
"Samuel W. Flint" <swflint@flintfam.org> writes:
> ---
> autocrypt.el | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/autocrypt.el b/autocrypt.el
> index 965f661..5fd6b6f 100644
> --- a/autocrypt.el
> +++ b/autocrypt.el
> @@ -510,11 +510,8 @@ 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)
This is a good point. autocrypt-accounts was until recently a custom
option, but shouldn't has been recently changed.
> + (autocrypt-save-data))
If we always save the data after modifying something, I don't think it's
necessary to call autocrypt-save-data in emacs-kill-hook and when
deactivating autocrypt-mode.
> (message "Successfully generated key for %s, and added to key chain."
> email)))
--
Philip K.