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:
Henrik Lissner 2018-06-16 21:00:01 +02:00
parent 8c64644450
commit 08986d9101
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -207,9 +207,9 @@ project (which may be different across perspective)."
(defun +doom-dashboard-initial-buffer ()
"Returns buffer to display on startup. Designed for `initial-buffer-choice'."
(if (doom-real-buffer-p)
(current-buffer)
(doom-fallback-buffer)))
(if (eq (current-buffer) (get-buffer "*scratch*"))
(doom-fallback-buffer)
(current-buffer)))
(defun +doom-dashboard-p (buffer)
"Returns t if BUFFER is the dashboard buffer."