aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
authorGravatar Dmitry Kurochkin <dmitry.kurochkin@gmail.com>2012-01-26 21:34:49 +0400
committerGravatar David Bremner <bremner@debian.org>2012-01-27 07:46:05 -0400
commit58d714e5ced2b6d16dcbd91589715e5ec52c97b4 (patch)
treef5bd98dc30dcadf7e971e508ad2445b984900538 /emacs/notmuch.el
parentf764bbd5446cb69b8e9ac0bbb2cebada0a87a86a (diff)
emacs: `notmuch-search-operate-all' code cleanup, no functional changes
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el11
1 files changed, 5 insertions, 6 deletions
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)