home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky gnu.emacs.help:5450 comp.emacs:4038
- Newsgroups: gnu.emacs.help,comp.emacs
- Path: sparky!uunet!spool.mu.edu!uwm.edu!linac!att!att!dptg!ulysses!allegra!princeton!csservices!mic
- From: mic@cs.princeton.edu (Michelangelo Grigni)
- Subject: Re: model for .emacs file
- In-Reply-To: h.b.furuseth@usit.uio.no's message of 19 Jan 93 13:23:19 GMT
- Message-ID: <1993Jan19.221800.21090@csservices.Princeton.EDU>
- Lines: 17
- Sender: news@csservices.Princeton.EDU (USENET News System)
- Organization: Princeton Department of Computer Science
- References: <1993Jan12.154544.17064@fuug.fi> <4fJ4tnu00VpGMiuQx_@andrew.cmu.edu>
- <1j6s13INN67t@life.ai.mit.edu> <MJB.93Jan16222231@oak44.doc.ic.ac.uk>
- <DODD.93Jan17095633@mycenae.cchem.berkeley.edu>
- <NICKEL.93Jan18194816@tempest.cs.tu-berlin.de>
- <H.B.FURUSETH.93Jan19142319@gandalf.uio.no>
- Date: Tue, 19 Jan 1993 22:18:00 GMT
-
- ["Local Variables" method elided]
-
- Instead of making a special case for .emacs.el, you can auto-recompile
- all of your emacs-lisp files, e.g.:
-
- (define-key emacs-lisp-mode-map "\C-X\C-S" 'save-compile-buffer)
- (defun save-compile-buffer (&optional prefix)
- "Save current buffer, byte-compile the file if a compiled version exists.
- A single prefix prevents compiling, a double prefix forces compiling."
- (interactive "p")
- (save-buffer)
- (if (or (equal prefix 16)
- (and (not (equal prefix 4))
- (file-exists-p (concat (buffer-file-name) "c"))))
- (progn
- (sit-for 0) ; redisplays status line
- (byte-compile-file (buffer-file-name)))))
-