From 718899c629bb1b8bd05285c2e8c5a1709e8e5226 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 1 Sep 2020 13:44:18 +0100 Subject: 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. --- emacs/.emacs.d/wpc/alist.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'emacs/.emacs.d/wpc/alist.el') 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) -- cgit 1.4.1