all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* find-file.el bug; checked in a fix.
@ 2007-12-05 22:10 Dave Goel
  2007-12-07 17:18 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Goel @ 2007-12-05 22:10 UTC (permalink / raw)
  To: emacs-devel

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

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

end of thread, other threads:[~2007-12-07 18:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 22:10 find-file.el bug; checked in a fix Dave Goel
2007-12-07 17:18 ` Richard Stallman
2007-12-07 18:50   ` Dave Goel

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.