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:
parent
25611707ed
commit
986573a4a2
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue