Rewrite switch-{buffer,window} hooks

+ Add doom-switch-frame-hook
+ Replace doom-{enter,exit}-{buffer,window}-hook with
  doom-switch-{buffer,window}-hook
+ New switch-buffer hooks run on buffer-list-update-hook rather than
  in select-window advice.
+ Blank our buffer-list-update-hook in some places to reduce how many
  times it gets triggered.
This commit is contained in:
Henrik Lissner 2019-03-07 00:26:51 -05:00
parent 8f2fb07948
commit a05b1877be
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
9 changed files with 93 additions and 104 deletions

View file

@ -9,7 +9,7 @@
(def-package! flycheck
:commands (flycheck-list-errors flycheck-buffer)
:after-call (doom-enter-buffer-hook after-find-file)
:after-call (doom-switch-buffer-hook after-find-file)
:config
;; Emacs feels snappier without checks on newline
(setq flycheck-check-syntax-automatically (delq 'new-line flycheck-check-syntax-automatically))