mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 13:33:03 +00:00
avy.el (avy-goto-word-1-above): Add
avy.el (avy-goto-word-1-below): Add
This commit is contained in:
parent
d644be1399
commit
33af738ae7
24
avy.el
24
avy.el
@ -1025,7 +1025,7 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
|
|||||||
(avy--generic-jump avy-goto-word-0-regexp arg avy-style)))
|
(avy--generic-jump avy-goto-word-0-regexp arg avy-style)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun avy-goto-word-1 (char &optional arg)
|
(defun avy-goto-word-1 (char &optional arg beg end)
|
||||||
"Jump to the currently visible CHAR at a word start.
|
"Jump to the currently visible CHAR at a word 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)."
|
||||||
(interactive (list (read-char "char: " t)
|
(interactive (list (read-char "char: " t)
|
||||||
@ -1041,7 +1041,27 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
|
|||||||
(concat
|
(concat
|
||||||
"\\b"
|
"\\b"
|
||||||
str)))))
|
str)))))
|
||||||
(avy--generic-jump regex arg avy-style))))
|
(avy--generic-jump regex arg avy-style beg end))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun avy-goto-word-1-above (char &optional arg)
|
||||||
|
"Jump to the currently visible CHAR at a word start.
|
||||||
|
This is a scoped version of `avy-goto-word-1', where the scope is
|
||||||
|
the visible part of the current buffer up to point. "
|
||||||
|
(interactive (list (read-char "char: " t)
|
||||||
|
current-prefix-arg))
|
||||||
|
(avy-with avy-goto-word-1
|
||||||
|
(avy-goto-word-1 char arg (window-start) (point))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun avy-goto-word-1-below (char &optional arg)
|
||||||
|
"Jump to the currently visible CHAR at a word start.
|
||||||
|
This is a scoped version of `avy-goto-word-1', where the scope is
|
||||||
|
the visible part of the current buffer following point. "
|
||||||
|
(interactive (list (read-char "char: " t)
|
||||||
|
current-prefix-arg))
|
||||||
|
(avy-with avy-goto-word-1
|
||||||
|
(avy-goto-word-1 char arg (point) (window-end (selected-window) t))))
|
||||||
|
|
||||||
(declare-function subword-backward "subword")
|
(declare-function subword-backward "subword")
|
||||||
(defvar subword-backward-regexp)
|
(defvar subword-backward-regexp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user