/*
 * edit  Version 0.0  18JAN84
 *
 * This the text processing subtree.
 *
 */
/*
 * TNIX Version
 * Keyshell Version Number 1
 */

/*
 * #include files used.
 */

#ifdef _nroff
#include <nroff>
#endif

edit
{
>
>\ked\e - Invokes `ed' the standard TNIX text editor.
>
>\kace\e - Invokes `ace' the optional Advanced Screen Oriented editor.
>
>\kpas lde\e - Invokes `lde' the optional Pascal Language Directed editor.
>
>\kformat\e - Invokes `nroff' the optional text formatter.
>            \mNote: nroff is part of the 8560 Text Processing (Class C) Package.\n
>
>\kdone\e - Cancels the command being built or returns to the top set of keys.
>
msg (^);
f1;ed;  {
	>
	>The name of the file to be edited \umust\n be entered. If the file name exists,
	>its contents will be used; otherwise, it will be created.
	>
	>\klistfiles\e - Lists files in current directory.
	>
	>To \usave\n the results of edit session, type \uw<Return>\n.
	>To \uexit\n from the editor, type \uq<Return>\n.
	>
	cmd(^ed.assist ), msg(^Enter file name to edit: %F), next;
	f1;; hist;
	f2;; hist;
	f3;; hist;
	f4;; hist;
	f5;; hist;
	f6;listfiles; call, msg (^Current directory list.), cmd (^ls), exec, return;
	f7;manual; man (ed);           
	f8;done; msg, break;
	}, {
	msg (^Function keys are now disabled.  Type "q<Return>" to leave the editor.), exec, msg, break;
};

f2;ace;
#ifdef _ace
	{
	>
	>The name of the file to be edited \umust\n be entered. If the file name exists,
	>its contents will be used; otherwise, it will be created.
	>
	>\klistfiles\e - Lists files in current directory.
	>
	cmd (^fs ace.assist ), msg (^Enter file name to edit: %F), next;
	f1;; hist;
	f2;; hist;
	f3;; hist;
	f4;; hist;
	f5;; hist;
	f6;listfiles; call, msg (^Current directory list.), cmd (^ls), exec, return;
	f7;manual; man (ace);
	f8;done; msg, break;
	}, {
	>
	>\kdefault\e - The default is to place the results of the edit session
	>            back into the original file being edited.  Enter another
	>            file name if the original file is to remain unchanged.
	>
	>\klistfiles\e - Lists files in current directory.
	>
	>To \uexit\n from editor, saving results of edit session, use \uex\n command.
	>To \ustop\n without saving edit results, use \us\n command.
	>
	msg (^Enter name of optional output file: %P), next;
	f1;default;par ( );
	f2;; hist;
	f3;; hist;
	f4;; hist;
	f5;; hist;
	f6;listfiles; call, msg (^Current directory list.), cmd (^ls), exec, return;
	f7;manual; man (ace);
	f8;done; msg, break;
	},{
	msg (^Loading ace.), exec, break;
	};
#else
	{
>
>ColorKey+ is not currently setup with keys for 'ace'.
>To add them, run \usetksh\n and build a new custom configuration if 
>the 'ace' text editor is available at your site. 
>
	msg (^Displaying message.), sly (history off), sly (shiftkey 4),
	sly (history on), msg, break;
	};
#endif

f3;pas lde;
#ifdef _paslde
	{
	>
	>The name of the file to be edited \umust\n be entered. If the file name exists,
	>its contents will be used; otherwise, it will be created.
	>
	>\klistfiles\e - Lists files in current directory.
	>
	cmd(^fs lde ), msg(^Enter file name to edit: %F), next;
	f1;; hist;
	f2;; hist;
	f3;; hist;
	f4;; hist;
	f5;; hist;
	f6;listfiles; call, msg (^Current directory list.), cmd (^ls), exec, return;
	f7;manual; man (lde);           
	f8;done; msg, break;
	},{
	msg (^Loading lde.), exec, break;
	};
#else
	{
>
>ColorKey+ is not currently setup with keys for 'lde'.
>To add them, run \usetksh\n and build a new custom configuration if 
>language directed editors are available at your site. 
>
	msg (^Displaying message.), sly (history off), sly (shiftkey 4),
	sly (history on), msg, break;
	};
#endif

f4;format;
#ifdef _nroff
	[nroff];
#else
	{
>
>ColorKey+ is not currently setup with keys for text formatting.
>To add them, run \usetksh\n and build a new custom configuration if 
>text formatting is available at your site. 
>
	msg (^Displaying message.), sly (history off), sly (shiftkey 4),
	sly (history on), msg, break;
	};
#endif

f8;done;msg, break;
}
