Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

conditional inclusion

0 views
Skip to first unread message

RAVI AYYALASOMAYAJULA

unread,
Feb 28, 1993, 10:02:12 PM2/28/93
to

I have several emacs lisp files such as makefilemode.el, csh-mode.el
c-comment.el in my load path. However, I face the following problem
right now.

Everytime I invoke emacs it first loads all the files that are in my
load path (unconditionally) and then makes the editor ready for use.

What I would like to do is I want only the files that are relevant
to that particular major mode need be included. For instance, if I
invoke gnus from the commandline, I want all the gnus related elisp
be included and the rest such as c-comment.el files be ignored. similarly
if I invoke emacs with c file as the commandline argument it should
include all the c related emacs lisp files only.

I am sure gurus out there must have already done this. I would appreciate
if someone can mail me his/her .emacs file or the solution as to how to
do it.

Thank you very much.

Ravi


--
-------------------------------------------------------------
Sastry.A.V.R.R | The woods are lovely, dark and deep,
(804)-489-9451(HOME) | But I have promises to keep,
(804)-683-4527(OFF) | And miles to go before I sleep,

Wayne Mesard

unread,
Mar 2, 1993, 6:32:44 AM3/2/93
to
sas...@hathor.cs.odu.edu (RAVI AYYALASOMAYAJULA) writes:
> Everytime I invoke emacs it first loads all the files that are in my
> load path (unconditionally) and then makes the editor ready for use.
>
> What I would like to do is I want only the files that are relevant
> to that particular major mode need be included.

Use autoload. For example:

(autoload 'ispell-word "ispell" "Check the spelling of word in buffer." t)
(autoload 'ispell-buffer "ispell" "Check the spelling of buffer." t)

instead of:

(load "ispell" nil t nil)
--
Wayne();
WMe...@cs.Stanford.edu

0 new messages