[comp.emacs] Loading and Autoloading files

gt1797a@prism.gatech.EDU (Ryan Mulderig - gt1797a) (04/13/91)

I am trying to make several packages as easy as possible to run. I have 
installed calc successfully and I am familiar with autoloading. What
I want to know how to is set up either default.el or the files themselves
that I am working on so that if they have dependancies, that are not
loaded thses will automaticly be loaded. What I have right now is (for the
navigator package)

   (autoload 'navigator  "location" "Navigator" t)
   (autoload 'multishell "location" "Multishell" t) , etc.

where navigator is dependant on multishell.

To run navigator I have to call each file up the dependance chain indiviually
   Meta-X comint
   Meta-X cmushell
   Meta-X multishell
   Meta-X navigator

I would like to know if their is a way to set things up so all I have to do
is type Meta-X navigator and it will start up with all dependancies taken
care of. This would also work well for the diary, calender, holiday package.

Thank You,

Ryan Mulderig, Assistant Systems Analysist
Earth and Atmospheric Sciences, Georgia Tech
EMAIL: ryan@eas.gatech.edu 

worley@compass.com (Dale Worley) (04/19/91)

In article <26165@hydra.gatech.EDU> gt1797a@prism.gatech.EDU (Ryan Mulderig - gt1797a) writes:
   What I have right now is (for the navigator package)

      (autoload 'navigator  "location" "Navigator" t)
      (autoload 'multishell "location" "Multishell" t) , etc.

   where navigator is dependant on multishell.

   To run navigator I have to call each file up the dependance chain indiviually
      Meta-X comint
      Meta-X cmushell
      Meta-X multishell
      Meta-X navigator

At the top of navigator.el, put in 

	(require 'multishell)

During the loading of navigator.el, when this form is executed,
multishell.el will be loaded if it hasn't been already.

There is one catch -- multishell.el must have in it:

	(provide 'multishell)

Look at the top of cmushell.el to see how it's done.

Dale

Dale Worley		Compass, Inc.			worley@compass.com
--
[V]irgins were often selected to beta-test volcanos.  -- Bob Starkey