diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index edc62d1d..673ceea3 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -1532,12 +1532,8 @@ If MSG is nil, use message at point." (defun mu4e~headers-prev-or-next-thread (backwards) "Move point to the top of the next thread. If BACKWARDS is non-`nil', move backwards." - (interactive "P") - (if (mu4e-headers-find-if-next #'mu4e~headers-thread-root-p backwards) - (point) - (progn - (mu4e-message (format "No %s thread found" (if backwards "previous" "next"))) - nil))) + (when (mu4e-headers-find-if-next #'mu4e~headers-thread-root-p backwards) + (point))) (defun mu4e-headers-prev-thread () "Move point to the previous thread." diff --git a/mu4e/mu4e-thread.el b/mu4e/mu4e-thread.el index bcbf5b1e..150e7e52 100644 --- a/mu4e/mu4e-thread.el +++ b/mu4e/mu4e-thread.el @@ -127,7 +127,7 @@ There are COUNT hidden and UNREAD messages overall." "Test if thread at point is folded." (interactive) (let* ((thread-beg (mu4e-thread-root)) - (thread-end (mu4e-thread-next)) + (thread-end (or (mu4e-thread-next) (point-max))) (overlays (overlays-in thread-beg thread-end))) (catch 'folded (dolist (overlay overlays) @@ -220,7 +220,7 @@ Reset individual folding states." (interactive) (unless (eq (line-end-position) (point-max)) (let* ((thread-beg (mu4e-thread-root)) - (thread-end (mu4e-thread-next)) + (thread-end (or (mu4e-thread-next) (point-max))) (unread-count 0) (fold-beg (save-excursion (goto-char thread-beg)