GNU Info

Info Node: (ada-mode)Identifier completion

(ada-mode)Identifier completion


Next: Index Menu of Subprograms Prev: Moving Through Ada Code Up: Top
Enter node , (file) or (file)node

Identifier completion
*********************

Overview
========

   Emacs and  Ada mode provide  two general ways for  the completion of
identifiers. This is  an easy way to type faster: you  just have to type
the first few  letters of an identifiers, and then  loop through all the
possible completions.

   The  first method  is general  for  Emacs. It  will work  both with
Ada buffers, but also in C buffers,  Java buffers, ....  The idea is to
parse all the opened buffers for possible completions.

   For instance, if the words `my_identifier', `my_subprogram' are the
only words starting with `my' in any of the opened files, then you will
have this scenario:

     You type:  my<M-/> Emacs inserts:  `my_identifier' If you press
     <M-/> once again, Emacs replaces `my_identifier' with
     `my_subprogram'.  Pressing <M-/> once more will bring you back to
     `my_identifier'.

   This is a very  fast way to do completion, and the  casing of words
will also be respected.

   The second  method is specific to Ada  buffer, and even to  users of
the Gnat compiler. Emacs will search the cross-information found in the
`.ali' files generated by Gnat for possible completions.

   The  main advantage  is  that  this completion  is  more accurate:
only existing identifier  will be  suggested, you don't  need to have
a file opened that already contains this identifiers, ....

   On the other  hand, this completion is a little  bit slower and
requires that you  have compiled your file  at least once since  you
created that identifier.

Summary of commands
===================

`C-<TAB>'
     Complete accurately current identifier using information in `.ali'
     file (`ada-complete-identifier').

`M-/'
     Complete identifier using buffer information (not Ada-specific).


automatically generated by info2www version 1.2.2.9