bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: longish Local Variables in Files


From: Dan Jacobson
Subject: Re: longish Local Variables in Files
Date: Fri, 10 Sep 2004 05:19:37 +0800

Here's perhaps another example for the Local Variables examples,
which you can put on the info Node "Locals",
which by the way should be renamed "Local Variables",
;Local Variables:
;compile-command: "emacs -batch -l .emacs -f batch-byte-compile .emacs"
;End:
(No I don't know how to use current-buffer instead of hardwiring ".emacs".)
Now even the beginner can get into the obsessive-compulsive habit of
byte-compiling his .emacs.
Wait.  Wrap this around your .emacs instead:
(let ((el (expand-file-name "~/.emacs"))
      (elc (expand-file-name "~/.gnus.elc")))
  (if (file-newer-than-file-p el elc)
      (progn
        (message "%s is not up to date, byte-compiling %s..." el elc)
        (sit-for 1)
        (byte-compile-file el)
        (load elc nil t t))
;ELSE: to the end of the file!
;;guts of .emacs go here
))
I wanted to not hardwire the file names in but they are needed in
during byte-compile apparently,  buffer-file-name can't be used.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]