From 838251f3f293f41df2aabbad8ea81ecad2b607e5 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 16 Oct 2024 16:33:49 +0100 Subject: Use cl-remove-if-not instead of +literate/filter in literate.el --- Emacs/.config/emacs/elisp/literate.el | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'Emacs') diff --git a/Emacs/.config/emacs/elisp/literate.el b/Emacs/.config/emacs/elisp/literate.el index 9e429a6..3990903 100644 --- a/Emacs/.config/emacs/elisp/literate.el +++ b/Emacs/.config/emacs/elisp/literate.el @@ -33,15 +33,6 @@ (defun +literate/el-to-elc (name) (string-replace ".el" ".elc" name)) -(defun +literate/filter (predicate list) - (if (null list) - nil - (let ((first (car list)) - (rest (cdr list))) - (if (funcall predicate first) - (cons first (+literate/filter predicate rest)) - (+literate/filter predicate rest))))) - (defun +literate/org-p (filename) (string= "org" (file-name-extension filename))) @@ -65,7 +56,7 @@ (mapcar #'(lambda (name) (concat user-emacs-directory "elisp/" name)) ;; Only take .el files - (+literate/filter + (cl-remove-if-not #'+literate/el-p (cddr (directory-files (concat user-emacs-directory "elisp/")))))) -- cgit v1.2.3-13-gbd6f