X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=72f78edcbcd401e5a729b1586753c143734ce52d;hb=9b7e0dcb9a8bd8a5898d9dd68715f3a0d0e5280d;hp=291eca2e0b2dba51dc3d213f75abd36fd4505e98;hpb=f764bbd5446cb69b8e9ac0bbb2cebada0a87a86a;p=notmuch diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 291eca2e..72f78edc 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -891,12 +891,11 @@ characters as well as `_.+-'. "Operations (+add -drop): notmuch tag " '("+" "-"))) ;; Perform some validation - (let ((words actions)) - (when (null words) (error "No operations given")) - (while words - (unless (string-match-p "^[-+][-+_.[:word:]]+$" (car words)) - (error "Action must be of the form `+this_tag' or `-that_tag'")) - (setq words (cdr words)))) + (when (null actions) (error "No operations given")) + (mapc (lambda (action) + (unless (string-match-p "^[-+][-+_.[:word:]]+$" action) + (error "Action must be of the form `+this_tag' or `-that_tag'"))) + actions) (apply 'notmuch-tag notmuch-search-query-string actions)) (defun notmuch-search-buffer-title (query)