From 020edafda501ed30d4bc490bf727a75c8ae042f7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 14 Jul 2023 19:51:32 +0100 Subject: (Emacs)~cleaned up literate.el Jesus, how could I have not noticed the spelling error in "Finishied byte compiling"?! --- Emacs/.config/emacs/elisp/literate.el | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'Emacs/.config/emacs/elisp') diff --git a/Emacs/.config/emacs/elisp/literate.el b/Emacs/.config/emacs/elisp/literate.el index bb34ae9..d50553e 100644 --- a/Emacs/.config/emacs/elisp/literate.el +++ b/Emacs/.config/emacs/elisp/literate.el @@ -28,10 +28,10 @@ (if (null list) nil (let ((first (car list)) - (tail (cdr list))) + (rest (cdr list))) (if (funcall predicate first) - (cons first (+literate/filter predicate tail)) - (+literate/filter predicate tail))))) + (cons first (+literate/filter predicate rest)) + (+literate/filter predicate rest))))) (defconst +literate/org-files (list (concat user-emacs-directory "config.org"))) @@ -41,11 +41,12 @@ (defconst +literate/elisp-files `(,(concat user-emacs-directory "early-init.el") ,(concat user-emacs-directory "init.el") - ,@(mapcar #'(lambda (name) (concat user-emacs-directory "elisp/" name)) - ;; Only take .el files - (+literate/filter - (lambda (name) (string= "el" (file-name-extension name))) - (cddr (directory-files (concat user-emacs-directory "elisp/"))))))) + ,@(mapcar + #'(lambda (name) (concat user-emacs-directory "elisp/" name)) + ;; Only take .el files + (+literate/filter + (lambda (name) (string= "el" (file-name-extension name))) + (cddr (directory-files (concat user-emacs-directory "elisp/"))))))) (defconst +literate/elisp-byte-compiled `(,@(mapcar #'(lambda (x) (replace-regexp-in-string ".el" ".elc" x)) +literate/output-files) @@ -75,15 +76,15 @@ "Compile all files in +literate/org-files via org-babel-tangle." (interactive) (message "Compiling files...") - (mapc #'org-babel-tangle-file +literate/org-files) + (mapcar #'org-babel-tangle-file +literate/org-files) (message "Files compiled") (message "Byte-compiling literate files...") - (mapc #'(lambda (file) (byte-compile-file file)) +literate/output-files) + (mapcar #'(lambda (file) (byte-compile-file file)) +literate/output-files) (message "Literate files byte-compiled") (message "Byte compiling init.el, early-init.el, elisp/*") - (mapc #'(lambda (file) (byte-compile-file file)) +literate/elisp-files) - (message "Finishied byte-compiling")) + (mapcar #'(lambda (file) (byte-compile-file file)) +literate/elisp-files) + (message "Finished byte-compiling")) (provide 'literate) ;;; literate.el ends here -- cgit v1.2.3-13-gbd6f