mirror of https://github.com/djcb/mu.git
mu4e: tweak threading for thread-end
This commit is contained in:
parent
5290d64d66
commit
2c69a6d84b
|
@ -1532,12 +1532,8 @@ If MSG is nil, use message at point."
|
||||||
(defun mu4e~headers-prev-or-next-thread (backwards)
|
(defun mu4e~headers-prev-or-next-thread (backwards)
|
||||||
"Move point to the top of the next thread.
|
"Move point to the top of the next thread.
|
||||||
If BACKWARDS is non-`nil', move backwards."
|
If BACKWARDS is non-`nil', move backwards."
|
||||||
(interactive "P")
|
(when (mu4e-headers-find-if-next #'mu4e~headers-thread-root-p backwards)
|
||||||
(if (mu4e-headers-find-if-next #'mu4e~headers-thread-root-p backwards)
|
(point)))
|
||||||
(point)
|
|
||||||
(progn
|
|
||||||
(mu4e-message (format "No %s thread found" (if backwards "previous" "next")))
|
|
||||||
nil)))
|
|
||||||
|
|
||||||
(defun mu4e-headers-prev-thread ()
|
(defun mu4e-headers-prev-thread ()
|
||||||
"Move point to the previous thread."
|
"Move point to the previous thread."
|
||||||
|
|
|
@ -127,7 +127,7 @@ There are COUNT hidden and UNREAD messages overall."
|
||||||
"Test if thread at point is folded."
|
"Test if thread at point is folded."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((thread-beg (mu4e-thread-root))
|
(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)))
|
(overlays (overlays-in thread-beg thread-end)))
|
||||||
(catch 'folded
|
(catch 'folded
|
||||||
(dolist (overlay overlays)
|
(dolist (overlay overlays)
|
||||||
|
@ -220,7 +220,7 @@ Reset individual folding states."
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless (eq (line-end-position) (point-max))
|
(unless (eq (line-end-position) (point-max))
|
||||||
(let* ((thread-beg (mu4e-thread-root))
|
(let* ((thread-beg (mu4e-thread-root))
|
||||||
(thread-end (mu4e-thread-next))
|
(thread-end (or (mu4e-thread-next) (point-max)))
|
||||||
(unread-count 0)
|
(unread-count 0)
|
||||||
(fold-beg (save-excursion
|
(fold-beg (save-excursion
|
||||||
(goto-char thread-beg)
|
(goto-char thread-beg)
|
||||||
|
|
Loading…
Reference in New Issue