[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dict-tree aa1a45d 105/154: Enable lexical binding, and
From: |
Stefan Monnier |
Subject: |
[elpa] externals/dict-tree aa1a45d 105/154: Enable lexical binding, and fix issues it picks up. |
Date: |
Mon, 14 Dec 2020 12:21:54 -0500 (EST) |
branch: externals/dict-tree
commit aa1a45dba5aff89990c01a6aefa6560944076362
Author: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Enable lexical binding, and fix issues it picks up.
---
dict-tree.el | 44 +++++++++++++++++++-------------------------
1 file changed, 19 insertions(+), 25 deletions(-)
diff --git a/dict-tree.el b/dict-tree.el
index 204d075..93d2332 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -1,4 +1,4 @@
-;;; dict-tree.el --- Dictionary data structure
+;;; dict-tree.el --- Dictionary data structure -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2012 Free Software Foundation, Inc
@@ -257,7 +257,7 @@ If START or END is negative, it counts from the end."
(if regexp-ranked-cache-threshold
(make-hash-table :test 'equal)
nil))
- (metadict-list nil)
+ (meta-dict-list nil)
))
(:constructor dictree--create-custom
(&optional
@@ -322,7 +322,7 @@ If START or END is negative, it counts from the end."
(if regexp-ranked-cache-threshold
(make-hash-table :test 'equal)
nil))
- (metadict-list nil)
+ (meta-dict-list nil)
))
(:copier dictree--copy))
name filename autosave modified
@@ -1126,7 +1126,7 @@ PREFIX is a prefix of STR."
;; Synchronise dictionary DICT's caches, given that the data
;; associated with KEY has been changed to NEWDATA, or KEY has been
;; deleted if DELETED is non-nil (NEWDATA is ignored in that case)."
- (let (arg reverse cache cache-entry completions cmpl maxnum)
+ (let (arg reverse cache)
;; synchronise the lookup cache if dict is a meta-dictionary, since
;; it's not done automatically
@@ -1577,7 +1577,7 @@ KEY's PROPERTY in *all* its constituent dictionaries."
(dictree--meta-dict-dictlist dict)))
(t ;; delete PROPERTY from KEY in normal dict
(let* ((cell (trie-member (dictree--trie dict) key))
- plist tail tail)
+ plist tail)
(when (and cell
(setq tail
(plist-member
@@ -1746,7 +1746,7 @@ is more efficient.
Note: to avoid nasty dynamic scoping bugs, FUNCTION must *not*
bind any variables with names commencing \"--\"."
- (nreverse (dictree-mapf function 'cons dict type)))
+ (nreverse (dictree-mapf function 'cons dict type reverse)))
@@ -2029,7 +2029,7 @@ Returns nil if the stack is empty."
;; otherwise...
(let ((heap (dictree--meta-stack-heap dictree-stack))
(sortfun (dictree--meta-stack-sortfun dictree-stack))
- stack curr next cell)
+ stack curr next)
(unless (heap-empty heap)
;; remove the first dictree-stack from the heap, pop it's
;; first element, and add it back to the heap (note that it
@@ -3065,9 +3065,8 @@ are created when using a trie that is not self-balancing,
see
(goto-char (point-min)))
(when (setq entry
(condition-case nil
- (dictree--read-line
- dict key-loadfun data-loadfun
- plist-loadfun)
+ (dictree--read-line key-loadfun data-loadfun
+ plist-loadfun)
(error (error "Error reading line %d of %s"
midpt file))))
(dictree-insert dict (car entry) (nth 1 entry)
@@ -3083,9 +3082,8 @@ are created when using a trie that is not self-balancing,
see
(forward-line 1))
(when (setq entry
(condition-case nil
- (dictree--read-line
- dict key-loadfun data-loadfun
- plist-loadfun)
+ (dictree--read-line key-loadfun data-loadfun
+ plist-loadfun)
(error (error "Error reading line %d of %s"
(+ midpt i 1) file))))
(dictree-insert dict (car entry) (nth 1 entry)
@@ -3102,9 +3100,8 @@ are created when using a trie that is not self-balancing,
see
(dictree--goto-line (- midpt i 1))
(when (setq entry
(condition-case nil
- (dictree--read-line
- dict key-loadfun data-loadfun
- plist-loadfun)
+ (dictree--read-line key-loadfun data-loadfun
+ plist-loadfun)
(error (error "Error reading line %d of %s"
(- midpt i 1) file))))
(dictree-insert dict (car entry)
@@ -3120,9 +3117,8 @@ are created when using a trie that is not self-balancing,
see
(dictree--goto-line lines)
(when (setq entry
(condition-case nil
- (dictree--read-line
- dict key-loadfun data-loadfun
- plist-loadfun)
+ (dictree--read-line key-loadfun data-loadfun
+ plist-loadfun)
(error (error "Error reading line %d of %s"
lines file))))
(dictree-insert dict (car entry) (nth 1 entry)
@@ -3137,10 +3133,9 @@ are created when using a trie that is not
self-balancing, see
(defun dictree--read-line
- (dict &optional key-loadfun data-loadfun plist-loadfun)
+ (&optional key-loadfun data-loadfun plist-loadfun)
;; Return a list containing the key, data (if any, otherwise nil) and
- ;; property list (ditto) at the current line of the current buffer,
- ;; for dictionary DICT.
+ ;; property list (ditto) at the current line of the current buffer.
(save-excursion
(let (key data plist)
;; read key
@@ -3151,12 +3146,11 @@ are created when using a trie that is not
self-balancing, see
(unless (eq (line-end-position) (point))
(setq data (read (current-buffer))))
(when data-loadfun (setq data (funcall data-loadfun data)))
- ;; if there's anything after the data, use is as the property
- ;; list
+ ;; if there's anything after the data, use it as the property list
(unless (eq (line-end-position) (point))
(setq plist (read (current-buffer))))
(when plist-loadfun (funcall plist-loadfun plist))
- ;; return the key and data
+ ;; return what we've read
(list key data plist)))))
- [elpa] externals/dict-tree 2700e21 035/154: Don't compile wrapped functions explicitly, (continued)
- [elpa] externals/dict-tree 2700e21 035/154: Don't compile wrapped functions explicitly, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 70f99ee 037/154: Make certain dictionary commands (mostly saving and loading) interactive again., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 35346a4 041/154: Bug-fix in dictree--write-dict-code, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 608fcd4 049/154: Bug-fix to dictree--write-dict-code, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 179c0b5 045/154: Bug-fix to messages displayed by dictree-populate-from-file, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 6b24547 052/154: Allow "]" to be included in a negated character alternatives, by placing immediately after the "[^"., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree a61f90e 053/154: Bug-fix in dictree-wildcard-search, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree b33203a 060/154: Manage loading and unloading of dictionaries automatically in predictive-mode, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 920d959 077/154: Replaced advice with cedet-edebug.el for pretty-printing, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 9946a1d 075/154: Dictionary now defaults to current dict in in most dictionary-related commands., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree aa1a45d 105/154: Enable lexical binding, and fix issues it picks up.,
Stefan Monnier <=
- [elpa] externals/dict-tree ce48d61 104/154: Use symbol-value instead of eval., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 9eb7d29 014/154: Bumped version number and updated commentary., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 034a2d4 020/154: Fixed dictree-member-p bug; dictionaries no longer 'provide' feature., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 104fd29 022/154: Roll back changes to read-dict - not clear that they're necessary even under windoze, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 6b05d61 025/154: Another bug-fix to the new cache policy code, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree daad3f1 040/154: Fixed bugs in dictree--write-dict-code and dictree-save, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 0aed5d4 043/154: Modified dictree--read-line to call data and plist load functions with null argument, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 7a5d669 044/154: Allow insertion and load functions to be overriden in dictree-populate-from-file,, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 4a77581 046/154: Tidied up dictree--query and related code, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree eccfe92 047/154: Bug fix in dictree--do-query, Stefan Monnier, 2020/12/14