]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.el
notmuch.el: Add 'N' binding to mark message read and go to next.
[notmuch] / notmuch.el
index cd5c896449a38c1c264b10096a829f796235c35c..a07b248be57b04a76ac71367f619dc54bb0c140f 100644 (file)
@@ -33,6 +33,7 @@
     (define-key map "c" 'notmuch-show-toggle-citations-visible)
     (define-key map "h" 'notmuch-show-toggle-headers-visible)
     (define-key map "n" 'notmuch-show-next-message)
+    (define-key map "N" 'notmuch-show-mark-read-then-next-open-message)
     (define-key map "p" 'notmuch-show-previous-message)
     (define-key map (kbd "C-n") 'notmuch-show-next-line)
     (define-key map (kbd "C-p") 'notmuch-show-previous-line)
@@ -358,11 +359,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)