branch: externals/doc-view-follow commit 6231996d460edd0f1ec1660cd1c2ce36b703230a Author: Paul Nelson <ultr...@gmail.com> Commit: Paul Nelson <ultr...@gmail.com>
Use lighterweight list iteration * doc-follow.el (doc-follow--sync-pages): Replace seq-do-indexed with a manual iteration using dolist and a counter variable. --- doc-follow.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc-follow.el b/doc-follow.el index a13488d459..cb4ddfef5c 100644 --- a/doc-follow.el +++ b/doc-follow.el @@ -110,15 +110,15 @@ by adding entries to this list.") (let* ((current-page (doc-follow--call-func cfg :current)) (max-page (doc-follow--call-func cfg :max)) (current-window (selected-window)) - (window-index (seq-position windows current-window))) - (seq-do-indexed - (lambda (win i) - (let ((target-page - (min max-page - (max 1 (+ current-page (- i window-index)))))) - (with-selected-window win - (doc-follow--call-func cfg :goto target-page)))) - windows)))))) + (window-index (seq-position windows current-window)) + (i 0)) + (dolist (win windows) + (let ((target-page + (min max-page + (max 1 (+ current-page (- i window-index)))))) + (with-selected-window win + (doc-follow--call-func cfg :goto target-page))) + (setq i (1+ i)))))))) (defun doc-follow--manage-advice (add-or-remove) "Add or remove advice for all functions in `doc-follow-modes'.