]> git.cworth.org Git - notmuch/blobdiff - emacs/notmuch-message.el
emacs: improve how cl-lib and pcase are required
[notmuch] / emacs / notmuch-message.el
index 9dc8d056146cd15cdbc179f82582206ae92d1b75..b90c934af4856c49d6ff7c32a2f7c909f03abf14 100644 (file)
@@ -21,6 +21,9 @@
 
 ;;; Code:
 
+(require 'cl-lib)
+(require 'pcase)
+
 (require 'message)
 (require 'notmuch-tag)
 
@@ -62,9 +65,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)