Respect initial-major-mode creating scratch buffer

This commit is contained in:
toctan 2014-07-01 20:50:17 +08:00
parent bc53a7008a
commit 4dab9a193a

View file

@ -371,10 +371,9 @@ Doesn't mess with special buffers."
(defun prelude-create-scratch-buffer ()
"Create a new scratch buffer."
(interactive)
(progn
(switch-to-buffer
(get-buffer-create (generate-new-buffer-name "*scratch*")))
(emacs-lisp-mode)))
(let ((buf (get-buffer-create (generate-new-buffer-name "*scratch*"))))
(set-buffer-major-mode buf)
(switch-to-buffer buf)))
(defvar prelude-tips
'("Press <C-c o> to open a file with external program."