[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b916e2a: * packages/trie/trie.el (trie--if-lexical-binding
From: |
Stefan Monnier |
Subject: |
[elpa] master b916e2a: * packages/trie/trie.el (trie--if-lexical-binding): Simplify |
Date: |
Sat, 29 Feb 2020 17:05:49 -0500 (EST) |
branch: master
commit b916e2ac6278ae898c6986f1bf19c0bfe51fa93d
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* packages/trie/trie.el (trie--if-lexical-binding): Simplify
(edebug-prin1, edebug-prin1-to-string): Silence compiler warnings.
---
packages/trie/trie.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/packages/trie/trie.el b/packages/trie/trie.el
index 80baecd..cadbb59 100644
--- a/packages/trie/trie.el
+++ b/packages/trie/trie.el
@@ -31,7 +31,7 @@
;; Quick Overview
;; --------------
;; A trie is a data structure used to store keys that are ordered sequences of
-;; elements (vectors, lists or strings in Elisp; strings are by far the most
+;; elements (vectors, lists, or strings in Elisp; strings are by far the most
;; common), in such a way that both storage and retrieval are space- and
;; time-efficient. But, more importantly, a variety of more advanced queries
;; can also be performed efficiently: for example, returning all strings with
@@ -188,11 +188,10 @@
(defmacro trie--if-lexical-binding (then else)
"If lexical binding is in effect, evaluate THEN, otherwise ELSE."
(declare (indent 1) (debug t))
- (if (let ((tempvar nil)
- (f (let ((tempvar t)) (lambda () tempvar))))
- tempvar ;; shut up "unused lexical variable" byte-compiler warning
- (funcall f))
- then else))
+ (let ((tempvar else)
+ (f (let ((tempvar then)) (lambda () tempvar))))
+ tempvar ;; shut up "unused lexical variable" byte-compiler warning
+ (funcall f)))
;; wrap CMPFUN for use in a subtree
@@ -2772,6 +2771,7 @@ results\)."
(defadvice edebug-prin1
(around trie activate compile preactivate)
+ (with-no-warnings (defvar object))
(let ((pretty (trie--edebug-pretty-print object)))
(if pretty
(progn
@@ -2784,6 +2784,7 @@ results\)."
(defadvice edebug-prin1-to-string
(around trie activate compile preactivate)
+ (with-no-warnings (defvar object))
(let ((pretty (trie--edebug-pretty-print object)))
(if pretty
(setq ad-return-value pretty)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master b916e2a: * packages/trie/trie.el (trie--if-lexical-binding): Simplify,
Stefan Monnier <=