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:
Henrik Lissner 2023-02-17 12:22:00 -05:00
parent d1b948eb2c
commit 7bf5938c66
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -619,7 +619,7 @@ This is a variadic `cl-pushnew'."
(defmacro add-load-path! (&rest dirs)
"Add DIRS to `load-path', relative to the current file.
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)
(dolist (dir (list ,@dirs))
(cl-pushnew (expand-file-name dir) load-path :test #'string=))))