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: Fri, 13 Jan 2006 23:07:30 +0100

On Fri Jan 13 2006 Stefan Monnier wrote:
> > - Even my latest build of CVS emacs doesn't try to load an
> >   uncompressed file ~/bar/foo.
> 
> Huh?  I must be misunderstanding you, because (load "vc.el") definitely
> finds the vc.el file in my emacs/lisp directory.

My email refered to my specific example: 

- 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.

- However, if we have ~/bar/foo.gz (and auto-compression enabled)
  then emacs loads ~/bar/foo.gz.

I suggest that the above two cases should be handled consistently.

The more I think about this, the more it seems to me the question is
really the following:

The elisp manual says

   To find the file, `load' first looks for a file named
   `FILENAME.elc', that is, for a file whose name is FILENAME with
   `.elc' appended. If such a file exists, it is loaded. If there is
   no file by that name, then `load' looks for a file named
   `FILENAME.el'. If that file exists, it is loaded. Finally, if
   neither of those names is found, `load' looks for a file named
   FILENAME with nothing appended, and loads it if it exists.

There are two possiblities

- First, emacs searches all directories in load-path for
  `FILENAME.elc', then it searches all directories in load-path for
  `FILENAME.el'. Finally, it searches all directories in load-path
  for `FILENAME'.

  It seems to me, this is what emacs does when FILENAME is not
  compressed.

- First, emacs searches in the first directory in load-path for
  `FILENAME.elc', `FILENAME.el', and `FILENAME'. Then it searches
  the second directory, the third directory, etc.

  It seems to me, this is what emacs does when FILENAME is
  compressed.

Emacs should use only one of these two possibilities and this should
be documented.

Roland




reply via email to

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