mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 13:33:03 +00:00
avy.el (avy--regex-candidates): Simplify
Remove the let-bound BEG and END that would shadow the function's args.
This commit is contained in:
parent
70bd6cec70
commit
248bff08bb
20
avy.el
20
avy.el
@ -586,17 +586,15 @@ When GROUP is non-nil, (BEG . END) should delimit that regex group."
|
|||||||
(dolist (pair (avy--find-visible-regions
|
(dolist (pair (avy--find-visible-regions
|
||||||
(or beg (window-start))
|
(or beg (window-start))
|
||||||
(or end (window-end (selected-window) t))))
|
(or end (window-end (selected-window) t))))
|
||||||
(let ((beg (car pair))
|
(save-excursion
|
||||||
(end (cdr pair)))
|
(goto-char (car pair))
|
||||||
(save-excursion
|
(while (re-search-forward regex (cdr pair) t)
|
||||||
(goto-char beg)
|
(unless (get-char-property (point) 'invisible)
|
||||||
(while (re-search-forward regex end t)
|
(when (or (null pred)
|
||||||
(unless (get-char-property (point) 'invisible)
|
(funcall pred))
|
||||||
(when (or (null pred)
|
(push (cons (cons (match-beginning group)
|
||||||
(funcall pred))
|
(match-end group))
|
||||||
(push (cons (cons (match-beginning group)
|
wnd) candidates)))))))
|
||||||
(match-end group))
|
|
||||||
wnd) candidates))))))))
|
|
||||||
(nreverse candidates)))
|
(nreverse candidates)))
|
||||||
|
|
||||||
(defvar avy--overlay-offset 0
|
(defvar avy--overlay-offset 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user