|
|
|
@ -172,30 +172,39 @@ LEAF is ((BEG . END) . WND)." |
|
|
|
(cdr leaf) |
|
|
|
(cdr leaf) |
|
|
|
(selected-window)))) |
|
|
|
(selected-window)))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun avi--generic-jump (regex flip) |
|
|
|
|
|
|
|
"Jump to REGEX. |
|
|
|
|
|
|
|
When FLIP is non-nil, flip `avi-all-windows'." |
|
|
|
|
|
|
|
(let ((avi-all-windows |
|
|
|
|
|
|
|
(if flip |
|
|
|
|
|
|
|
(not avi-all-windows) |
|
|
|
|
|
|
|
avi-all-windows))) |
|
|
|
|
|
|
|
(avi--goto |
|
|
|
|
|
|
|
(avi--process |
|
|
|
|
|
|
|
(avi--regex-candidates |
|
|
|
|
|
|
|
regex) |
|
|
|
|
|
|
|
#'avi--overlay-post)))) |
|
|
|
|
|
|
|
|
|
|
|
;;* Commands |
|
|
|
;;* Commands |
|
|
|
;;;###autoload |
|
|
|
;;;###autoload |
|
|
|
(defun avi-goto-char () |
|
|
|
(defun avi-goto-char (&optional arg) |
|
|
|
"Read one char and jump to it in current window." |
|
|
|
"Read one char and jump to it. |
|
|
|
(interactive) |
|
|
|
The window scope is determined by `avi-all-windows'. |
|
|
|
(avi--goto |
|
|
|
When ARG is non-nil, flip the window scope." |
|
|
|
(avi--process |
|
|
|
(interactive "P") |
|
|
|
(avi--regex-candidates |
|
|
|
(avi--generic-jump |
|
|
|
(string (read-char "char: ")) |
|
|
|
(string (read-char "char: ")) arg)) |
|
|
|
(selected-window)) |
|
|
|
|
|
|
|
#'avi--overlay-post))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload |
|
|
|
;;;###autoload |
|
|
|
(defun avi-goto-char-2 () |
|
|
|
(defun avi-goto-char-2 (&optional arg) |
|
|
|
"Read two chars and jump to them in current window." |
|
|
|
"Read two chars and jump to them in current window. |
|
|
|
(interactive) |
|
|
|
When ARG is non-nil, flip the window scope." |
|
|
|
(avi--goto |
|
|
|
(interactive "P") |
|
|
|
(avi--process |
|
|
|
(avi--generic-jump |
|
|
|
(avi--regex-candidates |
|
|
|
(string |
|
|
|
(string |
|
|
|
(read-char "char 1: ") |
|
|
|
(read-char "char 1: ") |
|
|
|
(read-char "char 2: ")) |
|
|
|
(read-char "char 2: ")) |
|
|
|
arg)) |
|
|
|
(selected-window)) |
|
|
|
|
|
|
|
#'avi--overlay-post))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload |
|
|
|
;;;###autoload |
|
|
|
(defun avi-isearch () |
|
|
|
(defun avi-isearch () |
|
|
|
@ -210,19 +219,21 @@ LEAF is ((BEG . END) . WND)." |
|
|
|
(avi--goto candidate))) |
|
|
|
(avi--goto candidate))) |
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload |
|
|
|
;;;###autoload |
|
|
|
(defun avi-goto-word-0 () |
|
|
|
(defun avi-goto-word-0 (arg) |
|
|
|
"Jump to a word start in current window." |
|
|
|
"Jump to a word start." |
|
|
|
(interactive) |
|
|
|
(interactive "P") |
|
|
|
(let* ((avi-keys (number-sequence ?a ?z)) |
|
|
|
(let ((avi-keys (number-sequence ?a ?z))) |
|
|
|
(candidates (avi--regex-candidates "\\b\\sw"))) |
|
|
|
(avi--generic-jump "\\b\\sw" arg))) |
|
|
|
(avi--goto |
|
|
|
|
|
|
|
(avi--process candidates #'avi--overlay-pre)))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload |
|
|
|
;;;###autoload |
|
|
|
(defun avi-goto-subword-0 () |
|
|
|
(defun avi-goto-subword-0 (&optional arg) |
|
|
|
"Jump to a word or subword start in current window." |
|
|
|
"Jump to a word or subword start." |
|
|
|
(interactive) |
|
|
|
(interactive "P") |
|
|
|
(let* ((avi-keys (number-sequence ?a ?z)) |
|
|
|
(let* ((avi-all-windows |
|
|
|
|
|
|
|
(if arg |
|
|
|
|
|
|
|
(not avi-all-windows) |
|
|
|
|
|
|
|
avi-all-windows)) |
|
|
|
|
|
|
|
(avi-keys (number-sequence ?a ?z)) |
|
|
|
(candidates (avi--regex-candidates |
|
|
|
(candidates (avi--regex-candidates |
|
|
|
"\\(\\b\\sw\\)\\|\\(?:[^A-Z]\\([A-Z]\\)\\)"))) |
|
|
|
"\\(\\b\\sw\\)\\|\\(?:[^A-Z]\\([A-Z]\\)\\)"))) |
|
|
|
(dolist (x candidates) |
|
|
|
(dolist (x candidates) |
|
|
|
|