[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 30abc92 61/68: avy-jump.el (avi-goto-word-0): Simplify
From: |
Oleh Krehel |
Subject: |
[elpa] master 30abc92 61/68: avy-jump.el (avi-goto-word-0): Simplify |
Date: |
Sat, 21 Mar 2015 19:07:10 +0000 |
branch: master
commit 30abc92d93669ea47920700c309533d74f12da42
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
avy-jump.el (avi-goto-word-0): Simplify
* avy-jump.el (avi-goto-word-1): Simplify.
---
avy-jump.el | 30 +++++++-----------------------
1 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/avy-jump.el b/avy-jump.el
index ef2f0c5..13b6102 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -168,19 +168,10 @@ LEAF is ((BEG . END) . WND)."
(defun avi-goto-word-0 ()
"Jump to a word start in current window."
(interactive)
- (let ((we (window-end (selected-window) t))
- (avi-keys (number-sequence ?a ?z))
- candidates)
- (save-excursion
- (goto-char (window-start))
- (while (< (point) we)
- (forward-word 2)
- (forward-word -1)
- (push (cons (point) (selected-window))
- candidates)))
+ (let* ((avi-keys (number-sequence ?a ?z))
+ (candidates (avi--regex-candidates "\\b\\sw")))
(avi--goto
- (avi--process (nreverse candidates)
- #'avi--overlay-pre))))
+ (avi--process candidates #'avi--overlay-pre))))
;;;###autoload
(defun avi-goto-word-1 ()
@@ -188,18 +179,11 @@ LEAF is ((BEG . END) . WND)."
Read one char with which the word should start."
(interactive)
(let ((candidates (avi--regex-candidates
- (string (read-char "char: "))
- (selected-window))))
- (save-excursion
- (setq candidates (cl-remove-if-not
- (lambda (x)
- (goto-char (caar x))
- (looking-at "\\b"))
- candidates)))
+ (concat
+ "\\b"
+ (string (read-char "char: "))))))
(avi--goto
- (avi--process
- candidates
- #'avi--overlay-pre))))
+ (avi--process candidates #'avi--overlay-pre))))
(defun avi--line ()
"Select line in current window."
- [elpa] master 47bd115 52/68: Allow customizing the leading char face, (continued)
- [elpa] master 47bd115 52/68: Allow customizing the leading char face, Oleh Krehel, 2015/03/21
- [elpa] master c897759 55/68: Update avy interface, Oleh Krehel, 2015/03/21
- [elpa] master 574b3bd 57/68: Add `aw-leading-char-style' extra-awesome custom var, Oleh Krehel, 2015/03/21
- [elpa] master 8b5f10a 53/68: Update outlines, Oleh Krehel, 2015/03/21
- [elpa] master d7cafcb 56/68: avy-jump.el: add example commands using avy, Oleh Krehel, 2015/03/21
- [elpa] master fcc64ab 59/68: avy-jump.el (avi--regex-candidates): Add optional bounds, Oleh Krehel, 2015/03/21
- [elpa] master d932090 60/68: avy-jump.el (avi--overlay): Fix bug, Oleh Krehel, 2015/03/21
- [elpa] master f0050fb 62/68: avy.el (avy-read): Give a more precise error, Oleh Krehel, 2015/03/21
- [elpa] master 4e5ca87 58/68: avy-jump.el: Major update, Oleh Krehel, 2015/03/21
- [elpa] master ee0fa60 64/68: Add show keys on mode line feature., Oleh Krehel, 2015/03/21
- [elpa] master 30abc92 61/68: avy-jump.el (avi-goto-word-0): Simplify,
Oleh Krehel <=
- [elpa] master a3d4817 63/68: Allow switching to the previous window, Oleh Krehel, 2015/03/21
- [elpa] master b83b941 65/68: Add `ace-window-display-mode' minor mode, Oleh Krehel, 2015/03/21
- [elpa] master d81f079 54/68: Remove dependency on ace-jump-mode, Oleh Krehel, 2015/03/21
- [elpa] master 2580bf9 67/68: ace-window.el (aw-mode-line-face): Inherit from mode-line-buffer-id, Oleh Krehel, 2015/03/21
- [elpa] master 22a3145 66/68: Make sure not to extend `mode-line-format' twice, Oleh Krehel, 2015/03/21
- [elpa] master b11606c 68/68: Add 'packages/ace-window/' from commit '2580bf9bd7f66ed4e923a125ee8efcc4b6a043e0', Oleh Krehel, 2015/03/21