-*-TEXT-*-
This file describes the TMACS library, source in MC:EMACS1;TMACS >
and MC:EMACS1;TMUCS >.  (TMUCS has some less frequently used
functions.  Some users generate TMACS but not TMUCS into their
environments.)

Node: Top,		Next: M-X Commands,		Up: (EMACS)

    TMACS is a library containing EMACS commands of various sorts, which
may be of occasional (or perhaps frequent) interest to the EMACS
community.  This file describes each of the functions in TMACS, starting
here with the ones that are probably of most general interest.  These are
summarized here;  for full details see the next node.

M-X Type Mailing List<mailing list name><cr>
	This command shows you who is on any ITS mailing list.
	It will work from one ITS machine to another -- e.g. if you are on
	AI, you can see MC's TMACS mailing list by doing:
	M-X Type Mailing ListTMACS@MC<cr>


^R Select Buffer
	This function is designed as a replacement for the standard List
	Buffers on C-X C-B.  This version will not only list the buffers,
	but lets you select buffers in a recursive edit level on this list.

M-X Graph Buffer<cr>  or  ^R Buffer Graph
	This function (called either by M-X or put on a key) shows you a
	schematic picture of the buffer in the echo area, e.g.:
	|----B-----==[==--]---Z------------------------------------------|
	     1      2     3      4      5     6      7      8     9
	This shows the region, the window, any narrowing that has occured.

M-X =Abbrev<abbrev><full function name><cr>
	This allows you to create abbreviations for function names that
	you call via M-X.  E.g. to make M-X LLL<cr> be an abbreviation for
	M-X List Loaded Libraries<cr>, just do:
	M-X =AbbrevLLLList Loaded Libraries<cr>
	This works nicely with completion -- if you type M-X LLL you see:
	M-X LLL = List Loaded Libraries giving you confirmation (though
	you could just type M-X LLL<cr> and not bother to see it).

^R Draw Vertical Line
	Draws a vertical line on the screen (but not modifying the
	buffer), allowing you to line up things visually.  Only works on
	ITS machines.

* Menu:

* M-X Commands::	The functions in TMACS generally run by M-X.
* Character Commands::	The functions in TMACS generally put on keys.
* Subroutines::		Subroutines of interest to TECO programmers.
* Mail::		If you wish to get news about TMACS or complain.

Node: M-X Commands,	Next: Character Commands,   Up: Top

Commands in file TMACS:

Type Mailing List
   C	Prints an entry in ITS mailing list file.
	This works on any ITS machine.  (.MAIL.;NAMES > has the ITS mailing
	    lists.)
	For instance, M-X Type Mailing Listbug-random-program<cr> will show
	    you who is on the bug-random-program mailing list on your machine.
	If string argument is of form <name>@<site>, <site>:.MAIL.;NAMES is
	    used.  Only final @ indicates site, so you can do something like:
	    M-X Type Mailing List$BUG-@@AI$
	A numeric ARG limits depth of recursion on EQV-LIST members. (Default
	    depth is 3.)
	<name>@<site> entries in EQV-LIST are not followed.
	Prints "Done." when done, since it sometimes is slow.
	    Giving a pre-comma numeric argument inhibits done-printing, for
	    use as a subroutine.

Graph Buffer
   C	Call ^R Buffer Graph to show schematic of buffer.

=Abbrev
   C	Define or delete M-X abbreviations.
	M-X =Abbrev$IF$Insert File$ will define M-X IF = Insert File$
	    to be M-X Insert File$, evaluated by name each time
	    M-X IF$ is used.  Thus if a new Insert File is created or loaded,
	    that one will be used.  This works nicely with command-completion.
	C-U 0 M-X =Abbrev$IF$ and
	C-U - M-X =Abbrev$IF$ will remove definition for M-X IF$.

