Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!tank!tank.uchicago.edu!pearce From: pearce@tycho.yerkes.uchicago.edu (Eric C. Pearce) Newsgroups: comp.emacs Subject: Re: .emacs Message-ID: Date: 5 Jun 89 19:36:00 GMT References: <8906051517.AA01192@dsys.ncsl.nist.gov> <40936@bbn.COM> Sender: news@tank.uchicago.edu Distribution: usa Organization: University of Chicago, Yerkes Observatory Lines: 34 In-reply-to: jr@bbn.com's message of 5 Jun 89 17:28:38 GMT > ... or make a hard or symbolic link from .emacs to .emacs.elc, and put > all your stuff in your .emacs.el. Remember to byte-compile the latter > when you change it. (The byte-compiler preserves links to the .elc > file). I use the following csh alias to avoid carrying the > byte-compiler code around in my running emacs: > > alias elc 'emacs -batch -f batch-byte-compile \!*' I have the following in my .emacs file, which keeps the real startup code byte compiled for me... (defvar custom-startup-file "~pearce/emacs/emacs") (defun byte-compile-if-newer (file) "Byte compile file.el if newer than file.elc" (if (file-newer-than-file-p (concat file ".el") (concat file ".elc")) (if (string= "pearce" (user-real-login-name)) (byte-compile-file (concat file ".el"))))) (byte-compile-if-newer custom-startup-file) (load custom-startup-file) The extra comparison to user-real-login-name keeps me from byte-compiling if I have su'ed somewhere. -- - Ecp Eric C. Pearce, Yerkes Observatory, University of Chicago. pearce@tycho.yerkes.uchicago.edu or pearce@oddjob.uchicago.edu