emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoload and auto-compression-mode


From: Stefan Monnier
Subject: Re: autoload and auto-compression-mode
Date: Sat, 14 Jan 2006 12:44:57 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> You are right -- but it seems we have indeed one more inconsistency.
> Modify your example as follows:

> % echo '(defun foo () (message "foo1"))' > ~/tmp/foo1/foo
> % echo '(defun foo () (message "foo2"))' > ~/tmp/foo2/foo.el

> M-: (let ((load-path (append '("~/tmp/foo1" "~/tmp/foo2") load-path)))
>          (autoload 'foo "foo" nil t)
>          (foo))

> and I get "foo2" in *Messages*. 
> But I get "foo1" if ~/tmp/foo1/foo is compressed.
> Seems that autoload and load act differently.

Yes, autoload calls `load' with a non-nil `must-suffix' argument, so
`foo1/foo' will not be loaded (even in the absence of foo2/foo.el), whereas
`foo1/foo.gz' will because it does have a suffix.

Why does autoload use `must-suffix'?  No clue.  Anyone?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]