Skip to content

Commit be6e337

Browse files
authored
Support supplying directories of files in the personal/preload directory (#1432)
1 parent ab0ed09 commit be6e337

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
<!-- markdownlint-disable MD013 MD024 -->
2+
13
# Change log
24

35
## master (unreleased)
46

57
### New features
68

9+
- [PR 1432](https://github.com/bbatsov/prelude/pull/1432): Allow directories of custom Emacs Lisp files in `personal/preload`.
710
- Enable `org-habits`.
811
- Neatly track `TODO` state changes in a drawer (LOGBOOK), thereby improving readability.
912
- Add a module to enable Literate Programming (`prelude-literal-programming.el`).

docs/configuration.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- markdownlint-disable MD013 MD046 -->
2+
13
# Configuration
24

35
## User Interface
@@ -74,10 +76,10 @@ Finally, if you don't want any theme at all, you can add this to your
7476

7577
## Personalizing
7678

77-
All files you create under the `personal/` directory are yours for
79+
All files or directories of files you create under the `personal/` directory are yours for
7880
personalization. There is no single special personal config file --
79-
any files you create in the `personal/` directory will be loaded in
80-
lexicographical order. The overall loading precedence is:
81+
any files or directories of files you create in the `personal/` directory will be loaded in
82+
lexicographical order (files first and then directories of files). The overall loading precedence is:
8183

8284
1. `personal/preload/*`
8385
2. `core/`

init.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ by Prelude.")
102102
(setq large-file-warning-threshold 100000000)
103103

104104
;; preload the personal settings from `prelude-personal-preload-dir'
105-
(when (file-exists-p prelude-personal-preload-dir)
106-
(message "[Prelude] Loading personal configuration files in %s..." prelude-personal-preload-dir)
107-
(mapc 'load (directory-files prelude-personal-preload-dir 't "^[^#\.].*el$")))
105+
(when (file-directory-p prelude-personal-preload-dir)
106+
(message "[Prelude] Loading personal configuration files from files and directories in %s..." prelude-personal-preload-dir)
107+
(mapc 'load (directory-files-recursively prelude-personal-preload-dir "^[^#\.].*el$")))
108108

109109
(message "[Prelude] Loading Prelude's core modules...")
110110

0 commit comments

Comments
 (0)