[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: |
Yiyi Hu |
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 |
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
<kevin.d.rodgers@gmail.com> 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
>
>
>
>