Moving Through Ada Code
There are several easy to use commands to stroll through Ada code.
All these functions are available through the Ada menu, and you can
also use the following key bindings or the command names:
Move to the next function/procedure/task, which ever comes next
Move to previous function/procedure/task
Move to next package.
Move to previous package.
Move to matching start of `end' (`ada-move-to-start'). If point
is at the end of a subprogram, this command jumps to the
corresponding `begin' if the user option `ada-move-to-declaration'
is `nil' (default), it jumps to the subprogram declaration
Move point to end of current block (`ada-move-to-end').
Switch between corresponding spec and body file
(`ff-find-other-file'). If the cursor is on a subprogram, switch
between declaration and body.
Move from any reference to its declaration and switch
between declaration and body (for procedures, tasks, private
and incomplete types).
runs the `gnatfind' command to search for all references to the
entity pointed by the cursor (`ada-find-references'). Use `C-x `'
(`next-error') to visit each reference (as for compilation errors).
These functions use the information in the output of the Gnat
Ada compiler. However, if your application was compiled with
the `-gnatx' switch, these functions will not work, since no extra
information is generated by GNAT. See GNAT documentation for further
Emacs will try to run Gnat for you whenever the
cross-reference informations are older than your source file
(provided the `ada-xref-create-ali' variable is non-`nil'). Gnat
then produces a file with the same name as the current Ada file but
with the extension changed to `.ali'. This files are normally used by
the binder, but they will also contain additional cross-referencing
By default, comment lines get indented like Ada code. There are a few
additional functions to handle comments:
Start a comment in default column.
Continue comment on next line.
Comment the selected region (add - at the beginning of lines).
Uncomment the selected region
autofill the current comment.
Automatic casing can be performed on port or whole buffer using:
Adjust case in the whole buffer (`ada-adjust-case-buffer').
Create a new entry in the exception dictionary, with the word under
the cursor (`ada-create-case-exception')
Rereads the exception dictionary from the file