fix load custom lisp first

This commit is contained in:
2025-07-07 16:21:27 +02:00
parent 89aca95fb4
commit c055905a79

View File

@@ -60,12 +60,12 @@ Fallbacks to `user-emacs-directory' if this file is not loaded.")
EXCLUDE-LIST, while for the dirs in INCLUDE-LIST, it will add all the
first level dirs of that dir too.
Example: (add-to-load-path-with-subdirs \"~/.emacs.d\" '(\".\" \"..\" \"backup\") '(\"vendor\" \"my-lisp\"))"
(add-to-list 'load-path base t) ;; append so shipped packages are loaded first
(add-to-list 'load-path base nil) ;; no append so shipped packages are loaded first
(dolist (f (directory-files base))
(let ((name (concat base "/" f)))
(when (and (file-directory-p name)
(not (member f exclude-list)))
(add-to-list 'load-path name t) ;; append so shipped packages are loaded first
(add-to-list 'load-path name nil) ;; no append so shipped packages are loaded first
(when (member f include-list)
(add-to-load-path-with-subdirs name exclude-list include-list))))))
(add-to-load-path-with-subdirs (concat config-dir "lisp") '("." ".." "0patches") nil)