Skip to content

Instantly share code, notes, and snippets.

@tychoish
Created August 21, 2020 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tychoish/5841ef582260b8ba5e75b1182fada5d1 to your computer and use it in GitHub Desktop.
Save tychoish/5841ef582260b8ba5e75b1182fada5d1 to your computer and use it in GitHub Desktop.
(defun tychoish-setup-user-local-config ()
"Ensure that all config files in the '~/.emacs.d/user' are loaded."
(let ((dirname (concat (expand-file-name user-emacs-directory) "user")))
(when (and (file-accessible-directory-p dirname)
(not (member dirname load-path)))
(add-to-list 'load-path dirname))
(mapc (lambda (fn)
(when (string-match-p "\\.el$" fn)
(require (intern (string-remove-suffix ".el" fn)))))
(directory-files dirname))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment