New add-load-path! convenience macro
This commit is contained in:
parent
e1622142ed
commit
f4acb3cefd
|
@ -199,6 +199,14 @@ If FETCHER is a function, ELT is used as the key in LIST (an alist)."
|
|||
elt)
|
||||
,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)
|
||||
"Attaches a self-removing function to HOOK-OR-FUNCTION.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user