all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Intercepting require statements
@ 2009-03-18 12:12 Nordlöw
  2009-03-18 13:25 ` Nikolaj Schumacher
  0 siblings, 1 reply; 2+ messages in thread
From: Nordlöw @ 2009-03-18 12:12 UTC (permalink / raw)
  To: help-gnu-emacs

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)

so that we can implement byte-code-cache for require statements?

Many thanks in advance,
Nordlöw


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Intercepting require statements
  2009-03-18 12:12 Intercepting require statements Nordlöw
@ 2009-03-18 13:25 ` Nikolaj Schumacher
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolaj Schumacher @ 2009-03-18 13:25 UTC (permalink / raw)
  To: Nordlöw; +Cc: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-18 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18 12:12 Intercepting require statements Nordlöw
2009-03-18 13:25 ` Nikolaj Schumacher

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.