[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dict-tree ce48d61 104/154: Use symbol-value instead of
From: |
Stefan Monnier |
Subject: |
[elpa] externals/dict-tree ce48d61 104/154: Use symbol-value instead of eval. |
Date: |
Mon, 14 Dec 2020 12:21:54 -0500 (EST) |
branch: externals/dict-tree
commit ce48d61ac0a8988d25cbbce9e2aa6d061a3d1c9f
Author: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Use symbol-value instead of eval.
---
dict-tree.el | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/dict-tree.el b/dict-tree.el
index 2ba3bdb..204d075 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -365,7 +365,7 @@ If START or END is negative, it counts from the end."
(lambda (dic)
(cond
((dictree-p dic) dic)
- ((symbolp dic) (eval dic))
+ ((symbolp dic) (symbol-value dic))
(t (error "Invalid object in DICTIONARY-LIST"))))
dictionary-list))
(combfun (dictree--wrap-combfun combine-function))
@@ -764,7 +764,7 @@ cache-threshold arguments are ignored."
regexp-ranked-cache-threshold)))
(mapc
(lambda (dic)
- (if (symbolp dic) (setq dic (eval dic)))
+ (if (symbolp dic) (setq dic (symbol-value dic)))
(setf (dictree--meta-dict-list dic)
(cons dict (dictree--meta-dict-list dic))))
dictionary-list))
@@ -1418,7 +1418,7 @@ PREFIX is a prefix of STR."
"Clear all DICT's query caches."
(interactive (list (read-dict "Dictionary: ")))
(when (and (called-interactively-p 'any) (symbolp dict))
- (setq dict (eval dict)))
+ (setq dict (symbol-value dict)))
(dolist (cachefun '(dictree-lookup-cache
dictree-complete-cache
dictree-complete-ranked-cache
@@ -1528,7 +1528,7 @@ additional information, and can only be retrieved using
`dictree-get-property'."
;; sort out arguments
- (and (symbolp dict) (setq dict (eval dict)))
+ (and (symbolp dict) (setq dict (symbol-value dict)))
(cond
;; set PROPERTY for KEY in all constituent dicts of a meta-dict
((dictree--meta-dict-p dict)
@@ -1566,7 +1566,7 @@ still be detected by supplying the optional argument to
Note that if DICT is a meta-dictionary, then this will delete
KEY's PROPERTY in *all* its constituent dictionaries."
;; sort out arguments
- (and (symbolp dict) (setq dict (eval dict)))
+ (and (symbolp dict) (setq dict (symbol-value dict)))
(cond
;; delete PROPERTY from KEY in all constituent dicts of a meta-dict
((dictree--meta-dict-p dict)
@@ -1755,7 +1755,7 @@ bind any variables with names commencing \"--\"."
Interactively, DICT is read from the mini-buffer."
(interactive (list (read-dict "Dictionary: ")))
(when (and (called-interactively-p 'any) (symbolp dict))
- (setq dict (eval dict)))
+ (setq dict (symbol-value dict)))
(let ((count 0))
(dictree-mapc (lambda (&rest dummy) (incf count)) dict)
(when (called-interactively-p 'interactive)
@@ -2413,7 +2413,7 @@ both forms. See `dictree-write'.
Interactively, DICT is read from the mini-buffer."
(interactive (list (read-dict "Dictionary: ")))
(when (and (called-interactively-p 'any) (symbolp dict))
- (setq dict (eval dict)))
+ (setq dict (symbol-value dict)))
(let ((filename (dictree-filename dict)))
;; if dictionary has no associated file, prompt for one
@@ -2461,7 +2461,7 @@ and OVERWRITE is the prefix argument."
nil "")
current-prefix-arg))
(when (and (called-interactively-p 'any) (symbolp dict))
- (setq dict (eval dict)))
+ (setq dict (symbol-value dict)))
;; default to DICT's current file, if any
(when (or (null filename)
(and (called-interactively-p 'any) (string= filename "")))
@@ -2638,7 +2638,7 @@ Interactively, FILE is read from the mini-buffer."
(let (dictname dict)
(setq dictname
(file-name-nondirectory (file-name-sans-extension file))
- dict (eval (intern-soft dictname)))
+ dict (symbol-value (intern-soft dictname)))
(if (not (dictree-p dict))
;; if loading failed, throw error interactively, return nil
;; non-interactively
@@ -2676,7 +2676,7 @@ is the prefix argument."
(interactive (list (read-dict "Dictionary: ")
current-prefix-arg))
(when (and (called-interactively-p 'any) (symbolp dict))
- (setq dict (eval dict)))
+ (setq dict (symbol-value dict)))
;; if dictionary has been modified, autosave is set and not overidden,
;; save it first
@@ -3033,7 +3033,7 @@ are created when using a trie that is not self-balancing,
see
(read-file-name "File to populate from: "
nil "" t)))
(when (and (called-interactively-p 'any) (symbolp dict))
- (setq dict (eval dict)))
+ (setq dict (symbol-value dict)))
(if (and (called-interactively-p 'any) (string= file ""))
(message "No file specified; dictionary %s NOT populated"
@@ -3184,7 +3184,7 @@ TYPE is always 'string."
(buffer-name (current-buffer)))
'string))
(when (and (called-interactively-p 'any) (symbolp dict))
- (setq dict (eval dict)))
+ (setq dict (symbol-value dict)))
;; select the buffer, creating it if necessary
(if buffer
@@ -3252,7 +3252,7 @@ OVERWRITE is the prefix argument, and TYPE is always
'string."
(interactive (list (read-dict "Dictionary: ")
(read-file-name "File to dump to: " nil "")))
(when (and (called-interactively-p 'any) (symbolp dict))
- (setq dict (eval dict)))
+ (setq dict (symbol-value dict)))
(if (and (called-interactively-p 'any) (string= filename ""))
(message "Dictionary %s NOT dumped" (dictree-name dict))
@@ -3344,7 +3344,7 @@ extension, suitable for passing to `load-library'."
((and allow-unmatched (file-regular-p dictname)) dictname)
;; if user selected a loaded dictionary, return dict itself
((condition-case nil
- (dictree-p (eval (intern-soft dictname)))
+ (dictree-p (symbol-value (intern-soft dictname)))
(void-variable nil))
(intern-soft dictname))
;; if user selected an unloaded dictionary, return dict name
- [elpa] externals/dict-tree 70f99ee 037/154: Make certain dictionary commands (mostly saving and loading) interactive again., (continued)
- [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, 2020/12/14
- [elpa] externals/dict-tree ce48d61 104/154: Use symbol-value instead of eval.,
Stefan Monnier <=
- [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
- [elpa] externals/dict-tree f6e9ba1 054/154: Added optional RESULTFUN argument to trie query functions,, Stefan Monnier, 2020/12/14