annotate man/ada-mode.texi @ 45664:535f4a1db8cb

*** empty log message ***
author Francesco Potortì <pot@gnu.org>
date Thu, 06 Jun 2002 22:36:54 +0000
parents 47a8aeb481fb
children 82d113655734
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1 \input texinfo @c -*-texinfo-*-
25913
2552233fdd74 Set file name to ../info/ada-mode
Gerd Moellmann <gerd@gnu.org>
parents: 25906
diff changeset
2 @setfilename ../info/ada-mode
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3 @settitle Ada Mode
30009
95bdbefcdac6 Use dircategory `Emacs'.
Gerd Moellmann <gerd@gnu.org>
parents: 28823
diff changeset
4 @dircategory Emacs
28823
72c6f8275e0b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 26490
diff changeset
5 @direntry
43961
47a8aeb481fb Synchronize DIR entries with text in @direntry in Texinfo sources.
Eli Zaretskii <eliz@gnu.org>
parents: 42326
diff changeset
6 * Ada mode: (ada-mode). Emacs mode for editing Ada code.
28823
72c6f8275e0b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 26490
diff changeset
7 @end direntry
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
8
37403
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
9 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
10 @comment The following lines inserts the copyright notice
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
11 @comment into the Info file.
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
12 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13
37403
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
14 @ifnottex
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
15 Copyright @copyright{} 1999, 2000, 2001 Free Software Foundation, Inc.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16
37403
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
17 Permission is granted to copy, distribute and/or modify this document
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
18 under the terms of the GNU Free Documentation License, Version 1.1 or
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
19 any later version published by the Free Software Foundation; with the
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
20 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
21 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
22 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
23 license is included in the section entitled ``GNU Free Documentation
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
24 License'' in the Emacs manual.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
25
37403
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
26 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
27 this GNU Manual, like GNU software. Copies published by the Free
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
28 Software Foundation raise funds for GNU development.''
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29
37403
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
30 This document is part of a collection distributed under the GNU Free
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
31 Documentation License. If you want to distribute this document
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
32 separately from the collection, you can do so by adding a copy of the
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
33 license to the document, as described in section 6 of the license.
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
34 @end ifnottex
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
35
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
36 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
37 @comment TeX title page
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
38 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
39
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40 @titlepage
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 @sp 10
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 @title{Ada Mode}
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 @sp 2
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 @subtitle An Emacs major mode for programming Ada 95 with GNAT
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 @subtitle July 1998 for Ada Mode Version 3.0
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46 @sp 2
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
47
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
48 @page
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
49 @vskip 0pt plus 1filll
37403
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
50 Copyright @copyright{} 1999, 2000, 2001 Free Software Foundation, Inc.
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
51 @sp 1
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
52 Permission is granted to copy, distribute and/or modify this document
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
53 under the terms of the GNU Free Documentation License, Version 1.1 or
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
54 any later version published by the Free Software Foundation; with the
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
55 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
56 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
57 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
58 license is included in the section entitled ``GNU Free Documentation
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
59 License'' in the Emacs manual.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
60
37403
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
61 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
62 this GNU Manual, like GNU software. Copies published by the Free
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
63 Software Foundation raise funds for GNU development.''
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
64
37403
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
65 This document is part of a collection distributed under the GNU Free
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
66 Documentation License. If you want to distribute this document
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
67 separately from the collection, you can do so by adding a copy of the
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
68 license to the document, as described in section 6 of the license.
aa94142b7f02 Add copyright notices.
Gerd Moellmann <gerd@gnu.org>
parents: 36509
diff changeset
69 @end titlepage
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
70
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
71
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72 @node Top, Overview, (dir), (dir)
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 @menu
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 * Overview::
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
76 * Installation:: Installing Ada mode on your system
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
77 * Customization:: Setting up Ada mode to your taste
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78 * Project files:: Describing the organization of your project
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
79 * Syntax highlighting:: Using specific colors and fonts to highlight
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
80 the structure of your files
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
81 * Moving Through Ada Code:: Moving easily through Ada sources
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
82 * Identifier completion:: Finishing words automatically
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
83 * Index Menu of Subprograms:: A menu of all the types and subprograms
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
84 defined in your application
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
85 * File Browser:: Easy access to your files
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
86 * Automatic Smart Indentation:: Indenting your code automatically as you type
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
87 * Formatting Parameter Lists:: Formating subprograms parameter lists
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
88 automatically
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
89 * Automatic Casing:: Adjusting the case of words automatically
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
90 * Statement Templates:: Inserting code templates
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
91 * Comment Handling:: Reformatting comments easily
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
92 * Compiling Executing:: Working with your application within Emacs
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
93 * Debugging:: Debugging your application
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
94 * Using non-standard file names:: Configuring Emacs for special file names
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
95 * Working Remotely:: Working on a different machine
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
96 * Index::
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97 @end menu
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
99
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
100 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
101 @node Overview, Installation, Top, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
102 @chapter Overview
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
103 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
104
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
105 The Emacs mode for programming in Ada 95 with GNAT helps the user in
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
106 understanding existing code and facilitates writing new code. It
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
107 furthermore provides some utility functions for easier integration of
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
108 standard Emacs features when programming in Ada.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
109
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
110 @section General features:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
111
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
112 @itemize @bullet
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
113 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
114 full Integrated Development Environment:
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
115 @itemize @bullet
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
116 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
117 support of ``project files'' for the configuration (directories,
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
118 compilation options,...)
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
119 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
120 compiling and stepping through error messages.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
121 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
122 running and debugging your applications within Emacs.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
123 @end itemize
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
124 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
125 easy to use for beginners by pull-down menus,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
126 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
127 user configurable by many user-option variables.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
128 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
129
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
130 @section Ada mode features that help understanding code:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
131
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
132 @itemize @bullet
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
133 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
134 functions for easy and quick stepping through Ada code,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
135 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
136 getting cross reference information for identifiers (e.g. find the
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
137 defining place by a keystroke),
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
138 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
139 displaying an index menu of types and subprograms and move point to
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
140 the chosen one,
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
141 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
142 automatic color highlighting of the various entities in Ada code.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
143 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
144
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
145 @section Emacs support for writing Ada code:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
146
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
147 @itemize @bullet
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
148 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
149 switching between spec and body files with eventually
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
150 auto-generation of body files,
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
151 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
152 automatic formating of subprograms parameter lists.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
153 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
154 automatic smart indentation according to Ada syntax,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
155 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
156 automatic completion of identifiers,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
157 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
158 automatic casing of identifiers, keywords, and attributes,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
159 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
160 insertion of statement templates,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
161 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
162 filling comment paragraphs like filling normal text,
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
163 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
164
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
165 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
166 @node Installation, Customization, Overview, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
167 @chapter Installation
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
168 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
169
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
170 If you got Ada mode as a separate distribution, you should have a
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
171 look at the @file{README} file. It explains the basic steps necessary
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
172 for a good installation of the emacs Ada mode.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
173
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
174 Installing the Ada mode is basically just a matter of copying a few
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
175 files into the Emacs library directories. Every time you open a file
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
176 with a file extension of @file{.ads} or @file{.adb}, Emacs will
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
177 automatically load and activate Ada mode.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
178
42326
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
179 @xref{Using non-standard file names}, if your files do
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
180 not use these extensions and if you want Emacs to automatically start the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
181 Ada mode every time you edit an Ada file.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
182
42326
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
183 Also, for general usage variables that you might want to set,
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
184 see
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
185 @iftex
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
186 @cite{The GNU Emacs Manual}.
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
187 @end iftex
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
188 @ifhtml
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
189 @cite{The GNU Emacs Manual}.
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
190 @end ifhtml
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
191 @ifinfo
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
192 @ref{Top, , The GNU Emacs Manual, emacs, The GNU Emacs Manual}.
939fbbfd59d8 Fix typo in cross-reference for `Using non-standard file names'
Robert J. Chassell <bob@rattlesnake.com>
parents: 40705
diff changeset
193 @end ifinfo
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
194
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
195 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
196 @section Required files
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
197 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
198
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
199 This Ada mode works best with Emacs 20.3 or higher (the easy editing
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
200 features for the project files won't work with any older version), but
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
201 most of the commands should work with older versions too. Please try to
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
202 install the most recent version of Emacs on your system before
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
203 installing Ada mode.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
204
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
205 Although part of Ada mode is compiler-independent, the most advanced
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
206 features are specific to the Gnat compiler @url{http://www.gnat.com}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
207
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
208 The following files are provided with the Ada mode distribution:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
209
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
210 @itemize @bullet
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
211
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
212 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
213 @file{ada-mode.el}: The main file for Ada mode.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
214 This is the only file which does not require Gnat. It contains the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
215 functions for indentation, formatting of parameter lists, stepping
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
216 through code, comment handling and automatic casing. Emacs versions
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
217 20.2 and higher already contain Ada mode version 2.27, which is an older
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
218 version of this file and should be replaced. Loading @file{ada-mode.el}
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
219 from the current distribution supersedes the standard installation.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
220
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
221 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
222 @file{ada-stmt.el}: Contains the statement templates feature.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
223
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
224 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
225 @file{ada-xref.el}: This file provides the main support for Gnat.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
226 This is where the functions for cross-references, completion of
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
227 identifiers, support for project files and compilation of your
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
228 application are defined.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
229
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
230 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
231 @file{ada-prj.el}: The functions to use for easy-edition of the
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
232 project files. This file is the only one which really requires Emacs
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
233 at least 20.2. It uses the new widget features from Emacs.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
234
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
235 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
236
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
237 @c --------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
238 @node Customization, Project files, Installation, Top
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
239 @chapter Customizing Ada mode
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
240 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
241
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
242 Ada mode is fully customizable. Everything, from the file names to
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
243 the automatic indentation and the automatic casing can be adapted to
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
244 your own needs.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
245
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
246 There are two different kinds of variables that control this
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
247 customization, both are easy to modify.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
248
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
249 The first set of variables are standard Emacs variables. Of course, some
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
250 are defined only for Ada mode, whereas others have a more general
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
251 meaning in Emacs. Please see the Emacs documentation for more
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
252 information on the latest. In this documentation, we will detail all the
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
253 variables that are specific to Ada mode, and a few others. The names
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
254 will be given, as in @code{ada-case-identifier}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
255
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
256 Emacs provides an easy way to modify them, through a special mode called
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
257 customization. To access this mode, select the menu
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
258 @samp{Ada->Customize}. This will open a new buffer with some fields that
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
259 you can edit. For instance, you will get something like:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
260 @example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
261 Put below the compiler switches.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
262 comp_opt= _____________________________________
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
263 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
264 The first line gives a brief description of the variable. The second
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
265 line is the name of the variable and the field where you can give a
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
266 value for this variable. Simply type what you want in the field.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
267
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
268 When you are finished modifying the variables, you can simply click on
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
269 the @b{Save for future sessions} button at the top of the buffer (click
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
270 with the middle mouse button). This will save the values in your
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
271 @file{.emacs} file, so that next time you start Emacs they will have the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
272 same values.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
273
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
274 To modify a specific variable, you can directly call the function
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
275 @code{customize-variable} from Emacs (just type @kbd{M-x
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
276 customize-variable @key{RET} @var{variable-name} @key{RET}}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
277
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
278 Some users might prefer to modify the variables directly in their
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
279 configuration file, @file{.emacs}. This file is coded in Emacs lisp, and
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
280 the syntax to set a variable is the following:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
281 @example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
282 (setq variable-name value)
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
283 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
284
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
285 The second set of variables for customization are set through the use of
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
286 project files. These variables are specific to a given project, whereas
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
287 the first set was more general. For more information, please
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
288 @xref{Project files}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
289
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
290 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
291 @node Project files, Syntax highlighting, Customization, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
292 @chapter Project files
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
293 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
294
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
295 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
296 @section General overview
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
297 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
298
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
299 Emacs provides a full Integrated Development Environment for GNAT and
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
300 Ada programmers. That is to say, editing, compiling, executing and
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
301 debugging can be performed within Emacs in a convenient and natural way.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
302
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
303 To take full advantage of this features, it is possible to create a file
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
304 in the main directory of your application, with a @samp{.adp} extension.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
305 This file contain all needed information dealing with the way your
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
306 application is organized between directories, the commands to compile,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
307 run and debug it etc. Creating this file is not mandatory and convenient
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
308 defaults are automatically provided for simple setups. It only becomes
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
309 necessary when those above mentioned defaults need customizing.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
310
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
311 A simple way to edit this file is provided for Emacs 20.2 or newer, with
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
312 the following functions, that you can access also through the Ada
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
313 menu. It is also possible to edit the project file as a regular text
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
314 file.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
315
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
316 Once in the buffer for editing the project file, you can save your
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
317 modification using the @samp{[OK]} button at the bottom of the buffer, or
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
318 simply use the usual @kbd{C-x C-s} binding. To cancel your
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
319 modifications, simply kill the buffer or click on the @samp{[CANCEL]} button
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
320 at the button.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
321
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
322 Each buffer using Ada mode will be associated with one project file when
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
323 there is one available, so that Emacs can easily navigate through
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
324 related source files for instance.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
325
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
326 The exact algorithm to determine which project file should be used is
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
327 described in the next section, but you can force the project file you
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
328 want to use by setting one or two variables in your @file{.emacs} file.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
329
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
330 @itemize @bullet
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
331 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
332 To set up a default project file to use for any directory, anywhere
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
333 on your system, set the variable @code{ada-prj-default-project-file} to
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
334 the name of that file.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
335
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
336 @example
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
337 (set 'ada-prj-default-project-file "/dir1/dir2/file")
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
338 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
339
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
340 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
341 For finer control, you can set a per-directory project file.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
342 This is done through the variable @code{ada-xref-default-prj-file}.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
343
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
344 @example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
345 (set 'ada-xref-default-prj-file
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
346 '(("/dir1/dir2" . "/dir3/file1")
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
347 ("/dir4/dir5" . "/dir6/file2")))
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
348 @end example
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
349
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
350 Note: This has a higher priority than the first variable, so the first
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
351 choice is to use this variable settings, and otherwise
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
352 @code{ada-prj-default-project-file}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
353 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
354
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
355
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
356 @table @kbd
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
357 @item C-c u
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
358 @findex ada-customize
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
359 Create or edit the project file for the current buffer (@code{ada-customize}).
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
360 @item C-c c
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
361 @findex ada-change-prj
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
362 Change the project file associated with the current Ada buffer (@code{ada-change-prj}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
363 @item C-c d
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
364 @findex ada-change-default-project
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
365 Change the default project file for the current directory
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
366 (@code{ada-change-default-project}). Every new file opened from this
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
367 directory will be associated with that file by default.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
368 @item ada-set-default-project-file
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
369 @findex ada-set-default-project-file
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
370 Set the default project file to use for *any* Ada file opened anywhere
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
371 on your system. This sets this file only for the current Emacs session.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
372 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
373
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
374 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
375 @section Project file variables
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
376 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
377
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
378 The following variables can be defined in a project file. They all have
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
379 a default value, so that small projects do not need to create a project
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
380 file.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
381
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
382 Some variables below can be referenced in other variables, using a
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
383 shell-like notation. For instance, if the variable @code{comp_cmd}
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
384 contains a sequence like @code{$@{comp_opt@}}, the value of that variable
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
385 will be substituted.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
386
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
387 Here is the list of variables:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
388
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
389 @table @asis
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
390 @item @code{src_dir} [default: @code{"./"}]
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
391 This is a list of directories where Ada mode will look for source
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
392 files. These directories are used mainly in two cases, both as a switch
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
393 for the compiler and for the cross-references.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
394
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
395 @item @code{obj_dir} [default: @code{"./"}]
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
396 This is a list of directories where to look for object and library
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
397 files. The library files are the @samp{.ali} files generated by Gnat
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
398 and that contain cross-reference informations.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
399
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
400 @item @code{comp_opt} [default: @code{""}]
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
401 Creates a variable which can be referred to subsequently by using the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
402 @code{$@{comp_opt@}} notation. This is intended to store the default
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
403 switches given to @command{gnatmake} and @command{gcc}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
404
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
405 @item @code{bind_opt=@var{switches}} [default: @code{""}]
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
406 Creates a variable which can be referred to subsequently by using the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
407 @code{$@{bind_opt@}} notation. This is intended to store the default
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
408 switches given to @command{gnatbind}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
409
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
410 @item @code{link_opt=@var{switches}} [default: @code{""}]
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
411 Creates a variable which can be referred to subsequently by using the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
412 @code{$@{link_opt@}} notation. This is intended to store the default
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
413 switches given to @command{gnatlink}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
414
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
415 @item @code{main=@var{executable}} [default: @code{""}]
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
416 Specifies the name of the executable for the application. This variable
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
417 can be referred to in the following lines by using the @code{$@{main@}}
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
418 notation.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
419
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
420 @item @code{cross_prefix=@var{prefix}} [default: @code{""}]
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
421 This variable should be set if you are working in a cross-compilation
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
422 environment. This is the prefix used in front of the gnatmake commands.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
423
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
424 @item @code{remote_machine=@var{machine}} [default: @code{""}]
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
425 This is the name of the machine to log into before issuing the
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
426 compilation command. If this variable is empty, the command will be
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
427 run on the local machine. This will not work on Windows NT machines,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
428 since Ada mode will simply precede the compilation command with a
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
429 @command{rsh} command, unknown on Windows.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
430
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
431 @item @code{comp_cmd=@var{command}} [default: @code{"$@{cross_prefix@}gcc -c -I$@{src_dir@} -g -gnatq"}]
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
432 Specifies the command used to compile a single file in the application.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
433 The name of the file will be added at the end of this command.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
434
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
435 @item @code{make_cmd=@var{command}} [default: @code{"$@{cross_prefix@}gnatmake $@{main@} -aI$@{src_dir@} -aO$@{obj_dir@} -g -gnatq -cargs $@{comp_opt@} -bargs $@{bind_opt@} -largs $@{link_opt@}"]}'
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
436 Specifies the command used to recompile the whole application.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
437
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
438 @item @code{run_cmd=@var{command}} [default: @code{"$@{main@}"}]
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
439 Specifies the command used to run the application.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
440
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
441 @item @code{debug_cmd=@var{command}} [default: @code{"$@{cross_prefix@}gdb $@{main@}"}]
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
442 Specifies the command used to debug the application
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
443
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
444 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
445
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
446 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
447 @section Detailed algorithm
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
448 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
449
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
450 This section gives more details on the project file setup and is only of
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
451 interest for advanced users.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
452
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
453 Usually, an Ada file is part of a larger application, whose sources and
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
454 objects can be spread over multiple directories. The first time emacs is
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
455 asked to compile, run or debug an application, or when a cross reference
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
456 function is used (goto declaration for instance), the following steps
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
457 are taken:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
458
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
459 @itemize @bullet
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
460 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
461 find the appropriate project file, open and parse it.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
462 All the fields read in the project file are then stored by emacs
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
463 locally. Finding the project file requires a few steps:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
464
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
465 @itemize @minus
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
466 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
467 if a file from the same directory was already associated with
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
468 a project file, use the same one. This is the variable
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
469 @code{ada-xref-default-prj-file} described above.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
470 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
471 if the variable @code{ada-prj-default-project-file} is set,
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
472 use the project file specified in this variable.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
473 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
474 if there is a project file whose name is the same as the source file
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
475 except for the suffix, use this one.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
476 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
477 if there's only one project file in the source directory, use
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
478 that one.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
479 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
480 if there are more than one project file in the source directory,
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
481 ask the user.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
482 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
483 if there are no project files in the source directory use standard
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
484 default values.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
485 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
486
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
487 The first project file that is selected in a given directory becomes the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
488 default project file for this directory and is used implicitly for other
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
489 sources unless specified otherwise by the user.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
490
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
491 @item
38881
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
492 look for the corresponding @samp{.ali} file in the @code{obj_dir} defined
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
493 in the project file. If this file can not be found, emacs proposes to
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
494 compile the source using the @code{comp_cmd} defined in the project file
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
495 in order to create the ali file.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
496
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
497 @item
38881
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
498 when cross referencing is requested, the @samp{.ali} file is parsed to
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
499 determine the file and line of the identifier definition. It is
38881
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
500 possible for the @samp{.ali} file to be older than the source file,
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
501 in which case it will be recompiled if the variable
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
502 @code{ada-xref-create-ali} is set, otherwise the reference is searched
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
503 in the obsolete ali file with possible inaccurate results.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
504
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
505 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
506 look for the file containing the declaration using the source
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
507 path @code{src_dir} defined in the project file. Put the cursor at the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
508 correct position and display this new cursor.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
509 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
510
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
511 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
512 @node Syntax highlighting, Moving Through Ada Code, Project files, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
513 @chapter Syntax highlighting
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
514 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
515
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
516 Ada mode is made to help you understand the structure of your source
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
517 files. Some people like having colors or different fonts depending on
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
518 the context: commands should be displayed differently than keywords,
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
519 which should also be different from strings, @dots{}
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
520
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
521 Emacs is able to display in a different way the following syntactic
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
522 entities:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
523
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
524 @itemize @bullet
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
525 @item keywords
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
526 @item commands
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
527 @item strings
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
528 @item gnatprep statements (preprocessor)
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
529 @item types (under certain conditions)
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
530 @item other words
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
531 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
532
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
533 This is not the default behavior for Emacs. You have to explicitly
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
534 activate it. This requires that you add a new line in your @file{.emacs}
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
535 file (if this file does not exist, just create it).
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
536
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
537 @example
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
538 (global-font-lock-mode t)
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
539 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
540
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
541 But the default colors might not be the ones you like. Fortunately,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
542 there is a very easy way to change them. Just select the menu
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
543 @samp{Help->Customize->Specific Face...} and press @key{RET}. This
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
544 will display a buffer will all the ``faces'' (the colors) that Emacs knows
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
545 about. You can change any of them.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
546
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
547
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
548 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
549 @node Moving Through Ada Code, Identifier completion, Syntax highlighting, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
550 @chapter Moving Through Ada Code
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
551 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
552
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
553 There are several easy to use commands to stroll through Ada code. All
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
554 these functions are available through the Ada menu, and you can also use
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
555 the following key bindings or the command names:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
556
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
557 @table @kbd
40705
421e0a91a1d1 Replace M-C- with C-M-
Eli Zaretskii <eliz@gnu.org>
parents: 39367
diff changeset
558 @item C-M-e
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
559 @findex ada-next-procedure
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
560 Move to the next function/procedure/task, which ever comes next
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
561 (@code{ada-next-procedure}).
40705
421e0a91a1d1 Replace M-C- with C-M-
Eli Zaretskii <eliz@gnu.org>
parents: 39367
diff changeset
562 @item C-M-a
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
563 @findex ada-previous-procedure
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
564 Move to previous function/procedure/task
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
565 (@code{ada-previous-procedure}).
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
566 @item M-x ada-next-package
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
567 @findex ada-next-package
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
568 Move to next package.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
569 @item M-x ada-prev-package
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
570 @findex ada-prev-package
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
571 Move to previous package.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
572 @item C-c C-a
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
573 @findex ada-move-to-start
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
574 Move to matching start of @code{end} (@code{ada-move-to-start}). If
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
575 point is at the end of a subprogram, this command jumps to the
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
576 corresponding @code{begin} if the user option
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
577 @code{ada-move-to-declaration} is @code{nil} (default), it jumps to
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
578 the subprogram declaration otherwise.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
579 @item C-c C-e
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
580 @findex ada-move-to-end
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
581 Move point to end of current block (@code{ada-move-to-end}).
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
582 @item C-c o
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
583 Switch between corresponding spec and body file
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
584 (@code{ff-find-other-file}). If the cursor is on a subprogram, switch
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
585 between declaration and body.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
586 @item C-c c-d
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
587 @findex ada-goto-declaration
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
588 Move from any reference to its declaration and switch between
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
589 declaration and body (for procedures, tasks, private and incomplete
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
590 types).
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
591 @item C-c C-r
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
592 @findex ada-find-references
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
593 runs the @file{gnatfind} command to search for all references to the
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
594 entity pointed by the cursor (@code{ada-find-references}). Use
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
595 @kbd{C-x `} (@code{next-error}) to visit each reference (as for
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
596 compilation errors).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
597 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
598
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
599 These functions use the information in the output of the Gnat Ada
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
600 compiler. However, if your application was compiled with the
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
601 @samp{-gnatx} switch, these functions will not work, since no extra
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
602 information is generated by GNAT. See GNAT documentation for further
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
603 information.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
604
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
605 Emacs will try to run Gnat for you whenever the cross-reference
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
606 informations are older than your source file (provided the
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
607 @code{ada-xref-create-ali} variable is non-@code{nil}). Gnat then produces a
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
608 file with the same name as the current Ada file but with the extension
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
609 changed to @file{.ali}. This files are normally used by the binder, but
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
610 they will also contain additional cross-referencing information.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
611
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
612 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
613 @node Identifier completion, Index Menu of Subprograms, Moving Through Ada Code, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
614 @chapter Identifier completion
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
615 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
616
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
617 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
618 @section Overview
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
619 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
620
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
621 Emacs and Ada mode provide two general ways for the completion of
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
622 identifiers. This is an easy way to type faster: you just have to type
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
623 the first few letters of an identifiers, and then loop through all the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
624 possible completions.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
625
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
626 The first method is general for Emacs. It will work both with Ada
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
627 buffers, but also in C buffers, Java buffers, @enddots{} The idea is to parse
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
628 all the opened buffers for possible completions.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
629
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
630 For instance, if the words @samp{my_identifier}, @samp{my_subprogram}
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
631 are the only words starting with @samp{my} in any of the opened files,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
632 then you will have this scenario:
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
633
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
634 @quotation
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
635 You type: my@key{M-/}
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
636 Emacs inserts: @samp{my_identifier}
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
637 If you press @key{M-/} once again, Emacs replaces @samp{my_identifier} with
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
638 @samp{my_subprogram}.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
639 Pressing @key{M-/} once more will bring you back to @samp{my_identifier}.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
640 @end quotation
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
641
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
642 This is a very fast way to do completion, and the casing of words will
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
643 also be respected.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
644
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
645 The second method is specific to Ada buffer, and even to users of the
38881
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
646 Gnat compiler. Emacs will search the cross-information found in the
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
647 @samp{.ali} files generated by Gnat for possible completions.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
648
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
649 The main advantage is that this completion is more accurate: only
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
650 existing identifier will be suggested, you don't need to have a file
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
651 opened that already contains this identifiers, @enddots{}
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
652
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
653 On the other hand, this completion is a little bit slower and requires
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
654 that you have compiled your file at least once since you created that
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
655 identifier.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
656
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
657 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
658 @section Summary of commands
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
659 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
660
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
661 @table @kbd
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
662 @item C-@key{TAB}
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
663 @findex ada-complete-identifier
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
664 Complete accurately current identifier using information in @samp{.ali} file
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
665 (@code{ada-complete-identifier}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
666 @item M-/
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
667 Complete identifier using buffer information (not Ada-specific).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
668 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
669
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
670 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
671 @node Index Menu of Subprograms, File Browser, Identifier completion, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
672 @chapter Index Menu of Subprograms
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
673 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
674
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
675 You can display a choice menu with all procedure/function/task
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
676 declarations in the file and choose an item by mouse click to get to its
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
677 declaration. This function is accessible through the @samp{Ada} menu when
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
678 editing a Ada file, or simply through the following key binding:
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
679
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
680 @table @kbd
36509
45500c80145f Fix case convention for mouse click.
Richard M. Stallman <rms@gnu.org>
parents: 30009
diff changeset
681 @item C-S-Mouse-3
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
682 display index menu
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
683 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
684
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
685 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
686 @node File Browser, Automatic Smart Indentation, Index Menu of Subprograms, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
687 @chapter File Browser
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
688 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
689
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
690 Emacs provides a special mode, called @code{speedbar}. When this mode is
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
691 activated, a new frame is displayed, with a file browser. The files from
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
692 the current directory are displayed, and you can click on them as you
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
693 would with any file browser. The following commands are then available.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
694
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
695 You can click on a directory name or file name to open it. The editor
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
696 will automatically select the best possible mode for this file,
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
697 including of course Ada mode for files written in Ada.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
698
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
699 If you click on the @samp{[+]} symbol near a file name, all the symbols (types,
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
700 variables and subprograms) defined in that file will be displayed, and
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
701 you can directly click on them to open the right file at the right
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
702 place.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
703
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
704 You can activate this mode by typing @key{M-x speedbar} in the editor.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
705 This will open a new frame. A better way might be to assicate the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
706 following key binding
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
707
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
708 @example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
709 (global-set-key [f7] 'speedbar-get-focus)
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
710 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
711
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
712 Every time you press @key{F7}, the mouse will automatically move to the
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
713 speedbar frame (which will be created if it does not exist).
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
714
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
715 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
716 @node Automatic Smart Indentation, Formatting Parameter Lists, File Browser, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
717 @chapter Automatic Smart Indentation
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
718 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
719
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
720 Ada mode comes with a full set of rules for automatic indentation.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
721 You can of course configure the indentation as you want, by setting the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
722 value of a few variables.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
723
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
724 As always, the preferred way to modify variables is to use the
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
725 @samp{Ada->Customize} menu (don't forget to save your changes!). This
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
726 will also show you some example of code where this variable is used, and
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
727 hopefully make things clearer.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
728
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
729 The relevant variables are the following:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
730
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
731 @table @asis
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
732 @item @code{ada-broken-indent} (default value: 2)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
733 Number of columns to indent the continuation of a broken line.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
734
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
735 @item @code{ada-indent} (default value: 3)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
736 Width of the default indentation.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
737
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
738 @item @code{ada-indent-record-rel-type} (default value: 3)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
739 Indentation for @code{record} relative to @code{type} or @code{use}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
740
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
741 @item @code{ada-indent-return} (default value: 0)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
742 Indentation for @code{return} relative to @code{function} (if
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
743 @code{ada-indent-return} is greater than 0), or the open parenthesis
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
744 (if @code{ada-indent-return} is negative or null). Note that in the second
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
745 case, when there is no open parenthesis, the indentation is done
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
746 relative to @code{function} with the value of @code{ada-broken-indent}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
747
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
748 @item @code{ada-label-indent} (default value: -4)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
749 Number of columns to indent a label.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
750
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
751 @item @code{ada-stmt-end-indent} (default value: 0)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
752 Number of columns to indent a statement @code{end} keyword on a separate line.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
753
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
754 @item @code{ada-when-indent} (default value: 3)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
755 Indentation for @code{when} relative to @code{exception} or @code{case}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
756
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
757 @item @code{ada-indent-is-separate} (default value: t)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
758 Non-@code{nil} means indent @code{is separate} or @code{is abstract} if on a single line.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
759
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
760 @item @code{ada-indent-to-open-paren} (default value: t)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
761 Non-@code{nil} means indent according to the innermost open parenthesis.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
762
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
763 @item @code{ada-indent-after-return} (default value: t)
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
764 Non-@code{nil} means that the current line will also be re-indented before
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
765 inserting a newline, when you press @key{RET}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
766 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
767
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
768 Most of the time, the indentation will be automatic, i.e when you will
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
769 press @key{RET}, the cursor will move to the correct column on the
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
770 next line.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
771
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
772 However, you might want or need sometimes to re-indent the current line
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
773 or a set of lines. For this, you can simply go to that line, or select
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
774 the lines, and then press @key{TAB}. This will automatically re-indent
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
775 the lines.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
776
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
777 Another mode of indentation exists that helps you to set up your
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
778 indentation scheme. If you press @kbd{C-c @key{TAB}}, Ada mode will do
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
779 the following:
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
780
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
781 @itemize @bullet
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
782 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
783 Reindent the current line, as @key{TAB} would do.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
784 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
785 Temporarily move the cursor to a reference line, i.e., the line that
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
786 was used to calculate the current indentation.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
787 @item
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
788 Display at the bottom of the window the name of the variable that
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
789 provided the offset for the indentation.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
790 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
791
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
792 The exact indentation of the current line is the same as the one for the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
793 reference line, plus an offset given by the variable.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
794
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
795 Once you know the name of the variable, you can either modify it
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
796 through the usual @samp{Ada->Customize} menu, or by typing @kbd{M-x
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
797 customize-variable @key{RET}} in the Emacs window, and then give the
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
798 name of the variable.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
799
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
800 @table @kbd
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
801 @item @key{TAB}
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
802 Indent the current line or the current region.
40705
421e0a91a1d1 Replace M-C- with C-M-
Eli Zaretskii <eliz@gnu.org>
parents: 39367
diff changeset
803 @item C-M-\
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
804 Indent lines in the current selected block.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
805 @item C-c @key{TAB}
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
806 Indent the current line and prints the name of the variable used for
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
807 indentation.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
808 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
809
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
810
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
811
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
812 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
813 @node Formatting Parameter Lists, Automatic Casing, Automatic Smart Indentation, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
814 @chapter Formatting Parameter Lists
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
815 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
816
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
817 To help you correctly align fields in a subprogram parameter list,
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
818 Emacs provides one function that will do most of the work for you.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
819 This function will align the declarations on the colon (@samp{:})
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
820 separating argument names and argument types, plus align the
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
821 @code{in}, @code{out} and @code{in out} keywords if required.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
822
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
823 @table @kbd
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
824 @item C-c C-f
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
825 @findex ada-format-paramlist
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
826 Format the parameter list (@code{ada-format-paramlist}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
827 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
828
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
829 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
830 @node Automatic Casing, Statement Templates, Formatting Parameter Lists, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
831 @chapter Automatic Casing
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
832 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
833
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
834 Casing of identifiers, attributes and keywords is automatically
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
835 performed while typing when the variable @code{ada-auto-case} is set.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
836 Every time you press a word separator, the previous word is
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
837 automatically cased.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
838
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
839 You can customize the automatic casing differently for keywords,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
840 attributes and identifiers. The relevant variables are the following:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
841 @code{ada-case-keyword}, @code{ada-case-attribute} and
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
842 @code{ada-case-identifier}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
843
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
844 All these variables can have one of the following values:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
845
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
846 @table @code
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
847 @item downcase-word
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
848 The previous word will simply be in all lower cases. For instance
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
849 @code{My_vARIable} is converted to @code{my_variable}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
850
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
851 @item upcase-word
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
852 The previous word will be fully converted to upper cases. For instance
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
853 @code{My_vARIable} is converted to @code{MY_VARIABLE}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
854
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
855 @item ada-capitalize-word
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
856 All letters, except the first one of the word and every letter after the
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
857 @samp{_} character are lower cased. Other letters are upper cased. For
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
858 instance @code{My_vARIable} is converted to @code{My_Variable}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
859
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
860 @item ada-loose-case-word
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
861 No letters is modified in the previous word, except the ones after the
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
862 @samp{_} character that are upper cased. For instance @code{My_vARIable} is
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
863 converted to @code{My_VARIable}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
864 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
865
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
866 These functions, although they will work in most cases, will not be
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
867 accurate sometimes. The Ada mode allows you to define some exceptions,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
868 that will always be cased the same way.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
869
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
870 The idea is to create a dictionary of exceptions, and store it in a
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
871 file. This file should contain one identifier per line, with the casing
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
872 you want to force. The default name for this file is
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
873 @file{~/.emacs_case_exceptions}. You can of course change this name,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
874 through the variable @code{ada-case-exception-file}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
875
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
876 Note that each line in this file must start with the key word whose
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
877 casing you want to specify. The rest of the line can be used for
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
878 comments (explaining for instance what an abbreviation means, as
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
879 recommended in the Ada 95 Quality and Style, paragraph 3.1.4). Thus, a
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
880 good example for this file could be:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
881
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
882 @example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
883 DOD Department of Defense
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
884 Text_IO
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
885 GNAT The GNAT compiler from Ada Core Technologies
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
886 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
887
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
888 When working on project involving multiple programmers, we recommend
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
889 that every member of the team sets this variable to the same value,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
890 which should point to a system-wide file that each of them can
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
891 write. That way, you will ensure that the casing is consistent
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
892 throughout your application(s).
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
893
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
894 @findex ada-create-case-exception
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
895 There are two ways to add new items to this file: you can simply edit it
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
896 as you would edit any text file, and add or suppress entries in this
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
897 file. Remember that you should put one entity per line. The other,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
898 easier way, is to position the cursor over the word you want to add, in
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
899 an Ada buffer. This word should have the casing you want. Then simply
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
900 select the menu @samp{Ada->Edit->Create Case Exception}, or the key
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
901 @kbd{C-c C-y} (@code{ada-create-case-exception}). The word will
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
902 automatically be added to the current list of exceptions and to the file.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
903
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
904 It is sometimes useful to have multiple exception files around (for
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
905 instance, one could be the standard Ada acronyms, the second some
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
906 company specific exceptions, and the last one some project specific
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
907 exceptions). If you set up the variable @code{ada-case-exception-file}
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
908 as a list of files, each of them will be parsed and used in your emacs
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
909 session.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
910
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
911 However, when you save a new exception through the menu, as described
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
912 above, the new exception will be added to the first file in the list
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
913 only. You can not automatically add an exception to one of the other
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
914 files, although you can of course edit the files by hand at any time.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
915
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
916 Automatic casing can be performed on port or whole buffer using:
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
917
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
918 @table @kbd
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
919 @item C-c C-b
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
920 @findex ada-adjust-case-buffer
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
921 Adjust case in the whole buffer (@code{ada-adjust-case-buffer}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
922 @item C-c C-y
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
923 Create a new entry in the exception dictionary, with the word under
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
924 the cursor (@code{ada-create-case-exception})
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
925 @item C-c C-t
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
926 @findex ada-case-read-exceptions
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
927 Rereads the exception dictionary from the file
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
928 @code{ada-case-exception-file} (@code{ada-case-read-exceptions}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
929 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
930
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
931 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
932 @node Statement Templates, Comment Handling, Automatic Casing, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
933 @chapter Statement Templates
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
934 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
935
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
936 NOTE: This features are not available on VMS for Emacs 19.28. The
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
937 functions used here do not exist on Emacs 19.28.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
938
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
939 Templates exist for most Ada statements. They can be inserted in the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
940 buffer using the following commands:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
941
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
942 @table @kbd
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
943 @item C-c t b
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
944 @findex ada-exception-block
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
945 exception Block (@code{ada-exception-block}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
946 @item C-c t c
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
947 @findex ada-case
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
948 case (@code{ada-case}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
949 @item C-c t d
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
950 @findex ada-declare-block
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
951 declare Block (@code{ada-declare-block}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
952 @item C-c t e
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
953 @findex ada-else
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
954 else (@code{ada-else}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
955 @item C-c t f
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
956 @findex ada-for-loop
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
957 for Loop (@code{ada-for-loop}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
958 @item C-c t h
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
959 @findex ada-header
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
960 Header (@code{ada-header}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
961 @item C-c t i
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
962 @findex ada-if
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
963 if (@code{ada-if}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
964 @item C-c t k
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
965 @findex ada-package-body
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
966 package Body (@code{ada-package-body}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
967 @item C-c t l
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
968 @findex ada-loop
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
969 loop (@code{ada-loop}).
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
970 @item C-c p
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
971 @findex ada-subprogram-body
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
972 subprogram body (@code{ada-subprogram-body}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
973 @item C-c t t
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
974 @findex ada-task-body
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
975 task Body (@code{ada-task-body}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
976 @item C-c t w
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
977 @findex ada-while
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
978 while Loop (@code{ada-while}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
979 @item C-c t u
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
980 @findex ada-use
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
981 use (@code{ada-use}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
982 @item C-c t x
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
983 @findex ada-exit
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
984 exit (@code{ada-exit}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
985 @item C-c t C-a
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
986 @findex ada-array
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
987 array (@code{ada-array}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
988 @item C-c t C-e
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
989 @findex ada-elsif
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
990 elsif (@code{ada-elsif}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
991 @item C-c t C-f
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
992 @findex ada-function-spec
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
993 function Spec (@code{ada-function-spec}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
994 @item C-c t C-k
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
995 @findex ada-package-spec
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
996 package Spec (@code{ada-package-spec}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
997 @item C-c t C-p
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
998 @findex ada-procedure-spec
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
999 procedure Spec (@code{ada-package-spec}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1000 @item C-c t C-r
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1001 @findex ada-record
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1002 record (@code{ada-record}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1003 @item C-c t C-s
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1004 @findex ada-subtype
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1005 subtype (@code{ada-subtype}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1006 @item C-c t C-t
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1007 @findex ada-task-spec
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1008 task Spec (@code{ada-task-spec}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1009 @item C-c t C-u
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1010 @findex ada-with
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1011 with (@code{ada-with}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1012 @item C-c t C-v
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1013 @findex ada-private
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1014 private (@code{ada-private}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1015 @item C-c t C-w
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1016 @findex ada-when
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1017 when (@code{ada-when}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1018 @item C-c t C-x
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1019 @findex ada-exception
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1020 exception (@code{ada-exception}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1021 @item C-c t C-y
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1022 @findex ada-type
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1023 type (@code{ada-type}).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1024 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1025
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1026 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1027 @node Comment Handling, Compiling Executing, Statement Templates, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1028 @chapter Comment Handling
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1029 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1030
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1031 By default, comment lines get indented like Ada code. There are a few
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1032 additional functions to handle comments:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1033
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1034
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1035 @table @kbd
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1036 @item M-;
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1037 Start a comment in default column.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1038 @item M-j
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1039 Continue comment on next line.
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1040 @item C-c ;
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1041 Comment the selected region (add -- at the beginning of lines).
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1042 @item C-c :
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1043 Uncomment the selected region
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1044 @item M-q
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1045 autofill the current comment.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1046 @end table
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1047
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1048 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1049 @node Compiling Executing, Debugging, Comment Handling, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1050 @chapter Compiling Executing
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1051 @c -----------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1052
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1053 Ada mode provides a much complete environment for compiling, debugging
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1054 and running an application within Emacs.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1055
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1056 All the commands used by Emacs to manipulate your application can be
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1057 customized in the project file. Some default values are provided, but
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1058 these will likely not be good enough for a big or even medium-sized
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1059 project. See the section on the project file for an explanation on how
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1060 to set up the commands to use.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1061
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1062 One of the variables you can set in your project file,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1063 @code{cross_prefix}, indicates whether you are using a cross-compilation
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1064 environment, and if yes for which target. The default command used for
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1065 compilation will add this @code{cross_prefix} in front of the name:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1066 @code{gcc} will become @code{cross_prefix}-@code{gcc}, @code{gnatmake}
38881
ef5cc490984d Fix a few minor markup errors.
Eli Zaretskii <eliz@gnu.org>
parents: 38864
diff changeset
1067 will become @code{cross_prefix}-@code{gnatmake}, @enddots{}
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1068
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1069 This will also modify the way your application is run and debugged,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1070 although this is not implemented at the moment.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1071
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1072 Here are the commands for building and using an Ada application
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1073
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1074 @itemize @bullet
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1075
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1076 @item Compiling the current source
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1077 This command is issued when issuing the @code{compile} command from the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1078 Ada menu. It compiles unconditionally the current source using the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1079 @code{comp_cmd} variable of the project file. Compilation options can be
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1080 customized with the variable @code{comp_opt} of the project file.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1081
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1082 Emacs will display a new buffer that contains the result of the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1083 compilation. Each line associated with an error will become active: you
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1084 can simply click on it with the middle button of the mouse, or move the
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1085 cursor on it and press @key{RET}. Emacs will then display the
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1086 relevant source file and put the cursor on the line and column the error
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1087 was found at.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1088
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1089 You can also simply press the @kbd{C-x `} key and Emacs will jump to the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1090 first error. If you press that key again, it will move you to the second
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1091 error, and so on.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1092
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1093 Some error messages might also include references to some files. These
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1094 references are also clickable in the same way.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1095
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1096
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1097 @item (Re)building the whole application
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1098 This command is issued when you select the @code{build} command from the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1099 Ada menu. It compiles all obsolete units of the current application
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1100 using the @code{make_cmd} variable of the project file. Compilation
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1101 options can be customized with the variable @code{comp_opt} of the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1102 project file, binder options with @code{bind_opt} and linker options
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1103 with @code{link_opt}. The main unit of the application may be specified
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1104 with @code{main}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1105
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1106 The compilation buffer is also active in the same way it was for the above
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1107 command.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1108
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1109 @item Running the application
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1110 This command is issued when you select the @code{run} command from the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1111 Ada menu. It executes the current application in an emacs
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1112 buffer. Arguments can be passed through before executing. The execution
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1113 buffer allows for interactive input/output.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1114
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1115 This command is not yet available in a cross-compilation
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1116 toolchain. Emacs would first need to log on the target before running
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1117 the application. This will be implemented in a future release of Gnat.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1118
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1119 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1120
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1121 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1122 @node Debugging, Using non-standard file names, Compiling Executing, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1123 @chapter Debugging your application
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1124 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1125
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1126 You can set up in the project file a command to use to debug your
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1127 application. Emacs is compatible with a lot of debuggers, and provide an
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1128 easy interface to them.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1129
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1130 This selection will focus on the gdb debugger, and two of the graphical
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1131 interfaces that exist for it.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1132
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1133 In all cases, the main window in Emacs will be split in two: in the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1134 upper buffer, the source code will appear, whereas the debugger
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1135 input/output window is displayed at the bottom. You can enter the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1136 debugger commands as usual in the command window. Every time a new
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1137 source file is selected by the debugger (for instance as a result of a
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1138 @code{frame} command), the appropriate source file is displayed in the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1139 upper buffer.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1140
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1141 The source window is interactive: you can click on an identifier with the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1142 right mouse button, and print its value in the debugger window. You can
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1143 also set a breakpoint simply by right-clicking on a line.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1144
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1145 You can easily use Emacs as the source window when you are using a
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1146 graphical interface for the debugger. The interesting thing is that,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1147 whereas you still have the graphical nifties, you can also you the
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1148 cross-references features that Ada mode provides to look at the
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1149 definition for the identifiers, @enddots{}
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1150
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1151 Here is how you can set up gdbtk and ddd for use with Emacs (These are
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1152 the commands you should setup in the project file):
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1153
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1154 @itemize @bullet
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1155 @item gdbtk
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1156 should be used with the switch @samp{--emacs_gdbtk}. It provides a nice
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1157 backtrace window, as well as a tasks window. You can click interactively
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1158 on both of them, and Emacs will display the source file on the correct
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1159 line.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1160
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1161 @item ddd (Data Display Debugger)
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1162 should be used with the switches @samp{--tty} and
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1163 @samp{--fullname}. Whenever you print a variable from Emacs, it will
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1164 be displayed graphically in the data window.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1165
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1166 @end itemize
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1167
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1168
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1169 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1170 @node Using non-standard file names, Working Remotely, Debugging, Top
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1171 @chapter Using non-standard file names
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1172 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1173
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1174 By default, Emacs is configured to use the GNAT style file names, where
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1175 file names are the package names, and the extension for spec and bodies
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1176 are respectively @samp{.ads} and @samp{.adb}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1177
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1178 If you want to use other types of file names, you will need to modify
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1179 your @file{.emacs} file.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1180
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1181 Adding new possible extensions is easy. Since Ada mode needs to know
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1182 how to go from the body to the spec (and back), you always have to
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1183 specify both. A function is provided with Ada mode to add new
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1184 extensions.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1185
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1186 For instance, if your spec and bodies files are called
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1187 @file{@var{unit}_s.ada} and @file{@var{unit}_b.ada}, respectively, you
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1188 need to add the following to your @file{.emacs} file:
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1189
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1190 @example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1191 (ada-add-extensions "_s.ada" "_b.ada")
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1192 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1193
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1194 Note that it is possible to redefine the extension, even if they already
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1195 exist, as in:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1196
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1197 @example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1198 (ada-add-extensions ".ads" "_b.ada")
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1199 (ada-add-extensions ".ads" ".body")
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1200 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1201
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1202 This simply means that whenever the ada-mode will look for the body for
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1203 a file whose extension is @file{.ads}, it will take the first available
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1204 file that ends with either @file{.adb} (standard), @file{_b.ada} or
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1205 @file{.body}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1206
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1207 If the filename is not the unit name, then things are a little more
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1208 complicated. You then need to rewrite the function
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1209 @code{ada-make-filename-from-adaname} (see the file @file{ada-mode.el}
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1210 for an example).
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1211
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1212 @c ---------------------------------------------------------------------
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1213 @node Working Remotely, Index, Using non-standard file names, Top
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1214 @chapter Working Remotely
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1215 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1216
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1217 When you work on project that involve a lot of programmers, it is
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1218 generally the case that you will edit the files on your own machine, but
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1219 you want to compile, run and debug your application in another buffer.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1220
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1221 Fortunately, here too Emacs provides a very convenient way to do this.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1222
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1223 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1224 @section Remote editing
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1225 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1226
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1227 First of all, the files do not need to be on your machine. Emacs can
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1228 edit any remote file, by doing transparent FTP sessions between your
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1229 machine and the remote machine that stores your files. This is a special
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1230 Emacs mode, called @code{ange-ftp}. To use it, you just have to use a
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1231 slightly different syntax when you open a file.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1232
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1233 For instance, if you want to open the file @file{/work/foo.adb} on the machine
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1234 aleph.gnu.org, where you log in as qwe, you would simply do this:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1235
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1236 @example
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1237 C-x C-f /qwe@@aleph.gnu.org:/work/foo.adb @key{RET}
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1238 @end example
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1239
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1240 @noindent
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1241 i.e., use your name, the name of the machine and the name of the file.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1242
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1243 The first time, Emacs will ask you for a password that it will remember
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1244 until you close the current Emacs. Even if the ftp session times out,
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1245 you won't need to reenter your password.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1246
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1247 Every time you save the file, Emacs will upload it to the remote machine
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1248 transparently. No file is modified on the local machine.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1249
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1250 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1251 @section Remote compiling
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1252 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1253
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1254 If the machine you want to compile on is not the one your Emacs is
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1255 running on, you can set the variable @code{remote_machine} in the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1256 project file for your application.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1257
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1258 This will force Emacs to issue a @command{rsh} command for the compilation,
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1259 instead of running it on the local machine. Unfortunately, this won't
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1260 work on Windows workstations, since this protocol is not supported.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1261
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1262 @example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1263 If your @code{remote_machine} is aleph.gnu.org and the standard
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1264 compilation command is @code{cd /work/ && gnatmake foo}, then Emacs will
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1265 actually issue the command @code{rsh aleph.gnu.org 'cd /work/ &&
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1266 gnatmake foo'}.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1267 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1268
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1269 The advantage of using the @code{remote_machine} variable is that it is
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1270 easier to change that machine without having to modify the compilation
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1271 command.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1272
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1273 Note that if you need to set up some environment variables before the
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1274 compilation, you need to insert a call to the appropriate initialization
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1275 script in the compilation command, for instance:
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1276
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1277 @example
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1278 build_cmd= initialization_script; cd /work/ && gnatmake foo
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1279 @end example
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1280
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1281 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1282 @section Remote running and debugging
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1283 @c ---------------------------------------------------------------------
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1284
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1285 This feature is not completely implemented yet.
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1286
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1287 However, most of the time, you will be able to run your application
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1288 remotely simply by replacing it with a @command{rsh} call.
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1289 For instance, if your command was @code{$@{main@}}, you could replace it with
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1290 @code{rsh aleph.gnu.org $@{main@}}.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1291
38864
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1292 However, this would not work on vxworks, for instance, where
c656fc177008 Many corrections in Texinfo usage and English usage.
Richard M. Stallman <rms@gnu.org>
parents: 37403
diff changeset
1293 @command{rsh} is not supported.
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1294
39367
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1295 @node Index, , Working Remotely, Top
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1296 @unnumbered Index
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1297
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1298 @printindex fn
88b1d99e92ad Add an Index and index all commands. This is so C-h C-f works.
Eli Zaretskii <eliz@gnu.org>
parents: 38881
diff changeset
1299
25906
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1300 @contents
3a06267f733d New file.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1301 @bye