emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 248bff0 37/78: avy.el (avy--regex-candidates): Simplify


From: Oleh Krehel
Subject: [elpa] master 248bff0 37/78: avy.el (avy--regex-candidates): Simplify
Date: Sat, 23 Jan 2016 13:59:56 +0000

branch: master
commit 248bff08bb5d6526e01e234b3545fe9aed930287
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    avy.el (avy--regex-candidates): Simplify
    
    Remove the let-bound BEG and END that would shadow the function's args.
---
 avy.el |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/avy.el b/avy.el
index e0e9359..756a62e 100644
--- a/avy.el
+++ b/avy.el
@@ -586,17 +586,15 @@ When GROUP is non-nil, (BEG . END) should delimit that 
regex group."
       (dolist (pair (avy--find-visible-regions
                      (or beg (window-start))
                      (or end (window-end (selected-window) t))))
-        (let ((beg (car pair))
-              (end (cdr pair)))
-          (save-excursion
-            (goto-char beg)
-            (while (re-search-forward regex end t)
-              (unless (get-char-property (point) 'invisible)
-                (when (or (null pred)
-                          (funcall pred))
-                  (push (cons (cons (match-beginning group)
-                                    (match-end group))
-                              wnd) candidates))))))))
+        (save-excursion
+          (goto-char (car pair))
+          (while (re-search-forward regex (cdr pair) t)
+            (unless (get-char-property (point) 'invisible)
+              (when (or (null pred)
+                        (funcall pred))
+                (push (cons (cons (match-beginning group)
+                                  (match-end group))
+                            wnd) candidates)))))))
     (nreverse candidates)))
 
 (defvar avy--overlay-offset 0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]