home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / m / me_cd25.zip / DOC.ZIP / PACKAGE.DOC < prev    next >
Text File  |  1992-11-09  |  37KB  |  861 lines

  1. ========================================================================
  2. ==        ME2 Packages             Craig Durland  10/91 ==
  3. ========================================================================
  4.  
  5. Here is some documentation on some of the packages of Mutt programs I
  6. use.
  7.  
  8.              Copyright 1991 Craig Durland
  9.     Distributed under the terms of the GNU General Public License.
  10.   Distributed "as is", without warranties of any kind, but comments,
  11.            suggestions and bug reports are welcome.
  12.  
  13. ========================================================================
  14. ==            Customizing me2.mut                  ==
  15. ========================================================================
  16.  
  17. Overview:
  18.   When ME2 runs, it tries to load several files:
  19.     osstuff.mco : OS related stuff.
  20.     ./mext.mco  : Directory local ME2 extensions
  21.     myme.mco    : Your personal ME2 extensions.
  22.   (You can change this behavior, see package me2.mut below).
  23.  
  24.  
  25. Package:    me2.mut
  26. How loaded: Compiled into ME2 (with the C compiler).
  27. Description:
  28.   This is (most of) the front end for ME2.  It sets up lots of
  29.     keybindings, autoloading, etc.  When ME2 runs, me2.mut tries to load
  30.     several files:
  31.       osstuff.mco : OS related stuff.
  32.       ./mext.mco  : Directory local ME2 extensions
  33.       myme.mco    : Your personal ME2 extensions.
  34.  
  35.   If you want to change basic ME2, edit this file, and recompile ME2.
  36.  
  37. Package:    myme.mut
  38. How loaded: By me2.mut as part of start up.
  39. Description:
  40.   This is the file that you put your personal extensions to ME2 in.
  41.     This is the stuff you don't want to everybody to have to use.  You
  42.     should put myme.mco in a spot that that is only in your ME2 path
  43.     (such as your home directory).
  44.   A copy of the file I use is in ../mutt/myme.mut.
  45. Functions you might to call:
  46.   command-line-done (bool it-has-been-processed)
  47.     Call this if you have processed the command line.
  48.  
  49. Package:  osstuff.mco
  50. See:  OS Stuff below.
  51.  
  52. Package:    ./mext.mut
  53. How loaded: By me2.mut as part of start up.
  54. Description:
  55.   If this file is the current directory when ME2 starts, me2.mut will
  56.     load it.  Use it to hold stuff you want ME2 to know about only in
  57.     this directory.
  58.   For example, I have a bunch of Mutt code to help me design bicycles.
  59.     I could autoload it but then I would have to type something
  60.     every time I wanted to work on a bicycle.  Since I do all the work in
  61.     the bicycle directory, I just put the code in bicycle/myme.mco and
  62.     when I run ME2, it is loaded automatically.
  63.  
  64. ========================================================================
  65. ==            Mark Rings                      ==
  66. ========================================================================
  67.  
  68. Package:    markring.mut
  69. How loaded: part of me2.mut, turned on for interactive buffers
  70. Description:
  71.   Mark rings provide a way to mark multiple places in a buffer so you
  72.   can jump to them easily.  Note that they can't span buffers.  Up to 4
  73.   marks (easily changeable in markring.mut) are kept, as more are set,
  74.   the ring wraps around and reuses the older marks.
  75. Functions:
  76.   markring-push        M-C-p or F-9
  77.     Push the dot into the end of the ring.
  78.   markring-pop        M-p
  79.     Goto the next mark in the ring.
  80.   markring-delete    Not bound
  81.     Remove the most recently popped mark from the ring.
  82.   markring-init        Not bound
  83.     Use this if a markring was not setup in this buffer (it normally is)
  84.     or you want to remove all marks from the ring and start over.
  85.  
  86. ========================================================================
  87. ==            Mode Support                      ==
  88. ========================================================================
  89.  
  90. Package:    alamode.mut
  91. How loaded: part of me2.mut
  92. Description:
  93.   This is the package that turns on modes.  Here is how it works (in the
  94.     order that things happen):
  95.   - When a interactive buffer is created, if the environment variable
  96.     MEMODE is set, "-mode" is appended to it and a call is made to that
  97.     function.  For example, if MEMODE is set to "mail", every time a
  98.     interactive buffer is created, "mail-mode" is called for that
  99.     buffer.  If the mode doesn't exist, ME2 will complain.
  100.   - If there is no MEMODE variable, the buffer name is looked at.  The
  101.     list of modes is looked at to see if any of the modes fits the name.
  102.     (You can change the list with auto-mode-list (see below).)  Here are
  103.     the default modes:
  104.       Extension        Program Run
  105.       ---------        -------    ---
  106.     .c        c-mode
  107.     .h        c-mode
  108.     .mut        mutt-mode
  109.     .doc        text-mode
  110.     .txt        text-mode
  111.     If the program is not there, ME2 will complain, but you might not
  112.       see it because other things will be written to the command line
  113.       after the error message (like "[Read 10 lines]").  No harm is done
  114.       if the mode is not run.
  115.     If there are no matches, the default-major-mode is run (see below).
  116.   - When a file is read into a interactive buffer, the first line of the
  117.     buffer is looked at.  If it contains text of the form "-*-foo-*-",
  118.     foo-mode is run.
  119. Functions:
  120.   default-major-mode    Not bound
  121.     Set the default major mode.  This is the mode set for a interactive
  122.       buffer when no other mode seems to fit.
  123.     For example:  If you want text mode to be the default:
  124.     (default-major-mode "text").  The "-mode" is appended when the mode
  125.       needs to be run.
  126.     The mode might be changed when the file is read in (see above).
  127.     The default is "none".
  128.   (auto-mode-list (bool append)(string mode-re mode-name ...)
  129.     Append or Prepend to the list of modes.
  130.     Input:
  131.       append:  TRUE if you want your list of modes to be appended (ie
  132.     searched last) to the list of modes.  There are two reasons you
  133.     might want to do this:  If you have not-very-often used mode,
  134.     putting it a the end of the list means a quicker search time for
  135.     the more often used modes.  If you want to override one of the
  136.     defaults, prepend so your new mode will be found first.
  137.       mode-re:
  138.         This is a regular expression that the buffer name is tested with.
  139.       If there is a match, mode-name is run.  For example, if you
  140.       want to test for the extension foo, use '.*\.foo$'.  The
  141.       single quote is important.  This re matches any string that
  142.       ends with the characters ".foo".  Note:  the re is not a
  143.       searching re - it is in place regular expression match.  That
  144.       is why you need the .* at the start.
  145.     Notes:
  146.       The mode-re is used to match the buffer name NOT the file
  147.         name.  Since I do the match at buffer create time, I don't
  148.         have a file name.  If you want to match file names, you will
  149.         need to change the call to set-mode from buffer-created-hook
  150.         to file-read-hook.  I used buffer-created-hook because then
  151.         I can use (switch-to-buffer) and have the mode set without
  152.         reading in a file.
  153.       My Unix mailer uses temp files named "/tmp/Re<digits>".  An re
  154.         to match that is 'Re[0-9]+$'.  Then, whenever mail uses ME
  155.         to edit mail, you can edit with your favorite mail mode.
  156.       mode-name:  The name of the mode you want to run if there is a
  157.         match.  If you want c mode, use "c".  The "-mode" is appended
  158.     when the mode needs to be run.
  159.     Here is the default:
  160.       (auto-mode-list TRUE
  161.     '.*\.c$'    "c"
  162.     '.*\.h$'    "c"
  163.     '.*\.mut$'    "mutt"
  164.     '.*\.doc$'    "text"
  165.     '.*\.txt$'    "text"
  166.       )
  167.     If you want to get rid of mode, prepend it and use none.  For
  168.       example, if you don't like c mode, use
  169.       (auto-mode-list FALSE '.*\.c$' "none"  '.*\.h$' "none") and c-mode
  170.       won't be called.  Of course, you could also just remove cmode.mco
  171.       and achieve the same result.
  172.     If you want to get rid of all modes, use 
  173.       (auto-mode-list FALSE '.' "none").  This will set every buffer to
  174.       none-mode.
  175. Notes:
  176.   While using the mode-re's gives a lot of flexibility, I wonder about
  177.     the speed hit.  Knowing how all this is implemented, it seems like
  178.     all those regular expression tests has got to take a long time.  It
  179.     doesn't seem to on my machine (but its a real fast machine).  Does
  180.     anyone use anything but the extension?  If not, it might make more
  181.     sense to just have a list of (extension, mode) pairs.
  182.   Sigh, I found a good use for the full name.  See my comments about
  183.     mail in mode-re above.
  184.  
  185. ========================================================================
  186. ==            C Mode                          ==
  187. ========================================================================
  188.  
  189. Package:    cmode.mut
  190. How loaded: 
  191.   Autoloaded when a buffer with extension ".c" or ".h" created or when a
  192.   file is read in with "-*-c-*-" in the first line.
  193. Modes:
  194.   Major: C
  195.   Minor: none or comment
  196. Description:
  197.   Electric C mode.  A collection of routines I've found useful when
  198.   editing C code.  It is turned on when ever you edit a .c or .h file.
  199.   Helps with comments, backspacing over tabs, { and a few others.
  200.  
  201.     Electric C mode is designed to help keep your C code formatted "as
  202.   you code".  You don't have to remember anything special - as you type,
  203.   what you type is looked at and may trigger certain actions.  This is a
  204.   minimalist C mode ment to enable you to keep your C code formatted in
  205.   a consistent manner.  The only extensive help is for comments.
  206.  
  207. Characters that trigger formatting:
  208.   Enter (return):  Matches the indent level of the previous line.
  209.   "{": When a "{" is pressed, one of the following will happen:
  210.     - If the space bar is pressed, "{ }" is generated and the cursor is
  211.       put between the braces.
  212.     - If Enter is pressed:
  213.         And the rest of the line is blank, you will get something like:
  214.          if (a) {        or  if (a)
  215.            cursor        {
  216.          }              cursor
  217.                  }
  218.         depending on where the "{" was.  The cursor is indented by
  219.        the amount specified by "indent-level".
  220.       If the rest of the line was not blank, a newline-and-indent is
  221.        done and the text after the { is indented.
  222.         For example:
  223.          if (a) foo(): if a "{ Enter" is done before the foo()
  224.          you will get:
  225.          if (a) {
  226.            foo()
  227.     - Otherwise, a "{" is inserted.
  228.   Backspace:  Behaves like backspacing over spaces even when backspacing
  229.     over tabs.
  230.   Newline (control-J):  Used to give some white space after a variable
  231.     declaration block.  The cursor is left at the same column as the
  232.     start of the declarations.
  233.       int j;    => int j;
  234.             blank line
  235.             cursor
  236.   "/": Comment assistance.
  237.     - If "*" is pressed and the rest of the line is blank and there is
  238.       text to the left of the "/", "/* */" is generated and the cursor
  239.       is put in the middle of the comment.  This is for end of line
  240.       comments like:  if (a) foobar(); /* comment */
  241.     - If "*" is pressed and the entire line is blank, block comment mode
  242.       is entered.  In this mode, your comment will autowrap at the
  243.       comment-wrap-column.  When you hit Enter or autowrap, stars are
  244.       put in the proper place, whitespace is added to match the previous
  245.       comment line.  If you press Enter "/", comment mode will
  246.       terminate.  "*/" or "*" blanks "/" will also terminate comment
  247.       mode.  If you want to get out of comment mode without using the
  248.       above, press M-; or execute "nocomment".
  249.       Examples:
  250.          /*
  251.               * Comment
  252.           *   Indented a bit
  253.           *   Next line follows the indent.
  254.           */
  255.          /*
  256.          ** Another comment style
  257.          */
  258.     - Otherwise, a "/" is inserted.
  259.   Meta-;
  260.     If in block comment mode, turn off comment mode.
  261.     If the cursor is on a line that is part of a block comment, start up
  262.       block comment mode.  This is very handy for adding to an existing
  263.       block comment.
  264.   Meta-J:  Format a C block comment.
  265.     If you munge a block comment and want to set it right, use this.
  266.     This formats all the lines between the dot and mark inclusive.
  267.     Put the region around the comment (or the part of the comment you
  268.       want to format) and press M-j.  The comment is commented in the
  269.       format of comment mode.
  270.     Notes:
  271.       To make sure that line breaks are preserved, insert blank lines at
  272.     the breaks.  The blank lines will be deleted after the comment
  273.     is formatted.
  274.       To change the indent level of the block, indent the first line of
  275.     the region to where you want.
  276.   Control-U Meta-J: Format a C boxed comment.
  277.     Same as format block comment except the comment is boxed:
  278.      /********************************
  279.       *   Comment            *
  280.       ********************************/
  281.     You can convert between boxed and block comments by just reformatting.
  282.  
  283. Constants (in cmode.mut) that can be modified to change formatting style:
  284.   Enter-key-action
  285.     Set this to "newline-and-indent" or "newline".  One of these is
  286.       called when the enter key is presses.
  287.   INDENT-LEVEL
  288.     This is the number of spaces to indent a block ie :
  289.     {
  290.         <block indent>
  291.     }
  292.     Default is 2.
  293.   COMMENT-WRAP-COLUMN
  294.     The column to word wrap at when in comment mode.  The default is 76.
  295.   TAB-SIZE
  296.     How many spaces to use when tab is hit.  The default is 0 which
  297.     means use hard tabs (which look like 8 spaces).
  298.   C-STARS
  299.     The number of stars to use at the left when in comment mode.
  300.     Use " *" if you use this style (1) (the default):
  301.     /*
  302.      *
  303.      */
  304.     Use "**" if you use this style (2):
  305.     /*
  306.     **
  307.     */
  308.   COMET
  309.     Match this with C-STARS:
  310.     Use " */" for style (1) and "*/" for style (2).
  311.  
  312.   BOXED-COMMENT-SPACE
  313.     The number of blank lines before and after text in boxed comment.
  314.     Default is 1.
  315.   BOXED-COMMENT-TRAILING-BLANKS
  316.     Blanks between text and *.  Default is 1.
  317.   BOXED-COMMENT-EDGE-STARS
  318.     You probably want to match this with C-STARS.  Use "*" or "**".
  319.  
  320. System Variables
  321.   tab-size
  322.     This is set to the constant tab-size.  You can change this with
  323.       c-mode-hook.
  324.   word-wrap
  325.     When in comment mode, word-wrap is set to the comment-wrap-column.
  326.       When comment mode ends, it is reset to 0.
  327.  
  328. Buffer Variables
  329.   "comment-offset" (number)
  330.  
  331. Hooks
  332.   c-mode-hook
  333.     This hook is called (if it exists) after c mode has initialized
  334.       itself.  With this hook you can override settings or do those few
  335.       extra things you wished c mode set up.  For example, this is the
  336.       perfect place to set the tab-size to what you think it should be.
  337.     This is a program you add to your code (typically in myme.mut).
  338.     Use this hook if you don't want to modify the constants in
  339.       cmode.mut.
  340.  
  341. Customizing (usually done in c-mode-hook)
  342.   c-mode-etc (int indent-level comment-wrap-column) (string c-stars comet)
  343.     Call this routine to change routine stuff.
  344.     Default (done by c-mode) is 
  345.     (c-mode-etc INDENT-LEVEL COMMENT-WRAP-COLUMN C-STARS COMET)
  346.   c-mode-boxed (int boxed-comment-space boxed-comment-trailing-blanks)
  347.      (string boxed-comment-edge-stars)
  348.     Use this to change the boxed comment style.
  349.     Default (done by c-mode) is 
  350.       (c-mode-boxed BOXED-COMMENT-SPACE BOXED-COMMENT-TRAILING-BLANKS
  351.             BOXED-COMMENT-EDGE-STARS)
  352.  
  353. ========================================================================
  354. ==        More Help For C Programming                  ==
  355. ========================================================================
  356.  
  357. Package:    cstuff.mut
  358. How loaded: Manually
  359. Description:
  360.   A few routines I didn't feel like integrating into C mode.
  361. Functions:
  362.   end-slide        M-`
  363.     Slide all text to the right of the cursor so that the last character
  364.     on the line is in column 78.  You can use C-u<column> to override
  365.     the 78 or just change the constant in cstuff.mut.  This is real
  366.     handy if have a bunch of one line comments that you want to end in
  367.     same column.  For example:
  368.     switch (foo)
  369.     {
  370.       case x:           /* we do this amazing thing when x */
  371.       case y:                 /* and doodah when y */
  372.     Just put the cursor in the white space between before the command
  373.       and press "M-`".
  374.   c-header-with-text    Not bound
  375.     This is used to generate fancy headers that look like:
  376.     /* ********************************************************* */
  377.     /* ********************* Fancy Header ********************** */
  378.     /* ********************************************************* */
  379.     Just answer "Fancy Header" when you are asked for the header text.
  380.  
  381. ========================================================================
  382. ==            Mutt Mode                      ==
  383. ========================================================================
  384.  
  385. Package:    muttmode.mut
  386. How loaded: 
  387.   Autoloaded when a buffer with extension ".mut" created or when a file
  388.   is read with "-*-mutt-*-" in the first line.
  389. Modes:
  390.   Major: Mutt
  391.   Minor: none or comment
  392. Description:
  393.   Electric Mutt mode.  Pretty much the same as C mode but for Mutt code.
  394.   See muttmode.mut for more info.
  395.  
  396. ========================================================================
  397. ==            Directory Stack                      ==
  398. ========================================================================
  399.  
  400. Package:    dir.mut
  401. How loaded: Auto loaded in me2.mut.
  402. Description:
  403.   Directory stack ala c-shell (UNIX only).  The stack size is fixed but
  404.   can be easily changed in dir.mut.
  405. Functions:
  406.   cd        Auto Loaded
  407.     Change the current directory.
  408.   dirs        Not auto loaded
  409.     Show the contents of the directory stack.  The top entry is the
  410.       current directory, next is the directory you left to get to the
  411.       current directory.  Use C-l to clear the stack from the display.
  412.   pwd        Auto Loaded
  413.     Show the current directory.
  414.   pu        Auto Loaded
  415.     Change the current directory, using the stack to save the changes.
  416.     (pu directory) pushes the current directory on the stack and sets
  417.        the current directory to directory.
  418.     (pu "") swaps the top 2 entries on the stack.
  419.     (pu +n) swaps the top of the stack with the nth stack item.  n
  420.        starts at zero.
  421.   po        Not auto loaded
  422.     Discards the top entry on the stack and sets the current directory
  423.      to the new top of stack.
  424.  
  425. ========================================================================
  426. ==            Text Mode                      ==
  427. ========================================================================
  428.  
  429. Package:    textmode.mut
  430. How loaded: 
  431.   Autoloaded when a buffer with extension ".doc" or ".txt" created or
  432.   when a file is read with "-*-text-*-" in the first line.
  433. Modes:
  434.   Major: Text
  435.   Minor: none
  436. Description:
  437.   Text mode.  Help with editing documents, etc.  Does line centering,
  438.   region centering, auto word wrap, format paragraphs, mark paragraphs,
  439.   move the cursor about in a paragraph, etc.
  440. Functions:
  441.   adjust-block            M-j
  442.     Format all lines in a block (lines between dot and mark inclusive).
  443.     Uses sysvar (word-wrap) or constant fill-column as the right margin.
  444.   center-line            M-s
  445.     Center the text in the line that the cursor is on.  With C-U, center
  446.      n lines.  Uses (word-wrap) or (screen-width) as right margin.
  447.   center-region            Not bound
  448.     Center all lines in a block.
  449.   underline-line        Not bound
  450.     Underline a line of text.  All nonspace characters are underlined
  451.     with dashes.
  452.  
  453.   forward-paragraph        M-e
  454.     Attempts to move to the end of a paragraph.
  455.   backward-paragraph        M-a
  456.     Attempts to move to the beginning of a paragraph.
  457.   mark-paragraph        M-h
  458.     Attempts to make the region include the paragraph the cursor is in.
  459.     Put mark at beginning of this paragraph, point at end.  If between
  460.     paragraphs, mark the next one.
  461.   cut-paragraph            Not bound
  462.     Cut to end of paragraph.
  463.   backward-cut-paragraph    Not bound
  464.     Cut back to start of paragraph.
  465.  
  466. Constants that can be set to affect text mode.
  467.   FILL-COLUMN
  468.     This is used to set the right margin in text mode.  Default is 72.
  469.   TAB-SIZE
  470.     How many spaces to use when tab is hit.  The default is 0 which
  471.     means use hard tabs (which look like 8 spaces).
  472.  
  473. System Variables
  474.   tab-size
  475.     This is set to the constant TAB-SIZE.  You can change this with
  476.     text-mode-hook.
  477.   word-wrap
  478.     This is set to the constant FILL-COLUMN.  You can change this with
  479.     text-mode-hook.
  480.  
  481. Hooks
  482.   text-mode-hook
  483.     This hook is called (if it exists) after text mode has initialized
  484.       itself.  With this hook you can override settings or do those few
  485.       extra things you wished text mode set up.  For example, this is
  486.       the perfect place to set the tab-size to what you think it should
  487.       be.
  488.     This is a program you add to your code (typically in myme.mut).
  489.     Use this hook if you don't want to modify the constants in
  490.       textmode.mut.
  491.  
  492. Customizing (usually done in text-mode-hook)
  493.   text-fill-column [int fill-column]
  494.     This is only currently used if word-wrap is 0.  It basically sets
  495.       FILL-COLUMN.
  496.     (text-fill-column) :  returns the current value of FILL-COLUMN.
  497.     (text-fill-column fill-column) : Sets FILL-COLUMN to fill-column.
  498.     Notes:
  499.       You can't call this until text mode is loaded.
  500.       I'm not real sure about the use of this.  Set it if you set
  501.     word-wrap to zero.  I'll need to think some more on how this
  502.     should work.
  503.  
  504. ========================================================================
  505. ==        Search [and Replace] Across Files              ==
  506. ========================================================================
  507.  
  508. Package:    findit.mut
  509. How loaded: Autoloaded in me2.mut
  510. Description:
  511.   Uses grep to search for a string in many files.  Once all the files
  512.     are found, the first file is visited and the string is looked for
  513.     with incremental search.  You can continue the search, edit or do
  514.     anything you want.  Once you are finished, use C-xC-n to visit the
  515.     next file containing the string.
  516.   With arg (C-u), do a search and replace across a bunch of files.  In
  517.     other aspects, acts the same as search.
  518. Functions:
  519.   findit    Not bound
  520.     Search for a string.  Use C-u for search and replace.
  521.   showit    C-xC-n
  522.     Goto the next file containing the string.
  523.  
  524. ========================================================================
  525. ==        Gomoku Game                          ==
  526. ========================================================================
  527.  
  528. Package:    gomoku.mut
  529. How loaded: Manually
  530. Description:
  531.   GNU Emacs Gomoku is a game played between two players (one of which is
  532.     ME) on a rectangular board.  Each player, in turn, marks a free
  533.     square of its choice.  The winner is the first one to mark five
  534.     contiguous squares in any direction (horizontally, vertically or
  535.     diagonally).
  536.   For more info, "use the source, Luke".
  537. Functions:
  538.   gomoku    Not bound
  539.  
  540. ========================================================================
  541. ==        Hide Buffers                          ==
  542. ========================================================================
  543.  
  544. Package:    hidebuf.mut
  545. How loaded: part of me2.mut
  546. Description:
  547.   Implements a "soft" buffer hidden bit.  Buffers can be put aside for a
  548.   little while and restored later.  I use this as a kind of workspace
  549.   manager - when I go off on a tangent, I can hide the files I'm working
  550.   on and when I've finished, unhide the files and pick up where I left
  551.   off.  Hiding files gets them out of the way of your current work.
  552. Functions:
  553.   next-buffer        F-2
  554.     Find the next unhidden buffer and make it the current one.  Next
  555.     means alphabetically.  With this routine, you can just bang on
  556.     function key 2 to move though all the buffers.
  557.   prev-buffer        Not bound
  558.     Find the previous unhidden buffer and make it the current one.
  559.   hide-buffer        M-h
  560.     Hide the current buffer.
  561.   unhide-buffer        Not bound
  562.     Unhide a buffer by name.
  563.   unhide-buffers    Not bound
  564.     Unhide all buffers.
  565.  
  566. ========================================================================
  567. ==            Hook Support                      ==
  568. ========================================================================
  569.  
  570. Package:    hook.mut
  571. How loaded: part of me2.mut.
  572. Description:
  573.   Provides support for the hooks that ME2 calls:  enter-ME-hook,
  574.     leave-ME-hook, process-hook, buffer-created-hook and read-file-hook.
  575.     In addition, it creates two hooks of its own for interactive
  576.     buffers:  Ibuffer-created-hook and Iread-file-hook.
  577.   The interactive hooks are called for buffers that have the Interactive
  578.     bit set.  See buffer-flags in ME2MUTT.DOC of some more info.
  579.   If you program uses a hook, it should register the hook (probably in a
  580.     MAIN routine).  In this way, many programs can share hooks with a
  581.     minimum of fuss.
  582.   I don't support two hooks:
  583.     - modeline-hook : Needs to be handled differently.  See modeline.mut.
  584.     - key-pressed-hook : Slows things down too much.  Your on your own.
  585. Functions:
  586.   (register-hook hook-id name-of-routine-to-call)    Not bound
  587.     Get the hook-id out of me2.h.  name-of-routine-to-call is string.
  588.     Must not be Hidden.
  589.  
  590. ========================================================================
  591. ==        Mail Mode                          ==
  592. ========================================================================
  593.  
  594. Package:    mailmode.mut
  595. How loaded: Auto loaded or via the MEMODE environment variable
  596. Modes:
  597.   Major: Text
  598.   Minor: Mail
  599. Description:
  600.   A minor mode of text-mode.
  601.   A [short] set of programs that make it a bit easier to work with
  602.     electronic mail or Usenet notes.
  603. Functions:
  604.   mail-mode    Not bound
  605.     Turns on mail mode.
  606.     Here are two way to get mail-mode turned on automatically when you
  607.       edit mail:
  608.     set-mode (in alamode.mut) sets this mode if the environment variable
  609.       MEMODE is set to "mail".  In my .profile, I have:
  610.     EDITOR=$HOME/bin/me2
  611.     MAILER=mailx
  612.       In .kshrc:
  613.     alias mail="MEMODE=mail   $MAILER"
  614.       Thus, whenever I type "mail" and get into the editor, I get ME2 in
  615.       mail-mode.
  616.     Another (better) way to do this is to note the name the mailer uses
  617.       for temporary files (the ones it uses to hold the mail you are
  618.       editing).  I use mailx and the form is:  "/tmp/Re<digits>".  So,
  619.       to get mail-mode when editing mail, add
  620.      (auto-mode-list TRUE
  621.        'Re[0-9]+$'  "mail"        ;; mailx:  "/tmp/Re<digits>"
  622.      )
  623.       to your startup file (myme.mut).
  624.   mail-format-quote-region    M-`    (meta backquote)
  625.     Format a region-block (all lines in region) and put a prefix
  626.       (default is "> ") in front of each line.  With arg (C-u), askes
  627.       what to use as a prefix.
  628.     This is very handy when want to reply to something that was sent to
  629.       you.  You can cut out the relevant chunk and have it formatted
  630.       nicely.  If you are replying to several people in the same
  631.       letter, use the arg option - this allows you to prefix everything
  632.       Peter says with something like "Peter> " so that everybody
  633.       receiving your mail will know who said what.  You can change the
  634.       default by changing "quoter" in mailmode.mut.
  635.   mail-quote-region    Not bound
  636.     Put the prefix in front of every line in the region.  No formatting.
  637. Constants:
  638.   quoter : The default string that is used when quoting text.
  639.     Initially "> ".
  640.  
  641. ========================================================================
  642. ==        Read Only Buffers                      ==
  643. ========================================================================
  644.  
  645. Package:    nomunge.mut
  646. How loaded: Autoloaded in me2.mut
  647. Description:
  648.   An attempt at a read only mode for buffers and files.  Its not very
  649.   robust but works OK for people who aren't trying to mess with the
  650.   buffer.  At any rate, they can't write the file out so any buffer
  651.   changes won't change the file.
  652. Functions:
  653.   buffer-nomunge    Not bound  Autoloaded
  654.     Rebind a bunch of keys to make it hard to change buffer contents
  655.     accidentally.
  656.  
  657. ========================================================================
  658. ==        Picture Mode                          ==
  659. ========================================================================
  660.  
  661. Package:    picture.mut
  662. How loaded: Auto loaded in me2.mut
  663. Description:
  664.   GNU Emacs Picture mode.  This mode is used to edit tables, text
  665.     pictures, etc.  Well documented in picture.mut or use the GNU Emacs
  666.     manual.
  667.   I've added a picture function that I find useful:  picture-box.
  668.   Note:  My port is something of a quick hack.  I didn't implement
  669.     rectangle registers (I put everything into the cut buffer).  I don't
  670.     use picture mode all that much and so haven't really beat on it.
  671.     In my limited testing, everything seems to work but I'm sure there
  672.     some things I missed.
  673. Functions:
  674.   edit-picture        Not bound  Autoloaded
  675.   picture-box        Not bound
  676.     Draw a box around the rectangle region.
  677.  
  678. ========================================================================
  679. ==        External Processes                      ==
  680. ========================================================================
  681.  
  682. These two packages use the compute server.  See me2mutt.doc and
  683. comserver.doc for more info on what it does and how to run it.
  684.  
  685. Package:    compile.mut
  686. How loaded: compile and grep are autoloaded in me2.mut
  687. Description:
  688.   Run a compile, grep or just about any output only process (such as
  689.     "ls" or "cc"), collect the output and optionally visit each line in
  690.     each file that is flagged.
  691.   Output is collected as the compile sends it out - you can still edit
  692.     normally.  This a "multiprocessing" compile - many things are going
  693.     on at once.  Note that ME only processes the compile output when
  694.     nothing else is happening - if a Mutt program is running or ME is
  695.     waiting for you (eg waiting for you to answer a question in the
  696.     minibuffer), compile output is queued and will be processed when
  697.     things are quiet again.  The *Compile* window can be removed from
  698.     the screen without affecting things.  DON'T delete the *Compile*
  699.     buffer (until to compile is done and you don't care about the
  700.     output).
  701.   Modeled after grep and compile in GNU Emacs.
  702.   This stuff only works on machines running unix (at least until
  703.     somebody ports the compute server to other OSes).
  704.   The compute server must be running.  It is what actually runs the
  705.     compiles - ME just processes the output.  See create-process in
  706.     ME2MUTT.DOC for how to run the compute server.
  707. Functions:
  708.   compile        Not bound    Autoloaded
  709.     Run a command, in a shell and put the output in the *Compile*
  710.       buffer.  You can run things like make, "cc -o foo foo.c", ls or
  711.       just about anything that is output only (can't send input to the
  712.       remote processes).  Since the command is run in a shell (sh), you
  713.       can use things like $HOME, *.c, etc.
  714.     Use compile-next-error to step through the errors.
  715.   grep            Not bound    Autoloaded
  716.     Run grep, collect the output and use compile-next-error to step
  717.       through the matches.
  718.   stop-compile        Not bound
  719.     Stop the process running in the *Compile* buffer.
  720.   compile-next-error    C-x`  (control-X backquote)
  721.     Looks in the *Compile* buffer, makes a list of errors (or grep
  722.       matches), visits the file(s) with the error(s) and puts the cursor
  723.       at the bogus line.  Each time you press C-X`, the cursor moves to
  724.       the next error.  You can edit as much as you like at each error.
  725.       You can start using C-X` before the compile is done (it is
  726.       possible for the error list to get out of sync if you change a
  727.       file before the compiler is done with it but that should be a
  728.       minor problem).
  729.     Knows how to parse the output of:  mc2, grep, HP-UX 8.0 cc, Apollo
  730.       cc and hopefully other compilers.  I tried to match what GNU Emacs
  731.       does but working with regular expressions can be a real pain in
  732.       the butt so there might be some bugs in here.  Apollo cc is a real
  733.       pain.
  734.     Doesn't know about ld:  If you have loader errors, you won't see
  735.       them if you remove the *Compile* window or shrink it so you can't
  736.       read all of it.  I usually just look at the *Compile* buffer to
  737.       make sure all went as expected.
  738. Hooks
  739.   process-hook is used to capture the output of the compile or grep.
  740.  
  741.  
  742. Package:    shell.mut
  743. How loaded: Manually
  744. Description:
  745.   Attempts to make it easy to run output only programs in a buffer.
  746.   Its a quick hack but might be interesting.
  747. Functions:
  748.   shell-shock        Not bound
  749. Hooks
  750.   process-hook is used to capture the output of the command.
  751.  
  752. ========================================================================
  753. ==        Tags                              ==
  754. ========================================================================
  755.  
  756. Package:    tags.mut
  757. How loaded: manually
  758. Description:
  759.   Tags are a small database for C functions.  Have you ever edited some
  760.     C code and come across a function and say to yourself "I wonder
  761.     where this function is?", well, tags can help answer that for you.
  762.   Tags uses the Unix ctags command.
  763.   To start things, create the tags database:
  764.     In the current directory: "ctags -xtw files.[ch] >Tags"
  765.     In a subtree: "find . -name '*.[ch]' -print | xargs ctags -xtw >Tags"
  766.     Keep the tags file in the directory it is created in.
  767.   When the tags code is loaded, it will ask you what directory the tags
  768.     file is in.  If you are not going to be changing directories, you
  769.     can use ".".  If you might, give the full path name for the
  770.     directory (file name completion is on).  Remember to only give the
  771.     directory name.
  772. Functions:
  773.   goto-tag        M-.
  774.     Look up a keyword in the tags data base, visit the file it is
  775.       defined in and put the dot at the start of the routine.
  776.     If just hit return when asked for the tag, the word after the dot is
  777.       used.  This is nice for things like:
  778.         foobar(fred,sam);
  779.     ^ dot
  780.       Hit M-. <enter> and you will in the file that foobar is defined
  781.       in.
  782.   select-tag-file    Not bound
  783.     Load the tags database.  See above.  If you want to change to a new
  784.     database, just run this again.
  785.   where-is-tag        Not bound
  786.     Shows the file that the tag is defined in.  As in goto-tag but just
  787.     tells you the file instead of editing it.
  788.  
  789. ========================================================================
  790. ==        OS Stuff                          ==
  791. ========================================================================
  792.  
  793. Package:    unix.mut
  794. How loaded: 
  795.   Compiled and then unix.mco is renamed to osstuff.mco.  osstuff.mco is
  796.   loaded by me2.mut.
  797. Description:
  798.   osstuff is a file that is loaded so you have a place to put all your
  799.   OS specific code.  When you use ME on a variety of machines, this is
  800.   very handy.
  801. Functions (unix.mut):
  802.   chmod        Not bound
  803.     Runs change mode on the file connected to the current buffer.  Real
  804.     handy when you check out a file, read it in, edit it and when you
  805.     try to save you find out it is read-only.  ick.  Just run chmod and
  806.     enter "a+w" and then save it.
  807.   Some stuff to try and figure out the terminal type.
  808.  
  809. ========================================================================
  810. ==        VT100 Type Terminals                      ==
  811. ========================================================================
  812.  
  813. Package:    xterm.mut
  814. How loaded:
  815.   In unix.mut.  The environment variable "TERM" is looked at to try and
  816.   figure out if this file should be loaded.
  817. Description:
  818.   Some terminals support function keys, arrow keys, etc.  This file adds
  819.     some support for xterm, vt100 and ansi style terminals.
  820.   Decodes arrow keys and function keys (those keys that send out "Escape
  821.     [ ...").
  822.  
  823. ========================================================================
  824. ==        HP Terminal Support                      ==
  825. ========================================================================
  826.  
  827. Package:    hpterm.mut
  828. How loaded: 
  829.   In unix.mut.  The environment variable "TERM" is looked at to try and
  830.   figure out if this file should be loaded.
  831. Description:
  832.   Try and sent up a HP terminal so ME can understand it when you press a
  833.   function or arrow key.  HP terminals make life difficult for Emacs
  834.   because the function keys send out text that is the same as other
  835.   Emacs commands.  It can be very hard to tell if you pressed down arrow
  836.   or M-b (which do two very different things).
  837.  
  838.   In order for this stuff to work, you must be using a version of ME
  839.   that knows about HP terminals.  You can turn this on in config.h.
  840.  
  841. ========================================================================
  842. ==        Window Scrolling                      ==
  843. ========================================================================
  844.  
  845. Package:    wscroll.mut
  846. How loaded: manually
  847. Description:
  848.   Some routines to move the current window right or left.
  849. Functions:
  850.  scroll-right        C-x<
  851.  scroll-left        C-x>
  852.    Manually scroll the current window horizontally.
  853.    Trys to keep the cursor on screen to prevent the update routines from
  854.      undoing the scroll.
  855.  cursor-is-right    Not bound
  856.  cursor-is-left        Not bound
  857.    Shift the window so that the cursor is at the right or left margin
  858.      (if possible).
  859.  center-screen-around-cursor-horizontally    Not bound
  860.    Try and put the cursor in the middle of the screen.
  861.