[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: user-controlled load-path extension: load-dir
From: |
PJ Weisberg |
Subject: |
Re: user-controlled load-path extension: load-dir |
Date: |
Tue, 8 Mar 2011 10:49:18 -0800 |
On Tue, Mar 8, 2011 at 1:58 AM, Evans Winner <address@hidden> wrote:
> the init process. Anyway, for what it's worth. This is the
> sort of functionality I expected when I heard about the
> ~/.emacs.d/ concept, and was surprised when that's not what
> it was.
I was also surprised that it wasn't possible to refactor my .emacs
file in this way. Though it occurred to me after my last post that
the average non-programmer probably would never feel the need to
refactor his .emacs.
For what it's worth (approximately the cost of the electrons used for
this message), here's the code I added to the end of my .emacs to do
what I believe we're discussing:
======================================================================
(defvar init-directory "~/.emacs.d/init-el"
"Directory in which PJ keeps elisp files to be executed on startup")
(push init-directory load-path)
(byte-recompile-directory init-directory 0)
(mapc 'load
(mapcar (lambda(x) (substring x 0 -3))
(directory-files init-directory nil ".*\\.el$")))
======================================================================
The part about byte-compiling the elisp files is totally unnecessary,
but it makes me feel better to think that things are slightly more
efficient than they could have been. ;-)
-PJ
Re: user-controlled load-path extension: load-dir, Ben Key, 2011/03/08
RE: user-controlled load-path extension: load-dir, Ben Key, 2011/03/08
- Re: user-controlled load-path extension: load-dir, Dimitri Fontaine, 2011/03/08
- Re: user-controlled load-path extension: load-dir, Chad Brown, 2011/03/08
- Re: user-controlled load-path extension: load-dir, Dimitri Fontaine, 2011/03/08
- Re: user-controlled load-path extension: load-dir, Chad Brown, 2011/03/08
- Re: user-controlled load-path extension: load-dir, Dimitri Fontaine, 2011/03/09
- Re: user-controlled load-path extension: load-dir, Ted Zlatanov, 2011/03/09
Re: user-controlled load-path extension: load-dir, Ben Key, 2011/03/08
Re: user-controlled load-path extension: load-dir, Ben Key, 2011/03/08
Re: user-controlled load-path extension: load-dir, Ben Key, 2011/03/09