X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-message.el;h=0164472f7b48e90d7a4ad74c27c390bccb270dc4;hp=9dc8d056146cd15cdbc179f82582206ae92d1b75;hb=HEAD;hpb=117501d5ceb332063adfeadc961e8c053f2cd942 diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el index 9dc8d056..0856a2e9 100644 --- a/emacs/notmuch-message.el +++ b/emacs/notmuch-message.el @@ -21,6 +21,10 @@ ;;; Code: +(require 'cl-lib) +(require 'pcase) +(require 'subr-x) + (require 'message) (require 'notmuch-tag) @@ -62,9 +66,8 @@ applied to the matching messages.") (defun notmuch-message-apply-queued-tag-changes () ;; Apply the tag changes queued in the buffer-local variable ;; notmuch-message-queued-tag-changes. - (dolist (query-and-tags notmuch-message-queued-tag-changes) - (notmuch-tag (car query-and-tags) - (cdr query-and-tags)))) + (pcase-dolist (`(,query . ,tags) notmuch-message-queued-tag-changes) + (notmuch-tag query tags))) (add-hook 'message-send-hook 'notmuch-message-apply-queued-tag-changes)