comparison man/ada-mode.texi @ 73494:c2808e06f0d0

* ada-mode.texi (Project files, Identifier completion) (Automatic Casing, Debugging, Using non-standard file names) (Working Remotely): Fix typos.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 26 Oct 2006 14:30:51 +0000
parents 11b616eddda4
children ad6a503ca867 7eeafaaa9eab
comparison
equal deleted inserted replaced
73493:334001e04b9b 73494:c2808e06f0d0
281 Ada programmers. That is to say, editing, compiling, executing and 281 Ada programmers. That is to say, editing, compiling, executing and
282 debugging can be performed within Emacs in a convenient and natural way. 282 debugging can be performed within Emacs in a convenient and natural way.
283 283
284 To take full advantage of this features, it is possible to create a file 284 To take full advantage of this features, it is possible to create a file
285 in the main directory of your application, with a @samp{.adp} extension. 285 in the main directory of your application, with a @samp{.adp} extension.
286 This file contain all needed information dealing with the way your 286 This file contains all needed information dealing with the way your
287 application is organized between directories, the commands to compile, 287 application is organized between directories, the commands to compile,
288 run and debug it etc. Creating this file is not mandatory and convenient 288 run and debug it etc. Creating this file is not mandatory and convenient
289 defaults are automatically provided for simple setups. It only becomes 289 defaults are automatically provided for simple setups. It only becomes
290 necessary when those above mentioned defaults need customizing. 290 necessary when those above mentioned defaults need customizing.
291 291
327 '(("/dir1/dir2" . "/dir3/file1") 327 '(("/dir1/dir2" . "/dir3/file1")
328 ("/dir4/dir5" . "/dir6/file2"))) 328 ("/dir4/dir5" . "/dir6/file2")))
329 @end example 329 @end example
330 330
331 Note: This has a higher priority than the first variable, so the first 331 Note: This has a higher priority than the first variable, so the first
332 choice is to use this variable settings, and otherwise 332 choice is to use this variable's settings, and otherwise
333 @code{ada-prj-default-project-file}. 333 @code{ada-prj-default-project-file}.
334 @end itemize 334 @end itemize
335 335
336 336
337 @table @kbd 337 @table @kbd
599 @section Overview 599 @section Overview
600 @c ----------------------------------------------------------------------- 600 @c -----------------------------------------------------------------------
601 601
602 Emacs and Ada mode provide two general ways for the completion of 602 Emacs and Ada mode provide two general ways for the completion of
603 identifiers. This is an easy way to type faster: you just have to type 603 identifiers. This is an easy way to type faster: you just have to type
604 the first few letters of an identifiers, and then loop through all the 604 the first few letters of an identifier, and then loop through all the
605 possible completions. 605 possible completions.
606 606
607 The first method is general for Emacs. It will work both with Ada 607 The first method is general for Emacs. It will work both with Ada
608 buffers, but also in C buffers, Java buffers, @enddots{} The idea is to parse 608 buffers, but also in C buffers, Java buffers, @enddots{} The idea is to parse
609 all the opened buffers for possible completions. 609 all the opened buffers for possible completions.
621 @end quotation 621 @end quotation
622 622
623 This is a very fast way to do completion, and the casing of words will 623 This is a very fast way to do completion, and the casing of words will
624 also be respected. 624 also be respected.
625 625
626 The second method is specific to Ada buffer, and even to users of the 626 The second method is specific to Ada buffers, and even to users of the
627 Gnat compiler. Emacs will search the cross-information found in the 627 Gnat compiler. Emacs will search the cross-information found in the
628 @samp{.ali} files generated by Gnat for possible completions. 628 @samp{.ali} files generated by Gnat for possible completions.
629 629
630 The main advantage is that this completion is more accurate: only 630 The main advantage is that this completion is more accurate: only
631 existing identifier will be suggested, you don't need to have a file 631 existing identifier will be suggested, you don't need to have a file
837 All letters, except the first one of the word and every letter after the 837 All letters, except the first one of the word and every letter after the
838 @samp{_} character are lower cased. Other letters are upper cased. For 838 @samp{_} character are lower cased. Other letters are upper cased. For
839 instance @code{My_vARIable} is converted to @code{My_Variable}. 839 instance @code{My_vARIable} is converted to @code{My_Variable}.
840 840
841 @item ada-loose-case-word 841 @item ada-loose-case-word
842 No letters is modified in the previous word, except the ones after the 842 No letters are modified in the previous word, except the ones after the
843 @samp{_} character that are upper cased. For instance @code{My_vARIable} is 843 @samp{_} character that are upper cased. For instance @code{My_vARIable} is
844 converted to @code{My_VARIable}. 844 converted to @code{My_VARIable}.
845 @end table 845 @end table
846 846
847 These functions, although they will work in most cases, will not be 847 These functions, although they will work in most cases, will not be
892 However, when you save a new exception through the menu, as described 892 However, when you save a new exception through the menu, as described
893 above, the new exception will be added to the first file in the list 893 above, the new exception will be added to the first file in the list
894 only. You can not automatically add an exception to one of the other 894 only. You can not automatically add an exception to one of the other
895 files, although you can of course edit the files by hand at any time. 895 files, although you can of course edit the files by hand at any time.
896 896
897 Automatic casing can be performed on port or whole buffer using: 897 Automatic casing can be performed on part of the buffer, or on the
898 whole buffer, using:
898 899
899 @table @kbd 900 @table @kbd
900 @item C-c C-b 901 @item C-c C-b
901 @findex ada-adjust-case-buffer 902 @findex ada-adjust-case-buffer
902 Adjust case in the whole buffer (@code{ada-adjust-case-buffer}). 903 Adjust case in the whole buffer (@code{ada-adjust-case-buffer}).
1106 1107
1107 You can set up in the project file a command to use to debug your 1108 You can set up in the project file a command to use to debug your
1108 application. Emacs is compatible with a lot of debuggers, and provide an 1109 application. Emacs is compatible with a lot of debuggers, and provide an
1109 easy interface to them. 1110 easy interface to them.
1110 1111
1111 This selection will focus on the gdb debugger, and two of the graphical 1112 This section will focus on the gdb debugger, and two of the graphical
1112 interfaces that exist for it. 1113 interfaces that exist for it.
1113 1114
1114 In all cases, the main window in Emacs will be split in two: in the 1115 In all cases, the main window in Emacs will be split in two: in the
1115 upper buffer, the source code will appear, whereas the debugger 1116 upper buffer, the source code will appear, whereas the debugger
1116 input/output window is displayed at the bottom. You can enter the 1117 input/output window is displayed at the bottom. You can enter the
1123 right mouse button, and print its value in the debugger window. You can 1124 right mouse button, and print its value in the debugger window. You can
1124 also set a breakpoint simply by right-clicking on a line. 1125 also set a breakpoint simply by right-clicking on a line.
1125 1126
1126 You can easily use Emacs as the source window when you are using a 1127 You can easily use Emacs as the source window when you are using a
1127 graphical interface for the debugger. The interesting thing is that, 1128 graphical interface for the debugger. The interesting thing is that,
1128 whereas you still have the graphical nifties, you can also you the 1129 whereas you still have the graphical nifties, you can also use the
1129 cross-references features that Ada mode provides to look at the 1130 cross-references features that Ada mode provides to look at the
1130 definition for the identifiers, @enddots{} 1131 definition for the identifiers, @enddots{}
1131 1132
1132 Here is how you can set up gdbtk and ddd for use with Emacs (These are 1133 Here is how you can set up gdbtk and ddd for use with Emacs (These are
1133 the commands you should setup in the project file): 1134 the commands you should setup in the project file):
1170 1171
1171 @example 1172 @example
1172 (ada-add-extensions "_s.ada" "_b.ada") 1173 (ada-add-extensions "_s.ada" "_b.ada")
1173 @end example 1174 @end example
1174 1175
1175 Note that it is possible to redefine the extension, even if they already 1176 Note that it is possible to redefine the extensions, even if they already
1176 exist, as in: 1177 exist, as in:
1177 1178
1178 @example 1179 @example
1179 (ada-add-extensions ".ads" "_b.ada") 1180 (ada-add-extensions ".ads" "_b.ada")
1180 (ada-add-extensions ".ads" ".body") 1181 (ada-add-extensions ".ads" ".body")
1193 @c --------------------------------------------------------------------- 1194 @c ---------------------------------------------------------------------
1194 @node Working Remotely, Index, Using non-standard file names, Top 1195 @node Working Remotely, Index, Using non-standard file names, Top
1195 @chapter Working Remotely 1196 @chapter Working Remotely
1196 @c --------------------------------------------------------------------- 1197 @c ---------------------------------------------------------------------
1197 1198
1198 When you work on project that involve a lot of programmers, it is 1199 When you work on a project that involves a lot of programmers, it is
1199 generally the case that you will edit the files on your own machine, but 1200 generally the case that you will edit the files on your own machine, but
1200 you want to compile, run and debug your application in another buffer. 1201 you want to compile, run and debug your application in another buffer.
1201 1202
1202 Fortunately, here too Emacs provides a very convenient way to do this. 1203 Fortunately, here too Emacs provides a very convenient way to do this.
1203 1204