refactor: switch buffer/frame/window hooks
Emacs 27 introduced a bunch of `window-*-change-functions` hooks, including `window-selection-change-functions` and `window-buffer-change-functions`, which handles 98% of the use case for Doom's `doom-switch-{buffer,window,frame}-hook` hooks, so I've rewritten them to use them under the hood, which amounts to simpler code and fewer hacks.
This commit is contained in:
parent
2614df72bd
commit
0bb4d4dfcb
4 changed files with 35 additions and 75 deletions
|
@ -477,6 +477,14 @@ If this is a daemon session, load them all immediately instead."
|
|||
(cdr doom-incremental-packages) t))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Fixes/hacks
|
||||
|
||||
;; Produce more helpful (and visible) error messages from errors emitted from
|
||||
;; hooks (particularly mode hooks, that usually go unnoticed otherwise.
|
||||
(advice-add #'run-hooks :override #'doom-run-hooks)
|
||||
|
||||
|
||||
;;
|
||||
;;; Bootstrapper
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue