mu4e-headers: make mu4e~headers-prev-or-next-thread return (point)

Or nil if not found.
This commit is contained in:
Dirk-Jan C. Binnema 2023-04-24 21:50:49 +03:00
parent e2947f181d
commit 5290d64d66
1 changed files with 5 additions and 3 deletions

View File

@ -1533,9 +1533,11 @@ If MSG is nil, use message at point."
"Move point to the top of the next thread.
If BACKWARDS is non-`nil', move backwards."
(interactive "P")
(or (mu4e-headers-find-if-next #'mu4e~headers-thread-root-p backwards)
(mu4e-message (format "No %s thread found"
(if backwards "previous" "next")))))
(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)))
(defun mu4e-headers-prev-thread ()
"Move point to the previous thread."