all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolaj Schumacher <me@nschum.de>
To: Nordlöw <per.nordlow@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Intercepting require statements
Date: Wed, 18 Mar 2009 14:25:32 +0100	[thread overview]
Message-ID: <m2ocvz6jzn.fsf@nschum.de> (raw)
In-Reply-To: <8349be33-bbb3-4158-9644-599b117c92ac@c36g2000yqn.googlegroups.com> ("Nordlöw"'s message of "Wed, 18 Mar 2009 05:12:20 -0700 (PDT)")

Nordlöw <per.nordlow@gmail.com> wrote:

> Is there a way to somehow intercept require statements like is done in
> byte-code-cache.el in the following way:
>
> (setq load-source-file-function #'bcc-load-source-file)

Doesn't require use `load' internally?

(setq load-source-file-function 'ignore)
(require 'something-not-yet-compiled)

is enough to prevent loading.


I think the problem is that `load' doesn't look at
`load-source-file-function' if it finds a byte-compiled file.  So there's
no chance to automatically re-compile an outdated file.

I don't think there's a way around that.

see also:
http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-01/msg00907.html


regards,
Nikolaj Schumacher




      reply	other threads:[~2009-03-18 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 12:12 Intercepting require statements Nordlöw
2009-03-18 13:25 ` Nikolaj Schumacher [this message]

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=m2ocvz6jzn.fsf@nschum.de \
    --to=me@nschum.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=per.nordlow@gmail.com \
    /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.