]> code.delx.au - gnu-emacs/commit
Allow finding libraries loaded manually outside the load-path
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 1 May 2016 16:38:07 +0000 (18:38 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 1 May 2016 16:38:07 +0000 (18:38 +0200)
commitce98b0b1ab20a1b5a0fe85c8b118b34d3b3cf274
treeb990694b4689c7ff51ae0e5f1bfe394a0eefdb88
parentbf0b6fab032bd35fae36f7371b7cd1fe3bfaaac7
Allow finding libraries loaded manually outside the load-path

* lisp/emacs-lisp/find-func.el (find-library--from-load-path):
New function to find a library from a load path (bug#5661).
(find-library-name): Use it.

There are so many combinations of inputs and possibly entries in
`load-history' that the code looks like an entry in a code obfuscation
contest.  If anybody has a better implementation, please substitute.

But remember that the input given may be foo, foo.el, foo.elc, and the
entries in load-history may be foo.el, foo.elc and foo.el.gz, and we
want to return only foo.el and foo.el.gz.  *phew*
lisp/emacs-lisp/find-func.el