@titlepage
@sp 10
-@title Ada Mode
-@sp 2
-@subtitle An Emacs major mode for programming in Ada
-@subtitle Ada Mode Version 5.1.5
-@sp 2
+@title Ada Mode Version 5.1.7
@page
@vskip 0pt plus 1filll
@insertcopying
To see what version of Ada mode you have installed, invoke @kbd{M-x
ada-mode-version}.
+You may also want to install additional utilities:
+
@menu
-* gnatinspect::
+* Ada Reference Manual::
+* gpr_query::
* Upgrading::
@end menu
-@node gnatinspect, Upgrading, Installation, Installation
-@section gnatinspect
-Ada mode has experimental support for the new AdaCore cross reference
-tool @code{gnatinspect}, which supports Ada, C, C++, and any other
-language for which gcc provices the @code{-fdump-xref}.
+@node Ada Reference Manual, gpr_query, Installation, Installation
+@section Ada Reference Manual
+The ELPA package ada-ref-man includes the Ada Reference Manual and
+Annotated Ada Reference Manual in info format.
+
+@node gpr_query, Upgrading, Ada Reference Manual, Installation
+@section gpr_query
+Ada mode has support for an external cross reference
+tool @code{gpr_query}, which supports Ada, C, C++, and any other
+language for which AdaCore gcc provices the @code{-fdump-xref}
+(@code{-fdump-xref} is an AdaCore extension).
-@code{gnatinspect} is distributed as part of @code{gnatcoll}. Ada mode
-requires the very latest version, in @code{gnatcoll 1.7w} distributed
-with GNAT GPL 2014.
+@code{gpr_query} requires the @code{gnatcoll} library provided by
+AdaCore. Ada mode requires the very latest version @code{gnatcoll
+1.7w} distributed with GNAT GPL 2014.
-To build @code{gnatinspect}, assuming GNAT GPL 2014 is installed in
+To build @code{gpr_query}, assuming GNAT GPL 2014 is installed in
@file{/usr/gnat-gpl-2014}, and @file{/usr/gnat-gpl-2014/bin} is in
PATH:
tar xf ~/Downloads/gnatcoll-1.7x-src.tgz
cd gnatcoll-1.7w-src
./configure --prefix=/usr/gnat-gpl-2014
-make Gnatcoll_Build=Debug
-sudo make Gnatcoll_Build=Debug install
+@c make Gnatcoll_Build=Debug
+@c sudo make Gnatcoll_Build=Debug install
+make
+sudo make install
+cd ~/.emacs.d/elpa/ada-mode-5.xx/build
+make install-gpr_query
@end example
To build an sqlite3 executable that is compatible with the database
-created by gnatinspect:
+created by @code{gpr_query}:
@example
cd gnatcoll-1.7w-src/src/sqlite/amalgamation/
gcc -O2 -o sqlite3 shell.c sqlite3.c -ldl -lpthread
@end example
-@node Upgrading, , gnatinspect, Installation
+@node Upgrading, , gpr_query, Installation
@section Upgrading from previous versions
See the file NEWS for more details; here we summarize only important
the 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 @file{gnatxref}, provided by the
+file @file{ada-gnat-xref.el}. One other tool is supported:
+@file{gpr_query}. To use it, add the following to @file{~/.emacs}:
+
+@example
+(require 'gpr-query)
+@end example
+
+To use @file{gpr_query}, the Ada code @file{gpr_query.adb} must be
+compiled; see @ref{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
-@code{ada-xref-tool} and the indirection variables. This has already
-been done for @code{gnatinspect}; set @code{ada-xref-tool} to
-@code{'gnat_inspect}.
+@code{ada-xref-tool} and the indirection variables.
-See @file{ada-gnat-xref.el} and @file{gnat-inspect.el} for examples.
+See @file{ada-gnat-xref.el} and @file{gpr-query.el} for examples.
@node Other customization, , Other cross-reference, Customization
@section Other customization
which defaults to @code{ada-skel-expand}, is bound to @key{C-c C-e}
(@pxref{Statement skeletons}).
@item imenu
+Navigate to subprograms and types by name, from a minibuffer menu.
+@item speedbar
+Navigate to subprograms and types by name, from a list in a dedicated window.
@item which-func
@end table
@file{~/.emacs}. Note that some are functions are added to
@code{before-save-hook}; they run just before a buffer is written to
disk. Also, the order is important; ada-mode does not set up the
-Ada-specific features of imenu and which-func unless they are loaded
+Ada-specific features of imenu and speedbar unless imenu is loaded
first.
@example
(setq-default indent-tabs-mode nil)
(electric-pair-mode 1)
-(require 'imenu)
-(require 'which-func)
+(require 'imenu) ;; also enables speedbar
(require 'ada-mode)
(add-to-list 'hippie-expand-try-functions-list 'ada-skel-hippie-try)
(define-key ada-mode-map "\C-e" 'hippie-expand)
program. That is given by the @code{main} project file variable;
it defaults to the current file if not yet set, but is also set by the
``set main and build'' command.
-@c IMPROVEME: get main from gpr via gnatinspect? not in gnatcoll 1.6w
@table @code
exception is defined in multiple files, the first occurrence is used.
If the word starts with an asterisk (@code{*}), it defines the casing
-of a word fragemnt (or ``substring''); part of a word between two
+of a word fragment (or ``substring''); part of a word between two
underscores or word boundary.
For example:
@file{gnat-core.el} is a start at a language-agnostic interface to the
GNAT tools. It was first factored out from @file{ada-gnat.el} and
-@file{ada-mode.el} to support the multi-language
-@file{gnat-inspect.el}, which is still experimental.
+@file{ada-mode.el} to support the multi-language @file{gpr_query.el}.
More code currently in @file{ada-mode.el} could be migrated to
@file{gnat-core.el}, in particular the project file support.
-@item gnat-inspect.el
-Provides an experimental interface to the experimental multi-language
-cross-reference tool @file{gnatinspect} from AdaCore, which will
-supercede @file{gnatxref}.
+@item gpr-query.el
+Provides an interface to the external multi-language cross-reference
+tool @file{gpr_query}.
Implements the Ada mode cross-reference functions for the
-@file{gnatinspect} backend, and a minor mode providing similar
+@file{gpr_query} backend, and a minor mode providing similar
functions for C++.
@end table