]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.el
notmuch.el: Don't require an extra press of space bar before archiving.
[notmuch] / notmuch.el
index cd5c896449a38c1c264b10096a829f796235c35c..8f0852b4185f8ec58858fa283375a97f2a6fbbed 100644 (file)
@@ -358,11 +358,10 @@ which this thread was originally shown."
        (unread (notmuch-show-message-unread-p)))
     (if (> next (window-end))
        (scroll-up nil)
-      (if unread
-         (notmuch-show-mark-read-then-next-open-message)
-       (if (notmuch-show-last-message-p)
-           (notmuch-show-archive-thread)
-         (notmuch-show-next-open-message))))))
+      (let ((last (notmuch-show-last-message-p)))
+       (notmuch-show-mark-read-then-next-open-message)
+       (if last
+           (notmuch-show-archive-thread))))))
 
 (defun notmuch-show-markup-citations-region (beg end)
   (goto-char beg)