diff options
author | William Carroll <wpcarro@gmail.com> | 2020-09-01T12·44+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-09-01T13·00+0100 |
commit | 718899c629bb1b8bd05285c2e8c5a1709e8e5226 (patch) | |
tree | bd360e7b7779e8d8f05df3eb1059887ede6ed8c7 /emacs/.emacs.d/wpc/alist.el | |
parent | 3b2fffe954e3927673e403ee124a78f78bb1c45c (diff) |
More Elisp linting
In order for this to scale, I need to solve two things: 1. Ad-hoc ignore fill-column rules for URLs and other exceptions. 2. Run Elisp flychecker without evaluating my Elisp code and firing its side-effects.
Diffstat (limited to 'emacs/.emacs.d/wpc/alist.el')
-rw-r--r-- | emacs/.emacs.d/wpc/alist.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/emacs/.emacs.d/wpc/alist.el b/emacs/.emacs.d/wpc/alist.el index f9d2be71fb8e..52493c6c03a7 100644 --- a/emacs/.emacs.d/wpc/alist.el +++ b/emacs/.emacs.d/wpc/alist.el @@ -199,8 +199,10 @@ Mutative variant of `alist-delete'." ;; TODO: Should I support `alist-find-key' and `alist-find-value' variants? (defun alist-find (p xs) - "Apply a predicate fn, P, to each key and value in XS and return the key of - the first element that returns t." + "Find an element in XS. + +Apply a predicate fn, P, to each key and value in XS and return the key of the +first element that returns t." (let ((result (list-find (lambda (x) (funcall p (car x) (cdr x))) xs))) (if result (car result) |