emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: user-controlled load-path extension: load-dir


From: Ben Key
Subject: Re: user-controlled load-path extension: load-dir
Date: Sat, 19 Mar 2011 00:10:26 -0400

Hello,

I have attached to this message an updated version of load-dir.el.  In this version, I have made several basic improvements.
  1. 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.
  2. Modified the load-dirs defcustom so that it can now accept several types via the "Value Menu" customize feature.
    1. nil, the default value, effectively causes load-dir.el to do nothing.
    2. t causes the default directory of ~/.emacs.d/load.d to be used (saves typing).
    3. A single directory causes files in that directory to be loaded.
    4. 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.

Attachment: load-dir.el
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]