;;; -*- Fonts: cthl12, cthl12i, cthl12b, cptfontb, hl10, ct18b, cthl12b, cthl12b, cthl12b, brchars -*-  document editor  chapter ed-chapter-1 5 1. Introduction 0  section ed-section1-1 6 1.1. Description 0 4ZMACS0 in Ada Mode is a powerful text editor used for the preparation of text and documents of any kind. Its primary use is to prepare Ada programs for input to an Ada compiler or interpreter such as the Computer * Thought Ada Interpreter/Debugger. 4ZMACS0 in Ada Mode is specifically designed with editing Ada code in mind, and provides many features, such as automatic fonting and indenting, that allow easy, error-free input of Ada code. 4ZMACS0 in Ada Mode was written specifically for the Symbolics Lisp Machine, and is based on the widely-used editor, 4ZMACS0, for that machine. While 4ZMACS0 is known and documented elsewhere, the extensions that make 4ZMACS0 in Ada Mode unique and Ada oriented are proprietary information of Computer * Thought Corporation. 4ZMACS0 in Ada Mode is an easy-to-use, full-screen editor that provides both sim- ple and powerful commands for manipulating Ada code, either with a keystroke or two, or by selecting commands from a menu. The editor is fully-documented and helpful. At any time during its use, you can find what commands are used to do specific operations, or find out what a given keystroke does.  section ed-section1-2 6 1.2. Further reference 0 For further information, refer to the 1Emacs Manual for ITS Users0 by Richard Stallman. This is the authoritative manual covering 4EMACS0. The subset of 4EMACS0 com- mands available under 4ZMACS0 is summarized in Appendix A. In addition, refer to the set of documentation provided with your Symbolics Lisp Machine for information about standard windowing and console features of that machine. A working knowledge of both 4ZMACS0 and the Symbolics Lisp Machine is assumed throughout the rest of this docu- ment.  chapter ed-chapter-2 5 2. Document Conventions 0 The following conventions are used in this manual: - Hyphenated references to keys such as CONTROL-V and META-V mean that two keys are to be pressed simultaneously. (This applies to the light beige keys with dark lettering.) For instance, you can generate CONTROL-V by holding down the first key (4CONTROL0) and pressing the second key (4V0). Unhyphenated references to keys such as SELECT A mean that keys are to be pressed sequentially. (This applies to the light beige keys with white lettering.) For example, you can generate FUNCTION REFRESH by pressing first the 4FUNCTION0 key and then the REFRESH key. - 3This font will be used to display examples of words and prompts that will appear on the Editor screen.0 - 1This italic font will be used to display "placeholder" words in messages and command descriptions -- these are used to describe the kind of data that should be entered or that will be printed. The surrounding text will describe what you will actually see or what you should actually use in place of these words.0 - 2This boldface font will be used to display important words and concepts.0  chapter ed-chapter-3 5 3. Running ZMACS in Ada Mode 0 To enter 4ZMACS0 in Ada Mode, you must first enter 4ZMACS0 by typing SELECT-E. Once you are in 4ZMACS0, there are two ways you can enter 4ZMACS0 in Ada Mode: - by calling up a file which has the name extension .ADA will automatically place you in Ada mode. For example, if you type CONTROL-X CONTROL-F, ZMACS will respond with the prompt message 3Find file:0. When you enter a file name such as myprogram.ada, you will immediately be placed in Ada mode. - by entering the 4ZMACS0 command META-X ADA MODE. You will immediately be switched from text (or Lisp) mode into Ada mode.  chapter ed-chapter-4 5 4. ZMACS in Ada Mode Screen Characteristics 0  section ed-section4-1 6 4.1. Full-Screen Editing 0 4ZMACS0 in Ada Mode is a full-screen editor. It uses a major portion of the ter- minal screen to display the text being edited. Generally, the editor will show about 45 or more lines of 80 or more characters, although it may be configured to smaller sizes for special applications. The screen always shows the current state of the text. After each command, the screen is updated to reflect the result of the command. This style of editing is sometimes referred to as "what you see is what you get." For example, items in italics or boldface will appear as such on the screen. When you use some editing commands, a pop-up window will appear displaying choices or related text. This window will overlay a portion of the screen until you remove it by hitting the 4SPACE0 bar. The cursor takes the form of a small blinking rectangle or, in some cases, it appears as a box outlining a particular word or language construct. The cursor indicates where editing commands take place and where characters are added to the text. It can also be thought of as an imaginary reference location called the 2point0. When a command description says that it performs some operation at the point, this means at the point where the cursor is displayed. The arrow displayed on the screen is controlled by the mouse. By rolling it around on a desk or other flat surface, you can use the mouse to position the mouse pointer any- where on the screen. The buttons on the mouse can be used to select items from menus. This is called clicking on an item. In the editor, the mouse may also be used for chang- ing the location of the cursor. This capability makes the mouse very useful for moving around the screen during editing. Figure 4-1 shows the window configuration of 4ZMACS0 in Ada Mode. In the main window is the text of an Ada program called ENUM.ADA. To the right is a menu containing Ada commands and templates. At the bottom is a mini-buffer of information related to the text. 3Figure 4-1: 0The three windows of the basic 4ZMACS0 in Ada Mode screen.0  section ed-section4-2 6 4.2. The Text Window 0 This is the main window on your screen containing the text of your Ada program. Above your program's text is an attribute line, and below the text is the program's full file name.  subsection ed-section4-2-1 6 4.2.1. Attribute Line 0 4ZMACS0 in Ada Mode always maintains an attribute line in your text file. This is a line at the beginning of the file designed to give the editor information the next time the file is loaded in. In files with Ada code, the attribute line tells the editor that the file contains Ada code and which fonts to use for displaying boldface, italics, and normal typeface. Since the attribute line is always a valid Ada comment, it does not interfere with your Ada code. It usually looks like: 2 -- -*- Mode:Ada; Fonts:CPTFONT,HL12I,CPTFONTB; -*- 0 Use of the ADA PARAMETERS command can alter font information in the attribute line. Refer to Section 7.1 for details. The attribute line is automatically generated and maintained for you, reflecting the parameters selected using the ADA PARAMETERS command.  subsection ed-section4-2-2 6 4.2.2. File Name Designation 0 Below the text of your program appears its full file name in the format your file server requires. This can include such designations as the directory, file type and version. The exact format of your file name will depend on the hardware configuration you are using.  section ed-section4-3 6 4.3. The Menu Window 0 The menu window consists of Ada Mode commands and Ada Mode templates. These may be selected using your mouse but cannot be edited by 4ZMACS0 in Ada Mode.  subsection ed-section4-3-1 6 4.3.1. Ada Commands 0 Chapter 7 discusses the set of Ada-related commands available to you when you click on this portion of the 4ZMACS0 in Ada Mode screen.  subsection ed-section4-3-2 6 4.3.2. Ada Templates 0 Chapter 6 covers the standard Ada language constructs for which the editor provides pre-generated templates.  section ed-section4-4 6 4.4. The Bottom Window 0 The bottom window is called the mini-buffer. At the very top of this window is the mode line, and at the very bottom is the mouse documentation line. The editor uses this mini-buffer for displaying information or getting input from the user.  subsection ed-section4-4-1 6 4.4.1. Mode Line 0 A mode line, which appears beneath the text window, gives the name of the file being edited and the current mode of the editor. If you append the file extension 4ADA0 to the name of your file, your Ada program will automatically be edited in Ada mode. Ada mode allows the editor to indent Ada code correctly and to display Ada reserved words and comments in a distinguishable manner. When the editor is in this mode, the word Ada appears in parentheses next to the word 4ZMACS0. The name of your file is displayed to the right of this mode indicator.  subsection ed-section4-4-2 6 4.4.2. Mouse Documentation Line 0 The reverse-video mouse documentation line at the very bottom of the screen usually describes what happens when you click one of the mouse buttons. However, when the mouse is positioned over a menu item, the mouse documentation line describes the function of that menu choice. If the mouse is not pointing to a menu selection, the docu- mentation line will appear as follows: 2 L: Move point L2: Move to point M: Mark thing M2: Save R: Ada Menu R2: System menu 0 This means that clicking the left button will move the point (cursor) to where the mouse is, clicking the middle button will mark the thing to which the mouse is pointing, and clicking the right button will expose the Ada Mode command menu. Double clicking the left button (i.e., clicking the left button twice in rapid succession) will move the mouse pointer to the point (cursor). Double clicking on the middle button (i.e., clicking the middle mouse button twice in rapid succession), will save, kill or yank back what was killed, in that sequence. Double clicking the right button will bring up the Lisp Machine system menu.  chapter ed-chapter-5 5 5. Ada Fonts and Indentation 0 4ZMACS0 in Ada Mode understands enough about Ada to be able to font and indent correctly, relieving you of that responsibility. By default, reserved words and comments are displayed in a distinctive form. Reserved words are displayed in bold- face type to stand out from the rest of the code, while comments are shown in italics and aligned along the right margin of the screen. 4ZMACS0 in Ada Mode indents Ada code according to the official style used in the Ada language reference manual*. Indenting Ada code can be a complicated process that __________________________ * Ada Joint Program Office: 1 Reference manual for the Ada programming language 0 (ANSI/MIL-STD-1815A-1983). U.S. Government Printing Office, 1983. depends not only on the current line of code but also on what Ada code precedes it. 4ZMACS0 in Ada Mode understands enough about Ada to do this indentation correctly for you. In fact, the indentation is accurate enough to be used as an indicator of pro- gram errors. For example, if the code you type seems incorrectly indented, you may have an error in it. This chapter discusses the use of fonts for Ada programs and the indentation of Ada code. The information given here applies to the default settings for fonts and indenta- tion. While you can use the ADA PARAMETERS command to alter these default values, we recommend that you leave them as is to conform to the official Ada style guide.  section ed-section5-1 6 5.1. Fonts 0 Text in Ada mode is displayed in four different fonts, described in the following para- graphs. All fonts on the Lisp Machine are identified with a name such as 4CPTFONT0. Font names ending in 4B0 are bold fonts, and font names ending in I are italic fonts. The basic name of the font also conveys information. For example, the font name TR12I is a member of the Times Roman font family, is 12 points high, and is an italic font. While this process is automatic, in certain instances after extended edit- ing, you may want to refont a region of text or the entire buffer of text you are edit- ing. Refer to Section 7.2 for more information on how this is accomplished.  subsection ed-section5-1-1 6 5.1.1. Normal Font 0 One font, called 4CPTFONT0, is used for displaying normal text. User-defined iden- tifiers, arithmetic expressions, strings, and so forth are displayed in this normal font. Identifiers are automatically capitalized.  subsection ed-section5-1-2 6 5.1.2. Boldface Font 0 Ada reserved words, such as 2procedure0 and begin, are displayed in a 2bold0 font, 4CPTFONTB0. The 4ZMACS0 in Ada Mode automatically recognizes reserved words in your Ada code. As you type them, reserved words appear in normal font, but as soon as you type 4SPACE0, LINE, or 4RETURN0, they switch to boldface.  subsection ed-section5-1-3 6 5.1.3. Italics Font 0 Comments are displayed in 0italics0 font HL12I. Like reserved words, comments first appear in regular font, but change automatically to italics as soon as you type 4SPACE0, 4LINE0, or RETURN.  subsection ed-section5-1-4 6 5.1.4. The Lozenge Font 0 When templates are used (see Chapter 6), certain characters appear in the 4TEMPLOZ0 font. This font displays certain keywords in 30. For example: 2 if 32 then 32 else 32 end if; 0 Here, 30 and 30 are displayed as lozenges because they serve as placeholders for user-supplied constructs.  subsection ed-section5-1-5 6 5.1.5. Automatic Fonting 0 The automatic font mechanism can be used as a helpful debugging tool. For example, if you are typing in an Ada procedure and the reserved word 2procedure0 is not put in boldface, perhaps the word was misspelled. If an arithmetic expression appears in ital- ics, it is likely that a minus sign was doubled, creating a comment unintentionally. Reserved word recognition can also be used to detect programs that are syntactically correct but still won't run. Consider the example: 2 procedure range is begin ... end; 0 The words 2procedure0, is, begin, and end would all be put in bold font, as desired. However, the procedure name 4RANGE0 would also be converted to boldface, since it is a reserved word. In this way, the editor will remind you that you cannot use a reserved word as a procedure name.  subsection ed-section5-1-6 6 5.1.6. Upper and Lower Case 0 In addition to changing fonts, 4ZMACS0 in Ada Mode changes the 2case0 of reserved words and non-reserved words. By default, reserved words are made lower case, non- reserved words are made upper case, and comments are left unchanged.  section ed-section5-2 6 5.2. Indentation 0 4ZMACS0 in Ada Mode will do its best to correctly indent Ada code. Generally, users want their Ada code indented to show nesting of blocks and to show how the constructs of some statements are arranged. While much of this is automatic, the editor has several special keys that deal with indentation (4LINE0 and 4TAB0). In addition, after extended editing, you may want to have 4ZMACS0 in Ada Mode automatically re- indent a region or the entire buffer of text you are editing. Refer to Section 7.2.1 for more information on how to accomplish this.  subsection ed-section5-2-1 6 5.2.1. Using the LINE Key 0 You should use the 4LINE0 key instead of 4RETURN0 when entering Ada code. When you type 4LINE0, the editor indents the current line, starts a new line (just as if you had typed 4RETURN0), and indents the new line according to the best possible guess. It is not always possible to indent a new line correctly at this point, since the editor does not know what will be typed on that line. For example, if a new line con- tains an end statement, the line should not be indented as much as preceding lines. If you use 4LINE0 instead of RETURN to terminate each line of code, the editor correctly indents the line after you have typed it. Each line is indented twice: once as a first approximation, and once when the line is complete.  subsection ed-section5-2-2 6 5.2.2. Using the TAB Key 0 Striking the 4TAB0 key indents the current line, no matter where on the line the cur- sor is positioned. The editor scans the line for reserved words and considers all the text prior to the current line. Indentation is relative to that occurring on previous lines. For example, if you decide to change the indentation of a procedure, the editor will place successive lines in the right place relative to that procedure declaration. If the indentation on a line ever looks incorrect, you can hit the 4TAB0 key to try indenting again. Indentation may not be correct, however, until you type the first reserved word on the line. If you don't like the indentation as you start to type a line, you may request a smaller indentation by typing META-TAB. Alternately, you can change the amount of indentation by clicking on the ADA PARAMETERS command on the menu to the right of your text. A window will pop up as described in Section 7.1.1.  chapter ed-chapter-6 5 6. Templates 0 4ZMACS0 in Ada Mode has an advanced feature, called 2templates,0 that is a shorthand method for entering common Ada language constructs. Using this feature, you may select blocks and similar groupings of Ada code from the 2 Ada templates 0 menu and insert them into the buffer at the current cursor position.  section ed-section6-1 6 6.1. Template Overview 0 There are a number of frequently-used constructs in Ada. These include 2procedure...begin...end0 blocks, 2case0 statements, and many others. The template facility allows you to select from some of the most common constructs and insert them into your code. Some templates prompt for a name. For example, if you ask for a 2procedure...begin...end0 block, the editor will prompt you in the mini-buffer for the name of the procedure. Then, if you had typed 4SEARCHQ0 as the name, the editor would insert in the text window the code: 2 procedure 4SEARCHQ2 is 32 begin 32 end 4SEARCHQ2; 0 Even though you only typed in the name once, the name 3SEARCHQ0 appears twice in the template code. This feature guarantees that the name is spelled correctly in both loca- tions. 4ZMACS0 in Ada Mode also inserts lozenges into the buffer, such as 30 in the example above. Each lozenge is treated as a single character and can be deleted using the 4RUBOUT0 key. The lozenge is a helpful reminder that something must be inserted into the template. It is recommended that you do 2not0 delete the lozenge until you are ready to replace it with something*. __________________________ * Lozenges appear in a special, fourth font, not one of the regular, bold, or italic fonts. Read the section on fonts on page 12 for more information. You may select a template for insertion by clicking on one of the categories in the Ada templates menu in the right-hand portion of your screen. You will see a menu of templates, each a miniature of the code. Select one with the mouse, or move the mouse away from the menu if you don't see one that meets your needs. Templates are always indented in relation to the first line of the template. If you want to indent the code of a template, use the 4TAB0 key on a blank line to get the correct indentation for that line and then insert the template. The editor will insert the first line of the template where the cursor was, and indent subsequent lines of the template the correct amount. When a template requires user input, such as a name or other identifier, the editor will check to see if it is valid. If, for example, a reserved word were entered where it would not be legal, the editor would inform you and ask for another identifier. Several secondary menus contain so many templates that they cannot all be displayed in the pop-up menu at the same time. These menus have scrolling capability simi- lar to the scrolling capability in the 4ZMACS0 editor. If you roll the mouse close to the left edge of the secondary menu, the arrow will change shape to a fat upward and downward pointing arrow. As with the 4ZMACS0 scroll bar, you can click the mouse to expose the next group of templates in the secondary menu to be displayed. Figure 6-1 shows how you might click on a particular category in the Ada tem- plates window in the right portion of your screen. Figure 6-2 shows one of the pop-up menus that appears when you click on an Ada templates category. Figure 6-3 shows how the scroll bar is displayed for secondary menu that does not fit into a single pop-up menu. Categories and associated templates are summarized in the following sections. 3Figure 6-1: 0Selecting an Ada templates category.0 3Figure 6-2: 0A pop-up menu of Ada templates.0 3Figure 6-3: 0Scroll Bar in Expressions.0  section ed-section6-2 6 6.2. Block Constructs 0  subsection ed-section6-2-1 6 6.2.1. BEGIN 0 2Action:0 Click on 2Block Constructs0 in the primary menu, then click on the first 2begin0 block template in the secondary menu. 2Template:0The template is inserted into your program with lozenges as shown below: 2 begin 32 end;0  subsection ed-section6-2-2 6 6.2.2. PROCEDURE 0 2Action:0 Click on 2Procedure0 in the primary menu, then click on the third procedure template in the secondary menu. 2Prompt:0 Respond to the prompt message in the mini buffer: 3Name of procedure:0 0QUERY0 1(Type 4RETURN1 when done.) 2Template:0The template is inserted into your program with lozenges as shown below: 2 procedure 0QUERY0 (30: 30 30; 30: 30 32) is begin 32 end 4QUERY0;  subsection ed-section6-2-3 6 6.2.3. FUNCTION 0 2Action:0 Click on 2Function0 in the primary menu, then click on the third 2func- tion0 template in the secondary menu. 2Prompt:0 Respond to the prompt message in the mini buffer: 3Name of function:0 FUN0 1(Type 4RETURN1 when done.) 2Template:0The template is inserted into your program with lozenges as shown below: 2 function 4FUN0 (30: 30; 30: 32) return 32 is 32 begin 32 end 4FUN0;  subsection ed-section6-2-4 6 6.2.4. PACKAGE 0 2Action:0 Click on Packages in the primary menu, then click on the first 2package0 template in the secondary menu. 2Prompt:0 Respond to the prompt message in the mini buffer: 3Name of package: 0PACK0 1(Type 4RETURN1 when done.) Template:0 The template is inserted into your program with lozenges as shown below: 2 package 4PACK2 is 32 end 4PACK0;  subsection ed-section6-2-5 6 6.2.5. PACKAGE BODY 0 2Action:0 Click on 2Packages0 in the primary menu, then click on the first 2pack- age body0 template in the secondary menu. 2Prompt:0 Respond to the prompt message in the mini buffer: 3Name of package: 0BOD0 1(Type 4RETURN1 when done.) 2Template:0The template is inserted into your program with lozenges as shown below: 2 package body 4BOD2 is 32 begin 32 exeception when 32 => 32 end 4BOD0;  subsection ed-section6-2-6 6 6.2.6. TASK 0 2Action:0 Click on 2Tasks0 in the primary menu, then click on the first 2task0 tem- plate in the secondary menu. 2Prompt:0 Respond to the prompt message in the mini buffer: 3Name of task: 0TSK0 1(Type 4RETURN1 when done.) 2Template:0The template is inserted into your program with lozenges as shown below: 2 task 4TSK2 is entry (30: 30; 30 32); end 4TSK0;  subsection ed-section6-2-7 6 6.2.7. TASK BODY 0 2Action:0 Click on 2Tasks0 in the primary menu, then click on the first 2task body0 template in the secondary menu. 2Prompt:0 Respond to the prompt message in the mini buffer: 3Name of task: 0TBOD0 1(Type 4RETURN1 when done.) 2Template:0The template is inserted into your program with lozenges as shown below: 2 task body 4TBOD2 is 32 begin 32 end 4TBOD0;  subsection ed-section6-2-8 6 6.2.8. RECORD 0 2Action:0 Click on 2Type Declarations0 in the primary menu, then click on the 2record0 template in the secondary menu. 2Template:0The template is inserted into your program with lozenges as shown below: 2 type 32 is record 30 : 30 := 30; 30 : 32; end record; 0  section ed-section6-3 6 6.3. Loop Constructs 0  subsection ed-section6-3-1 6 6.3.1. LOOP 0 2Action:0 Click on 2Loop Constructs0 in the primary menu, then click on the 2loop0 template in the secondary menu. 2Template:0The template is inserted into your program with lozenges as shown below: 2 loop 32 exit when 30; 32 end loop; 0  subsection ed-section6-3-2 6 6.3.2. WHILE 0 2Action:0 Click on 2Loop Constructs0 in the primary menu, then click on the 2while0 template in the secondary menu. 2Template:0The template is inserted into your program with lozenges as shown below: 2 while 32 loop 32 end loop; 0  subsection ed-section6-3-3 6 6.3.3. FOR 0 2Action:0 Click on 2Loop Constructs0 in the primary menu, then click on the first 2for0 template in the secondary menu. 2Template:0The template is inserted into your program with lozenges as shown below: 2 for 32 in 32 loop 32 end loop; 0  section ed-section6-4 6 6.4. Conditionals and Cases 0  subsection ed-section6-4-1 6 6.4.1. IF THEN ELSE 0 2Action:0 Click on 2Conditionals & Cases0 in the primary menu, then click on the third 2if then else0 template in the secondary menu. 2Template:0The template is inserted into your program with lozenges as shown below: 2 if 32 then 32 else 32 end if; 0  subsection ed-section6-4-2 6 6.4.2. IF THEN ELSIF 0 2Action:0 Click on 2Conditionals & Cases0 in the primary menu, then click on the second 2if then elsif0 template in the secondary menu. 2Template:0The template is inserted into your program with lozenges as shown below: 2 if 32 then 32 elsif 32 then 32 else 32 end if; 0  subsection ed-section6-4-3 6 6.4.3. CASE 0 2Action:0 Click on 2Conditionals & Cases0 in the primary menu, then click on the 2case0 template in the secondary menu. 2Template:0The template is inserted into your program with lozenges as shown below: 2 case 32 is when 32 => 32 when 32 | 32 => 32 when others => 32 end case; 0 In Figure 6-2, the template selected was a conditional statement beginning with an 2if0 clause. Figure 6-4 shows this template inserted at the current cursor position within your Ada program. 3Figure 6-4: 0The 2if0 conditional statement template inserted into an Ada program.0 After a template is inserted, the cursor positions itself right after the first lozenge. The lozenges are meant to be placeholders for actual code you will type in. Figure 6-5, shows actual conditional data substituted for the 30 lozenge. 3Figure 6-5: 0Actual code substituted for the 30 lozenge.0  chapter ed-chapter-7 5 7. ZMACS in Ada Mode Commands 0 This chapter describes the Ada commands you can select from the ADA PARAMETERS menu to the right of your screen. Figure 7-1 shows how you would select one of these com- mands from the menu window using your mouse. These include commands that: - change Ada Mode parameters, - font buffers or regions, and - indent buffers or regions. Commands in each of these categories are described in the following paragraphs. 3Figure 7-1: 0Selecting an Ada command from the menu window.0  section ed-section7-1 6 7.1. Changing Ada Mode Parameters 0  subsection ed-section7-1-1 6 7.1.1. ADA PARAMETERS 0 2Function:0To change fonting or indentation characteristics of 4ZMACS0 in Ada Mode. 2Result:0 Figure 7-2. shows the pop-up menu that appears when you click on ADA PARAMETERS in the Ada commands menu. 3Figure 7-2: 0Items that can be selected from the Ada Parameters.0  section ed-section7-2 6 7.2. Format Ada Code Commands 0 These commands can be invoked to fix indentation or fonting inconsistencies that have crept into your Ada code during editing. The term 2buffer0 refers to the capability of 4ZMACS0 to display up to seven files in a multiwindow environment. Each buffer has a separate name and can hold a separate file of Ada source code. If you are not working with multiple buffers, these commands act upon the entire file in the buffer you are editing, with an important exception. If a region is currently defined, these commands apply only to that region.  subsection ed-section7-2-1 6 7.2.1. INDENT BUFFER 0 2Function:0To indent all the lines in a buffer the correct amount. There will be times when indentation goes awry. After serious editing, with lots of insertion and deletion, it's possible that you may not have had a chance to indent each line correctly. 4ZMACS0 in Ada Mode can indent all the lines in a buffer automatically for you, using this command. 2Result:0 Clicking on this item will indent each line in the buffer, starting at the top line. This process is functionally equivalent to typing 4TAB0 on each line. You can watch in the mini-buffer as the editor goes through the text of your file a line at a time.  subsection ed-section7-2-2 6 7.2.2. INDENT REGION 0 2Function:0If you just need for the editor to check indentation on a portion of your text, mark the text as a region, then click on this command. 2Result:0 Only the portion of your program marked as a region will be checked for proper indentation.  subsection ed-section7-2-3 6 7.2.3. FONT BUFFER 0 2Function:0You can ask the editor to check the fonting over the entire buffer of text if you wish. If you have edited code and the editor has not recognized reserved words, it may be wise to refont the entire buffer. To do this, simply click on this command in the Ada commands menu. 2Result:0 The editor will examine every word in the buffer and select the correct font and case.  subsection ed-section7-2-4 6 7.2.4. FONT REGION 0 2Function:0If you just need for the editor to check fonting on a portion of your text, mark the text as a region, then click on this command in the Ada commands menu. 2Result:0 Only the portion of your program marked as a region will be checked for proper fonting.  chapter ed-summary 5Appendix A A ZMACS Command Summary 0 Typing SELECT-E will invoke the 4ZMACS0 editor on the Lisp Machine. The following summary shows default bindings of frequently-used commands to individual keys on the key- board. In the summary, references to c- and m- stand for 4CONTROL0 and 4META0 respectively. 7Getting out 0 c-4X0 c-SWrites the current buffer into a new version of the current file name c-4X0 c-WWrites the current buffer into a file with a different name (prompts; default is last file written or else file associated with current buffer) 7Buffer operations 0 c-4X0 c-FGets a file into a buffer for editing c-4X0 B Selects a different buffer (prompts; default is the last one) c-4X0 c-BDisplays a menu of available buffers. Lines are mouse-sensitive c-4X0 K Kills a buffer (prompts for which one; default is current one) m-< Moves to the beginning of the current buffer m-> Moves to the end of the current buffer 7Character operations 0 c-4B0 Moves left (Back) a character c-4F0 Moves right (Forward) a character c-4P0 Moves up (Previous) a character c-4N0 Moves down (Next) a character 4RUBOUT0Deletes a character left c-4D0 Deletes a character right c-4T0 Transposes the two characters around point or before point (at end of line); for example, 2ht => th0 7Word operations 0 m-4B0 Moves left (Back) a word m-4F0 Moves right (Forward) a word m-4RUBOUT0 Kills a word left (c-4Y0 yanks it back at point) m-4D0 Kills a word right (c-4Y0 yanks it back at point) m-4T0 Transposes the two words around point; for example, 2if only => only if0 m-4C0 Capitalizes the word following point m-4L0 Lowercases the word following point m-4U0 Uppercases the word following point 7Line operations 0 c-4A0 Moves to the beginning of the line c-4E0 Moves to the end of the line c-4O0 Opens up a line for typing c-4X0 c-OCloses up any blank lines around point CLEAR INPUT Kills from the beginning of the line to point (c-4Y0 yanks it back at point) c-4K0 Kills from point to end of line 7Sentence operations 0 m-4A0 Moves to the beginning of the sentence m-4E0 Moves to the end of the sentence c-X RUBOUT Kills from the beginning of the sentrence to point (c-4Y0 yanks it back at point) m-4K0 Kills from the point to the end of the sentence (c-4Y0 yanks it back at point) 7Paragraph operations 0 m-[ Moves to the beginning of the paragraph m-] Moves to the end of the paragraph m-4Q0 Fills the current paragraph 1n0 c-4X0 FSets the fill column to n; for example, 2c-6 c-5 c-4X0 F0 7Screen operations 0 c-4V0 Shows next screen m-4V0 Shows previous screen c-0 c-4L0Moves the line where point is to line 0 (top) of the screen 7Search and replace 0 c-4S0 1string0Incremental search (searches while you are entering the string). Ter- minate search with 4ESCAPE0. c-4R0 1string0Incremental backward search. Terminate search with 4ESCAPE0. c-% 1string10 4RETURN0 string2 RETURN Replaces string1 with string2 throughout. m-% 1string10 4RETURN0 string2 RETURN Replaces 1string10 with string2 throughout, querying for each occurrence of 1string10. Press 4SPACE0 meaning do it or 4RUBOUT0 meaning skip. 7Region operations 0 c-4SPACE0Sets the mark (for use with Region commands). Use a command that moves point in order to create a region. (It underlines to show the region.) c-4W0 Kills region (c-4Y0 yanks it back at point) m-4W0 Saves a copy of region (c-4Y0 yanks it back at point) 7Window operations 0 c-4X0 2 Splits the screen in two windows (same buffer shown in each) c-4X0 1 Resumes single window (using buffer from top window) c-4X0 O Moves the cursor to other window (all the usual commands apply) c-m-4V0 Displays the next screen in the other window 7Mode operations 0 m-4X0 ada mode Puts the editor into Ada mode. m-4X0 text mode Puts the editor into Text mode. m-4X0 lisp mode Puts the editor into Lisp mode.