[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
find-file.el bug; checked in a fix.
From: |
Dave Goel |
Subject: |
find-file.el bug; checked in a fix. |
Date: |
Wed, 05 Dec 2007 17:10:27 -0500 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
hi
Bug in the current cvs:
If a function f is autoloaded from a file a.el in a directory d, and
if there also exists an executable file called a in a directory d1,
then calling find-function on f shows the file a instead of
a.el. (And, it then fails to find the function f in the incorrectly
loaded file.)
The problem seems to appear when d1 precedes d in your extended load-path.
----
I have checked in a fix --
The problem is that symbol-function definition for loaded functions
does not store the .el suffix. locate-library then searches for all
suffixes ("el" "el.gz" "" ) in the load-path. Given this order, it
does the right thing - prefer "el" over "" in a *given* directory.
However, this will fail if the "" suffix occurs in a different
directory which gets examined earlier.
I believe that an appropriate solution is to simply make
`find-library-name' search for the (".el" ".el.gz") files first in the
load-path. Only if it does not succeed look for the other suffixes.
The rationale is that it is much more likely that emacs would have
learned of that function from a ".el" (or a derivative thereof, like a
.elc) rather than a "" file.
I have committed this fix.
----
This seems like a pretty non-destructive and local change. `find-library-name',
not to be confused by locate-library, is only used in find-file.el.
-----
(I am posting here after years. You all know me as D. Goel or Deepak
Goel or deego from my older email address which I no longer use
actively. I don't want to frob my From: header every time I post here;
so I am going to remark about the change here, and leave my From:
intact; I should learn about gnus posting styles...)
- Deepak Goel
- find-file.el bug; checked in a fix.,
Dave Goel <=