all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Can we add a function which is used to returned immediately within an source file for lib?
Date: Wed, 10 Sep 2008 23:04:37 -0600	[thread overview]
Message-ID: <gaa8t5$ig4$1@ger.gmane.org> (raw)
In-Reply-To: <f469f8de0809100231t28e450d4s24bd0e06530e5843@mail.gmail.com>

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





  reply	other threads:[~2008-09-11  5:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10  9:31 Can we add a function which is used to returned immediately within an source file for lib? Yiyi Hu
2008-09-11  5:04 ` Kevin Rodgers [this message]
2008-09-12  2:24   ` Yiyi Hu
2008-09-12  1:27 ` Thien-Thi Nguyen
2008-09-12  2:23   ` Yiyi Hu
  -- strict thread matches above, loose matches on Subject: below --
2008-09-10 12:15 Yiyi Hu
2008-09-10 21:06 ` mail
2008-09-12  2:37   ` Yiyi Hu
2008-09-12  2:47     ` David Hansen
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

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

  git send-email \
    --in-reply-to='gaa8t5$ig4$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.