Lock File
   C	Lock current buffer's file.
	"Lock" the file in the current buffer by creating FN1 *LOCKED*.
	Will complain if FN1 *LOCKED* already exists, and will tell who has it
	    locked (since FN1 *LOCKED* contains that person's xuname).
	Fails the critical-race test.
	This assumes that others will cooperate and use M-X Lock File$ and the
	    matching M-X Unlock File$.

Unlock File
   C	"Unlock" file in buffer locked by M-X Lock File.

Flush Variables
   C	Kill some variables specified by search string.
	Kill variables whose name contains the string argument.
	String argument actually is a TECO search string, and so you can flush
	    variables containing "foo" OR "bar" by using the string argument
	    "foobar".
	The list to be flushed is typed, asking Y, N, or ^R?
	    N means abort, ^R allows editing of the list.

List unused ^R characters
   C	Unused C-, M-, and C-M- characters.
	If numeric argument then list unused prefix commands.

0
   C	Does nothing, returns nothing...
	...but is good for something:
	If you want to give some Teco commands from the bottom of the screen,
	you can call ^R Extended Command (or any such "Meta-X") and give the
	Teco commands as the "string argument".

UnSAILify
   C	Turn SAIL file into readable form.
	M-X UnSAILify interchanges underscore and backarrow; this is good for
	    mail.
	1 M-X UnSAILify goes further and fixes lossage caused by image FTPing
	    a SAIL file.

Uncontrolify
   C	Turn control chars into uparrowed chars.
	This is good for listing a file with control characters in it on a
	    line printer which would not show control characters well.
	String argument is a string of characters NOT to change.
	TABs are turned into spaces.  CRLF pairs are left alone.

Abort Recursive Edit
   C	Abnormal exit from recursive editing command.
	The recursive edit is exited and the command that invoked
	    it is aborted. 
	For a normal exit, you should use ^R Exit, NOT this command.
	The command can put a string in Abort Resumption Message
	    to tell the user how to resume the command after aborting it.
	If the option variable Less Asking is non-0, it won't
	    print any message or ask for confirmation.

Revert File
   C	Undo changes to a file.
	Reads back the file being edited from disk
	(or the most recent save file, if that isn't the same thing).
	A numeric argument means ignore the Auto Save files.
	A nonzero pre-comma argument waives confirmation.
	If the option variable Less Asking is non-0, it won't ask
	for confirmation either.

Save Trees
   C	Compress a listing with form feeds.
	Replaces some ^L's in buffer by 4 blank lines, in an attempt
	to fill  all  pages.  Page length  is  an  optional  numeric
	argument.

SRMail
   C	Summarize new mail and call RMAIL.
	If there is no new mail, and the variable SRMAIL No New Mail Query
	    Exit is non-0, asks whether to exit or read mail.
	Any string argument is passed to RMAIL.
	Summarizing happens only if there is no string argument, i.e. you're
	    reading your mail in the normal way.

Nowhere Links
   C	Enters recursive ^R on links to nonexistant files
	String argument is directory name (should end with semicolon).


Node: Character Commands,   Next: Subroutines,	Previous: M-X Commands, Up: Top

^R Commands in file TMACS:

^R Select Buffer
   ^R	Display information about all buffers.
	A recursive edit level is entered on a list of all buffers.
	On exit the buffer on the current line is selected.
	Point is initially on line of current buffer and space will exit (like
	    ^R Exit), so this is very much like List Buffers but
	    combines listing with selecting in a way that does not involve
	    much typing or redisplay.  * means modified, - means modified and
	    not auto-saved, . means current buffer, and $ means readonly.
	D will mark buffer for deletion on exit,
	S will mark buffer for saving on exit,
	U will unmark buffer, and
	~ will clear modified flags of buffer.

^R Buffer Graph
   ^R	Show a scale schematic of buffer in echo area.
	(You can also use M-X Graph Buffer<cr>.)
	Draws something like the following in the echo area:
	|----B-----==[==--]---Z------------------------------------------|
	     1      2     3      4      5     6      7      8     9
	The |--...--| indicates the whole buffer, numbers approx tenths.
	=== indicates the region.
	B indicates the virtual buffer beginning.
	Z indicates the virtual buffer end.
	[---] indicates the window.

^R Draw Vertical Line
   ^R	Draws from current hpos, not inserting.
	Line drawn only in current window, and column printed at base of line.
	This only works on ITS machines.
	If any ARG given, is displacement from current hpos.  E.g. -1 means
	    draw line through position one column left.
	If C-U is specified, together with an ARG then ARG is an absolute
	    column.  E.g. M-3 C-U as argument makes line in column 3.  But
	    M-3 as argument makes line in column 3+current_column.

^R Auto Fill Comments
   ^R	Refill the comment and its continuations.
	To handle comment starts (or parts of them) that are repeated, e.g.
	";;; " in Lisp, or perhaps "/*** " in Pl1, it will treat a duplicated
	last character of the comment start or begin as part of the comment
	beginning when merging comment lines.

^R Change Case Letter
   ^R	Next <argument> letters, moving past.
	Numeric argument negative means move left.
	Fast, does not move gap.

^R Get Macro Name
   ^R	Inserts macro name for char typed.
	MARK is set before inserted name.
	Handles bit and char prefixes, e.g. Meta-, ^X, unless:
	Given a numeric argument, gets the name of a prefixer (e.g. metizer).
	Impure-strings that are uncompressed macros are handled if their names
	    are present at the beginning of the macro.
	Some characters run standard builtin functions whose names are found
	    in the BARE library.  These work fine.  Others which are not found
	    just insert their key names, e.g. Meta-O.

^R Argument
   ^R	Put on digits, minus, and comma to get arguments

^R Break Line
   ^R	Fill if too long, even out of Auto Fill mode.
	Cursor may be anywhere within line.
	Line will be broken (space inserted at margin) repeatedly until it
	    fits within the margins.
	Uses ^R Auto-Fill Space.

^R Uppercase Last Word
   ^R	Uppercase word(s) before point.

^R Lowercase Last Word
   ^R	Lowercase word(s) before point.

^R Uppercase Last Initial
   ^R	Capitalize word(s) before point.

^R Really Underline Word
   ^R	Underline words using backspaces.
	Numeric argument is number of words to underline.
	Canonicalizes the underlining if the option Canonicalize Underlines
	    is non-0.  (Multics-style canonicalization.)
	    If 0, it puts _<BS><letter> so that scopes don't show only the _.

^R Remove Word Underline
   ^R	Removes underlining from NUMARG words.

^R Comma-Arg
   ^R	Give pre- and post-comma arguments to a command.
	Numeric argument becomes the pre-comma argument.
	Any digits you type after this become post-comma arguments.  They are
	    terminated by a non-digit, which is the ^R command called.  If
	    there are no post-comma digits typed, there is only a pre-comma
	    argument.
	Example (assuming this is on M-, and meta-digits are autoarguments):
	    Typing the following characters: M-1 2 3 M-, 4 5 6 M-X calls M-X
	    with arguments of 123,456 so you get "123,456 M-X".
	Leaves ..0 set to char after the post-comma argument.

Node: Subroutines,  Next: Mail,	Previous: Character Commands, Up: Top

Subroutines in file TMACS:

^^ TMACS Error Handler
   S	Q..P: handles TECO errors.
	If first character typed is "?" then Backtrace is called.
	A space makes us exit, with no action.
	If option TMACS Error Dispatch is non-0, some other characters may
	    be typed, in any order, ending with a space (no further action) or
	    "?" (enter Backtrace):
	
		B	Display the offending buffer.
		D	Directory Lister is run.
		W	Who caused this? -- type function's name.
	Typing HELP character describes the error handler.
	Quits are not handled at all unless QDebug is nonzero. That is so a
	    quit will cause the buffer and modeline to be restored and
	    redisplayed immediately.
	A QRP error (q-register PDL overflow) will cause
	automatic parital unwinding of the q-register PDL if you
	type anything but Space.  You can thus enter Backtrace etc.

& Set ..D
   S	Create a new ..D with chars in arg as break characters.

& Get 9-Bit Character Name
   S	Inserts pretty name for 9-bit ARG.
	Example:  415. MM & Get 9-Bit$ inserts "Meta-CR".
	An arg of "2," means say "^M" instead of "CR", etc, and ^B instead of
	    an alpha on TV's.

& Kill Prefixed Variable Names
   S	Kill some variables.
	String argument is prefix for variable name.  E.g. doing m(m.m& Kill
	    Prefixed Variable Names)Cache  will kill all variables whose
	    names start with "Cache ".

& Insert Prefixed Variable Names
   S	Insert some variable names.
	String argument is prefix for variable name.  One variable name to a
	    line.
	E.g. m(m.m& Insert Prefixed Variable Names)MM  will insert the names
	    of all variables whose names start with "MM ".
	Also see & Kill Prefixed Variable Names, and & List Prefixed Variable
	    Names.

# RMAIL R
   S	Edit and then send a reply to current message.
	With 1st arg of 1, continues editing an outgoing message.
	With 1st arg of 2, sends a (non-reply) message - different
	    initialization.
	Uses its own buffer, *REPLY*, with Text and Auto Fill modes.
	This must be put into $MM # RMAIL R$ to work.

& Temporarily _<BS> No Break
   S	Set so _ and BS are not breaks.
	Pushes a ..N so definitions for _ and <BS> revert when caller exits.

Node: Mail,   Previous: Subroutines,	Up: Top

    If you wish to be informed of changes to TMACS, asked about various
EMACS ideas being bandied about, or kept up-to-date on news about TMACS
commands, you can place yourself on the TMACS mailing list, which lives on
MIT-MC.

    If you wish to make any suggestions about TMACS, or comments etc., you
can mail them to TMACS@MIT-MC.  People on the TMACS mailing list get both
information and bug-reports.  It is thus a more verbose (though not
terribly so) mailing list than INFO-EMACS.

    The primary maintainers of TMACS are ECC@MIT-AI and EAK@MIT-MC, if you
want to be more selective in your suggestions.
