scratch buffer: check if mode is a function before running it

This commit is contained in:
Henrik Lissner 2016-06-08 21:09:19 -04:00
parent 791faeece4
commit 75f54bf82e

View file

@ -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)