Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!rpi.edu!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: comp.emacs Subject: Re: loadst dies Message-ID: Date: 5 Jun 89 18:07:59 GMT References: <8906051517.AA01192@dsys.ncsl.nist.gov> Sender: usenet@rpi.edu Reply-To: tale@pawl.rpi.edu Distribution: comp Lines: 58 In-reply-to: rbj@dsys.ncsl.nist.GOV's message of 5 Jun 89 15:17:38 GMT In <8906051517.AA01192@dsys.ncsl.nist.gov> rbj@dsys.ncsl.nist.GOV (Root Boy Jim) writes: RBJ> Yes, but not specifically on your problem. I merely wish to point RBJ> out that 248 lines in your .emacs is too much. Remember that .emacs RBJ> is not byte compiled, it is much more efficient to put only (load)'s RBJ> in there, plus maybe a few variable settings. Put function definitions RBJ> in your lisp directory and byte compile them. Here is my .emacs: Yes and no. I just checked my .emacs and it is 115 lines of code. Here is why I don't consider it a problem: a) it _is_ byte-compiled. You can have a byte-compiled .emacs ... % ls -l .emacs emacs/.emacs* lrwxrwxrwx 1 tale 16 Mar 23 17:24 .emacs -> emacs/.emacs.elc -rw-r--r-- 1 tale 5704 May 15 16:12 emacs/.emacs.el -rw-r--r-- 1 tale 4175 May 15 16:12 emacs/.emacs.elc b) The bulk of it (56 lines) is hook definitions. The hook definitions are that long because seven of them are lambda expressions, one of which is 20 lines long (my gnus-Startup-hook, which makes sure that whichever of my accounts I happen to be on I will be using my most current .newsrc). c) The other large grouped areas are variable definitions and key bindings. Since I use page-menu-mode, though, I don't need to bother with breaking all of these things up into seperate files ... managing them in one file is easy: pg siz text 1 72 ;;; setq's and hook defs 2 10 ;;; Declarations dependent on environment 3 7 ;;; Enabled commands: eval-expression, narrow-to-region, narrow-to- 4 22 ;;; Key bindings; most are for autoloaded functions in ~emacs/local 5 16 ;;; elisp loading and autoloading 6 6 ;;; Miscellaneous I do keep two things seperate -- emacs/loadmisc.el and emacs/gnus-etc.el. loadmisc is defuns. I don't keep any defuns in my .emacs. gnus-etc has all of my variables declared for GNUS, except for gnus-Startup-hook. That cuts down on overhead some. It also has some function definitions/ redefinitions to add to/customize GNUS. It is required in the gnus= Startup-hook. So you can have a byte-compiled .emacs and since the file can be made manageable with some simple organization, there really isn't a drawback to having a seemingly long .emacs. I could make my .emacs 424 lines longer if I just put the loadmisc in it instead; the net effect for Emacs wouldn't be any different. But I do agree that modularity is A Good Thing. I just don't happen to like a bunch of ten to twenty-five line files in my directory when they can do just as well as one file. (For the curious, page 1 is actually just one setq and one setq-default.) Dave -- (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))