From 4f27d8e774f432915425b4bdbb99d160915feb1a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 8 May 2020 14:49:14 -0400 Subject: [PATCH] Fix #3070: project scratch buffers not persistent --- core/autoload/scratch.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/autoload/scratch.el b/core/autoload/scratch.el index 49b49c794..31a95ec96 100644 --- a/core/autoload/scratch.el +++ b/core/autoload/scratch.el @@ -23,14 +23,15 @@ the first, fresh scratch buffer you create. This accepts: (defvar doom-scratch-current-project nil "The name of the project associated with the current scratch buffer.") +(put 'doom-scratch-current-project 'permanent-local t) (defvar doom-scratch-buffer-hook () "The hooks to run after a scratch buffer is created.") -(defun doom--load-persistent-scratch-buffer (name) +(defun doom--load-persistent-scratch-buffer (project-name) (setq-local doom-scratch-current-project - (or name + (or project-name doom-scratch-default-file)) (let ((smart-scratch-file (expand-file-name (concat doom-scratch-current-project ".el")