branch: elpa/treepy
commit c69f7edafff809588a567b0a4e5ea7765e28c43d
Author: Danny Willems <[email protected]>
Commit: Danny Willems <[email protected]>
test: silence free-variable and docstring byte-compile warnings
In test/treepy.el-zipper-test.el:
- `numered-tree' and `custom-zipper' are set at top level with `setq',
which the byte-compiler flags as assignment/reference to free
variables; declare them with `defvar'.
- fix a docstring that used unescaped single quotes around "a la
treepy".
---
test/treepy.el-zipper-test.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/treepy.el-zipper-test.el b/test/treepy.el-zipper-test.el
index 8490a63568..be5444032f 100644
--- a/test/treepy.el-zipper-test.el
+++ b/test/treepy.el-zipper-test.el
@@ -260,7 +260,7 @@
;;; Preorder vs Postorder
-(setq numered-tree '(1 . ((2 . (4 5)) 3)))
+(defvar numered-tree '(1 . ((2 . (4 5)) 3)))
(defun numered-children (node)
(cdr node))
@@ -368,7 +368,7 @@ be (defn new-&node-type> [field-map])."
(:concat `((:args . ,children)))
(:value `((:val . ,(car children))))))))
-(setq custom-zipper (treepy-zipper #'custom-branch-p #'custom-children
#'custom-make-node custom-tree))
+(defvar custom-zipper (treepy-zipper #'custom-branch-p #'custom-children
#'custom-make-node custom-tree))
(defun can-simplify-concat? (node)
(and (equal ':concat (node-type node))
@@ -470,7 +470,7 @@ be (defn new-&node-type> [field-map])."
(defun treepy-parseclj--make-node (node children)
- "Helper parseclj function to create nodes 'a la treepy'.
+ "Helper parseclj function to create nodes a la treepy.
NODE is an AST node. CHILDREN is a list of AST nodes."
(mapcar (lambda (pair)
(if (eql (car pair) :children)