[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wrong-type-argument when ~/.emacs is byte compiled
From: |
Kevin Rodgers |
Subject: |
Re: wrong-type-argument when ~/.emacs is byte compiled |
Date: |
Thu, 12 May 2005 09:24:37 -0600 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
Esben Stien wrote:
> I have this code in my ~/.emacs to automatically byte compile when I
> save the file.
>
> (defun autocompile nil
> "compile itself if ~/.emacs"
> (interactive)
> (require 'bytecomp)
> (if (string= (buffer-file-name) (expand-file-name (concat
default-directory ".emacs")))
> (byte-compile-file (buffer-file-name))))
> (add-hook 'after-save-hook 'autocompile)
That will automatically byte compile .emacs files in any directory.
--
Kevin Rodgers