unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Hansen <david.hansen@gmx.net>
To: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <8763p2cc6m.fsf@localhorst.mine.nu> (raw)
In-Reply-To: f469f8de0809111937g5963325ci9d23385bc7fca7a8@mail.gmail.com

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





  reply	other threads:[~2008-09-12  2:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10 12:15 Can we add a function which is used to returned immediately within an source file for lib? Yiyi Hu
2008-09-10 21:06 ` mail
2008-09-12  2:37   ` Yiyi Hu
2008-09-12  2:47     ` David Hansen [this message]
2008-09-12  2:51     ` Yiyi Hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763p2cc6m.fsf@localhorst.mine.nu \
    --to=david.hansen@gmx.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).