scratch buffer: check if mode is a function before running it
This commit is contained in:
parent
791faeece4
commit
75f54bf82e
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue