X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-tag.el;fp=emacs%2Fnotmuch-tag.el;h=3c958dd44f693b4d9d94d9fdd9af68073c084a75;hp=c006026c1eefd018f4e1a78b755d5e00cc25fffd;hb=f47e3333b5478e43840e55710311aebdd441fc0e;hpb=25a8873c68f9ef033d393efaf7f4c46a29f798f4 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index c006026c..3c958dd4 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -406,8 +406,9 @@ Return all tags if no search terms are given." "\n+" t)) (defun notmuch-select-tag-with-completion (prompt &rest search-terms) - (let ((tag-list (apply #'notmuch-tag-completions search-terms))) - (completing-read prompt tag-list nil nil nil 'notmuch-select-tag-history))) + (completing-read prompt + (apply #'notmuch-tag-completions search-terms) + nil nil nil 'notmuch-select-tag-history)) (defun notmuch-read-tag-changes (current-tags &optional prompt initial-input) "Prompt for tag changes in the minibuffer. @@ -455,10 +456,9 @@ present or a \"-\" to indicate that the tag should be removed from TAGS if present." (let ((result-tags (copy-sequence tags))) (dolist (tag-change tag-changes) - (let ((op (aref tag-change 0)) - (tag (and (not (string= tag-change "")) + (let ((tag (and (not (string= tag-change "")) (substring tag-change 1)))) - (cl-case op + (cl-case (aref tag-change 0) (?+ (unless (member tag result-tags) (push tag result-tags))) (?- (setq result-tags (delete tag result-tags)))