lang/emacs-lisp: reload recompiled file if older version is loaded
This commit is contained in:
parent
acb7536e64
commit
f0e0271dcc
1 changed files with 9 additions and 1 deletions
|
@ -59,7 +59,15 @@
|
|||
:commands auto-compile-on-save-mode
|
||||
:config
|
||||
(setq auto-compile-display-buffer nil
|
||||
auto-compile-use-mode-line nil))
|
||||
auto-compile-use-mode-line nil)
|
||||
(defun +emacs-lisp*load-after-compile (success)
|
||||
"Reload the current emacs-lisp file after it's recompiled, if an older
|
||||
version is loaded."
|
||||
(when (eq success t)
|
||||
(let ((buffer-path (file-truename buffer-file-name)))
|
||||
(when (assoc buffer-path load-history)
|
||||
(load-file buffer-path)))))
|
||||
(advice-add 'auto-compile-byte-compile :filter-return '+emacs-lisp*load-after-compile))
|
||||
|
||||
|
||||
(def-package! highlight-quoted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue