* Moving Through Ada Code:: Moving easily through Ada sources
* Identifier completion:: Finishing words automatically
* Indentation:: Indenting your code automatically as you type
-* Statement skeletons::
-* Aligning code::
+* Statement skeletons:: Some code is written for you
+* Aligning code:: Making it pretty
* Automatic casing:: Adjusting the case of words automatically
* Comment Handling:: Reformatting comments easily
* Key summary::
2 Installation
**************
-Ada mode requires Emacs 24.2 or greater.
+Ada mode requires Emacs 24.2 or greater; it also requires the Emacs lisp
+sources (not just the compiled binaries).
Ada mode is distributed in the Gnu ELPA package archive; it can be
installed via 'M-x list-packages' (*note (emacs)Packages::). You must
To see what version of Ada mode you have installed, invoke 'M-x
ada-mode-version'.
+ You may also want to install additional utilities:
+
* Menu:
+* Ada Reference Manual::
* gnatinspect::
+* gpr_query::
* Upgrading::
\1f
-File: ada-mode.info, Node: gnatinspect, Next: Upgrading, Prev: Installation, Up: Installation
+File: ada-mode.info, Node: Ada Reference Manual, Next: gnatinspect, Up: Installation
+
+2.1 Ada Reference Manual
+========================
-2.1 gnatinspect
+The ELPA package ada-ref-man includes the Ada Reference Manual and
+Annotated Ada Reference Manual in info format.
+
+\1f
+File: ada-mode.info, Node: gnatinspect, Next: gpr_query, Prev: Installation, Up: Installation
+
+2.2 gnatinspect
===============
Ada mode has experimental support for the new AdaCore cross reference
'gnatinspect' is distributed as part of 'gnatcoll'. Ada mode
requires the very latest version, in 'gnatcoll 1.7w' distributed with
-GNATPro 7.2.
+GNAT GPL 2014.
- To build 'gnatinspect', assuming gnat-7.2 is installed in
-'/usr/gnat-7.2':
+ To build 'gnatinspect', assuming GNAT GPL 2014 is installed in
+'/usr/gnat-gpl-2014', and '/usr/gnat-gpl-2014/bin' is in PATH:
- tar xf ~/Downloads/gnatcoll-1.7w-src.tgz
+ tar xf ~/Downloads/gnatcoll-1.7x-src.tgz
cd gnatcoll-1.7w-src
- ./configure --prefix=/usr/gnat-7.2
+ ./configure --prefix=/usr/gnat-gpl-2014
make Gnatcoll_Build=Debug
sudo make Gnatcoll_Build=Debug install
+ To build an sqlite3 executable that is compatible with the database
+created by gnatinspect:
+
+ cd gnatcoll-1.7w-src/src/sqlite/amalgamation/
+ gcc -O2 -o sqlite3 shell.c sqlite3.c -ldl -lpthread
+
+\1f
+File: ada-mode.info, Node: gpr_query, Next: Upgrading, Prev: gnatinspect, Up: Installation
+
+2.3 gpr_query
+=============
+
+'gpr_query' is similar to 'gnatinspect', but customized for Emacs
+ada-mode use. To install it, install 'gnatinspect' as above (*note
+gnatinspect::), then:
+
+ cd ~/.emacs.d/elpa/ada-mode-5.xx/build
+ make install-gpr_query
+
\1f
-File: ada-mode.info, Node: Upgrading, Prev: gnatinspect, Up: Installation
+File: ada-mode.info, Node: Upgrading, Prev: gpr_query, Up: Installation
-2.2 Upgrading from previous versions
+2.4 Upgrading from previous versions
====================================
See the file NEWS for more details; here we summarize only important
cross-reference-tool-specific functions for corresponding Ada mode
operations.
- To use a cross reference tool other than gnatxref, you must write
+ The default cross-reference tool is 'gnatxref', provided by the file
+'ada-gnat-xref.el'. Two other tools are supported: 'gnat_inspect' and
+'gpr_query'. To use these, add one of the following to '~/.emacs':
+
+ (require 'gnat-inspect)
+ (require 'gpr-query)
+
+ To use 'gpr_query', the Ada code 'gpr_query.adb' must be compiled;
+see *note Installation::.
+
+ To use a cross reference tool other than the above, you must write
Emacs lisp code that provides the interface to the compiler, and set
-'ada-xref-tool' and the indirection variables. This has already been
-done for 'gnatinspect'; set 'ada-xref-tool' to ''gnat_inspect'.
+'ada-xref-tool' and the indirection variables.
- See 'ada-gnat-xref.el' and 'gnat-inspect.el' for examples.
+ See 'ada-gnat-xref.el', 'gnat-inspect.el', 'gpr-query.el' for
+examples.
\1f
File: ada-mode.info, Node: Other customization, Prev: Other cross-reference, Up: Customization
For named statements (packages, loops, etc), the name is taken from
the word before point, and the name of the statement from the word
-before that. Some expansions prompt for more information, such as
-whether a spec or body is desired. For example, 'package A_Package C-c
-C-e' first prompts for "body" or "spec". If "spec" is selected, the
-following code is inserted:
+before that.
+
+ Some expansions prompt for more information, such as whether a spec
+or body is desired. For example, 'package A_Package C-c C-e' first
+prompts for "body" or "spec". If "spec" is selected, the following code
+is inserted:
package A_Package is
private
Note that the order of the keyword 'declare' and the name 'A_Block'
are reversed in the expansion; this may take some getting used to.
+Alternately, if no name is present in the buffer, you are prompted for a
+name: 'declare C-c C-e' first prompts for a name, then expands to the
+above.
+
+ The variable 'ada-skel-initial-string' defines what to insert in a
+newly created empty buffer. It defaults to '{header}', which is a
+placeholder defined by 'ada-skel-header', which inserts a typical header
+with a copyright license (choice of GPL or restricted). Users will
+typically want to override the definition of 'ada-skel-initial-string'
+and/or 'ada-skel-header', or provide more choices of copyright license.
\1f
File: ada-mode.info, Node: Aligning code, Next: Automatic casing, Prev: Statement skeletons, Up: Top
defined in multiple files, the first occurrence is used.
If the word starts with an asterisk ('*'), it defines the casing of a
-word fragemnt (or "substring"); part of a word between two underscores
+word fragment (or "substring"); part of a word between two underscores
or word boundary.
For example:
\1f
Tag Table:
Node: Top\7f945
-Node: Overview\7f2508
-Node: Installation\7f3719
-Node: gnatinspect\7f4533
-Node: Upgrading\7f5267
-Node: Customization\7f5841
-Node: Non-standard file names\7f6323
-Node: Other compiler\7f8164
-Node: Other cross-reference\7f8743
-Node: Other customization\7f9462
-Node: Compiling Executing\7f11932
-Node: Compile commands\7f12667
-Node: Compiling Examples\7f15405
-Node: No project files\7f16237
-Node: Set compiler options\7f21603
-Node: Set source search path\7f23565
-Node: Use GNAT project file\7f26018
-Node: Use multiple GNAT project files\7f28792
-Node: Use a Makefile\7f31512
-Node: Compiler errors\7f32827
-Node: Project files\7f33644
-Node: Project file overview\7f34671
-Node: Project file variables\7f36199
-Node: Moving Through Ada Code\7f39829
-Node: Identifier completion\7f42528
-Node: Indentation\7f43490
-Node: Statement skeletons\7f47542
-Node: Aligning code\7f48752
-Node: Automatic casing\7f49697
-Node: Comment Handling\7f52401
-Node: Key summary\7f52920
-Node: Developer overview\7f55547
-Node: Directory structure\7f55887
-Node: Package organization\7f59373
-Node: Ada mode\7f59608
-Node: gpr mode\7f61804
-Node: GNAT core\7f62087
-Node: Wisi\7f63033
-Node: OpenToken\7f64000
-Node: ELPA\7f64602
-Node: GNU Free Documentation License\7f65212
-Node: Index\7f90373
+Node: Overview\7f2576
+Node: Installation\7f3787
+Node: Ada Reference Manual\7f4769
+Node: gnatinspect\7f5026
+Node: gpr_query\7f6023
+Node: Upgrading\7f6380
+Node: Customization\7f6952
+Node: Non-standard file names\7f7434
+Node: Other compiler\7f9275
+Node: Other cross-reference\7f9854
+Node: Other customization\7f10865
+Node: Compiling Executing\7f13335
+Node: Compile commands\7f14070
+Node: Compiling Examples\7f16808
+Node: No project files\7f17640
+Node: Set compiler options\7f23006
+Node: Set source search path\7f24968
+Node: Use GNAT project file\7f27421
+Node: Use multiple GNAT project files\7f30195
+Node: Use a Makefile\7f32915
+Node: Compiler errors\7f34230
+Node: Project files\7f35047
+Node: Project file overview\7f36074
+Node: Project file variables\7f37602
+Node: Moving Through Ada Code\7f41232
+Node: Identifier completion\7f43931
+Node: Indentation\7f44893
+Node: Statement skeletons\7f48945
+Node: Aligning code\7f50730
+Node: Automatic casing\7f51675
+Node: Comment Handling\7f54379
+Node: Key summary\7f54898
+Node: Developer overview\7f57525
+Node: Directory structure\7f57865
+Node: Package organization\7f61351
+Node: Ada mode\7f61586
+Node: gpr mode\7f63782
+Node: GNAT core\7f64065
+Node: Wisi\7f65011
+Node: OpenToken\7f65978
+Node: ELPA\7f66580
+Node: GNU Free Documentation License\7f67190
+Node: Index\7f92351
\1f
End Tag Table