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:
parent
8f2fb07948
commit
a05b1877be
9 changed files with 93 additions and 104 deletions
|
@ -147,7 +147,7 @@ savehist file."
|
|||
(def-package! smartparens
|
||||
;; Auto-close delimiters and blocks as you type. It's more powerful than that,
|
||||
;; but that is all Doom uses it for.
|
||||
:after-call (doom-exit-buffer-hook after-find-file)
|
||||
:after-call (doom-switch-buffer-hook after-find-file)
|
||||
:commands (sp-pair sp-local-pair sp-with-modes sp-point-in-comment sp-point-in-string)
|
||||
:config
|
||||
(require 'smartparens-config)
|
||||
|
@ -220,9 +220,9 @@ savehist file."
|
|||
(advice-add #'dtrt-indent-mode :around #'doom*fix-broken-smie-modes))
|
||||
|
||||
|
||||
(def-package! undo-tree
|
||||
(def-package! undo-tree
|
||||
;; Branching & persistent undo
|
||||
:after-call (doom-exit-buffer-hook after-find-file)
|
||||
:after-call (doom-switch-buffer-hook after-find-file)
|
||||
:config
|
||||
(setq undo-tree-auto-save-history t
|
||||
;; undo-in-region is known to cause undo history corruption, which can
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue