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

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

Re: Cool and Useful LISP for the .emacs file


From: Edward Dodge
Subject: Re: Cool and Useful LISP for the .emacs file
Date: Fri, 07 Nov 2003 17:41:11 -0600
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (darwin)

Dan Anderson <dan@mathjunkies.com> writes:

> I was wondering what other people have in their .emacs file.  I would
> like to challenge everyone to add at least one cool tip / trick to:
>
> http://www.emacswiki.org/cgi-bin/wiki/DotEmacs
>
> -Dan

My personal favorite:

   (defun autocompile nil
     "compile itself if ~/.emacs"
     (interactive)
     (if (string= (buffer-file-name) (concat default-directory ".emacs"))
         (byte-compile-file (buffer-file-name))))

   (add-hook 'after-save-hook 'autocompile)

Never byte-compile your .emacs file by hand again!   

-- 
Edward Dodge

/GNU Emacs 21.3.50.1 (powerpc-apple-darwin5.5) of 2002-10-11 on G3/


reply via email to

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