From e299de4a0f833174dcfe4ccc1c0e39c28caa8a0c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 1 Sep 2021 18:14:23 -0500 Subject: Automatically call persistent-scratch-mode on *scratch* --- init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index 288e988..fbf5296 100644 --- a/init.el +++ b/init.el @@ -1794,7 +1794,12 @@ browser defined in `browse-url-secondary-browser-function'." (setup (:straight persistent-scratch) (:option persistent-scratch-backup-directory (acdw/dir "scratch" t) persistent-scratch-keep-n-newest-backups 12) - (persistent-scratch-setup-default)) + (persistent-scratch-setup-default) + (mapc (lambda (buf) + (with-current-buffer buf + (when (funcall persistent-scratch-scratch-buffer-p-function) + (persistent-scratch-mode +1)))) + (buffer-list))) (setup (:straight restart-emacs) (defun emacs-upgrade (&optional update-packages) -- cgit 1.4.1-21-gabe81