]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-message.el
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / emacs / notmuch-message.el
index 9dc8d056146cd15cdbc179f82582206ae92d1b75..0856a2e943e6e4cb38d38759d976a512651edb4b 100644 (file)
 
 ;;; 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)