perf: defer init for frame's buffer-predicate
Ensures that it doesn't pull in the buffer library so early in the startup process, or gets called prematurely.
This commit is contained in:
parent
7a81b0252f
commit
c5de95f722
1 changed files with 3 additions and 3 deletions
|
@ -187,9 +187,6 @@ or if the current buffer is read-only or not file-visiting."
|
||||||
;;
|
;;
|
||||||
;;; Buffers
|
;;; Buffers
|
||||||
|
|
||||||
;; Make `next-buffer', `other-buffer', etc. ignore unreal buffers.
|
|
||||||
(push '(buffer-predicate . doom-buffer-frame-predicate) default-frame-alist)
|
|
||||||
|
|
||||||
(defadvice! doom--switch-to-fallback-buffer-maybe-a (&rest _)
|
(defadvice! doom--switch-to-fallback-buffer-maybe-a (&rest _)
|
||||||
"Switch to `doom-fallback-buffer' if on last real buffer.
|
"Switch to `doom-fallback-buffer' if on last real buffer.
|
||||||
|
|
||||||
|
@ -596,6 +593,9 @@ triggering hooks during startup."
|
||||||
(add-hook 'kill-buffer-query-functions #'doom-protect-fallback-buffer-h)
|
(add-hook 'kill-buffer-query-functions #'doom-protect-fallback-buffer-h)
|
||||||
(add-hook 'after-change-major-mode-hook #'doom-highlight-non-default-indentation-h 'append)
|
(add-hook 'after-change-major-mode-hook #'doom-highlight-non-default-indentation-h 'append)
|
||||||
|
|
||||||
|
;; Make `next-buffer', `other-buffer', etc. ignore unreal buffers.
|
||||||
|
(push '(buffer-predicate . doom-buffer-frame-predicate) default-frame-alist)
|
||||||
|
|
||||||
;; Initialize `doom-switch-window-hook' and `doom-switch-frame-hook'
|
;; Initialize `doom-switch-window-hook' and `doom-switch-frame-hook'
|
||||||
(add-hook 'window-selection-change-functions #'doom-run-switch-window-or-frame-hooks-h)
|
(add-hook 'window-selection-change-functions #'doom-run-switch-window-or-frame-hooks-h)
|
||||||
;; Initialize `doom-switch-buffer-hook'
|
;; Initialize `doom-switch-buffer-hook'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue