diff options
Diffstat (limited to 'doc/misc/ada-mode.texi')
| -rw-r--r-- | doc/misc/ada-mode.texi | 83 |
1 files changed, 41 insertions, 42 deletions
diff --git a/doc/misc/ada-mode.texi b/doc/misc/ada-mode.texi index 8d06ae0de22..926d6a5749c 100644 --- a/doc/misc/ada-mode.texi +++ b/doc/misc/ada-mode.texi @@ -3,7 +3,7 @@ @settitle Ada Mode @copying -Copyright @copyright{} 1999-2012 Free Software Foundation, Inc. +Copyright @copyright{} 1999--2013 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -14,8 +14,7 @@ and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License''. (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and -modify this GNU manual. Buying copies from the FSF supports it in -developing GNU and promoting software freedom.'' +modify this GNU manual.'' @end quotation @end copying @@ -26,7 +25,7 @@ developing GNU and promoting software freedom.'' @titlepage @sp 10 -@title{Ada Mode} +@title Ada Mode @sp 2 @subtitle An Emacs major mode for programming in Ada @subtitle Ada Mode Version 4.00 @@ -38,7 +37,7 @@ developing GNU and promoting software freedom.'' @contents -@node Top, Overview, (dir), (dir) +@node Top @top Ada Mode @ifnottex @@ -65,7 +64,7 @@ developing GNU and promoting software freedom.'' @end menu -@node Overview, Installation, Top, Top +@node Overview @chapter Overview The Emacs mode for programming in Ada helps the user in understanding @@ -97,7 +96,7 @@ and other GNAT commands. See the Emacs info manual, section 'Running Debuggers Under Emacs', for general information on debugging. -@node Installation, Customization, Overview, Top +@node Installation @chapter Installation Ada mode is part of the standard Emacs distribution; if you use that, @@ -137,7 +136,7 @@ GNAT-specific). @end itemize -@node Customization, Compiling Executing, Installation, Top +@node Customization @chapter Customizing Ada mode Here we assume you are familiar with setting variables in Emacs, @@ -176,7 +175,7 @@ See the Emacs help for each of these variables for more information. * Other customization:: @end menu -@node Non-standard file names, Other compiler, Customization, Customization +@node Non-standard file names @section Non-standard file names By default, Ada mode is configured to use the GNAT file naming @@ -218,7 +217,7 @@ rewrite the function @code{ada-make-filename-from-adaname}. Doing that is beyond the scope of this manual; see the current definitions in @file{ada-mode.el} and @file{ada-xref.el} for examples. -@node Other compiler, Other customization, Non-standard file names, Customization +@node Other compiler @section Other compiler By default, Ada mode is configured to use the Gnu Ada compiler GNAT. @@ -228,7 +227,7 @@ used to run that compiler, either in lisp variables or in Emacs Ada mode project files. See @ref{Project file variables} for the list of project variables, and the corresponding lisp variables. -@node Other customization, , Other compiler, Customization +@node Other customization @section Other customization All user-settable Ada mode variables can be set via the menu @@ -246,7 +245,7 @@ and the syntax to set a variable is the following: (setq variable-name value) @end example -@node Compiling Executing, Project files, Customization, Top +@node Compiling Executing @chapter Compiling Executing Ada projects can be compiled, linked, and executed using commands on @@ -264,7 +263,7 @@ file variables referenced here. * Compiler errors:: @end menu -@node Compile commands, Compiler errors, Compiling Executing, Compiling Executing +@node Compile commands @section Compile commands Here are the commands for building and using an Ada project, as @@ -347,7 +346,7 @@ Invoke @samp{Ada | Project | Load}, and load a project file that specifies @code @end enumerate -@node Compiler errors, , Compile commands, Compiling Executing +@node Compiler errors @section Compiler errors The @code{Check file}, @code{Compile file}, and @code{Build} commands @@ -367,7 +366,7 @@ Some error messages might also include references to other files. These references are also clickable in the same way, or put point after the line number and press @key{RET}. -@node Project files, Compiling Examples, Compiling Executing, Top +@node Project files @chapter Project files An Emacs Ada mode project file specifies what directories hold sources @@ -386,7 +385,7 @@ an Emacs Ada mode project file. * Project file variables:: @end menu -@node Project File Overview, GUI Editor, Project files, Project files +@node Project File Overview @section Project File Overview Project files have a simple syntax; they may be edited directly. Each @@ -451,7 +450,7 @@ file extension; if it is @code{.gpr}, the file is treated as a GNAT project file. Any other extension is treated as an Emacs Ada mode project file. -@node GUI Editor, Project file variables, Project File Overview, Project files +@node GUI Editor @section GUI Editor The project file editor is invoked with the menu @samp{Ada | Projects @@ -462,7 +461,7 @@ modification using the @samp{[save]} button at the bottom of the buffer, or the @kbd{C-x C-s} binding. To cancel your modifications, kill the buffer or click on the @samp{[cancel]} button. -@node Project file variables, , GUI Editor, Project files +@node Project file variables @section Project file variables The following variables can be defined in a project file; some can @@ -522,8 +521,8 @@ ada_project_path_sep=: ada_project_path=$GDS_ROOT/makerules ada_project_path=../opentoken @end example -the environment variable @code{ADA_PROJECT_PATH} will be set to -@code{"/home/shared/makerules:/home/opentoken/"}. +then as a result the environment variable @code{ADA_PROJECT_PATH} will +be set to @code{"/home/shared/makerules:/home/opentoken/"}. The default value is not the current value of this environment variable, because that will typically have been set by another @@ -649,7 +648,7 @@ commands and source navigation. @end table -@node Compiling Examples, Moving Through Ada Code, Project files, Top +@node Compiling Examples @chapter Compiling Examples We present several small projects, and walk thru the process of @@ -671,7 +670,7 @@ website mentioned in @xref{Installation}. * Use multiple GNAT project files:: @end menu -@node No project files, Set compiler options, Compiling Examples, Compiling Examples +@node No project files @section No project files This example uses no project files. @@ -731,7 +730,7 @@ In buffer @file{hello.adb}, invoke @samp{Ada | Check file}. You should get a @code{*compilation*} buffer containing something like (the directory paths will be different): -@example +@smallexample cd c:/Examples/Example_1/ gnatmake -u -c -gnatc -g c:/Examples/Example_1/hello.adb -cargs -gnatq -gnatQ gcc -c -Ic:/Examples/Example_1/ -gnatc -g -gnatq -gnatQ -I- c:/Examples/Example_1/hello.adb @@ -739,7 +738,7 @@ hello.adb:4:04: "Put_Line" is not visible hello.adb:4:04: non-visible declaration at a-textio.ads:264 hello.adb:4:04: non-visible declaration at a-textio.ads:260 gnatmake: "c:/Examples/Example_1/hello.adb" compilation error -@end example +@end smallexample If you have enabled font-lock, the lines with actual errors (starting with @file{hello.adb}) are highlighted, with the file name in red. @@ -837,7 +836,7 @@ Invoke @samp{Ada | Project | Load}, and load a project file that specifies @code @end enumerate -@node Set compiler options, Set source search path, No project files, Compiling Examples +@node Set compiler options @section Set compiler options This example illustrates using an Emacs Ada mode project file to set a @@ -899,7 +898,7 @@ used to set the compiler options. Fixing the error, linking and running the code proceed as in @ref{No project files}. -@node Set source search path, Use GNAT project file, Set compiler options, Compiling Examples +@node Set source search path @section Set source search path In this example, we show how to deal with files in more than one @@ -983,7 +982,7 @@ compiler error message. Fixing the error, linking and running the code proceed as in @ref{No project files}. -@node Use GNAT project file, Use multiple GNAT project files, Set source search path, Compiling Examples +@node Use GNAT project file @section Use GNAT project file In this example, we show how to use a GNAT project file, with no Ada @@ -1046,14 +1045,14 @@ Then, again in @file{hello_4.adb}, invoke @samp{Ada | Set main and Build}. You should get a @code{*compilation*} buffer containing something like (the directory paths will be different): -@example +@smallexample cd c:/Examples/Example_4/Gnat_Project/ gnatmake -o hello_4 hello_4 -Phello_4.gpr -cargs -gnatq -gnatQ -bargs -largs gcc -c -g -gnatyt -gnatq -gnatQ -I- -gnatA c:\Examples\Example_4\Gnat_Project\hello_4.adb gcc -c -g -gnatyt -gnatq -gnatQ -I- -gnatA c:\Examples\Example_4\hello_pkg.adb hello_pkg.adb:2:08: keyword "body" expected here [see file name] gnatmake: "c:\examples\example_4\hello_pkg.adb" compilation error -@end example +@end smallexample Compare the @code{gcc} options to the compiler output in @ref{Set compiler options}; this shows that @file{hello_4.gpr} is being used to @@ -1062,7 +1061,7 @@ set the compiler options. Fixing the error, linking and running the code proceed as in @ref{No project files}. -@node Use multiple GNAT project files, , Use GNAT project file, Compiling Examples +@node Use multiple GNAT project files @section Use multiple GNAT project files In this example, we show how to use multiple GNAT project files, @@ -1113,20 +1112,20 @@ Then, again in @file{hello_5.adb}, invoke @samp{Ada | Set main and Build}. You should get a @code{*compilation*} buffer containing something like (the directory paths will be different): -@example +@smallexample cd c:/Examples/Example_5/ gnatmake -o hello_5 hello_5 -Phello_5.gpr -g -cargs -gnatq -gnatQ -bargs -largs gcc -c -g -gnatyt -g -gnatq -gnatQ -I- -gnatA c:\Examples\Example_5\hello_5.adb gcc -c -g -gnatyt -g -gnatq -gnatQ -I- -gnatA c:\Examples\Example_4\hello_pkg.adb hello_pkg.adb:2:08: keyword "body" expected here [see file name] gnatmake: "c:\examples\example_4\hello_pkg.adb" compilation error -@end example +@end smallexample Now type @kbd{C-x `}. @file{Example_4/hello_pkg.adb} is shown, demonstrating that @file{hello_5.gpr} and @file{hello_4.gpr} are being used to set the compilation search path. -@node Moving Through Ada Code, Identifier completion, Compiling Examples, Top +@node Moving Through Ada Code @chapter Moving Through Ada Code There are several easy to use commands to navigate through Ada code. All @@ -1180,7 +1179,7 @@ If the @code{ada-xref-create-ali} variable is non-@code{nil}, Emacs will try to run GNAT for you whenever cross-reference information is needed, and is older than the current source file. -@node Identifier completion, Automatic Smart Indentation, Moving Through Ada Code, Top +@node Identifier completion @chapter Identifier completion Emacs and Ada mode provide two general ways for the completion of @@ -1225,7 +1224,7 @@ Complete current identifier using cross-reference information. Complete identifier using buffer information (not Ada-specific). @end table -@node Automatic Smart Indentation, Formatting Parameter Lists, Identifier completion, Top +@node Automatic Smart Indentation @chapter Automatic Smart Indentation Ada mode comes with a full set of rules for automatic indentation. You @@ -1302,7 +1301,7 @@ Indent the current line and display the name of the variable used for indentation. @end table -@node Formatting Parameter Lists, Automatic Casing, Automatic Smart Indentation, Top +@node Formatting Parameter Lists @chapter Formatting Parameter Lists @table @kbd @@ -1315,7 +1314,7 @@ This aligns the declarations on the colon (@samp{:}) separating argument names and argument types, and aligns the @code{in}, @code{out} and @code{in out} keywords. -@node Automatic Casing, Statement Templates, Formatting Parameter Lists, Top +@node Automatic Casing @chapter Automatic Casing Casing of identifiers, attributes and keywords is automatically @@ -1404,7 +1403,7 @@ Rereads the exception dictionary from the file @code{ada-case-exception-file} (@code{ada-case-read-exceptions}). @end table -@node Statement Templates, Comment Handling, Automatic Casing, Top +@node Statement Templates @chapter Statement Templates Templates are defined for most Ada statements, using the Emacs @@ -1495,7 +1494,7 @@ exception (@code{ada-exception}). type (@code{ada-type}). @end table -@node Comment Handling, GNU Free Documentation License, Statement Templates, Top +@node Comment Handling @chapter Comment Handling By default, comment lines get indented like Ada code. There are a few @@ -1507,18 +1506,18 @@ Start a comment in default column. @item M-j Continue comment on next line. @item C-c ; -Comment the selected region (add -- at the beginning of lines). +Comment the selected region (add @samp{--} at the beginning of lines). @item C-c : Uncomment the selected region @item M-q autofill the current comment. @end table -@node GNU Free Documentation License, Index, Comment Handling, Top +@node GNU Free Documentation License @appendix GNU Free Documentation License @include doclicense.texi -@node Index, , GNU Free Documentation License, Top +@node Index @unnumbered Index @printindex fn |
