File psl-1983/3-1/doc/nmode/nm-metax.ibm artifact 85f2cad20a part of check-in 955d0a90a7


,MOD
- R 44X (11 April 1983) <PSL.NMODE-DOC>NM-METAX.ibm
PLA 97_LAS 80 0_FIR 2_INT 1 6.0_TYP 160 163 162 193_INP 12 101_MAR 2
,END
,PRO
201 OUT 160_202 OUT 163_203 OUT 162_204 OUT 193
205 INP 12 101_206 INP 12 102
,END
,DEFINE
 UNIT SPACE
 FUNCTION
,END

          201/NMODE Manual (Extended (Meta-X) Commands and Functions)        Page 6-1


          202/6.  Extended (Meta-X) Commands and Functions

            201/Not all NMODE commands are of the one or two character variety you have
          seen so far.   Most commands have long invocations composed of English
          words.  This is for two reasons: the long invocations are easier to remember
          and more suggestive, and there are not enough two-character combinations
          for every command to have one.

            The commands with long names are known as 202/extended commands 201/because
          they extend the set of two-character commands.

          202/6.1  Issuing Extended Commands

                  201/M-X            Begin an extended command.  Follow by the command
                                  invocation  only;  the  command  will  ask  for  any
                                  arguments.
                  C-M-X         Same as M-X.

            Extended commands are also called 202/M-X commands201/, because they all start
          with  the  character  Meta-X  (203/m-x-prefix201/).   The M-X is followed by the
          command's long, suggestive invocation.  The invocation is terminated with a
          Return.       For   example,   Meta-X   Auto   Fill   Mode<CR>   invokes
          203/auto-fill-mode-command201/.  This function when executed turns Auto Fill mode on
          or off.

            There are a great many functions in NMODE for you to call.  They will be
          described elsewhere in the manual, according to what they do.  Here we are
          concerned only with extended commands in general.

          202/6.1.1  Typing The Command Name

            201/When you type M-X, the cursor moves down to the echo area at the bottom
          of the screen.  "Extended Command:" is printed there, and when you type
          the command name it echoes there.  This is known as 202/reading a line in the
          echo area201/.  You can use any moving or deleting command (C-A, C-E, C-F,
          C-B , C-D, Backspace, etc.)  to help construct the M-X command.  A C-G
          cancels the whole M-X.   These editing characters apply any time NMODE
          reads a line in the echo area, not just within M-X.

            The string "Extended Command:" which appears in the echo area is called a
          202/prompt201/.  The prompt always tells you what sort of argument is required and
          what it is going to be used for; "Extended Command:" means that you are
          inside of the command M-X, and should type the invocation of a function to
          be called.

          202/6.1.2  Completion

            201/You can abbreviate the name of the command, typing only the beginning of
          the name, as much as is needed to identify the command unambiguously.  You
          can also use completion on the function name.  This means that you type part
          of the command name, and NMODE visibly fills in the rest, or as much as can
          be determined from the part you have typed.
          201/Page 6-2                                          NMODE Manual (Completion)


            You request completion by typing Return.  For example, if you type M-X
          Au<CR>, the "Au" expands to "Auto Fill Mode" because "Auto Fill Mode" is
          the only command invocation that starts with "Au".  If you ask for completion
          when there are several alternatives for the next character, the bell rings and
          nothing else happens.

            Space is another way to request completion, but it completes only one word.
          Successive Spaces complete one word each, until either there are multiple
          possibilities or the end of the name is reached.  If the first word of a
          command is Edit, List, Kill, View or What, it is sufficient to type just the
          first letter and complete it with a Space.  (This does not follow from the
          usual definition of completion, since the single letter is ambiguous; it is a
          special feature added because these words are so common).

          202/6.2  Arcane Information about M-X Commands

            201/You can skip this section if you are not interested in customization, unless
          you want to know what is going on behind the scenes.

            Actually, 203/every 201/command in NMODE simply runs a function.  For example,
          when   you   type   the   command   C-N,   it   runs   the   function
          "203/move-down-extending-command201/".   C-N  can  be  thought of as a sort of
          abbreviation.   We say that the command C-N has been 202/connected 201/to the
          function 203/move-down-extending-command201/.  The name is looked up once when
          the command and function are connected, so that it does not have to be
          looked up again each time the command is used.   The documentation for
          individual NMODE commands usually gives the name of the function which
          really implements the command in parentheses after the command itself.

            Just as any function can be called directly with M-X, so almost any
          function can be connected to a command.  You can use the command M-X Set
          Key (203/set-key-command201/) to do this.  M-X Set Key reads the name of the
          function from the keyboard, then reads the character command (including
          metizers or other prefix characters) directly from the terminal. To define
          C-N, you could type

          M-X Set Key<CR>move-down-extending-command<CR>

          and  then  type  C-N.     If,  for  instance,  you  use  the  function
          203/{auto-fill-mode-command} 201/often, you could connect it to the command C-X Z
          (not normally defined).  You could even connect it to the command C-M-V,
          replacing that command's normal definition.  Set Key is good for redefining
          commands in the middle of editing.  An init file can do it each time you run
          NMODE.  See Section 22.1 [Init], page 1.

REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]