adapath.el contains an Emacs function adapath which manages the directory search lists used to find files from Ada and compilation modes. It's my first attempt at Emacs Lisp, so any criticisms will be welcome.
You need to have the following in your ~/.emacs (I assume you'll have put adapath.el on your Emacs load path):
(load-library "adapath")Normally, I just (load-library "adapath") in my .emacs as above, and then run adapath in my project base directory. Alternatively, you could say
(load-library "adapath") (adapath "my/project/directory")
This program is issued under the GNU Public License.
adapath takes an optional parameter, which is defaulted to the current buffer's directory (so you can run adapath in a compilation buffer, if you forgot to do it first).
The list of directories in which to look for compiler-supplied sources is given in a customisable variable adapath-system-directories.
I used to recommend that you put adapath into your ada-mode-hook, and made ada-search-directories buffer-local. Both were bad advice!