From c5de95f722725f8875b1ff438163bc617667d139 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 20 Sep 2022 01:50:09 +0200 Subject: [PATCH] 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. --- lisp/doom-ui.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/doom-ui.el b/lisp/doom-ui.el index e135c08b2..0b3060467 100644 --- a/lisp/doom-ui.el +++ b/lisp/doom-ui.el @@ -187,9 +187,6 @@ or if the current buffer is read-only or not file-visiting." ;; ;;; 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 _) "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 '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' (add-hook 'window-selection-change-functions #'doom-run-switch-window-or-frame-hooks-h) ;; Initialize `doom-switch-buffer-hook'