-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Support supplying directories of files in the personal/preload directory #1432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…oad directory Signed-off-by: Michael Levine <[email protected]>
Signed-off-by: Michael Levine <[email protected]>
@@ -102,6 +102,9 @@ by Prelude.") | |||
(when (file-exists-p prelude-personal-preload-dir) | |||
(message "[Prelude] Loading personal configuration files in %s..." prelude-personal-preload-dir) | |||
(mapc 'load (directory-files prelude-personal-preload-dir 't "^[^#\.].*el$"))) | |||
(when (file-directory-p prelude-personal-preload-dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just modify the previous block instead of introducing a new one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just modify the previous block instead of introducing a new one?
Do you mean as an or
condition with when (file-exists-p
? If so, I assumed the mapc
command on directory-files
could fail if file-exists-p
is false
but file-directory-p
is true. My assumption could definitely be wrong though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's fair, but you can just use file-directory-p
in the previous when
, as looking at the code it assumes it's always a directory anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent idea! I updated the previous block based on your suggestion.
Signed-off-by: Michael Levine <[email protected]>
…r feedback Signed-off-by: Michael Levine <[email protected]>
Signed-off-by: Michael Levine <[email protected]>
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs. Thank you for your contribution and understanding! |
Signed-off-by: Michael Levine <[email protected]>
Signed-off-by: Michael Levine <[email protected]>
Signed-off-by: Michael Levine <[email protected]>
There seem to be a lot of linter errors for the |
Currently the
personal/preload
directory accepts.el
files. This PR allows you to include directories in thepersonal/preload
directory, and all.el
files recursively found in those directories will be loaded as well.Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
Thanks!