[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2c74d01 21/78: avy.el (avy--generic-jump): Add beg and end
From: |
Oleh Krehel |
Subject: |
[elpa] master 2c74d01 21/78: avy.el (avy--generic-jump): Add beg and end optional args |
Date: |
Sat, 23 Jan 2016 13:59:46 +0000 |
branch: master
commit 2c74d0160a52ecdf6a24ddf70230748a1dc40d01
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
avy.el (avy--generic-jump): Add beg and end optional args
* avy.el (avy-goto-char-in-line): Update.
Fixes #89
---
avy.el | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/avy.el b/avy.el
index 7f1b7e7..459d99f 100644
--- a/avy.el
+++ b/avy.el
@@ -765,16 +765,17 @@ LEAF is normally ((BEG . END) . WND)."
(de-bruijn #'avy--overlay-at-full)
(t (error "Unexpected style %S" style))))
-(defun avy--generic-jump (regex window-flip style)
+(defun avy--generic-jump (regex window-flip style &optional beg end)
"Jump to REGEX.
When WINDOW-FLIP is non-nil, do the opposite of `avy-all-windows'.
-STYLE determines the leading char overlay style."
+STYLE determines the leading char overlay style.
+BEG and END delimit the area where candidates are searched."
(let ((avy-all-windows
(if window-flip
(not avy-all-windows)
avy-all-windows)))
(avy--process
- (avy--regex-candidates regex)
+ (avy--regex-candidates regex beg end)
(avy--style-fn style))))
;;* Commands
@@ -796,14 +797,13 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
(defun avy-goto-char-in-line (char)
"Jump to the currently visible CHAR in the current line."
(interactive (list (read-char "char: " t)))
- (let ((avy-all-windows nil))
- (avy-with avy-goto-char
- (avy--process
- (save-restriction
- (narrow-to-region (line-beginning-position)
- (line-end-position))
- (avy--regex-candidates (regexp-quote (string char))))
- (avy--style-fn avy-style)))))
+ (avy-with avy-goto-char
+ (avy--generic-jump
+ (regexp-quote (string char))
+ avy-all-windows
+ avy-style
+ (line-beginning-position)
+ (line-end-position))))
;;;###autoload
(defun avy-goto-char-2 (char1 char2 &optional arg)
- [elpa] master 1d1e4b6 06/78: Allow to switch action midway from goto to kill/mark/copy, (continued)
- [elpa] master 1d1e4b6 06/78: Allow to switch action midway from goto to kill/mark/copy, Oleh Krehel, 2016/01/23
- [elpa] master 30067dd 14/78: avy.el (avy-action-goto): Don't push mark when region is active, Oleh Krehel, 2016/01/23
- [elpa] master a6db8a3 08/78: Rename avy--with-avy-keys to avy-with, Oleh Krehel, 2016/01/23
- [elpa] master 1e578a1 15/78: Considers letter case only if given Upcase letter, Oleh Krehel, 2016/01/23
- [elpa] master e8cebf1 13/78: Make arg optional in avy-goto-subword-1, Oleh Krehel, 2016/01/23
- [elpa] master 36b296c 20/78: avy.el (subword-backward-regexp): Fix declaration, Oleh Krehel, 2016/01/23
- [elpa] master dbd2d20 17/78: avy.el (avy-pop-mark): Handle multiple frames, Oleh Krehel, 2016/01/23
- [elpa] master a86bdee6 16/78: avy.el (avy-pop-mark): use own history for points and windows, Oleh Krehel, 2016/01/23
- [elpa] master ed120ea 19/78: avy.el (avy-goto-line): Allow numeric prefix arg, Oleh Krehel, 2016/01/23
- [elpa] master 53d457c 18/78: Add misc punctuation to subword commands, Oleh Krehel, 2016/01/23
- [elpa] master 2c74d01 21/78: avy.el (avy--generic-jump): Add beg and end optional args,
Oleh Krehel <=
- [elpa] master 009c0bc 22/78: avy.el (avy--line): Work for visual-line-mode, Oleh Krehel, 2016/01/23
- [elpa] master 53decea 24/78: avy.el (avy--line): Don't error on end of buffer, Oleh Krehel, 2016/01/23
- [elpa] master a6cfeda 23/78: avy.el (avy-goto-subword-0): Don't offer invisible chars, Oleh Krehel, 2016/01/23
- [elpa] master 72afecb 25/78: avy.el (avy-push-mark): Bring back push-mark, Oleh Krehel, 2016/01/23
- [elpa] master b1ef1f8 26/78: avy.el (avy--line): Obey avy-background, Oleh Krehel, 2016/01/23
- [elpa] master 48aa2cd 28/78: Improve avy-goto-char-timer so that it may read 1 or many chars, Oleh Krehel, 2016/01/23
- [elpa] master ac16227 27/78: Add padding for wide-width character, Oleh Krehel, 2016/01/23
- [elpa] master 67662ef 29/78: Fix indentation of defface, Oleh Krehel, 2016/01/23
- [elpa] master f9d7a76 31/78: Improve avy-goto-char-timer., Oleh Krehel, 2016/01/23
- [elpa] master 3f53a2a 30/78: avy.el (avy-goto-line): Fix off-by-one, Oleh Krehel, 2016/01/23