From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Yiyi Hu" Newsgroups: gmane.emacs.help Subject: Re: Can we add a function which is used to returned immediately within an source file for lib? Date: Fri, 12 Sep 2008 02:24:12 +0000 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1221191674 28130 80.91.229.12 (12 Sep 2008 03:54:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Sep 2008 03:54:34 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Kevin Rodgers" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 12 05:55:30 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kdzkk-0003ua-CU for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Sep 2008 05:55:26 +0200 Original-Received: from localhost ([127.0.0.1]:41311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdzjk-0004fD-1p for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Sep 2008 23:54:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KdyKU-0002SJ-Ew for help-gnu-emacs@gnu.org; Thu, 11 Sep 2008 22:24:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KdyKT-0002Qr-9f for help-gnu-emacs@gnu.org; Thu, 11 Sep 2008 22:24:13 -0400 Original-Received: from [199.232.76.173] (port=57964 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdyKT-0002Qh-3a for help-gnu-emacs@gnu.org; Thu, 11 Sep 2008 22:24:13 -0400 Original-Received: from mail-gx0-f12.google.com ([209.85.217.12]:46359) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KdyKT-00049T-C2 for help-gnu-emacs@gnu.org; Thu, 11 Sep 2008 22:24:13 -0400 Original-Received: by gxk5 with SMTP id 5so17925267gxk.18 for ; Thu, 11 Sep 2008 19:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=5EhrHRLgLrdEoZfVQecvAIOlfx0dFzBZQ1MmqFnw5Gg=; b=jPJCsbFz4U+DXhSSxUQvH5XhHQS8fi+CaI7mM07ewvz7Fx1smUd+TzaPRLAkPKr3WF YKQ0xYBiaspp7R6kkQSrARYbwNFyS31PozuioS9XCj/j1wj0Zei04Nh8TC7RZqzIhetx WzmVQBqEDxk3nU4XFzejwlLs8wtZXxbK6ZM8M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=FYQNavLTHPEwZxA3c1oPPhUiqgaFo8w3m2DUpjkFeOaT+9AI0dupyFDDMYwWgyuGW4 cqc8sdSZIVbaxJT6PIb/YfmGD37ld9nfUnbD9uXOn+NAOg0ef5hYEpnmFujHPSpIFU/q Qd2kczu6K2YZ9DDZ3x0l+miuDpcaZRtAdi+M8= Original-Received: by 10.151.112.19 with SMTP id p19mr5226423ybm.30.1221186252090; Thu, 11 Sep 2008 19:24:12 -0700 (PDT) Original-Received: by 10.150.98.15 with HTTP; Thu, 11 Sep 2008 19:24:12 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-Mailman-Approved-At: Thu, 11 Sep 2008 23:53:21 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57459 Archived-At: IMHO, It won't be easily done without touching the c source for the load function to quit directly. On Thu, Sep 11, 2008 at 5:04 AM, Kevin Rodgers wrote: > Yiyi Hu wrote: >> >> Can we add a function or extend (return t) to skip loading the rest of >> source please? >> >> Eg, my ~/.emacs >> >> (defun byte-compile-file-if-newer (src) >> (let ((result (concat src ".elc"))) >> (when (file-newer-than-file-p src result) >> (byte-compile-file src) >> (load-file result)))) >> >> (byte-compile-file-if-newer "~/.emacs") >> >> (custom-set-variables >> ;; custom-set-variables was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> '(auto-compression-mode t) >> '(column-number-mode t) >> '(cperl-indent-level 4) >> '(delete-selection-mode t) >> '(display-battery-mode t) >> '(display-time-24hr-format t) >> '(display-time-day-and-date t) >> '(display-time-mode t) >> '(encoded-kbd-mode t) >> '(gnus-nntp-server "news.readfreenews.net") >> '(indent-tabs-mode nil) >> '(inferior-lisp-program "sbcl") >> '(inhibit-eol-conversion t) >> '(inhibit-startup-screen t) >> '(initial-scratch-message nil) >> '(menu-bar-mode nil) >> '(mouse-avoidance-mode (quote exile) nil (avoid))) >> >> For now, there is now way to support skip the rest of ~/.emacs after >> (byte-compile-file-if-newer "~/.emacs"). > > Yes, it might be convenient if the load function established a tag that > you could throw to, or if some higher level interface to load did so > e.g. the inner lambda form in command-line (startup.el). > > -- > Kevin Rodgers > Denver, Colorado, USA > > > >