mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-05 12:37:33 -05:00
New add-load-path! convenience macro
This commit is contained in:
@ -199,6 +199,14 @@ If FETCHER is a function, ELT is used as the key in LIST (an alist)."
|
|||||||
elt)
|
elt)
|
||||||
,list)))
|
,list)))
|
||||||
|
|
||||||
|
(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!))
|
||||||
|
file-name-handler-alist)
|
||||||
|
(dolist (dir (list ,@dirs))
|
||||||
|
(cl-pushnew (expand-file-name dir) load-path))))
|
||||||
|
|
||||||
(defmacro add-transient-hook! (hook-or-function &rest forms)
|
(defmacro add-transient-hook! (hook-or-function &rest forms)
|
||||||
"Attaches a self-removing function to HOOK-OR-FUNCTION.
|
"Attaches a self-removing function to HOOK-OR-FUNCTION.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user