Hello,
I have attached to this message an updated version of load-dir.el. In this version, I have made several basic improvements.
- Each of the defcustom items now has a require property. The main benefit of this is that a user may now simply place load-dir.el in their load path, use M-x load-library to load 'load-dir' and then do a M-x customize-group to customize the 'load-dir' group, customize load-dirs, and restart Emacs. There is no need to also manually edit their .emacs file to add a '(require 'load-dir)' in order to actually cause Emacs to load load-dir.el.
- Modified the load-dirs defcustom so that it can now accept several types via the "Value Menu" customize feature.
- nil, the default value, effectively causes load-dir.el to do nothing.
- t causes the default directory of ~/.emacs.d/load.d to be used (saves typing).
- A single directory causes files in that directory to be loaded.
- A list of directories causes all files in every directory in the list to be loaded.
Note that the error handling code does not appear to be working as expected. I set load-dir-ignore-errors to t. I then placed a file error.el in my load-dir directory that contains a deliberate error. The expected behavior is for Emacs initialization to complete with perhaps a message telling me about the error. Instead, Emacs initialization halts at the error and the "*GNU Emacs*" buffer is never displayed. I will look into this latter.
I hope that you find this changes useful.