mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
scratch buffer: check if mode is a function before running it
This commit is contained in:
@ -263,7 +263,8 @@ buffers regardless of project."
|
||||
;; or scratch buffer by default
|
||||
(with-current-buffer (doom/popup-buffer doom-buffer)
|
||||
(doom|update-scratch-buffer nil t)
|
||||
(unless (eq major-mode mode)
|
||||
(when (and (not (eq major-mode mode))
|
||||
(functionp mode))
|
||||
(funcall mode))
|
||||
(unless doom-buffer-edited
|
||||
(erase-buffer)
|
||||
|
Reference in New Issue
Block a user