Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!columbia!convent!agw From: agw@convent.columbia.edu (Art Werschulz) Newsgroups: comp.emacs Subject: Is a file loadable? Message-ID: <5852@columbia.edu> Date: 29 Aug 88 19:42:44 GMT Sender: news@columbia.edu Reply-To: agw@convent.columbia.edu () Organization: Columbia University Computer Science Dept. Lines: 28 Hi. Let us say that file "foo" is "loadable" if either foo.elc or foo.el is in one of the directories in the load-path. I would like to do the following: IF foo is loadable THEN (autoload 'foo-mode "foo" t t nil) ELSE (autoload 'foo-mode "bar" t t nil) The obvious thing would be to defun a predicate loadable-p, and procede from there. Is there anything built-in that I can use, and so avoid re-inventing the wheel? Clearly emacs itself has to search the load-path whenever it has to do a load or autoload. How can I use this built-in ability? Thanks. Art Werschulz ARPAnet: agw@columbia.edu USEnet: ... seismo!columbia!agw BITnet: agw@columbia.edu CCNET: agw@garfield ATTnet: Columbia University (212) 280-3610 280-2736 Fordham University (212) 841-5323 841-5396