A bit off topic, but I think the problem can probably be answered
better in cll then in ce.
My .emacs file looks like.
(load "load-all")
load-all.el looks like,
(defvar somevar "ADummy")
(load "foo1")
(load "foo2")
(load "foo3")
...
I byte compile foo1.el,foo2.el ... and load-all.el take and cat all
the elc files into one file and rename it load-all.elc, to save
loading time. Then I delete all the el files and the foo*.elc files.
So how can I write the load-all.el so that in that case emacs will
startup with out any errors, but it still loads, so that when I change
things I can debug by loading the el files to see what happens.
In essence I'm asking to replace load with a function that will:
* Load the file if the load is encountered in a *.el file that is
being loaded.
* Ignore the load ( except possibly to make external references to
symbols if need be ) when byte compiling.
* Ignore the load when loading the *.elc file.
Any suggestions?
--------------------------------------------------
Thaddeus L. Olczyk, PhD
Think twice, code once.
In article <··································@4ax.com>,
Thaddeus L Olczyk <······@interaccess.com> wrote:
>A bit off topic, but I think the problem can probably be answered
>better in cll then in ce.
>
>My .emacs file looks like.
>
>(load "load-all")
>
>load-all.el looks like,
>
>(defvar somevar "ADummy")
>(load "foo1")
>(load "foo2")
>(load "foo3")
>...
>
>I byte compile foo1.el,foo2.el ... and load-all.el take and cat all
>the elc files into one file and rename it load-all.elc, to save
>loading time. Then I delete all the el files and the foo*.elc files.
Why bother? I think you're overestimating the overhead of loading a
separate file.
>So how can I write the load-all.el so that in that case emacs will
>startup with out any errors, but it still loads, so that when I change
>things I can debug by loading the el files to see what happens.
>
>In essence I'm asking to replace load with a function that will:
> * Load the file if the load is encountered in a *.el file that is
> being loaded.
> * Ignore the load ( except possibly to make external references to
> symbols if need be ) when byte compiling.
> * Ignore the load when loading the *.elc file.
>
>Any suggestions?
Instead of (load "foo1"), use (require 'foo1), and at the end of foo1.el
put (provide 'foo1).
--
Barry Margolin, ··············@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
On Thu, 24 Jul 2003 14:30:58 GMT, Barry Margolin
<··············@level3.com> wrote:
>Why bother? I think you're overestimating the overhead of loading a
>separate file.
>
Actually, I can see the files loading ( on the status ) line. It takes
about six seconds for emacs to start, but for me that seems very
fast, and I have been working on it, so that parts of the file might
not get read now. Before I startedworking on it, it took 21 seconds.
It used to take a minute, untill I started byte-compiling everything.
I suspect that the ovrhead is large for one reason. ILISP merges it's
files into one to speed up loading. From the installation file:
"For reducing the Emacs startup time you may run `make loadfile'. This
concatenates all `.elc' (the compiled Emacs Lisp files) into an
`ilisp-all.elc' file and removes the `*.elc' files. So your Emacs can
load one single compiled file faster than a bunch of smaller compiled
files."
--------------------------------------------------
Thaddeus L. Olczyk, PhD
Think twice, code once.