[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dict-tree 8aa6047 106/154: Suppress bogus unused lexica
From: |
Stefan Monnier |
Subject: |
[elpa] externals/dict-tree 8aa6047 106/154: Suppress bogus unused lexical variable byte-compiler warnings. |
Date: |
Mon, 14 Dec 2020 12:21:54 -0500 (EST) |
branch: externals/dict-tree
commit 8aa604770578ffae0dfd0236e0d9bc9eb9881d44
Author: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Suppress bogus unused lexical variable byte-compiler warnings.
---
dict-tree.el | 58 +++++++++++++++++++++++++++-------------------------------
1 file changed, 27 insertions(+), 31 deletions(-)
diff --git a/dict-tree.el b/dict-tree.el
index 93d2332..64a44fc 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -90,11 +90,6 @@ If START or END is negative, it counts from the end."
;; `goto-line' without messing around with mark and messages
-;; Note: This is a bug in simple.el. There's clearly a place for
-;; non-interactive calls to goto-line from Lisp code, and there's
-;; no warning against doing this in the documentation. Yet
-;; goto-line *always* calls push-mark, which usually *shouldn't*
-;; be invoked by Lisp programs, as its docstring warns.
(defmacro dictree--goto-line (line)
"Goto line LINE, counting from line 1 at beginning of buffer."
`(progn
@@ -219,7 +214,7 @@ If START or END is negative, it counts from the end."
autosave
unlisted
(comparison-function '<)
- (insert-function (lambda (a b) a))
+ (insert-function (lambda (a _b) a))
(rank-function (lambda (a b) (> (cdr a) (cdr b))))
(cache-policy 'time)
(cache-update-policy 'synchronize)
@@ -268,7 +263,7 @@ If START or END is negative, it counts from the end."
autosave
unlisted
(comparison-function '<)
- (insert-function (lambda (a b) a))
+ (insert-function (lambda (a _b) a))
(rank-function (lambda (a b) (> (cdr a) (cdr b))))
(cache-policy 'time)
(cache-update-policy 'synchronize)
@@ -600,10 +595,11 @@ structure. See `trie-create' for details."
(or name (setq name (and filename (file-name-sans-extension
(file-name-nondirectory filename)))))
(or comparison-function (setq comparison-function '<))
- (or insert-function (setq insert-function (lambda (a b) a)))
+ (or insert-function (setq insert-function (lambda (a _b) a)))
(or rank-function (setq rank-function (lambda (a b) (> (cdr a) (cdr b)))))
(or cache-policy (setq cache-policy 'time))
(or cache-update-policy (setq cache-update-policy 'synchronize))
+ (or trie-type (setq trie-type 'avl))
(let ((dict
(dictree--create
@@ -663,7 +659,7 @@ underlying data structure. See `trie-create' for details."
(or name (setq name (and filename (file-name-sans-extension
(file-name-nondirectory filename)))))
(or comparison-function (setq comparison-function '<))
- (or insert-function (setq insert-function (lambda (a b) a)))
+ (or insert-function (setq insert-function (lambda (a _b) a)))
(or rank-function (setq rank-function (lambda (a b) (< (cdr a) (cdr b)))))
(or cache-policy (setq cache-policy 'time))
(or cache-update-policy (setq cache-update-policy 'synchronize))
@@ -1635,7 +1631,7 @@ bind any variables with names commencing \"--\"."
;; binding a variable with the same name as one of the arguments
(let ((--dictree-mapc--function function))
(dictree--mapc
- (lambda (key data plist)
+ (lambda (key data _plist)
(funcall --dictree-mapc--function key data))
dict type reverse)))
@@ -1757,7 +1753,7 @@ Interactively, DICT is read from the mini-buffer."
(when (and (called-interactively-p 'any) (symbolp dict))
(setq dict (symbol-value dict)))
(let ((count 0))
- (dictree-mapc (lambda (&rest dummy) (incf count)) dict)
+ (dictree-mapc (lambda (&rest _dummy) (incf count)) dict)
(when (called-interactively-p 'interactive)
(message "Dictionary %s contains %d entries"
(dictree--name dict) count))
@@ -1787,11 +1783,11 @@ Interactively, DICT is read from the mini-buffer."
(dictree--construct-meta-stack-heapfun sortfun)
(length (dictree--trielist dict))))
(pushed '())
- (dummy (mapc
- (lambda (dic)
- (heap-add
- heap (trie-stack dic type reverse)))
- (dictree--trielist dict)))))
+ (_dummy (mapc
+ (lambda (dic)
+ (heap-add
+ heap (trie-stack dic type reverse)))
+ (dictree--trielist dict)))))
(:constructor dictree--complete-meta-stack-create
(dict prefix &optional reverse
&aux
@@ -1803,13 +1799,13 @@ Interactively, DICT is read from the mini-buffer."
sortfun reverse)
(length (dictree--trielist dict))))
(pushed '())
- (dummy (mapc
- (lambda (trie)
- (let ((stack (trie-complete-stack
- trie prefix reverse)))
- (unless (trie-stack-empty-p stack)
- (heap-add heap stack))))
- (dictree--trielist dict)))))
+ (_dummy (mapc
+ (lambda (trie)
+ (let ((stack (trie-complete-stack
+ trie prefix reverse)))
+ (unless (trie-stack-empty-p stack)
+ (heap-add heap stack))))
+ (dictree--trielist dict)))))
(:constructor dictree--regexp-meta-stack-create
(dict regexp &optional reverse
&aux
@@ -1821,13 +1817,13 @@ Interactively, DICT is read from the mini-buffer."
sortfun reverse)
(length (dictree--trielist dict))))
(pushed '())
- (dummy (mapc
- (lambda (trie)
- (let ((stack (trie-regexp-stack
- trie regexp reverse)))
- (unless (trie-stack-empty-p stack)
- (heap-add heap stack))))
- (dictree--trielist dict)))))
+ (_dummy (mapc
+ (lambda (trie)
+ (let ((stack (trie-regexp-stack
+ trie regexp reverse)))
+ (unless (trie-stack-empty-p stack)
+ (heap-add heap stack))))
+ (dictree--trielist dict)))))
(:copier nil))
combfun sortfun heap pushed)
@@ -2301,7 +2297,7 @@ Note that PREDICATE will be called with two arguments: the
completion, and its associated data."
(let ((completions
(dictree-complete dict string nil nil nil nil
- predicate (lambda (key data) key))))
+ predicate (lambda (key _data) key))))
(if all completions (try-completion "" completions))))
- [elpa] externals/dict-tree 5f549f0 073/154: Bug-fixes to dictree--write-meta-dict-code, (continued)
- [elpa] externals/dict-tree 5f549f0 073/154: Bug-fixes to dictree--write-meta-dict-code, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 0ef5b58 078/154: Revert "Replaced advice with cedet-edebug.el for pretty-printing", Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree df22e8e 074/154: Bug-fixes to edebug advice, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 3794988 079/154: Simplified advice-based edebug pretty-printing of tries and dictionaries., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 238fd6b 082/154: Fixed bug in dictree--merge that caused one too many completions to be cached., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree a256974 086/154: Minor typo-fixes in docstrings., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree d6ea2b5 088/154: Fixed interactive argument handling in predictive-fast-learn-from-buffer., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 39ace6f 094/154: Added autoload cookies., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree a1bff31 096/154: Trivial whitespace tidying., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree e752b53 101/154: Accept symbols for dictionary arguments., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 8aa6047 106/154: Suppress bogus unused lexical variable byte-compiler warnings.,
Stefan Monnier <=
- [elpa] externals/dict-tree 4b3cc3c 122/154: Do lexbind test at compile-time instead of load-time., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree a4b2a1b 126/154: Improve edebug pretty-printing., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree b7173e8 152/154: Fix lexical binding bugs., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 3a4d3f1 015/154: Added dictree-mapcar function; code tidying., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 1dde6e1 030/154: Define missing setf methods for data cells, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 3969702 125/154: Tidy up unnecessary macros by making them into defsubst or defun., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 74c792c 111/154: Add page breaks., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 5cf96da 123/154: Implement iterator generators on collection data structures., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 913c84b 129/154: Fix bug in dictree-unload., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 1e5b3f6 130/154: Fix bug in dictree--wrap-fuzzy-rankfun wrapping., Stefan Monnier, 2020/12/14