Merge pull request #891 from edwintorok/theme-elc
Load .elc even for themes
This commit is contained in:
commit
9c4147bbbb
1 changed files with 10 additions and 0 deletions
|
@ -448,6 +448,16 @@ instead). Meant for `kill-buffer-query-functions'."
|
||||||
(powerline-reset)))
|
(powerline-reset)))
|
||||||
(advice-add #'load-theme :around #'doom*disable-old-themes-first)
|
(advice-add #'load-theme :around #'doom*disable-old-themes-first)
|
||||||
|
|
||||||
|
(defun doom*prefer-compiled-theme (orig-fn &rest args)
|
||||||
|
"Make `load-theme' prioritize the byte-compiled theme (if it exists) for a
|
||||||
|
moderate boost in startup (or theme switch) time."
|
||||||
|
(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))))
|
||||||
|
(apply orig-fn args)))
|
||||||
|
(advice-add #'load-theme :around #'doom*prefer-compiled-theme)
|
||||||
|
|
||||||
(defun doom|disable-whitespace-mode-in-childframes (frame)
|
(defun doom|disable-whitespace-mode-in-childframes (frame)
|
||||||
(when (frame-parameter frame 'parent-frame)
|
(when (frame-parameter frame 'parent-frame)
|
||||||
(with-selected-frame frame
|
(with-selected-frame frame
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue