[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can we add a function which is used to returned immediately within a
From: |
David Hansen |
Subject: |
Re: Can we add a function which is used to returned immediately within an source file for lib? |
Date: |
Fri, 12 Sep 2008 04:47:45 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
On Fri, 12 Sep 2008 02:37:47 +0000 Yiyi Hu wrote:
> What I want to do is simple:
> When emacs starts, It checks if ~/.emacs is newer than ~/.emacs.elc,
> if it does, then it recompiles the ~/.emacs, and load ~/.emacs.elc on
> the fly. But skip the rest of ~/.emacs, The reason why I want this
> will be explained.
Do the time stamp check and recompile from .emacs but use another file
for the actual code.
> The unless version has this problem.
> (unless (byte-compile-file-if-newer "~/.emacs")
> remaining lisp code ...)
> Because, This will confuse M-x customize-* series functions.
> Eg, when you put (customize-set-variables ....) things within (unless
> (byte-compile-file-if-newer "~/.emacs") )
Use another `custom-file' (setq custom-file "~/.emacs.d/emacs-custom")
or w/ above suggestion the problem doesn't occur:
(when (have-to-recompile-my-init-file-p)
(byte-compile-file my-init-file))
(load my-init-file)
;; Custom stuff follows...
> returning while loading source is a good feature to have.
Well, you can always use `condition-case' and `error' but you need one
wrapper for it.
David