mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix: relative paths for add-load-path!
Because (dir!) was being expanded too early (at macro expansion time) rather than runtime.
This commit is contained in:
@ -619,7 +619,7 @@ This is a variadic `cl-pushnew'."
|
|||||||
(defmacro add-load-path! (&rest dirs)
|
(defmacro add-load-path! (&rest dirs)
|
||||||
"Add DIRS to `load-path', relative to the current file.
|
"Add DIRS to `load-path', relative to the current file.
|
||||||
The current file is the file from which `add-to-load-path!' is used."
|
The current file is the file from which `add-to-load-path!' is used."
|
||||||
`(let ((default-directory ,(dir!))
|
`(let ((default-directory (dir!))
|
||||||
file-name-handler-alist)
|
file-name-handler-alist)
|
||||||
(dolist (dir (list ,@dirs))
|
(dolist (dir (list ,@dirs))
|
||||||
(cl-pushnew (expand-file-name dir) load-path :test #'string=))))
|
(cl-pushnew (expand-file-name dir) load-path :test #'string=))))
|
||||||
|
Reference in New Issue
Block a user