From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.devel 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 Organization: disorganized Message-ID: <8763p2cc6m.fsf@localhorst.mine.nu> References: <87y71zemnp.fsf@justinbogner.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221188015 17966 80.91.229.12 (12 Sep 2008 02:53:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Sep 2008 02:53:35 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 12 04:54:31 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kdynk-0001Vb-4b for ged-emacs-devel@m.gmane.org; Fri, 12 Sep 2008 04:54:28 +0200 Original-Received: from localhost ([127.0.0.1]:59080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdymj-0008Sg-SR for ged-emacs-devel@m.gmane.org; Thu, 11 Sep 2008 22:53:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kdymg-0008SQ-0i for emacs-devel@gnu.org; Thu, 11 Sep 2008 22:53:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kdyme-0008SE-Gi for emacs-devel@gnu.org; Thu, 11 Sep 2008 22:53:21 -0400 Original-Received: from [199.232.76.173] (port=33807 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdyme-0008SB-Dh for emacs-devel@gnu.org; Thu, 11 Sep 2008 22:53:20 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:47075 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kdyme-0000lw-IO for emacs-devel@gnu.org; Thu, 11 Sep 2008 22:53:20 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Kdyma-0004Y7-J6 for emacs-devel@gnu.org; Fri, 12 Sep 2008 02:53:16 +0000 Original-Received: from e178045133.adsl.alicedsl.de ([85.178.45.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Sep 2008 02:53:16 +0000 Original-Received: from david.hansen by e178045133.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Sep 2008 02:53:16 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178045133.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:sLMSYN7hLFvfsl+yUwp45aP1f6w= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:103836 Archived-At: 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