From f089f3c550af5237e6748913f21084115499782d Mon Sep 17 00:00:00 2001 From: William Carroll Date: Wed, 2 Sep 2020 15:23:46 +0100 Subject: Linting Elisp TL;DR: - Prefer cl-lib - Prefer spaces to tabs - Resolve various checkdoc complaints --- emacs/.emacs.d/wpc/tree.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'emacs/.emacs.d/wpc/tree.el') diff --git a/emacs/.emacs.d/wpc/tree.el b/emacs/.emacs.d/wpc/tree.el index 4af383a8c088..ae5fba7950c9 100644 --- a/emacs/.emacs.d/wpc/tree.el +++ b/emacs/.emacs.d/wpc/tree.el @@ -37,7 +37,7 @@ (require 'series) (require 'random) (require 'maybe) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library @@ -116,9 +116,11 @@ Depth-first traversals have the advantage of typically consuming less memory (cl-defun tree-random (&optional (value-fn (lambda (_) nil)) (branching-factor 2)) - "Randomly generate a tree with BRANCHING-FACTOR using VALUE-FN to compute the -node values. VALUE-FN is called with the current-depth of the node. Useful for -generating test data. Warning this function can overflow the stack." + "Randomly generate a tree with BRANCHING-FACTOR. + +This uses VALUE-FN to compute the node values. VALUE-FN is called with the +current-depth of the node. Useful for generating test data. Warning this +function can overflow the stack." (cl-labels ((do-random (d vf bf) (make-node -- cgit 1.4.1