GNU Info

Info Node: (ada-mode)Moving Through Ada Code

(ada-mode)Moving Through Ada Code


Next: Identifier completion Prev: Syntax highlighting Up: Top
Enter node , (file) or (file)node

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:

`M-C-e'
     Move to the next function/procedure/task, which ever comes next
     (`ada-next-procedure').

`M-C-a'
     Move to previous function/procedure/task
     (`ada-previous-procedure').

`M-x ada-next-package'
     Move to next package.

`M-x ada-prev-package'
     Move to previous package.

`C-c C-a'
     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
     otherwise.

`C-c C-e'
     Move point to end of current block (`ada-move-to-end').

`C-c o'
     Switch between corresponding spec and body file
     (`ff-find-other-file').  If the cursor is on a subprogram, switch
     between declaration and body.

`C-c c-d'
     Move  from   any  reference  to  its  declaration   and  switch
     between declaration  and body  (for  procedures, tasks,  private
     and  incomplete types).

`C-c C-r'
     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
information.

   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
information.


automatically generated by info2www version 1.2.2.9