mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
perf(lib): dir!: unset file-name-handler-alist
file-name-directory consults this variable for alternative strategies, which is unnecessary work. (file!) won't (and should never be used in any context where it could) return anything but a simple file path.
This commit is contained in:
@ -303,7 +303,8 @@ TRIGGER-HOOK is a list of quoted hooks and/or sharp-quoted functions."
|
|||||||
|
|
||||||
(defmacro dir! ()
|
(defmacro dir! ()
|
||||||
"Return the directory of the file this macro was called."
|
"Return the directory of the file this macro was called."
|
||||||
(file-name-directory (macroexpand '(file!))))
|
(let (file-name-handler-alist)
|
||||||
|
(file-name-directory (macroexpand '(file!)))))
|
||||||
|
|
||||||
;; REVIEW Should I deprecate this? The macro's name is so long...
|
;; REVIEW Should I deprecate this? The macro's name is so long...
|
||||||
(defalias 'letenv! 'with-environment-variables)
|
(defalias 'letenv! 'with-environment-variables)
|
||||||
|
Reference in New Issue
Block a user