From 984240b6ef8ca5c1c79ba9a124a2883598202501 Mon Sep 17 00:00:00 2001 From: shoshin Date: Tue, 5 Jul 2022 11:33:00 -0500 Subject: Fix: [custom] make file if it does not exist --- shoshin-config.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'shoshin-config.el') diff --git a/shoshin-config.el b/shoshin-config.el index e57b2b5..293377d 100644 --- a/shoshin-config.el +++ b/shoshin-config.el @@ -1,7 +1,11 @@ ;;; shoshimacs.el --- Beginner's Mind Config -*- lexical-binding:t -*- -(setq custom-file "~/.emacs.d/shoshimacs-custom.el") -(load custom-file) +(let ((my-custom-file (expand-file-name + "shoshimacs-custom.el" user-emacs-directory))) + (unless (file-exists-p my-custom-file) + (make-empty-file my-custom-file)) + (setq custom-file my-custom-file) + (load custom-file)) ;;; Package Management (when (< emacs-major-version 28) -- cgit v1.2.3