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: Roland Winkler
Subject: Re: autoload and auto-compression-mode
Date: Sat, 14 Jan 2006 00:11:55 +0100

On Fri Jan 13 2006 Stefan Monnier wrote:
> > - If ~/bar is in the load-path before ~/foo and we have files
> >   ~/bar/foo and ~/foo/foo.el, then emacs loads ~/foo/foo.el.
> 
> Really?
> I've just tried it here with:
> 
>    % echo '(message "foo1")' >~/tmp/foo1/foo
>    % echo '(message "foo2")' >~/tmp/foo2/foo.el
>    
>    M-: (let ((load-path (list* "~/tmp/foo1" "~/tmp/foo2" load-path)))
>          (load "foo")) RET
> 
> and I got "foo1" in *Messages*

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.

Roland




reply via email to

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