From 6d1ff1a2dfb316710ef0399a7d557a5ce3c0e0c8 Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Fri, 30 Dec 2022 14:10:17 -0500 Subject: [PATCH] Fix scratch buffer reverting mode on switch --- init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 8c4770b..7712eb3 100644 --- a/init.el +++ b/init.el @@ -244,7 +244,8 @@ init file, which initializes the package manager during compile time." "Open the scratch buffer, (re)creating it if not present." (interactive) (pop-to-buffer (get-buffer-create "*scratch*") '((display-buffer-reuse-window display-buffer-same-window))) - (lisp-interaction-mode)) + (unless (derived-mode-p initial-major-mode) + (funcall initial-major-mode))) (defun user/scan-directory-for-projects () "Prompt for a directory and then scan for any project roots within.