Annotation of coherent/d/usr/bin/emacs/Read_me, revision 1.1.1.1

1.1       root        1: me/Read_me 10/11/90
                      2: 
                      3: Flexible bindings and emacs programming.
                      4: 
                      5: The new emacs has two tables for keybindings an old table which
                      6: is loaded at compile time and is never changed, and a new table
                      7: which can be modified by the new keybinding commands.
                      8: 
                      9: The following new commands are implemented.
                     10: 
                     11: ctl-x m        Renames the curent macro ctl-x E to a new binding. The
                     12:        current macro must be defned. This function asks for a
                     13:        new binding (such as ESC z or ctl-f) the current macro
                     14:        is renamed to the new binding. Example:
                     15:        ctl-x ( ESC s xyz ctl-u ctl-d ctl-x ) /* define macro */
                     16:        ctl-x m esc l                         /* rename it esc l */
                     17: 
                     18: ctl-x r        Requests an old binding and a new binding. The new
                     19:        binding takes on the meaning of the old binding. If the
                     20:        two bindings are the same the new binding is deleted.
                     21:        Examples:
                     22:        ctl-x r esc l esc l     /* undefine previous example */
                     23:        ctl-x r ctl-x c ctl-z   /* exchange meanings of */
                     24:        ctl-x r ctl-z ctl-x c   /* ctl-z and ctl-x c */
                     25: 
                     26:        Note from the second example the old binding table is
                     27:        never changed so the exchange works.
                     28: 
                     29:        If you connect to Coherent via some utility such as kermit
                     30:        you may find that emacs doesn't understand your arrow keys.
                     31:        Flexible binding can often fix that.
                     32: 
                     33:        ctl-x r ctl-p (up arrow)
                     34:        ctl-x r ctl-n (down arrow)      /* this may kill esc b */
                     35:        ctl-x r ctl-b (left arrow)      /* this may kill esc c */
                     36:        ctl-x r ctl-f (right arrow)     /* this may kill esc d */
                     37: 
                     38: ctl-x s        Requests a file name and saves all flexible bindings to
                     39:        that file. If the current macro is completely defined it
                     40:        is also saved. A special macro called the initialization
                     41:        macro is also saved.
                     42: 
                     43: ctl-x l        Requests a file name and reloads all flexible bindings
                     44:        from it. The initialization macro is loaded but not
                     45:        executed.
                     46: 
                     47: ctl-x x        Rebinds prefix key ctl-x, provides two new prefix keys
                     48:        and rebinds ctl-u. Asks for each prefix key or space.
                     49:        Space leaves existing binding. Then it asks for a new
                     50:        binding for ctl-u.
                     51: 
                     52: -f filename
                     53:        This is an argv parameter. The filename is loaded and
                     54:        after all other listed files are loaded the
                     55:        initialization macro is executed.
                     56: 
                     57: ctl-x i Rebinds the current macro to the initialization macro.
                     58: 
                     59:        Note if you have some edit sequence to execute on a number
                     60:        of files create it, executeing some meaningless binding such as
                     61:        esc Z at the end. Rebind esc Z to ctl-z. Rebind the current
                     62:        macro to the initialization macro. Save the flexabile bindings
                     63:        to some file. Now use the Coherent do loop to run the
                     64:        initilaization macro on all the files you wish changed.
                     65: 
                     66: ctl-u -1 some macro
                     67:        The repeat count of -1 for executing a macro means
                     68:        execute the macro until it fails then return success.
                     69: 
                     70: 
                     71: Emacs programming example. Bulid a macro that finds instances
                     72: of xyz and deletes the next four characters. Use that macro
                     73: on a list of files.
                     74: 
                     75: ctl-x ( esc s xyz [ret] ctl-u ctl-d ctl-x )    /* define the macro */
                     76: ctl-x m esc a                          /* name it esc a */
                     77: ctl-x ( ctl-u -1 [ret] esc a esc z ctl-x )     /* macro with
                     78:                                           meaningless esc z */
                     79: ctl-x i                                        /* make it init mac */
                     80: ctl-x r ctl-z esc z                    /* esc z = ctl-z */
                     81: ctl-x s        myfile.rc                       /* save bindings */
                     82: ctl-z                                  /* exit */
                     83: 
                     84: me -f myfile.rc datafile.x
                     85: 
                     86: Notes:
                     87:        ctl-x m and ctl-x r both check that the new name is
                     88:        not ctl-x r. Changing the binding of ctl-x r would
                     89:        alow the user to paint himself into a corner.
                     90: 
                     91:        Earlier documents gave the argv of -b. There is an
                     92:        emacs -b for backup version. I therefore used -f to
                     93:        designate flex binding files.
                     94: 
                     95:        if -f is not specified emacs checks for a flexable
                     96:        bindings file. On Coherent this is presumed to be
                     97:        at $HOME/.emacs.rc On atari and Ms-Dos $LIBPATH\emacs.rc
                     98: 
                     99:        For a complete list of all the keybindings in emacs.
                    100:        Look at bind.doc which is produced by ext.c during
                    101:        the make process.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.