X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;fp=emacs%2Fnotmuch-tree.el;h=254664c4718bfa0affbeb48b4e76054f3db022fa;hp=e5c23de260d478fc01f2f5d7af7f3aaf0e150120;hb=11ac932a4503872c19987b843d58513c4b9ef76f;hpb=7b756d1e3885b70e81647a85432e0f2d043167c9 diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index e5c23de2..254664c4 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -24,6 +24,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (require 'mail-parse) (require 'notmuch-lib) @@ -32,7 +34,6 @@ (require 'notmuch-tag) (require 'notmuch-parser) -(eval-when-compile (require 'cl)) (declare-function notmuch-search "notmuch" (&optional query oldest-first target-thread target-line)) (declare-function notmuch-call-notmuch-process "notmuch" (&rest args)) (declare-function notmuch-read-query "notmuch" (prompt)) @@ -721,10 +722,10 @@ found or nil if not." and call FUNCTION for side effects." (save-excursion (notmuch-tree-thread-top) - (loop collect (funcall function) - do (forward-line) - while (and (notmuch-tree-get-message-properties) - (not (notmuch-tree-get-prop :first)))))) + (cl-loop collect (funcall function) + do (forward-line) + while (and (notmuch-tree-get-message-properties) + (not (notmuch-tree-get-prop :first)))))) (defun notmuch-tree-get-messages-ids-thread-search () "Return a search string for all message ids of messages in the current thread." @@ -905,10 +906,11 @@ message together with all its descendents." (defun notmuch-tree-insert-thread (thread depth tree-status) "Insert the collection of sibling sub-threads THREAD at depth DEPTH in the current forest." (let ((n (length thread))) - (loop for tree in thread - for count from 1 to n - - do (notmuch-tree-insert-tree tree depth tree-status (eq count 1) (eq count n))))) + (cl-loop for tree in thread + for count from 1 to n + do (notmuch-tree-insert-tree tree depth tree-status + (eq count 1) + (eq count n))))) (defun notmuch-tree-insert-forest-thread (forest-thread) "Insert a single complete thread."