[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b5e02ac 05/24: Fixup byte-compile warnings
From: |
Oleh Krehel |
Subject: |
[elpa] master b5e02ac 05/24: Fixup byte-compile warnings |
Date: |
Thu, 25 Jun 2015 10:17:48 +0000 |
branch: master
commit b5e02ac61c676e02ad5e9b8257933f430f5d63b2
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Fixup byte-compile warnings
* avy.el (avy-tree): Move.
---
avy.el | 69 +++++++++++++++++++++++++++++++--------------------------------
1 files changed, 34 insertions(+), 35 deletions(-)
diff --git a/avy.el b/avy.el
index 7115c7f..bca174f 100644
--- a/avy.el
+++ b/avy.el
@@ -223,41 +223,6 @@ SEQ-LEN is how many elements of KEYS it takes to identify
a match."
lst (cdr lst))))))
(nreverse path-alist)))
-(defun avy-read-de-bruijn (lst keys)
- "Select from LST dispatching on KEYS."
- ;; In theory, the De Bruijn sequence B(k,n) has k^n subsequences of length n
- ;; (the path length) usable as paths, thus that's the lower bound. Due to
- ;; partially overlapping matches, not all subsequences may be usable, so it's
- ;; possible that the path-len must be incremented, e.g., if we're matching
- ;; for x and a buffer contains xaxbxcx only every second subsequence is
- ;; usable for the four matches.
- (let* ((path-len (ceiling (log (length lst) (length keys))))
- (alist (avy--path-alist-1 lst path-len keys)))
- (while (not alist)
- (cl-incf path-len)
- (setq alist (avy--path-alist-1 lst path-len keys)))
- (let* ((len (length (caar alist)))
- (i 0))
- (setq avy-current-path "")
- (while (< i len)
- (dolist (x (reverse alist))
- (avy--overlay-at-full (reverse (car x)) (cdr x)))
- (let ((char (read-char))
- branch)
- (avy--remove-leading-chars)
- (setq alist
- (delq nil
- (mapcar (lambda (x)
- (when (eq (caar x) char)
- (cons (cdr (car x)) (cdr x))))
- alist)))
- (setq avy-current-path
- (concat avy-current-path (string char)))
- (cl-incf i)
- (unless alist
- (funcall avy-handler-function char))))
- (cdar alist))))
-
(defun avy-tree (lst keys)
"Coerce LST into a balanced tree.
The degree of the tree is the length of KEYS.
@@ -348,6 +313,40 @@ multiple DISPLAY-FN invokations."
(concat avy-current-path (string char))))
(funcall avy-handler-function char))))))
+(defun avy-read-de-bruijn (lst keys)
+ "Select from LST dispatching on KEYS."
+ ;; In theory, the De Bruijn sequence B(k,n) has k^n subsequences of length n
+ ;; (the path length) usable as paths, thus that's the lower bound. Due to
+ ;; partially overlapping matches, not all subsequences may be usable, so it's
+ ;; possible that the path-len must be incremented, e.g., if we're matching
+ ;; for x and a buffer contains xaxbxcx only every second subsequence is
+ ;; usable for the four matches.
+ (let* ((path-len (ceiling (log (length lst) (length keys))))
+ (alist (avy--path-alist-1 lst path-len keys)))
+ (while (not alist)
+ (cl-incf path-len)
+ (setq alist (avy--path-alist-1 lst path-len keys)))
+ (let* ((len (length (caar alist)))
+ (i 0))
+ (setq avy-current-path "")
+ (while (< i len)
+ (dolist (x (reverse alist))
+ (avy--overlay-at-full (reverse (car x)) (cdr x)))
+ (let ((char (read-char)))
+ (avy--remove-leading-chars)
+ (setq alist
+ (delq nil
+ (mapcar (lambda (x)
+ (when (eq (caar x) char)
+ (cons (cdr (car x)) (cdr x))))
+ alist)))
+ (setq avy-current-path
+ (concat avy-current-path (string char)))
+ (cl-incf i)
+ (unless alist
+ (funcall avy-handler-function char))))
+ (cdar alist))))
+
;;** Rest
(defun avy-window-list ()
"Return a list of windows depending on `avy-all-windows'."
- [elpa] master a7c92d8 21/24: Updated screenshot image for ivy-goto-char., (continued)
- [elpa] master a7c92d8 21/24: Updated screenshot image for ivy-goto-char., Oleh Krehel, 2015/06/25
- [elpa] master f727b53 24/24: Merge commit '8d38a898f23b3105c5d098f0cfb6c3383547e394' from avy, Oleh Krehel, 2015/06/25
- [elpa] master 02bf35b 13/24: Modify `at-full' and `de-bruijn' overlays to color depth, Oleh Krehel, 2015/06/25
- [elpa] master 236293a 15/24: avy.el (avy-isearch): Allow different styles, Oleh Krehel, 2015/06/25
- [elpa] master 054390f 16/24: avy.el (avy-translate-char-function): Fixup doc, Oleh Krehel, 2015/06/25
- [elpa] master 78d20e0 07/24: Fix jumping to other frames, Oleh Krehel, 2015/06/25
- [elpa] master 7a00821 09/24: avy.el (avy-dowindows): Ignore pdf-view-mode, Oleh Krehel, 2015/06/25
- [elpa] master e5104ca 20/24: avy.el (avy-goto-word-1): Quote punctuation, Oleh Krehel, 2015/06/25
- [elpa] master 55c77c5 04/24: For De Bruin, don't build a tree, Oleh Krehel, 2015/06/25
- [elpa] master aa2eb24 01/24: Makefile: "all" should depend on "compile", Oleh Krehel, 2015/06/25
- [elpa] master b5e02ac 05/24: Fixup byte-compile warnings,
Oleh Krehel <=