[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/autocrypt a56b2806f3 08/94: fixed undefined autocrypt-l
From: |
ELPA Syncer |
Subject: |
[elpa] externals/autocrypt a56b2806f3 08/94: fixed undefined autocrypt-list-recipients bug |
Date: |
Sun, 26 Mar 2023 07:57:56 -0400 (EDT) |
branch: externals/autocrypt
commit a56b2806f354d8dea7b16919062b0a3efda2b57c
Author: Philip K <philip@warpmail.net>
Commit: Philip K <philip@warpmail.net>
fixed undefined autocrypt-list-recipients bug
---
autocrypt.el | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/autocrypt.el b/autocrypt.el
index 011c8da0ac..b2991a9644 100644
--- a/autocrypt.el
+++ b/autocrypt.el
@@ -119,7 +119,8 @@ Every member of this list has to be an instance of the
:header autocrypt-mu4e-header)
(message
:install autocrypt-message-install
- :uninstall autocrypt-message-uninstall))
+ :uninstall autocrypt-message-uninstall
+ :header message-fetch-field))
"Alist for all MUA specific functions.
The value of each record is a plist. The value of each property
@@ -264,6 +265,15 @@ well-formed, otherwise returns just nil."
(goto-char (match-end 0))))
(and addr keydata (list addr pref keydata)))))
+(defun autocrypt-list-recipients ()
+ "Return a list of all recipients to this message."
+ (let (recipients)
+ (dolist (hdr '("To" "Cc" "Reply-To"))
+ (let* ((f (autocrypt-mua-call :header hdr))
+ (r (and f (mail-extract-address-components f t))))
+ (setq recipients (nconc (mapcar #'cadr r) recipients))))
+ (delete-dups recipients)))
+
;;;
https://autocrypt.org/level1.html#updating-autocrypt-peer-state-from-key-gossip
(defun autocrypt-process-gossip (date)
"Update internal autocrypt gossip state.
@@ -479,7 +489,7 @@ preference (\"prefer-encrypt\")."
;;; MU4E SUPPORT
(with-eval-after-load 'mu4e
- ;; setup with (advice-add 'mu4e :after (lambda (&rest _) (autocrypt-mode)))
+ ;; setup with (add-hook 'mu4e-main-mode-hook #'autocrypt-mode)
(defun autocrypt-mu4e-install ()
"Install autocrypt hooks for mu4e."
@@ -514,15 +524,6 @@ preference (\"prefer-encrypt\")."
(remove-hook 'message-send-hook #'autocrypt-message-pre-send)
(define-key message-mode-map (kbd "C-c RET C-a") nil))
- (defun autocrypt-message-list-recipients ()
- "Return a list of all recipients to this message."
- (let (recipients)
- (dolist (hdr '("To" "Cc" "Reply-To"))
- (let* ((f (message-field-value hdr))
- (r (and f (mail-extract-address-components f t))))
- (setq recipients (nconc (mapcar #'cadr r) recipients))))
- (delete-dups recipients)))
-
;;
https://autocrypt.org/level1.html#key-gossip-injection-in-outbound-messages
(defun autocrypt-message-gossip-p (recipients)
"Find out if the current message should have gossip headers."
@@ -537,7 +538,7 @@ preference (\"prefer-encrypt\")."
(defun autocrypt-message-setup ()
"Check if Autocrypt is possible, and add pseudo headers."
(interactive)
- (let ((recs (autocrypt-message-list-recipients))
+ (let ((recs (autocrypt-list-recipients))
(from (autocrypt-canonicalise (message-field-value "from"))))
;; encrypt message if applicable
(save-excursion
@@ -551,7 +552,7 @@ preference (\"prefer-encrypt\")."
"Insert Autocrypt headers before sending a message.
Will handle and remove \"Do-(Discourage-)Autocrypt\" if found."
- (let* ((recs (autocrypt-message-list-recipients))
+ (let* ((recs (autocrypt-list-recipients))
(from (autocrypt-canonicalise (message-field-value "from"))))
;; encrypt message if applicable
(when (eq (autocrypt-recommendation from recs) 'encrypt)
- [elpa] externals/autocrypt a5d67301c1 57/94: Revert to custom generic backend system, (continued)
- [elpa] externals/autocrypt a5d67301c1 57/94: Revert to custom generic backend system, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 8965ce57c7 74/94: Add references to autocrypt-backends to all generic functions, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt c439cbe029 76/94: Update "How to use" section to demonstrate configuring without setup, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt ff87f73f00 77/94: Install process-header into gnus-select-article-hook, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt a89bbd717e 79/94: Fix custom type of autocrypt-process-header, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 9e393f869a 81/94: Adjust header formatting, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 46557b4403 92/94: Relicense autocrypt under GPL-3, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 977a60aa04 93/94: Assign copyright to the FSF, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 373194a318 03/94: added license, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 5fec39262e 05/94: updated minimal package requirement, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt a56b2806f3 08/94: fixed undefined autocrypt-list-recipients bug,
ELPA Syncer <=
- [elpa] externals/autocrypt 1491d9de1e 07/94: fixed checkdoc complaints, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt dae7c32262 15/94: turned autoload calls into autoload comments, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt b903929bf3 17/94: reindented autocrypt-list-recipients, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt f970fb51c8 19/94: added melpa link to readme, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt a0b03bd459 25/94: removed version tag from autocrypt group, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt a16bf93ba8 26/94: made autocrypt-gossip-p depend on autocrypt-do-gossip, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 73d21d9de9 27/94: replaced write-file with write-region, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 4824fb6e4b 29/94: Recognize Mu4e as MUA, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 2f9f3ee4c6 31/94: Add major-mode indicator to autocrypt file, ELPA Syncer, 2023/03/26
- [elpa] externals/autocrypt 050d496716 32/94: Fix mu4e setup when composing new messages, ELPA Syncer, 2023/03/26