Use `notmuch-show-mapc' function instead of a custom `loop'. --- emacs/notmuch-show.el | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index e606224..4ec3fce 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1518,13 +1518,12 @@ i.e. a list of tags to change with '+' and '-' prefixes." i.e. a list of tags to change with '+' and '-' prefixes." (interactive (notmuch-select-tags-with-completion nil notmuch-show-thread-id)) (apply 'notmuch-tag (notmuch-show-get-messages-ids-search) changed-tags) - (save-excursion - (goto-char (point-min)) - (loop do (let* ((current-tags (notmuch-show-get-tags)) - (new-tags (notmuch-update-tags current-tags changed-tags))) - (unless (equal current-tags new-tags) - (notmuch-show-set-tags new-tags))) - while (notmuch-show-goto-message-next)))) + (notmuch-show-mapc + (lambda () + (let* ((current-tags (notmuch-show-get-tags)) + (new-tags (notmuch-update-tags current-tags changed-tags))) + (unless (equal current-tags new-tags) + (notmuch-show-set-tags new-tags)))))) (defun notmuch-show-add-tag () "Same as `notmuch-show-tag' but sets initial input to '+'." -- 1.7.8.3