diff options
author | William Carroll <wpcarro@gmail.com> | 2020-09-02T14·23+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-09-02T14·23+0100 |
commit | f089f3c550af5237e6748913f21084115499782d (patch) | |
tree | 9d6d9e44b81801c65a197bfb5ac9e72ecea782bd /emacs/.emacs.d/wpc | |
parent | ea274f924a637b3c32be0c19c961897ceacfae7c (diff) |
Linting Elisp
TL;DR: - Prefer cl-lib - Prefer spaces to tabs - Resolve various checkdoc complaints
Diffstat (limited to 'emacs/.emacs.d/wpc')
-rw-r--r-- | emacs/.emacs.d/wpc/al.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/clipboard.el | 6 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/colorscheme.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/cycle.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/dotted.el | 4 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/fonts.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/ivy-helpers.el | 7 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/keyboard.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/math.el | 3 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/prelude.el | 4 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/tree.el | 10 |
11 files changed, 23 insertions, 21 deletions
diff --git a/emacs/.emacs.d/wpc/al.el b/emacs/.emacs.d/wpc/al.el index 92e1caa413f5..e29f853f8ea5 100644 --- a/emacs/.emacs.d/wpc/al.el +++ b/emacs/.emacs.d/wpc/al.el @@ -107,7 +107,7 @@ "Set K to V in XS." (if (al-has-key? k xs) (progn - ;; Note: this is intentional `alist-get' and not `al-get'. + ;; Note: this is intentional `alist-get' and not `al-get'. (setf (alist-get k xs) v) xs) (list-cons `(,k . ,v) xs))) diff --git a/emacs/.emacs.d/wpc/clipboard.el b/emacs/.emacs.d/wpc/clipboard.el index 8500b5a66ed0..47cc459061e3 100644 --- a/emacs/.emacs.d/wpc/clipboard.el +++ b/emacs/.emacs.d/wpc/clipboard.el @@ -20,19 +20,19 @@ ;; Dependencies ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (cl-defun clipboard-copy (x &key (message "[clipboard.el] Copied!")) - "Copy string, X, to X11's clipboard." + "Copy string, X, to X11's clipboard and `message' MESSAGE." (kill-new x) (message message)) (cl-defun clipboard-paste (&key (message "[clipboard.el] Pasted!")) - "Paste contents of X11 clipboard." + "Paste contents of X11 clipboard and `message' MESSAGE." (yank) (message message)) diff --git a/emacs/.emacs.d/wpc/colorscheme.el b/emacs/.emacs.d/wpc/colorscheme.el index 69b3f1b153de..a02dc67c56a9 100644 --- a/emacs/.emacs.d/wpc/colorscheme.el +++ b/emacs/.emacs.d/wpc/colorscheme.el @@ -20,7 +20,7 @@ (require 'cycle) (require '>) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library diff --git a/emacs/.emacs.d/wpc/cycle.el b/emacs/.emacs.d/wpc/cycle.el index f13fb2098285..5ea015930017 100644 --- a/emacs/.emacs.d/wpc/cycle.el +++ b/emacs/.emacs.d/wpc/cycle.el @@ -19,7 +19,7 @@ (require 'math) (require 'maybe) (require 'struct) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Wish list diff --git a/emacs/.emacs.d/wpc/dotted.el b/emacs/.emacs.d/wpc/dotted.el index 1c338cd43b50..f400affd6ec6 100644 --- a/emacs/.emacs.d/wpc/dotted.el +++ b/emacs/.emacs.d/wpc/dotted.el @@ -19,14 +19,14 @@ (require 'prelude) (require 'macros) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (cl-defun dotted-new (&optional a b) - "Create a new dotted pair (i.e. cons cell)." + "Create a new dotted pair of A and B." (cons a b)) (defun dotted-instance? (x) diff --git a/emacs/.emacs.d/wpc/fonts.el b/emacs/.emacs.d/wpc/fonts.el index 92f484967702..55fd0eae2f65 100644 --- a/emacs/.emacs.d/wpc/fonts.el +++ b/emacs/.emacs.d/wpc/fonts.el @@ -21,7 +21,7 @@ (require 'cycle) (require 'device) (require 'maybe) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Constants diff --git a/emacs/.emacs.d/wpc/ivy-helpers.el b/emacs/.emacs.d/wpc/ivy-helpers.el index 69fcfb03386a..d13b99353451 100644 --- a/emacs/.emacs.d/wpc/ivy-helpers.el +++ b/emacs/.emacs.d/wpc/ivy-helpers.el @@ -14,15 +14,16 @@ (require 'tuple) (require 'string) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (cl-defun ivy-helpers-kv (prompt kv f) - "PROMPT users with the keys in KV and return its corresponding value. Calls F -with the key and value from KV." + "PROMPT users with the keys in KV and return its corresponding value. + +Apply key and value from KV to F." (ivy-read prompt kv diff --git a/emacs/.emacs.d/wpc/keyboard.el b/emacs/.emacs.d/wpc/keyboard.el index 51e53e984083..d5a3f92f122b 100644 --- a/emacs/.emacs.d/wpc/keyboard.el +++ b/emacs/.emacs.d/wpc/keyboard.el @@ -18,7 +18,7 @@ (require 'string) (require 'number) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Constants diff --git a/emacs/.emacs.d/wpc/math.el b/emacs/.emacs.d/wpc/math.el index 85a4efc94e19..9f6218fa4930 100644 --- a/emacs/.emacs.d/wpc/math.el +++ b/emacs/.emacs.d/wpc/math.el @@ -15,7 +15,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'maybe) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Constants @@ -31,7 +31,6 @@ ;; TODO: Support all three arguments. ;; Int -> Int -> Int -> Boolean (cl-defun math-triangle-of-power (&key base power result) - ;; TODO: Assert two of three are set. (cond ((maybe-somes? base power result) (error "All three arguments should not be set")) diff --git a/emacs/.emacs.d/wpc/prelude.el b/emacs/.emacs.d/wpc/prelude.el index 6708e27965e8..824a80f8047c 100644 --- a/emacs/.emacs.d/wpc/prelude.el +++ b/emacs/.emacs.d/wpc/prelude.el @@ -23,7 +23,7 @@ (require 'dash) (require 's) (require 'f) -(require 'cl-macs) +(require 'cl-lib) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Utilities @@ -130,7 +130,7 @@ This is a wrapper around `start-process' that has an API that resembles ,@program-args)))) (defun prelude-executable-exists? (name) - "Return t if CLI tool NAME exists according to `exec-path'." + "Return t if CLI tool NAME exists according to the variable `exec-path'." (let ((file (locate-file name exec-path))) (require 'maybe) (if (maybe-some? file) 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 |