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*