Copyright (C) 2000-2012 |
GNU Info (ada-mode)Using non-standard file namesUsing non-standard file names ***************************** By default, Emacs is configured to use the GNAT style file names, where file names are the package names, and the extension for spec and bodies are respectively `.ads' and `.adb'. If you want to use other types of file names, you will need to modify your `.emacs' file. Adding new possible extensions is easy. Since Ada mode needs to know how to go from the body to the spec (and back), you always have to specify both. A function is provided with Ada mode to add new extensions. For instance, if your spec and bodies files are called `UNIT_s.ada' and `UNIT_b.ada', respectively, you need to add the following to your `.emacs' file: (ada-add-extensions "_s.ada" "_b.ada") Note that it is possible to redefine the extension, even if they already exist, as in: (ada-add-extensions ".ads" "_b.ada") (ada-add-extensions ".ads" ".body") This simply means that whenever the ada-mode will look for the body for a file whose extension is `.ads', it will take the first available file that ends with either `.adb' (standard), `_b.ada' or `.body'. If the filename is not the unit name, then things are a little more complicated. You then need to rewrite the function `ada-make-filename-from-adaname' (see the file `ada-mode.el' for an example). automatically generated by info2www version 1.2.2.9 |