[Top][All Lists]

[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: Wed, 9 Mar 2011 00:50:23 -0600


I have attached to this message version 4 of

Several changes have been made to this version.
  1. The error handling in load-dir actually works as expected.  If one of the files in the user-load-dir generates an error, it is silently ignored and load-dir continues to load all the other files in the user-load-dir.
  2. Added the function byte-compile-dir to user-load-dir.el.  This function can be used to byte compile all files in the directory specified by the directory parameter.  If the optional parameter recurs is non-nil, this is done recursively.
  3. Added the function byte-compile-user-load-dir-files.  This interactive function may be used to byte compile all files in the user-load-dir.
  4. The function load-user-load-dir-files does nothing if user-load-dir is nil.
  5. Modified the user-load-dir defcustom so that it is set to t instead of nil in the case that it cannot be initialized at load time due to user-init-file being nil.
  6. Modified user-load-dir-after-init-hook so that it only sets user-load-dir to its default value if it is equal to t.
The reason I made changes 5 and 6 is to allow for the possibility of this feature being disabled by the user setting user-load-dir to nil.

Setting auto-load-files-in-user-load-dir to nil causes to not be called automatically by the user-load-dir-after-init-hook but the files can still be called by calling load-user-load-dir-files interactively.  Setting
user-load-dir to nil disables load-user-load-dir-files and byte-compile-user-load-dir-files.

Attachment: user-load-dir.el
Description: Binary data

reply via email to

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