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

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

[elpa] master fcc64ab 59/68: avy-jump.el (avi--regex-candidates): Add op


From: Oleh Krehel
Subject: [elpa] master fcc64ab 59/68: avy-jump.el (avi--regex-candidates): Add optional bounds
Date: Sat, 21 Mar 2015 19:07:09 +0000

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

    avy-jump.el (avi--regex-candidates): Add optional bounds
---
 avy-jump.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/avy-jump.el b/avy-jump.el
index 5045160..672ffcb 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -75,16 +75,16 @@ POS is either a position or (BEG . END)."
                       #'aw--remove-leading-chars))))
     (aw--done)))
 
-(defun avi--regex-candidates (regex &optional wnd)
+(defun avi--regex-candidates (regex &optional wnd beg end)
   "Return all elements that match REGEX in WND.
 Each element of the list is ((BEG . END) . WND)."
   (setq wnd (or wnd (selected-window)))
-  (let ((we (window-end (selected-window) t))
+  (let ((we (or end (window-end (selected-window) t)))
         candidates)
     (save-window-excursion
       (select-window wnd)
       (save-excursion
-        (goto-char (window-start))
+        (goto-char (or beg (window-start)))
         (while (re-search-forward regex we t)
           (push (cons (cons (match-beginning 0)
                             (match-end 0))



reply via email to

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