branch: elpa/scroll-on-jump
commit 7a51468bdd023b5e8d75e2aa5d99fd6f51b3fbe8
Author: Campbell Barton <[email protected]>
Commit: Campbell Barton <[email protected]>

    Cleanup: declare variable
---
 scroll-on-jump.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/scroll-on-jump.el b/scroll-on-jump.el
index f318f669f1..f85a56ca44 100644
--- a/scroll-on-jump.el
+++ b/scroll-on-jump.el
@@ -397,7 +397,8 @@ Argument ALSO-MOVE-POINT When non-nil, move the POINT as 
well."
                     (goto-char (window-start window))
                     (forward-line lines-scroll)))))))
 
-        (scroll-on-jump--scroll-impl window lines-scroll dir (not (eq (point) 
point-next))))))
+        (let ((also-move-point (not (eq (point) point-next))))
+          (scroll-on-jump--scroll-impl window lines-scroll dir 
also-move-point)))))
 
   (goto-char point-next))
 
@@ -460,12 +461,9 @@ Argument ALSO-MOVE-POINT When non-nil, move the POINT as 
well."
                       (dir
                         (if (< window-start-prev window-start-next)
                           1
-                          -1)))
-                    (scroll-on-jump--scroll-impl
-                      window
-                      (* dir lines-scroll)
-                      dir
-                      (not (eq (point) point-next)))))
+                          -1))
+                      (also-move-point (not (eq (point) point-next))))
+                    (scroll-on-jump--scroll-impl window (* dir lines-scroll) 
dir also-move-point)))
                 (goto-char point-next))
               (scroll-on-jump-auto-center window point-prev point-next))))))))
 

Reply via email to