Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
This commit is contained in:
parent
c3a84f0fbf
commit
d12752324a
12 changed files with 113 additions and 115 deletions
|
@ -619,10 +619,8 @@ This offers a moderate boost in startup (or theme switch) time, so long as
|
|||
:around #'load-theme
|
||||
(if (or (null after-init-time)
|
||||
doom--prefer-theme-elc)
|
||||
(cl-letf* ((old-locate-file (symbol-function 'locate-file))
|
||||
((symbol-function 'locate-file)
|
||||
(lambda (filename path &optional _suffixes predicate)
|
||||
(funcall old-locate-file filename path '("c" "") predicate))))
|
||||
(letf! (defun locate-file (filename path &optional _suffixes predicate)
|
||||
(funcall locate-file filename path '("c" "") predicate))
|
||||
(apply orig-fn args))
|
||||
(apply orig-fn args))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue