From 1793b8f270974f3bca2ccae64c2654fe5366346b Mon Sep 17 00:00:00 2001
From: Bozhidar Batsov <bozhidar@batsov.com>
Date: Sun, 18 Oct 2020 11:45:13 +0300
Subject: [PATCH] Fallback to the sample prelude-modules.el if missing

---
 CHANGELOG.md | 1 +
 init.el      | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 93d4a77..d60cde8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@
 * Remove `prelude-fullscreen`, as these days people can use `toggle-frame-fullscreen` instead. (it was introduced in Emacs 24.4)
 * Removed `beacon-mode`.
 * Added `transient/` to `.gitignore`.
+* Fallback to `sample/prelude-modules.el` in the absence of a `prelude-modules.el` in one's personal folder.
 
 ### Bugs fixed
 
diff --git a/init.el b/init.el
index 4d39900..5f2a493 100644
--- a/init.el
+++ b/init.el
@@ -135,8 +135,10 @@ by Prelude.")
 ;; the modules
 (if (file-exists-p prelude-modules-file)
     (load prelude-modules-file)
-  (message "Missing modules file %s" prelude-modules-file)
-  (message "You can get started by copying the bundled example file from sample/prelude-modules.el"))
+  (message "Missing personal modules file %s" prelude-modules-file)
+  (message "Falling back to the bundled example file sample/prelude-modules.el")
+  (message "You should copy this file to your personal configuration folder and tweak it to your liking")
+  (load (expand-file-name "sample/prelude-modules.el" user-emacs-directory)))
 
 ;; config changes made through the customize UI will be stored here
 (setq custom-file (expand-file-name "custom.el" prelude-personal-dir))