mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 13:33:03 +00:00
parent
2d613eb050
commit
08370cdbc3
7
avy.el
7
avy.el
@ -1341,10 +1341,11 @@ This variable is used by `avy-goto-subword-0' and `avy-goto-subword-1'."
|
|||||||
:type '(repeat character))
|
:type '(repeat character))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun avy-goto-subword-0 (&optional arg predicate)
|
(defun avy-goto-subword-0 (&optional arg predicate beg end)
|
||||||
"Jump to a word or subword start.
|
"Jump to a word or subword start.
|
||||||
|
|
||||||
The window scope is determined by `avy-all-windows' (ARG negates it).
|
The window scope is determined by `avy-all-windows' (ARG negates it).
|
||||||
|
BEG and END narrow the scope where candidates are searched.
|
||||||
|
|
||||||
When PREDICATE is non-nil it's a function of zero parameters that
|
When PREDICATE is non-nil it's a function of zero parameters that
|
||||||
should return true."
|
should return true."
|
||||||
@ -1360,10 +1361,10 @@ should return true."
|
|||||||
(dolist (char avy-subword-extra-word-chars)
|
(dolist (char avy-subword-extra-word-chars)
|
||||||
(modify-syntax-entry char "w" syn-tbl))
|
(modify-syntax-entry char "w" syn-tbl))
|
||||||
(with-syntax-table syn-tbl
|
(with-syntax-table syn-tbl
|
||||||
(let ((ws (window-start))
|
(let ((ws (or beg (window-start)))
|
||||||
window-cands)
|
window-cands)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (window-end (selected-window) t))
|
(goto-char (or end (window-end (selected-window) t)))
|
||||||
(subword-backward)
|
(subword-backward)
|
||||||
(while (> (point) ws)
|
(while (> (point) ws)
|
||||||
(when (or (null predicate)
|
(when (or (null predicate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user