aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-08-20 01:14:55 +0000
committerRichard M. Stallman2001-08-20 01:14:55 +0000
commit2e78ad148c515db46fe3ae23835a0028ec8d4a24 (patch)
tree6dc22fa7a987ab675d283914a6751802e6b1195d
parent9efa277712a43a3a5eeb359dccc6b67f3fcb23ba (diff)
downloademacs-2e78ad148c515db46fe3ae23835a0028ec8d4a24.tar.gz
emacs-2e78ad148c515db46fe3ae23835a0028ec8d4a24.zip
Many corrections in Texinfo usage and English usage.
-rw-r--r--man/ada-mode.texi500
1 files changed, 273 insertions, 227 deletions
diff --git a/man/ada-mode.texi b/man/ada-mode.texi
index 1ad2158e0bb..13c0ffa004c 100644
--- a/man/ada-mode.texi
+++ b/man/ada-mode.texi
@@ -73,8 +73,8 @@ license to the document, as described in section 6 of the license.
73 73
74@menu 74@menu
75* Overview:: 75* Overview::
76* Installation:: Installing the Ada mode on your system 76* Installation:: Installing Ada mode on your system
77* Customization:: Setting up the Ada mode to your taste 77* Customization:: Setting up Ada mode to your taste
78* Project files:: Describing the organization of your project 78* Project files:: Describing the organization of your project
79* Syntax highlighting:: Using specific colors and fonts to highlight 79* Syntax highlighting:: Using specific colors and fonts to highlight
80 the structure of your files 80 the structure of your files
@@ -109,39 +109,56 @@ standard Emacs features when programming in Ada.
109@section General features: 109@section General features:
110 110
111@itemize @bullet 111@itemize @bullet
112@item full Integrated Development Environment : 112@item
113full Integrated Development Environment:
113@itemize @bullet 114@itemize @bullet
114@item support of 'project files' for the configuration (directories, 115@item
116support of ``project files'' for the configuration (directories,
115compilation options,...) 117compilation options,...)
116@item compiling and stepping through error messages. 118@item
117@item running and debugging your applications within Emacs. 119compiling and stepping through error messages.
120@item
121running and debugging your applications within Emacs.
118@end itemize 122@end itemize
119@item easy to use for beginners by pull-down menus, 123@item
120@item user configurable by many user-option variables. 124easy to use for beginners by pull-down menus,
125@item
126user configurable by many user-option variables.
121@end itemize 127@end itemize
122 128
123@section Ada mode features that help understanding code: 129@section Ada mode features that help understanding code:
124 130
125@itemize @bullet 131@itemize @bullet
126@item functions for easy and quick stepping through Ada code, 132@item
127@item getting cross reference information for identifiers (e.g. find the 133functions for easy and quick stepping through Ada code,
134@item
135getting cross reference information for identifiers (e.g. find the
128defining place by a keystroke), 136defining place by a keystroke),
129@item displaying an index menu of types and subprograms and move point to 137@item
138displaying an index menu of types and subprograms and move point to
130the chosen one, 139the chosen one,
131@item automatic color highlighting of the various entities in Ada code. 140@item
141automatic color highlighting of the various entities in Ada code.
132@end itemize 142@end itemize
133 143
134@section Emacs support for writing Ada code: 144@section Emacs support for writing Ada code:
135 145
136@itemize @bullet 146@itemize @bullet
137@item switching between spec and body files with eventually 147@item
148switching between spec and body files with eventually
138auto-generation of body files, 149auto-generation of body files,
139@item automatic formating of subprograms parameter lists. 150@item
140@item automatic smart indentation according to Ada syntax, 151automatic formating of subprograms parameter lists.
141@item automatic completion of identifiers, 152@item
142@item automatic casing of identifiers, keywords, and attributes, 153automatic smart indentation according to Ada syntax,
143@item insertion of statement templates, 154@item
144@item filling comment paragraphs like filling normal text, 155automatic completion of identifiers,
156@item
157automatic casing of identifiers, keywords, and attributes,
158@item
159insertion of statement templates,
160@item
161filling comment paragraphs like filling normal text,
145@end itemize 162@end itemize
146 163
147@c ----------------------------------------------------------------------- 164@c -----------------------------------------------------------------------
@@ -149,21 +166,21 @@ auto-generation of body files,
149@chapter Installation 166@chapter Installation
150@c ----------------------------------------------------------------------- 167@c -----------------------------------------------------------------------
151 168
152If you got the Ada mode as a separate distribution, you should have a 169If you got Ada mode as a separate distribution, you should have a
153look at the @file{README} file. It explains the basic steps necessary 170look at the @file{README} file. It explains the basic steps necessary
154for a good installation of the emacs Ada mode. 171for a good installation of the emacs Ada mode.
155 172
156Installing the Ada mode is basically just a matter of copying a few 173Installing the Ada mode is basically just a matter of copying a few
157files into the Emacs library directories. Every time you open a file 174files into the Emacs library directories. Every time you open a file
158with a file extension of @file{.ads} or @file{.adb}, Emacs will 175with a file extension of @file{.ads} or @file{.adb}, Emacs will
159automatically load and activate the Ada mode. 176automatically load and activate Ada mode.
160 177
161See the section @ref{Using non-standard file names}, if your files do 178@xref{Using non-standard file names}, if your files do
162not use these extensions and if you want Emacs to automatically start the 179not use these extensions and if you want Emacs to automatically start the
163Ada mode every time you edit an Ada file. 180Ada mode every time you edit an Ada file.
164 181
165See also the Emacs documentation @ref{(emacs)}, for general usage 182See also the Emacs Manual (@pxref{(Top,,,emacs, The Emacs Manual)}),
166variables that you might want to set. 183for general usage variables that you might want to set.
167 184
168@c --------------------------------------------------------------------- 185@c ---------------------------------------------------------------------
169@section Required files 186@section Required files
@@ -173,16 +190,17 @@ This Ada mode works best with Emacs 20.3 or higher (the easy editing
173features for the project files won't work with any older version), but 190features for the project files won't work with any older version), but
174most of the commands should work with older versions too. Please try to 191most of the commands should work with older versions too. Please try to
175install the most recent version of Emacs on your system before 192install the most recent version of Emacs on your system before
176installing the Ada mode. 193installing Ada mode.
177 194
178Although part of the Ada mode is compiler independent, the most advanced 195Although part of Ada mode is compiler-independent, the most advanced
179features are specific to the Gnat compiler @url{http://www.gnat.com}. 196features are specific to the Gnat compiler @url{http://www.gnat.com}.
180 197
181The following files are provided with the Ada mode distribution: 198The following files are provided with the Ada mode distribution:
182 199
183@itemize @bullet 200@itemize @bullet
184 201
185@item @file{ada-mode.el}: The main file for the Ada mode. 202@item
203@file{ada-mode.el}: The main file for Ada mode.
186This is the only file which does not require Gnat. It contains the 204This is the only file which does not require Gnat. It contains the
187functions for indentation, formatting of parameter lists, stepping 205functions for indentation, formatting of parameter lists, stepping
188through code, comment handling and automatic casing. Emacs versions 206through code, comment handling and automatic casing. Emacs versions
@@ -190,25 +208,28 @@ through code, comment handling and automatic casing. Emacs versions
190version of this file and should be replaced. Loading @file{ada-mode.el} 208version of this file and should be replaced. Loading @file{ada-mode.el}
191from the current distribution supersedes the standard installation. 209from the current distribution supersedes the standard installation.
192 210
193@item @file{ada-stmt.el}: Contains the statement templates feature. 211@item
212@file{ada-stmt.el}: Contains the statement templates feature.
194 213
195@item @file{ada-xref.el}: This file provides the main support for Gnat. 214@item
215@file{ada-xref.el}: This file provides the main support for Gnat.
196This is where the functions for cross-references, completion of 216This is where the functions for cross-references, completion of
197identifiers, support for project files and compilation of your 217identifiers, support for project files and compilation of your
198application are defined. 218application are defined.
199 219
200@item @file{ada-prj.el}: The functions to use for easy-edition of the 220@item
201project files. This file is the only one which really requires Emacs at 221@file{ada-prj.el}: The functions to use for easy-edition of the
202least 20.2. It uses the new widget features from Emacs. 222project files. This file is the only one which really requires Emacs
223at least 20.2. It uses the new widget features from Emacs.
203 224
204@end itemize 225@end itemize
205 226
206@c -------------------------------------------------------------------- 227@c --------------------------------------------------------------------
207@node Customization, Project files, Installation, Top 228@node Customization, Project files, Installation, Top
208@chapter Customizing the Ada mode 229@chapter Customizing Ada mode
209@c --------------------------------------------------------------------- 230@c ---------------------------------------------------------------------
210 231
211The ada-mode is fully customizable. Everything, from the file names to 232Ada mode is fully customizable. Everything, from the file names to
212the automatic indentation and the automatic casing can be adapted to 233the automatic indentation and the automatic casing can be adapted to
213your own needs. 234your own needs.
214 235
@@ -216,15 +237,15 @@ There are two different kinds of variables that control this
216customization, both are easy to modify. 237customization, both are easy to modify.
217 238
218The first set of variables are standard Emacs variables. Of course, some 239The first set of variables are standard Emacs variables. Of course, some
219are defined only for the Ada mode, whereas others have a more general 240are defined only for Ada mode, whereas others have a more general
220meaning in Emacs. Please see the Emacs documentation for more 241meaning in Emacs. Please see the Emacs documentation for more
221information on the latest. In this documentation, we will detail all the 242information on the latest. In this documentation, we will detail all the
222variables that are specific to the Ada mode, and a few others. The names 243variables that are specific to Ada mode, and a few others. The names
223will be given, as in @code{ada-case-identifier}. 244will be given, as in @code{ada-case-identifier}.
224 245
225Emacs provides an easy way to modify them, through a special mode called 246Emacs provides an easy way to modify them, through a special mode called
226customization. To access this mode, select the menu 247customization. To access this mode, select the menu
227@kbd{Ada->Customize}. This will open a new buffer with some fields that 248@samp{Ada->Customize}. This will open a new buffer with some fields that
228you can edit. For instance, you will get something like: 249you can edit. For instance, you will get something like:
229@example 250@example
230Put below the compiler switches. 251Put below the compiler switches.
@@ -241,8 +262,8 @@ with the middle mouse button). This will save the values in your
241same values. 262same values.
242 263
243To modify a specific variable, you can directly call the function 264To modify a specific variable, you can directly call the function
244@code{customize-variable} from Emacs (just type @key{M-x 265@code{customize-variable} from Emacs (just type @kbd{M-x
245customize-variable RET} and then type the variable name. 266customize-variable @key{RET} @var{variable-name} @key{RET}}).
246 267
247Some users might prefer to modify the variables directly in their 268Some users might prefer to modify the variables directly in their
248configuration file, @file{.emacs}. This file is coded in Emacs lisp, and 269configuration file, @file{.emacs}. This file is coded in Emacs lisp, and
@@ -270,7 +291,7 @@ Ada programmers. That is to say, editing, compiling, executing and
270debugging can be performed within Emacs in a convenient and natural way. 291debugging can be performed within Emacs in a convenient and natural way.
271 292
272To take full advantage of this features, it is possible to create a file 293To take full advantage of this features, it is possible to create a file
273in the main directory of your application, with a '.adp' extension. 294in the main directory of your application, with a @samp{.adp} extension.
274This file contain all needed information dealing with the way your 295This file contain all needed information dealing with the way your
275application is organized between directories, the commands to compile, 296application is organized between directories, the commands to compile,
276run and debug it etc. Creating this file is not mandatory and convenient 297run and debug it etc. Creating this file is not mandatory and convenient
@@ -283,9 +304,9 @@ menu. It is also possible to edit the project file as a regular text
283file. 304file.
284 305
285Once in the buffer for editing the project file, you can save your 306Once in the buffer for editing the project file, you can save your
286modification using the '[OK]' button at the bottom of the buffer, or 307modification using the @samp{[OK]} button at the bottom of the buffer, or
287simply use the usual @kbd{C-x C-s} binding. To cancel your 308simply use the usual @kbd{C-x C-s} binding. To cancel your
288modifications, simply kill the buffer or click on the '[CANCEL]' button 309modifications, simply kill the buffer or click on the @samp{[CANCEL]} button
289at the button. 310at the button.
290 311
291Each buffer using Ada mode will be associated with one project file when 312Each buffer using Ada mode will be associated with one project file when
@@ -297,20 +318,25 @@ described in the next section, but you can force the project file you
297want to use by setting one or two variables in your @file{.emacs} file. 318want to use by setting one or two variables in your @file{.emacs} file.
298 319
299@itemize @bullet 320@itemize @bullet
300@item To set up a default project file to use for any directory, anywhere 321@item
322To set up a default project file to use for any directory, anywhere
301on your system, set the variable @code{ada-prj-default-project-file} to 323on your system, set the variable @code{ada-prj-default-project-file} to
302the name of that file. 324the name of that file.
325
303@example 326@example
304 (set 'ada-prj-default-project-file "/dir1/dir2/file") 327(set 'ada-prj-default-project-file "/dir1/dir2/file")
305@end example 328@end example
306 329
307@item For a finer controlled, you can set a per-directory project file. 330@item
331For finer control, you can set a per-directory project file.
308This is done through the variable @code{ada-xref-default-prj-file}. 332This is done through the variable @code{ada-xref-default-prj-file}.
333
309@example 334@example
310 (set 'ada-xref-default-prj-file 335 (set 'ada-xref-default-prj-file
311 '(("/dir1/dir2" . "/dir3/file1") 336 '(("/dir1/dir2" . "/dir3/file1")
312 ("/dir4/dir5" . "/dir6/file2"))) 337 ("/dir4/dir5" . "/dir6/file2")))
313@end example 338@end example
339
314Note: This has a higher priority than the first variable, so the first 340Note: This has a higher priority than the first variable, so the first
315choice is to use this variable settings, and otherwise 341choice is to use this variable settings, and otherwise
316@code{ada-prj-default-project-file}. 342@code{ada-prj-default-project-file}.
@@ -318,15 +344,15 @@ choice is to use this variable settings, and otherwise
318 344
319 345
320@table @kbd 346@table @kbd
321@item C-c u ada-customize menu: Ada->Project->New/Edit 347@item C-c u
322Create or edit the project file for the current buffer. 348Create or edit the project file for the current buffer (@code{ada-customize}).
323@item C-c c ada-change-prj 349@item C-c c
324Change the project file associated with the current Ada buffer. 350Change the project file associated with the current Ada buffer (@code{ada-change-prj}).
325@item C-c d 351@item C-c d
326Change the default project file for the current directory. Every new 352Change the default project file for the current directory. Every new
327file opened from this directory will be associated with that file by 353file opened from this directory will be associated with that file by
328default. 354default.
329@item ada-set-default-project-file menu: Ada->Project->Set Default 355@item ada-set-default-project-file
330Set the default project file to use for *any* Ada file opened anywhere 356Set the default project file to use for *any* Ada file opened anywhere
331on your system. This sets this file only for the current Emacs session. 357on your system. This sets this file only for the current Emacs session.
332@end table 358@end table
@@ -346,59 +372,59 @@ will be substituted.
346 372
347Here is the list of variables: 373Here is the list of variables:
348 374
349@table @code 375@table @asis
350@item src_dir [default: "./"] 376@item @code{src_dir} [default: @code{"./"}]
351This is a list of directories where the Ada mode will look for source 377This is a list of directories where Ada mode will look for source
352files. These directories are used mainly in two cases, both as a switch 378files. These directories are used mainly in two cases, both as a switch
353for the compiler and for the cross-references. 379for the compiler and for the cross-references.
354 380
355@item obj_dir [default: "./"] 381@item @code{obj_dir} [default: @code{"./"}]
356This is a list of directories where to look for object and library 382This is a list of directories where to look for object and library
357files. The library files are the .ali files generated by Gnat and that 383files. The library files are the @samp{.ali} files generated by Gnat
358contain cross-reference informations. 384and that contain cross-reference informations.
359 385
360@item comp_opt [default: ""] 386@item @code{comp_opt} [default: @code{""}]
361Creates a variable which can be referred to subsequently by using the 387Creates a variable which can be referred to subsequently by using the
362@code{$@{comp_opt@}} notation. This is intended to store the default 388@code{$@{comp_opt@}} notation. This is intended to store the default
363switches given to `gnatmake' and `gcc'. 389switches given to @command{gnatmake} and @command{gcc}.
364 390
365@item bind_opt=SWITCHES [default: ""] 391@item @code{bind_opt=@var{switches}} [default: @code{""}]
366Creates a variable which can be referred to subsequently by using the 392Creates a variable which can be referred to subsequently by using the
367@code{$@{bind_opt@}} notation. This is intended to store the default 393@code{$@{bind_opt@}} notation. This is intended to store the default
368switches given to `gnatbind'. 394switches given to @command{gnatbind}.
369 395
370@item link_opt=SWITCHES [default: ""] 396@item @code{link_opt=@var{switches}} [default: @code{""}]
371Creates a variable which can be referred to subsequently by using the 397Creates a variable which can be referred to subsequently by using the
372@code{$@{link_opt@}} notation. This is intended to store the default 398@code{$@{link_opt@}} notation. This is intended to store the default
373switches given to `gnatlink'. 399switches given to @command{gnatlink}.
374 400
375@item main=EXECUTABLE [default: ""] 401@item @code{main=@var{executable}} [default: @code{""}]
376Specifies the name of the executable for the application. This variable 402Specifies the name of the executable for the application. This variable
377can be referred to in the following lines by using the @code{$@{main@}} 403can be referred to in the following lines by using the @code{$@{main@}}
378notation. 404notation.
379 405
380@item cross_prefix=PREFIX [default: ""] 406@item @code{cross_prefix=@var{prefix}} [default: @code{""}]
381This variable should be set if you are working in a cross-compilation 407This variable should be set if you are working in a cross-compilation
382environment. This is the prefix used in front of the gnatmake commands. 408environment. This is the prefix used in front of the gnatmake commands.
383 409
384@item remote_machine=MACHINE [default: ""] 410@item @code{remote_machine=@var{machine}} [default: @code{""}]
385This is the name of the machine to log into before issuing the 411This is the name of the machine to log into before issuing the
386compilation command. If this variable is empty, the command will be run 412compilation command. If this variable is empty, the command will be
387on the local machine. This will not work on Windows NT machines, since 413run on the local machine. This will not work on Windows NT machines,
388the Ada mode will simply precede the compilation command with a 'rsh' 414since Ada mode will simply precede the compilation command with a
389command, unknown on Windows. 415@command{rsh} command, unknown on Windows.
390 416
391@item comp_cmd=COMMAND [default: "$@{cross_prefix@}gcc -c -I$@{src_dir@} -g -gnatq"] 417@item @code{comp_cmd=@var{command}} [default: @code{"$@{cross_prefix@}gcc -c -I$@{src_dir@} -g -gnatq"}]
392Specifies the command used to compile a single file in the application. 418Specifies the command used to compile a single file in the application.
393The name of the file will be added at the end of this command. 419The name of the file will be added at the end of this command.
394 420
395@item make_cmd=COMMAND [default: "$@{cross_prefix@}gnatmake $@{main@} -aI$@{src_dir@} -aO$@{obj_dir@} -g -gnatq -cargs $@{comp_opt@} -bargs $@{bind_opt@} -largs $@{link_opt@}"]' 421@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@}"]}'
396Specifies the command used to recompile the whole application. 422Specifies the command used to recompile the whole application.
397 423
398@item run_cmd=COMMAND [default: "$@{main@}"] 424@item @code{run_cmd=@var{command}} [default: @code{"$@{main@}"}]
399Specifies the command used to run the application. 425Specifies the command used to run the application.
400 426
401@item debug_cmd=COMMAND [default: "$@{cross_prefix@}gdb $@{main@}"] 427@item @code{debug_cmd=@var{command}} [default: @code{"$@{cross_prefix@}gdb $@{main@}"}]
402Specifies the command used to debug the application 428Specifies the command used to debug the application
403 429
404@end table 430@end table
@@ -417,23 +443,30 @@ function is used (goto declaration for instance), the following steps
417are taken: 443are taken:
418 444
419@itemize @bullet 445@itemize @bullet
420@item find the appropriate project file, open and parse it. 446@item
447find the appropriate project file, open and parse it.
421All the fields read in the project file are then stored by emacs 448All the fields read in the project file are then stored by emacs
422locally. Finding the project file requires a few steps: 449locally. Finding the project file requires a few steps:
423 450
424@itemize @minus 451@itemize @minus
425@item if a file from the same directory was already associated with 452@item
453if a file from the same directory was already associated with
426a project file, use the same one. This is the variable 454a project file, use the same one. This is the variable
427@code{ada-xref-default-prj-file} described above. 455@code{ada-xref-default-prj-file} described above.
428@item if the variable @code{ada-prj-default-project-file} is set, 456@item
457if the variable @code{ada-prj-default-project-file} is set,
429use the project file specified in this variable. 458use the project file specified in this variable.
430@item if there is a project file whose name is the same as the source file 459@item
431 except for the suffix, use this one. 460if there is a project file whose name is the same as the source file
432@item if there's only one project file in the source directory, use 461except for the suffix, use this one.
462@item
463if there's only one project file in the source directory, use
433that one. 464that one.
434@item if there are more than one project file in the source directory, 465@item
466if there are more than one project file in the source directory,
435ask the user. 467ask the user.
436@item if there are no project files in the source directory use standard 468@item
469if there are no project files in the source directory use standard
437default values. 470default values.
438@end itemize 471@end itemize
439 472
@@ -441,19 +474,22 @@ The first project file that is selected in a given directory becomes the
441default project file for this directory and is used implicitly for other 474default project file for this directory and is used implicitly for other
442sources unless specified otherwise by the user. 475sources unless specified otherwise by the user.
443 476
444@item look for the corresponding .ali file in the @code{obj_dir} defined 477@item
478look for the corresponding .ali file in the @code{obj_dir} defined
445in the project file. If this file can not be found, emacs proposes to 479in the project file. If this file can not be found, emacs proposes to
446compile the source using the @code{comp_cmd} defined in the project file 480compile the source using the @code{comp_cmd} defined in the project file
447in order to create the ali file. 481in order to create the ali file.
448 482
449@item when cross referencing is requested, the .ali file is parsed to 483@item
484when cross referencing is requested, the .ali file is parsed to
450determine the file and line of the identifier definition. It is 485determine the file and line of the identifier definition. It is
451possible for the .ali file to be older than the source file, in which 486possible for the .ali file to be older than the source file, in which
452case it will be recompiled if the variable @code{ada-xref-create-ali} is 487case it will be recompiled if the variable @code{ada-xref-create-ali} is
453set, otherwise the reference is searched in the obsolete ali file with 488set, otherwise the reference is searched in the obsolete ali file with
454possible inaccurate results. 489possible inaccurate results.
455 490
456@item look for the file containing the declaration using the source 491@item
492look for the file containing the declaration using the source
457path @code{src_dir} defined in the project file. Put the cursor at the 493path @code{src_dir} defined in the project file. Put the cursor at the
458correct position and display this new cursor. 494correct position and display this new cursor.
459@end itemize 495@end itemize
@@ -463,10 +499,10 @@ correct position and display this new cursor.
463@chapter Syntax highlighting 499@chapter Syntax highlighting
464@c ----------------------------------------------------------------------- 500@c -----------------------------------------------------------------------
465 501
466The Ada mode is made to help you understand the structure of your source 502Ada mode is made to help you understand the structure of your source
467files. Some people like having colors or different fonts depending on 503files. Some people like having colors or different fonts depending on
468the context: commands should be displayed differently than keywords, 504the context: commands should be displayed differently than keywords,
469which should also be different from strings, ... 505which should also be different from strings, @dots{}
470 506
471Emacs is able to display in a different way the following syntactic 507Emacs is able to display in a different way the following syntactic
472entities: 508entities:
@@ -485,13 +521,13 @@ activate it. This requires that you add a new line in your @file{.emacs}
485file (if this file does not exist, just create it). 521file (if this file does not exist, just create it).
486 522
487@example 523@example
488 (global-font-lock-mode t) 524(global-font-lock-mode t)
489@end example 525@end example
490 526
491But the default colors might not be the ones you like. Fortunately, 527But the default colors might not be the ones you like. Fortunately,
492there is a very easy way to change them. Just select the menu 528there is a very easy way to change them. Just select the menu
493@kbd{Help->Customize->Specific Face...} and press @kbd{Return}. This 529@samp{Help->Customize->Specific Face...} and press @key{RET}. This
494will display a buffer will all the "faces" (the colors) that Emacs knows 530will display a buffer will all the ``faces'' (the colors) that Emacs knows
495about. You can change any of them. 531about. You can change any of them.
496 532
497 533
@@ -505,45 +541,50 @@ these functions are available through the Ada menu, and you can also use
505the following key bindings or the command names: 541the following key bindings or the command names:
506 542
507@table @kbd 543@table @kbd
508@item M-C-e ada-next-procedure 544@item M-C-e
509Move to the next function/procedure/task, which ever comes next. 545Move to the next function/procedure/task, which ever comes next
510@item M-C-a ada-previous-procedure 546(@code{ada-next-procedure}).
511Move to previous function/procedure/task. 547@item M-C-a
512@item ada-next-package 548Move to previous function/procedure/task
549(@code{ada-previous-procedure}).
550@item M-x ada-next-package
513Move to next package. 551Move to next package.
514@item ada-prev-package 552@item M-x ada-prev-package
515Move to previous package. 553Move to previous package.
516@item C-c C-a ada-move-to-start 554@item C-c C-a
517Move to matching start of @code{end}. If point is at the end of a 555Move to matching start of @code{end} (@code{ada-move-to-start}). If
518subprogram, this command jumps to the corresponding @code{begin} if the 556point is at the end of a subprogram, this command jumps to the
519user option @code{ada-move-to-declaration} is @code{nil} (default), it 557corresponding @code{begin} if the user option
520jumps to the subprogram declaration otherwise. 558@code{ada-move-to-declaration} is @code{nil} (default), it jumps to
521@item C-c C-e ada-move-to-end 559the subprogram declaration otherwise.
522Move point to end of current block. 560@item C-c C-e
523@item C-c o ff-find-other-file 561Move point to end of current block (@code{ada-move-to-end}).
524Switch between corresponding spec and body file. If the cursor is on a 562@item C-c o
525subprogram, switch between declaration and body. 563Switch between corresponding spec and body file
564(@code{ff-find-other-file}). If the cursor is on a subprogram, switch
565between declaration and body.
526@item C-c c-d 566@item C-c c-d
527Move from any reference to its declaration and switch between 567Move from any reference to its declaration and switch between
528declaration and body (for procedures, tasks, private and incomplete 568declaration and body (for procedures, tasks, private and incomplete
529types). 569types).
530@item C-c C-r ada-find-references 570@item C-c C-r
531runs the @file{gnatfind} command to search for all references to the 571runs the @file{gnatfind} command to search for all references to the
532entity pointed by the cursor. Use 'next-error' function, or C-x `, to 572entity pointed by the cursor (@code{ada-find-references}). Use
533visit each reference (as for compilation errors). 573@kbd{C-x `} (@code{next-error}) to visit each reference (as for
574compilation errors).
534@end table 575@end table
535 576
536These functions use the information in the output of the Gnat Ada 577These functions use the information in the output of the Gnat Ada
537compiler. However, if your application was compiled with the 578compiler. However, if your application was compiled with the
538@code{-gnatx} switch, these functions will not work, since no extra 579@samp{-gnatx} switch, these functions will not work, since no extra
539information is generated by GNAT. See GNAT documentation for further 580information is generated by GNAT. See GNAT documentation for further
540information. 581information.
541 582
542Emacs will try to run Gnat for you whenever the cross-reference 583Emacs will try to run Gnat for you whenever the cross-reference
543informations are older than your source file (provided the 584informations are older than your source file (provided the
544@code{ada-xref-create-ali} variable is non nil). Gnat then produces a 585@code{ada-xref-create-ali} variable is non-@code{nil}). Gnat then produces a
545file with the same name as the current Ada file but with the extension 586file with the same name as the current Ada file but with the extension
546changed to @code{.ali}. This files are normally used by the binder, but 587changed to @file{.ali}. This files are normally used by the binder, but
547they will also contain additional cross-referencing information. 588they will also contain additional cross-referencing information.
548 589
549@c ----------------------------------------------------------------------- 590@c -----------------------------------------------------------------------
@@ -555,24 +596,26 @@ they will also contain additional cross-referencing information.
555@section Overview 596@section Overview
556@c ----------------------------------------------------------------------- 597@c -----------------------------------------------------------------------
557 598
558Emacs and the Ada mode provide two general ways for the completion of 599Emacs and Ada mode provide two general ways for the completion of
559identifiers. This is an easy way to type faster: you just have to type 600identifiers. This is an easy way to type faster: you just have to type
560the first few letters of an identifiers, and then loop through all the 601the first few letters of an identifiers, and then loop through all the
561possible completions. 602possible completions.
562 603
563The first method is general for Emacs. It will work both with Ada 604The first method is general for Emacs. It will work both with Ada
564buffers, but also in C buffers, Java buffers, ... The idea is to parse 605buffers, but also in C buffers, Java buffers, @enddots{} The idea is to parse
565all the opened buffers for possible completions. 606all the opened buffers for possible completions.
566 607
567For instance, if the following words are present in any of the opened 608For instance, if the words @samp{my_identifier}, @samp{my_subprogram}
568files: my_identifier, my_subprogam, then you will have this scenario: 609are the only words starting with @samp{my} in any of the opened files,
569@example 610then you will have this scenario:
611
612@quotation
570You type: my@key{M-/} 613You type: my@key{M-/}
571Emacs will display: my_identifier 614Emacs inserts: @samp{my_identifier}
572If you press @key{M-/} once again, Emacs will replace my_identifier with 615If you press @key{M-/} once again, Emacs replaces @samp{my_identifier} with
573my_subprogram. 616@samp{my_subprogram}.
574Pressing @key{M-/} once more will bring you back to my_identifier. 617Pressing @key{M-/} once more will bring you back to @samp{my_identifier}.
575@end example 618@end quotation
576 619
577This is a very fast way to do completion, and the casing of words will 620This is a very fast way to do completion, and the casing of words will
578also be respected. 621also be respected.
@@ -583,7 +626,7 @@ files generated by Gnat for possible completions.
583 626
584The main advantage is that this completion is more accurate: only 627The main advantage is that this completion is more accurate: only
585existing identifier will be suggested, you don't need to have a file 628existing identifier will be suggested, you don't need to have a file
586opened that already contains this identifiers,... 629opened that already contains this identifiers, @enddots{}
587 630
588On the other hand, this completion is a little bit slower and requires 631On the other hand, this completion is a little bit slower and requires
589that you have compiled your file at least once since you created that 632that you have compiled your file at least once since you created that
@@ -594,10 +637,11 @@ identifier.
594@c ----------------------------------------------------------------------- 637@c -----------------------------------------------------------------------
595 638
596@table @kbd 639@table @kbd
597@item C-TAB ada-complete-identifier 640@item C-@key{TAB}
598complete accurately current identifier using information in .ali file 641Complete accurately current identifier using information in @samp{.ali} file
642(@code{ada-complete-identifier}).
599@item M-/ 643@item M-/
600complete identifier using buffer information (not ada specific) 644Complete identifier using buffer information (not Ada-specific).
601@end table 645@end table
602 646
603@c ----------------------------------------------------------------------- 647@c -----------------------------------------------------------------------
@@ -607,8 +651,8 @@ complete identifier using buffer information (not ada specific)
607 651
608You can display a choice menu with all procedure/function/task 652You can display a choice menu with all procedure/function/task
609declarations in the file and choose an item by mouse click to get to its 653declarations in the file and choose an item by mouse click to get to its
610declaration. This function is accessible through the 'Ada' menu when 654declaration. This function is accessible through the @samp{Ada} menu when
611editing a Ada file, or simply through the following key binding : 655editing a Ada file, or simply through the following key binding:
612 656
613@table @kbd 657@table @kbd
614@item C-S-Mouse-3 658@item C-S-Mouse-3
@@ -627,9 +671,9 @@ would with any file browser. The following commands are then available.
627 671
628You can click on a directory name or file name to open it. The editor 672You can click on a directory name or file name to open it. The editor
629will automatically select the best possible mode for this file, 673will automatically select the best possible mode for this file,
630including of course the ada-mode for files written in Ada 674including of course Ada mode for files written in Ada.
631 675
632If you click on the [+] symbol near a file name, all the symbols (types, 676If you click on the @samp{[+]} symbol near a file name, all the symbols (types,
633variables and subprograms) defined in that file will be displayed, and 677variables and subprograms) defined in that file will be displayed, and
634you can directly click on them to open the right file at the right 678you can directly click on them to open the right file at the right
635place. 679place.
@@ -642,7 +686,7 @@ following key binding
642(global-set-key [f7] 'speedbar-get-focus) 686(global-set-key [f7] 'speedbar-get-focus)
643@end example 687@end example
644 688
645Every time you press @key{f7}, the mouse will automatically move to the 689Every time you press @key{F7}, the mouse will automatically move to the
646speedbar frame (which will be created if it does not exist). 690speedbar frame (which will be created if it does not exist).
647 691
648@c ----------------------------------------------------------------------- 692@c -----------------------------------------------------------------------
@@ -650,90 +694,93 @@ speedbar frame (which will be created if it does not exist).
650@chapter Automatic Smart Indentation 694@chapter Automatic Smart Indentation
651@c ----------------------------------------------------------------------- 695@c -----------------------------------------------------------------------
652 696
653The Ada mode comes with a full set of rules for automatic indentation. 697Ada mode comes with a full set of rules for automatic indentation.
654You can of course configure the indentation as you want, by setting the 698You can of course configure the indentation as you want, by setting the
655value of a few variables. 699value of a few variables.
656 700
657As always, the preferred way to modify variables is to use the 701As always, the preferred way to modify variables is to use the
658@code{Ada->Customize} menu (don't forget to save your changes!). This 702@samp{Ada->Customize} menu (don't forget to save your changes!). This
659will also show you some example of code where this variable is used, and 703will also show you some example of code where this variable is used, and
660hopefully make things clearer. 704hopefully make things clearer.
661 705
662The relevant variables are the following: 706The relevant variables are the following:
663 707
664@table @code 708@table @asis
665@item ada-broken-indent (default value: 2) 709@item @code{ada-broken-indent} (default value: 2)
666Number of columns to indent the continuation of a broken line 710Number of columns to indent the continuation of a broken line.
667 711
668@item ada-indent (default value: 3) 712@item @code{ada-indent} (default value: 3)
669Width of the default indentation 713Width of the default indentation.
670 714
671@item ada-indent-record-rel-type (default value: 3) 715@item @code{ada-indent-record-rel-type} (default value: 3)
672Indentation for 'record' relative to 'type' or 'use' 716Indentation for @code{record} relative to @code{type} or @code{use}.
673 717
674@item ada-indent-return (default value: 0) 718@item @code{ada-indent-return} (default value: 0)
675Indentation for 'return' relative to 'function' (if ada-indent-return 719Indentation for @code{return} relative to @code{function} (if
676is greater than 0), or the open parenthesis (if ada-indent-return is 720@code{ada-indent-return} is greater than 0), or the open parenthesis
677negative or null). Note that in the second case, when there is no 721(if @code{ada-indent-return} is negative or null). Note that in the second
678open parenthesis, the indentation is done relative to 'function' with 722case, when there is no open parenthesis, the indentation is done
679the value of ada-broken-indent. 723relative to @code{function} with the value of @code{ada-broken-indent}.
680 724
681@item ada-label-indent (default value: -4) 725@item @code{ada-label-indent} (default value: -4)
682Number of columns to indent a label 726Number of columns to indent a label.
683 727
684@item ada-stmt-end-indent (default value: 0) 728@item @code{ada-stmt-end-indent} (default value: 0)
685Number of columns to indent a statement 'end' keyword on a separate line 729Number of columns to indent a statement @code{end} keyword on a separate line.
686 730
687@item ada-when-indent (default value: 3) 731@item @code{ada-when-indent} (default value: 3)
688Indentation for 'when' relative to 'exception' or 'case' 732Indentation for @code{when} relative to @code{exception} or @code{case}.
689 733
690@item ada-indent-is-separate (default value: t) 734@item @code{ada-indent-is-separate} (default value: t)
691Non-nil means indent 'is separate' or 'is abstract' if on a single line 735Non-@code{nil} means indent @code{is separate} or @code{is abstract} if on a single line.
692 736
693@item ada-indent-to-open-paren (default value: t) 737@item @code{ada-indent-to-open-paren} (default value: t)
694Non-nil means indent according to the innermost open parenthesis 738Non-@code{nil} means indent according to the innermost open parenthesis.
695
696@item ada-indent-after-return (default value: t)
697Non-nil means that the current line will also be re-indented before
698inserting a newline, when you press @kbd{Return}.
699 739
740@item @code{ada-indent-after-return} (default value: t)
741Non-@code{nil} means that the current line will also be re-indented before
742inserting a newline, when you press @key{RET}.
700@end table 743@end table
701 744
702Most of the time, the indentation will be automatic, i.e when you will 745Most of the time, the indentation will be automatic, i.e when you will
703press @kbd{Return}, the cursor will move to the correct column on the 746press @key{RET}, the cursor will move to the correct column on the
704next line. 747next line.
705 748
706However, you might want or need sometimes to re-indent the current line 749However, you might want or need sometimes to re-indent the current line
707or a set of lines. For this, you can simply go to that line, or select 750or a set of lines. For this, you can simply go to that line, or select
708the lines, and then press @kbd{TAB}. This will automatically re-indent 751the lines, and then press @key{TAB}. This will automatically re-indent
709the lines. 752the lines.
710 753
711Another mode of indentation exists that helps you to set up your 754Another mode of indentation exists that helps you to set up your
712indentation scheme. If you press @kbd{C-c TAB}, the ada-mode will do the 755indentation scheme. If you press @kbd{C-c @key{TAB}}, Ada mode will do
713following: 756the following:
757
714@itemize @bullet 758@itemize @bullet
715@item Reindent the current line, as @kbd{TAB} would do 759@item
716@item Temporarily move the cursor to a reference line, i.e the line that 760Reindent the current line, as @key{TAB} would do.
717 was used to calculate the current indentation 761@item
718@item Display at the bottom of the window the name of the variable that 762Temporarily move the cursor to a reference line, i.e., the line that
719 provided the offset for the indentation 763was used to calculate the current indentation.
764@item
765Display at the bottom of the window the name of the variable that
766provided the offset for the indentation.
720@end itemize 767@end itemize
721 768
722The exact indentation of the current line is the same as the one for the 769The exact indentation of the current line is the same as the one for the
723reference line, plus an offset given by the variable. 770reference line, plus an offset given by the variable.
724 771
725Once you know the name of the variable, you can either modify it through 772Once you know the name of the variable, you can either modify it
726the usual @key{Ada->Customize} menu, or by typing @key{M-x 773through the usual @samp{Ada->Customize} menu, or by typing @kbd{M-x
727customize-variable RET} in the Emacs window, and then give the name of 774customize-variable @key{RET}} in the Emacs window, and then give the
728the variable. 775name of the variable.
729 776
730@table @kbd 777@table @kbd
731@item TAB 778@item @key{TAB}
732indent the current line or the current region. 779Indent the current line or the current region.
733@item M-C-\ 780@item M-C-\
734indent lines in the current selected block. 781Indent lines in the current selected block.
735@item C-c TAB 782@item C-c @key{TAB}
736indent the current line and prints the name of the variable used for 783Indent the current line and prints the name of the variable used for
737indentation. 784indentation.
738@end table 785@end table
739 786
@@ -744,15 +791,15 @@ indentation.
744@chapter Formatting Parameter Lists 791@chapter Formatting Parameter Lists
745@c ----------------------------------------------------------------------- 792@c -----------------------------------------------------------------------
746 793
747To help you correctly align fields in a subprogram parameter list, Emacs 794To help you correctly align fields in a subprogram parameter list,
748provides one function that will do most of the work for you. This 795Emacs provides one function that will do most of the work for you.
749function will align the declarations on the colon (':') separating 796This function will align the declarations on the colon (@samp{:})
750argument names and argument types, plus align the 'in', 'out' and 'in 797separating argument names and argument types, plus align the
751out' keywords if required. 798@code{in}, @code{out} and @code{in out} keywords if required.
752 799
753@table @kbd 800@table @kbd
754@item C-c C-f ada-format-paramlist 801@item C-c C-f
755Format the parameter list. 802Format the parameter list (@code{ada-format-paramlist}).
756@end table 803@end table
757 804
758@c ----------------------------------------------------------------------- 805@c -----------------------------------------------------------------------
@@ -772,7 +819,7 @@ attributes and identifiers. The relevant variables are the following:
772 819
773All these variables can have one of the following values: 820All these variables can have one of the following values:
774 821
775@table @kbd 822@table @code
776@item downcase-word 823@item downcase-word
777The previous word will simply be in all lower cases. For instance 824The previous word will simply be in all lower cases. For instance
778@code{My_vARIable} is converted to @code{my_variable}. 825@code{My_vARIable} is converted to @code{my_variable}.
@@ -783,12 +830,12 @@ The previous word will be fully converted to upper cases. For instance
783 830
784@item ada-capitalize-word 831@item ada-capitalize-word
785All letters, except the first one of the word and every letter after the 832All letters, except the first one of the word and every letter after the
786'_' character are lower cased. Other letters are upper cased. For 833@samp{_} character are lower cased. Other letters are upper cased. For
787instance @code{My_vARIable} is converted to @code{My_Variable}. 834instance @code{My_vARIable} is converted to @code{My_Variable}.
788 835
789@item ada-loose-case-word 836@item ada-loose-case-word
790No letters is modified in the previous word, except the ones after the 837No letters is modified in the previous word, except the ones after the
791'_' character that are upper cased. For instance @code{My_vARIable} is 838@samp{_} character that are upper cased. For instance @code{My_vARIable} is
792converted to @code{My_VARIable}. 839converted to @code{My_VARIable}.
793@end table 840@end table
794 841
@@ -805,7 +852,7 @@ through the variable @code{ada-case-exception-file}.
805Note that each line in this file must start with the key word whose 852Note that each line in this file must start with the key word whose
806casing you want to specify. The rest of the line can be used for 853casing you want to specify. The rest of the line can be used for
807comments (explaining for instance what an abbreviation means, as 854comments (explaining for instance what an abbreviation means, as
808recommended in the Ada 95 Quality and Style, paragrpah 3.1.4). Thus, a 855recommended in the Ada 95 Quality and Style, paragraph 3.1.4). Thus, a
809good example for this file could be: 856good example for this file could be:
810 857
811@example 858@example
@@ -825,7 +872,7 @@ as you would edit any text file, and add or suppress entries in this
825file. Remember that you should put one entity per line. The other, 872file. Remember that you should put one entity per line. The other,
826easier way, is to position the cursor over the word you want to add, in 873easier way, is to position the cursor over the word you want to add, in
827an Ada buffer. This word should have the casing you want. Then simply 874an Ada buffer. This word should have the casing you want. Then simply
828select the menu @kbd{Ada->Edit->Create Case Exception}, or the key 875select the menu @samp{Ada->Edit->Create Case Exception}, or the key
829@kbd{C-c C-y}. The word will automatically be added to the current list 876@kbd{C-c C-y}. The word will automatically be added to the current list
830of exceptions and to the file. 877of exceptions and to the file.
831 878
@@ -842,6 +889,7 @@ only. You can not automatically add an exception to one of the other
842files, although you can of course edit the files by hand at any time. 889files, although you can of course edit the files by hand at any time.
843 890
844Automatic casing can be performed on port or whole buffer using: 891Automatic casing can be performed on port or whole buffer using:
892
845@table @kbd 893@table @kbd
846@item C-c C-b 894@item C-c C-b
847Adjust case in the whole buffer. 895Adjust case in the whole buffer.
@@ -933,7 +981,7 @@ additional functions to handle comments:
933Start a comment in default column. 981Start a comment in default column.
934@item M-j 982@item M-j
935Continue comment on next line. 983Continue comment on next line.
936@item C-c ; comment-region 984@item C-c ;
937Comment the selected region (add -- at the beginning of lines). 985Comment the selected region (add -- at the beginning of lines).
938@item C-c : 986@item C-c :
939Uncomment the selected region 987Uncomment the selected region
@@ -978,7 +1026,7 @@ customized with the variable @code{comp_opt} of the project file.
978Emacs will display a new buffer that contains the result of the 1026Emacs will display a new buffer that contains the result of the
979compilation. Each line associated with an error will become active: you 1027compilation. Each line associated with an error will become active: you
980can simply click on it with the middle button of the mouse, or move the 1028can simply click on it with the middle button of the mouse, or move the
981cursor on it and press @kbd{Return}. Emacs will then display the 1029cursor on it and press @key{RET}. Emacs will then display the
982relevant source file and put the cursor on the line and column the error 1030relevant source file and put the cursor on the line and column the error
983was found at. 1031was found at.
984 1032
@@ -1041,23 +1089,23 @@ also set a breakpoint simply by right-clicking on a line.
1041You can easily use Emacs as the source window when you are using a 1089You can easily use Emacs as the source window when you are using a
1042graphical interface for the debugger. The interesting thing is that, 1090graphical interface for the debugger. The interesting thing is that,
1043whereas you still have the graphical nifties, you can also you the 1091whereas you still have the graphical nifties, you can also you the
1044cross-references features that the ada-mode provides to look at the 1092cross-references features that Ada mode provides to look at the
1045definition for the identifiers,... 1093definition for the identifiers, @enddots{}
1046 1094
1047Here is how you can set up gdbtk and ddd for use with Emacs (These are 1095Here is how you can set up gdbtk and ddd for use with Emacs (These are
1048the commands you should setup in the project file): 1096the commands you should setup in the project file):
1049 1097
1050@itemize @bullet 1098@itemize @bullet
1051@item gdbtk 1099@item gdbtk
1052should be used with the switch --emacs_gdbtk. It provides a nice 1100should be used with the switch @samp{--emacs_gdbtk}. It provides a nice
1053backtrace window, as well as a tasks window. You can click interactively 1101backtrace window, as well as a tasks window. You can click interactively
1054on both of them, and Emacs will display the source file on the correct 1102on both of them, and Emacs will display the source file on the correct
1055line. 1103line.
1056 1104
1057@item ddd (Data Display Debugger) 1105@item ddd (Data Display Debugger)
1058should be used with the switches --tty and -fullname. Whenever you 1106should be used with the switches @samp{--tty} and
1059print a variable from Emacs, it will be displayed graphically in the 1107@samp{--fullname}. Whenever you print a variable from Emacs, it will
1060data window. 1108be displayed graphically in the data window.
1061 1109
1062@end itemize 1110@end itemize
1063 1111
@@ -1069,19 +1117,19 @@ data window.
1069 1117
1070By default, Emacs is configured to use the GNAT style file names, where 1118By default, Emacs is configured to use the GNAT style file names, where
1071file names are the package names, and the extension for spec and bodies 1119file names are the package names, and the extension for spec and bodies
1072are respectively .ads and .adb. 1120are respectively @samp{.ads} and @samp{.adb}.
1073 1121
1074If you want to use other types of file names, you will need to modify 1122If you want to use other types of file names, you will need to modify
1075your .emacs configuration file. 1123your @file{.emacs} file.
1076 1124
1077Adding new possible extensions is easy. Since the ada-mode needs to know 1125Adding new possible extensions is easy. Since Ada mode needs to know
1078how to go from the body to the spec (and back), you always have to 1126how to go from the body to the spec (and back), you always have to
1079specify both. A function is provided with the ada-mode to add new 1127specify both. A function is provided with Ada mode to add new
1080extensions. 1128extensions.
1081 1129
1082For instance, if your files are called <unit>_s.ada and <unit>_b.ada 1130For instance, if your spec and bodies files are called
1083respectively for spec and bodies, you need to add the following to your 1131@file{@var{unit}_s.ada} and @file{@var{unit}_b.ada}, respectively, you
1084@file{.emacs} : 1132need to add the following to your @file{.emacs} file:
1085 1133
1086@example 1134@example
1087(ada-add-extensions "_s.ada" "_b.ada") 1135(ada-add-extensions "_s.ada" "_b.ada")
@@ -1100,10 +1148,10 @@ a file whose extension is @file{.ads}, it will take the first available
1100file that ends with either @file{.adb} (standard), @file{_b.ada} or 1148file that ends with either @file{.adb} (standard), @file{_b.ada} or
1101@file{.body}. 1149@file{.body}.
1102 1150
1103If the filename is not the unit name, then things are a little more 1151If the filename is not the unit name, then things are a little more
1104complicated. You then need to rewrite the function 1152complicated. You then need to rewrite the function
1105ada-make-filename-from-adaname (see the file @file{ada-mode.el} for an 1153@code{ada-make-filename-from-adaname} (see the file @file{ada-mode.el}
1106example). 1154for an example).
1107 1155
1108@c --------------------------------------------------------------------- 1156@c ---------------------------------------------------------------------
1109@node Working Remotely, ,Using non-standard file names, Top 1157@node Working Remotely, ,Using non-standard file names, Top
@@ -1126,15 +1174,16 @@ machine and the remote machine that stores your files. This is a special
1126Emacs mode, called @code{ange-ftp}. To use it, you just have to use a 1174Emacs mode, called @code{ange-ftp}. To use it, you just have to use a
1127slightly different syntax when you open a file. 1175slightly different syntax when you open a file.
1128 1176
1129@example 1177For instance, if you want to open the file @file{/work/foo.adb} on the machine
1130For instance, if you want to open the file /work/foo.adb on the machine
1131aleph.gnu.org, where you log in as qwe, you would simply do this: 1178aleph.gnu.org, where you log in as qwe, you would simply do this:
1132 1179
1133@key{C-x C-f} /qwe@@aleph.gnu.org:/work/foo.adb @key{Return} 1180@example
1134 1181C-x C-f /qwe@@aleph.gnu.org:/work/foo.adb @key{RET}
1135i.e put your name, the name of the machine and the name of the file.
1136@end example 1182@end example
1137 1183
1184@noindent
1185i.e., use your name, the name of the machine and the name of the file.
1186
1138The first time, Emacs will ask you for a password that it will remember 1187The first time, Emacs will ask you for a password that it will remember
1139until you close the current Emacs. Even if the ftp session times out, 1188until you close the current Emacs. Even if the ftp session times out,
1140you won't need to reenter your password. 1189you won't need to reenter your password.
@@ -1150,7 +1199,7 @@ If the machine you want to compile on is not the one your Emacs is
1150running on, you can set the variable @code{remote_machine} in the 1199running on, you can set the variable @code{remote_machine} in the
1151project file for your application. 1200project file for your application.
1152 1201
1153This will force Emacs to issue a rsh command for the compilation, 1202This will force Emacs to issue a @command{rsh} command for the compilation,
1154instead of running it on the local machine. Unfortunately, this won't 1203instead of running it on the local machine. Unfortunately, this won't
1155work on Windows workstations, since this protocol is not supported. 1204work on Windows workstations, since this protocol is not supported.
1156 1205
@@ -1170,7 +1219,7 @@ compilation, you need to insert a call to the appropriate initialization
1170script in the compilation command, for instance: 1219script in the compilation command, for instance:
1171 1220
1172@example 1221@example
1173build_cmd= initialization_script ; cd /work/ && gnatmake foo 1222build_cmd= initialization_script; cd /work/ && gnatmake foo
1174@end example 1223@end example
1175 1224
1176@c --------------------------------------------------------------------- 1225@c ---------------------------------------------------------------------
@@ -1180,15 +1229,12 @@ build_cmd= initialization_script ; cd /work/ && gnatmake foo
1180This feature is not completely implemented yet. 1229This feature is not completely implemented yet.
1181 1230
1182However, most of the time, you will be able to run your application 1231However, most of the time, you will be able to run your application
1183remotely simply by replacing it with a 'rsh' call on Unix. 1232remotely simply by replacing it with a @command{rsh} call.
1184 1233For instance, if your command was @code{$@{main@}}, you could replace it with
1185@example 1234@code{rsh aleph.gnu.org $@{main@}}.
1186For instance, if your command was '$@{main@}', you could replace it with
1187'rsh aleph.gnu.org $@{main@}'.
1188@end example
1189 1235
1190However, this would not fully work for instance on vxworks, where rsh 1236However, this would not work on vxworks, for instance, where
1191is not supported. 1237@command{rsh} is not supported.
1192 1238
1193@contents 1239@contents
1194@bye 1240@bye