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.