From 5290d64d66b28422ded15574fcdf18e0b408dd21 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 24 Apr 2023 21:50:49 +0300 Subject: [PATCH] mu4e-headers: make mu4e~headers-prev-or-next-thread return (point) Or nil if not found. --- mu4e/mu4e-headers.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index 3c75b63a..edc62d1d 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -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."