From ff8277625f43c1354b63333090f72c277c1f43f8 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 31 Aug 2020 17:05:31 +0100 Subject: Lint prelude.el This was a doozey because I use it everywhere. Is there a better way to globally rename things? Aye aye aye... computers, man! --- emacs/.emacs.d/wpc/list.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'emacs/.emacs.d/wpc/list.el') diff --git a/emacs/.emacs.d/wpc/list.el b/emacs/.emacs.d/wpc/list.el index 83c4c5ccdc42..64b3a846a9d8 100644 --- a/emacs/.emacs.d/wpc/list.el +++ b/emacs/.emacs.d/wpc/list.el @@ -49,7 +49,7 @@ ;; Dependencies ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; TODO: Move `prelude/assert' elsewhere so that I can require it without +;; TODO: Move `prelude-assert' elsewhere so that I can require it without ;; introducing the circular dependency of list.el -> prelude.el -> list.el. ;;(require 'prelude) (require 'dash) @@ -137,7 +137,7 @@ ;; (if (alist/has-key? k acc) ;; (setf (alist-get k acc) (list v)) ;; (setf (alist-get k acc) (list v)))))))) -;; (prelude/assert +;; (prelude-assert ;; (equal '(("John" . ("Cleese" "Malkovich")) ;; ("Thomas" . ("Aquinas"))) ;; (list/index (lambda (x) (plist-get x :first-name)) @@ -210,7 +210,7 @@ Be leery of using this with things like alists. Many data structures in Elisp ;; TODO: Add tests. (defun list/dedupe-adjacent (xs) "Return XS without adjacent duplicates." - (prelude/assert (not (list/empty? xs))) + (prelude-assert (not (list/empty? xs))) (list/reduce (list (list/first xs)) (lambda (x acc) (if (equal x (list/first acc)) @@ -223,16 +223,16 @@ Be leery of using this with things like alists. Many data structures in Elisp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (when list/tests? -;; (prelude/assert +;; (prelude-assert ;; (= 0 ;; (list/length '()))) -;; (prelude/assert +;; (prelude-assert ;; (= 5 ;; (list/length '(1 2 3 4 5)))) -;; (prelude/assert +;; (prelude-assert ;; (= 16 ;; (list/reduce 1 (lambda (x acc) (+ x acc)) '(1 2 3 4 5)))) -;; (prelude/assert +;; (prelude-assert ;; (equal '(2 4 6 8 10) ;; (list/map (lambda (x) (* x 2)) '(1 2 3 4 5))))) -- cgit 1.4.1