mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Simplify dashboard initial buffer check
We only need to check if we're in the scratch buffer. doom-real-buffer-p is overkill for that. This also reduces file loads at startup for autoloaded functions added to the doom-real-buffer-functions and doom-unreal-buffer-functions.
This commit is contained in:
@ -207,9 +207,9 @@ project (which may be different across perspective)."
|
|||||||
|
|
||||||
(defun +doom-dashboard-initial-buffer ()
|
(defun +doom-dashboard-initial-buffer ()
|
||||||
"Returns buffer to display on startup. Designed for `initial-buffer-choice'."
|
"Returns buffer to display on startup. Designed for `initial-buffer-choice'."
|
||||||
(if (doom-real-buffer-p)
|
(if (eq (current-buffer) (get-buffer "*scratch*"))
|
||||||
(current-buffer)
|
(doom-fallback-buffer)
|
||||||
(doom-fallback-buffer)))
|
(current-buffer)))
|
||||||
|
|
||||||
(defun +doom-dashboard-p (buffer)
|
(defun +doom-dashboard-p (buffer)
|
||||||
"Returns t if BUFFER is the dashboard buffer."
|
"Returns t if BUFFER is the dashboard buffer."
|
||||||
|
Reference in New Issue
Block a user