\input imbasic.tex \def\chapnum{0} \setcount0 0 \def\draftflg{F} \rm{} \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{1}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}THE TEDIT TEXT EDITOR \rm{}\penalty 2000 \penalty 2000 \mark{THE TEDIT TEXT EDITOR} \penalty 2000 \vskip10pt \penalty 2000 TEdit is a window-based, modeless text editor, capable of handling fonts and some rudimentary formatting. Text is selected with the mouse, and all editor operations act on the current selection. There are two ways to start TEdit: With an explicit call to the function \lisp{}TEDIT\rm{}, or from the background menu. At top level, you can call \lisp{}{\nofill{}(TEDIT \arg{}TEXT\lisp{} \arg{}WINDOW\lisp{})\par}\rm{} where \arg{}TEXT\rm{} is the thing you want to edit, and \arg{}WINDOW\rm{} is an optional argument specifying the window you want to do the editing in. To start a fresh editing window, specify a \arg{}TEXT\rm{} of \lisp{}NIL\rm{}. Otherwise, \arg{}TEXT\rm{} may be the name of an existing file, a string to be edited, or an arbitrary [\lisp{}MKSTRING\rm{}-able] Lisp object. The text is displayed in an editing window, and may be edited there (see below). There will be a one-line-high prompting window across the top of the editing window; it is used to ask for file names, search strings, and the like. The \lisp{}TEdit\rm{} option in the background menu opens an empty editing window; you may either type in the text you want, or use the \lisp{}Put\rm{} menu option (below) to bring in a file. \vskip10pt \bf{}\noindent\save0\hbox{1.1}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}Selecting Text \rm{}\penalty 2000 \penalty 2000 \mark{Selecting Text} \penalty 2000 \vskip10pt \penalty 2000 TEdit works by operating on {\lquotes}selected{\rquotes} pieces of text. Selected text is highlighted in some way, and may have a caret flashing at one end. Insertions go where the caret is; deletion and other operations are applied to the currently selected text. Text is selected using the mouse. There are two regions within an edit window: The area containing text, and a {\lquotes}line bar{\rquotes} just inside the left edge of the window. While the mouse is inside the text region, the cursor is the normal up-and-left pointing arrow. When the cursor moves into the line bar, it changes to an up-and-right pointing arrow. Which region the mouse is in determines what kind of selection happens: The \lisp{}LEFT\rm{} mouse button always selects the smallest things. In the text region, it selects the character you're pointing at; in the line bar, it selects the single line you're pointing at. The \lisp{}MIDDLE\rm{} mouse button selects larger things. In the text region, it selects the word the cursor is over, and in the line bar it selects the paragraph the cursor is next to. The \lisp{}RIGHT\rm{} button always extends a selection. The current selection is extended to include the character{\char'57}word{\char'57}line{\char'57}paragraph you are now pointing at. For example, if the existing selection was a whole-word selection, the extended selection will also consist of whole words. There are special ways of selecting text which carry an implicit command with them: If you hold the \lisp{}CTRL\rm{} key down while selecting text, the text will be shown white-on-black. When you release the \lisp{}CTRL\rm{} key, the selected text will be deleted. You can abort a \lisp{}CTRL\rm{}-selection: Hold down a mouse button, and release the \lisp{}CTRL\rm{} key. Then release the mouse button. Holding the \lisp{}SHIFT\rm{} key down while making a selection causes it to be a {\lquotes}copy-source{\rquotes} selection. A copy source is marked with a dashed underline. Whatever is selected as a copy source when the \lisp{}SHIFT\rm{} key is released will be copied to where the caret is. This even works to copy text from one edit window to another. You can abort a copy: Hold down a mouse button, and release the \lisp{}SHIFT\rm{} key. Then release the mouse button. Holding the \lisp{}CTRL\rm{} and \lisp{}SHIFT\rm{} keys down while making a selection causes it to be a {\lquotes}move{\rquotes} selection, which is marked by making it veverse video. Whatever is selected as a {\lquotes}move{\rquotes} source when the \lisp{}CTRL\rm{} and \lisp{}SHIFT\rm{} keys are released will be moved to where the caret is. This even works to move text from one edit window to another. You can abort a move: Hold down a mouse button, and release the \lisp{}CTRL\rm{} and \lisp{}SHIFT\rm{} keys. Then release the mouse button. If the variable \lisp{}TEDIT.EXTEND.PENDING.DELETE\rm{} is non-\lisp{}NIL\rm{}, extending a selection will display the selection as white-on-black. The next time something is typed (or if text is copied or moved there), the inverted text will be deleted first. This provides an easy way of replacing text. \vskip10pt \bf{}\noindent\save0\hbox{1.2}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}Editing Operations \rm{}\penalty 2000 \penalty 2000 \mark{Editing Operations} \penalty 2000 \vskip10pt \penalty 2000 Inserting text: Except for command characters, whatever is typed on the keyboard gets inserted where the caret is. The \lisp{}BS\rm{} key and control-A both act as a backspace, deleting the character just before the caret. Control-W is the backspace-word command. Deleting Text: Hitting the \lisp{}DEL\rm{} key causes the currently-selected text to be deleted. Alternatively, you can use the \lisp{}CTRL\rm{}-selection method described above. Copying Text: Use \lisp{}SHIFT\rm{}-selection, as described above. Moving Text: Use \lisp{}CTRL\rm{}-\lisp{}SHIFT\rm{}-selection. Undoing an edit operation: The top blank key is the \lisp{}Undo\rm{} key (the \lisp{}KEYBOARD\rm{} key on the 1108). It will undo the most recent edit command. \lisp{}Undo\rm{} is itself undo-able, so you can never back up more than a single command. Redoing an edit operation: The \lisp{}ESC\rm{} key is the \lisp{}Redo\rm{} key (the forward-arrow key on the 1108). It will redo the most recent edit command on the current selection. For example, if you insert some text, then select elsewhere, hitting \lisp{}ESC\rm{} will insert a copy of the text in the new place also. If the last command was a delete, \lisp{}Redo\rm{} will delete the currently-selected text; if it was a font change, the same change will be applied to the current selection. The command menu: You can get command menus by moving into the edit window's title region and hitting the \lisp{}RIGHT\rm{} or \lisp{}MIDDLE\rm{} mouse buttons. \lisp{}RIGHT\rm{} gets the usual menu of window commands. \lisp{}MIDDLE\rm{} gets a menu of editor commands: \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Put\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Causes an updated version of the file to be written. Tedit will ask you for a file name, offering the existing name (if any) as the default. When the file name is offered, you may type {\char'136}E to abort the operation. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Get\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Lets you read in a new file to edit, \sl{}without saving the one you were working on.\rm{} You'll be asked for a file name in the prompt window. Instead of a file name, you may type {\char'136}E to abort the operation. \parshape 1 0 pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Include\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Lets you copy the contents of a file into the edit window, inserting it where the caret is. Tedit will ask you for a file name in its prompt window. Instead of a file name, you may type {\char'136}E to abort the operation. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Quit\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Causes the editor to stop without updating the file you're editing. If you haven't saved your changes, you'll be asked to confirm this. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Find\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Asks for a search string, then hunts from the caret toward the end of document for a match. Selects the first match found; if there is none, nothing happens. The search is case-sensitive; i.e. {\lquotes}Foo{\rquotes} will not be found with the search string {\lquotes}FOO{\rquotes}. If you need to include special characters (e.g. CR) in the search string, quote them with \lisp{}{\char'136}V\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92 pt 370pt {}\save0\hbox{\lisp{}Substitute\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Asks for a search string and a replacement string. Within the current selection, all instances of the search string are replaced by the replacement string. If you wish, TEdit will ask you to confirm each replacement before actually doing it. If you need to include special characters (e.g. CR) in the search or replacement strings, quote them with \lisp{}{\char'136}V\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Looks\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Changes the character looks of the selected characters: The font, character size, and face (bold, italic, etc.). Three menus will pop up in sequence: One to select the font name, one to select the face, and one to select the size. You may select an option in each menu. If, for example, you want to leave the character size alone, just click the mouse outside the size menu. In general, any aspect of the character looks that you don't change will remain the same. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Hardcopy\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Prints the document to your default press or InterPress printer, with 1 inch margins all around. The variable \lisp{}DEFAULTPRINTINGHOST\rm{} controls which kind of printer TEdit will send to. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Press File\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Creates a Press or InterPress file of the document, with 1 inch margins all around. The file format is also controlled by \lisp{}DEFAULTPRINTINGHOST\rm{}. \parshape 1 0 pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Expanded Menu\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Opens a large menu that has three parts: A TEdit operations section, a character-looks menu, and a paragraph looks (\sl{}i.e.,\rm{} formatting) menu. This expanded menu has fill-in blanks for some fields (like what the \lisp{}Find\rm{} command should hunt for), and has on-off-neutral buttons to control character properties like boldness. This is described below. \parshape 1 0pt 462pt {} \vskip10pt \bf{}\noindent\save0\hbox{1.3}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}Tedit Expanded Menu \rm{}\penalty 2000 \penalty 2000 \mark{Tedit Expanded Menu} \penalty 2000 \vskip10pt \penalty 2000 Selecting the item {\lquotes}Expanded menu{\rquotes} from TEdit's title-bar menu creates a small free-form menu on top of your editing window. The expanded menu contains selectable menu buttons and places for you to type text (e.g., what to search for when you do a FIND). From the main expanded menu, you can open three other sub-menus for more specialized operations: Setting character looks, setting paragraph formatting, and laying out pages for hardcopy. \vskip10pt \bf{}\noindent\save0\hbox{1.3.1}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}Using TEdit-style Menus \rm{}\penalty 2000 \penalty 2000 \mark{Using TEdit-style Menus} \penalty 2000 \vskip10pt \penalty 2000 The expanded menu is itself a TEdit window, so the usual editing operations work--with one change. Some parts of the menu can't be selected or operated on; they're protected. The places you can select are: menu buttons, the margin ruler (see below), and between pairs of curly braces, so: {\char'173}{\char'175}. Menu buttons appear in bold; every menu button which needs to ask for text has a pair of {\char'173}{\char'175} associated with it, e.g., the line \lisp{}{\nofill{}Quit Hardcopy \rm{}server:\lisp{} {\char'173}{\char'175} \rm{}copies:\lisp{} {\char'173}{\char'175}\par}\rm{} has two buttons on it. The {\lquotes}\lisp{}Quit\rm{}{\rquotes} button needs no further arguments, while the {\lquotes}\lisp{}Hardcopy\rm{}{\rquotes} button can take two arguments: the name of the server to print to and the number of copies to print. When a button requires arguments, you need to fill them in before hitting the button. To get rid of an expanded menu, just close it using the right mouse button command menu. \vskip10pt \bf{}\noindent\save0\hbox{1.3.2}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}TEdit The Main Expanded Menu \rm{}\penalty 2000 \penalty 2000 \mark{TEdit The Main Expanded Menu} \penalty 2000 \vskip10pt \penalty 2000 The TEdit operation menu looks like this: \lisp{}{\nofill{}Quit ParaLooks CharLooks PageLayout All Get {\char'173}{\char'175} Put {\char'173}{\char'175} Include {\char'173}{\char'175} Find {\char'173}{\char'175} Substitute {\char'173}{\char'175} \rm{}for\lisp{} {\char'173}{\char'175} Hardcopy \rm{}server:\lisp{} {\char'173}{\char'175} \rm{}copies:\lisp{} {\char'173}{\char'175}\par}\rm{} The \lisp{}Get\rm{}, \lisp{}Put\rm{}, \lisp{}Include\rm{}, and \lisp{}Find\rm{} buttons all require a text argument, which must be typed in before you hit the corresponding menu button. \lisp{}Substitute\rm{} requires two arguments, the second being the search string, and the first being the replacement. The \lisp{}Hardcopy\rm{} button takes two optional text arguments. If you specify a server name, the hardcopy will be sent there. If you leave the brackets empty, TEdit uses \lisp{}DEFAULTPRINTINGHOST\rm{} as usual. You may also specify how many copies of the document you want; if you don't put anything in the {\lquotes}copies{\rquotes} field, you get one copy. The \lisp{}Quit\rm{}, \lisp{}ParaLooks\rm{}, \lisp{}CharLooks\rm{}, \lisp{}PageLayout\rm{}, and \lisp{}All\rm{} buttons need no additional arguments. \lisp{}Quit\rm{} stops the current editing session; \lisp{}All\rm{} causes the entire document to be selected. This is useful for making global substitutions or changes to character looks. The three menu buttons \lisp{}ParaLooks\rm{}, \lisp{}CharLooks\rm{}, and \lisp{}PageLayout\rm{} give you access to the three specialized menus. \vskip10pt \bf{}\noindent\save0\hbox{1.3.3}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}TEdit The Character Looks Menu \rm{}\penalty 2000 \penalty 2000 \mark{TEdit The Character Looks Menu} \penalty 2000 \vskip10pt \penalty 2000 The Character Looks Menu looks like this: \lisp{}{\nofill{}Character Looks Menu: APPLY SHOW \rm{}Props:\lisp{} Bold Italic Underline StrikeThru Overbar TimesRoman Helvetica Gacha Modern Classic Terminal Other \rm{}other font:\lisp{} {\char'173}{\char'175} \rm{}Size:\lisp{} {\char'173}{\char'175} Normal Superscript Subscript \rm{}distance:\lisp{} {\char'173}{\char'175}\par}\rm{} Generally speaking, you select the text you want to change, set the entries in this menu up as you want the text to appear, then make the change by hitting the \lisp{}APPLY\rm{} button. If you have a piece of text whose looks you want to copy, select the text and hit the \lisp{}SHOW\rm{} button. The menu will be filled in to match that text's looks. You can then \lisp{}APPLY\rm{} it elsewhere, perhaps after modifying things slightly. The second line of the menu is a list of character properties which can be modified independently. Each of the menu buttons has three states: If the button appears white-on-black, that property will be turned on; If the button appears with a diagonal line, that property will be turned off; If the button appears black-on-white, that property will be left alone. Why is it useful to leave a property alone? Suppose you have a paragraph in Times Roman with some bold and some italic in it. If you want to change the font to Helvetica without changing the boldness or italicness, you can do so. The third line of the menu is a list of font-family names. You can select among them: selecting one family deselects any others. You can also select no family by mouse buttoning between two of the families. If you \lisp{}APPLY\rm{} with no font family selected, the text will be left in whatever font family it was. The \lisp{}Other\rm{} choice in the font-family selection lets you add new fonts to the menu. To pick a family that isn't offered in the menu, first type the name between the brackets after (rm other font Then pick \lisp{}Other\rm{} as the font family. Then next time you \lisp{}APPLY\rm{} the menu, the new font family will be applied to the text you've selected, and the family name will be added to the menu. The last line of the menu lets you set the font's size, and specify any superscripting or subscripting. Fill in the {\lquotes}Size:{\rquotes} field with a number, and \lisp{}APPLY\rm{}ing will change all the selected characters to that size. Leave it empty, and the characters will retain their existing sizes. For character offsets, you have three choices: Normal characters lie on the baseline; Superscript characters lie above the baseline by the distance you specify (2 points by default); Subscript characters lie below the baseline by the distance you specify (2 points by default). As with font family names, you may mouse in the space between options to neutralize the choice. \lisp{}APPLY\rm{}ing with a neutral choice leaves characters with the super- and subscripting they had, if any. \vskip10pt \bf{}\noindent\save0\hbox{1.4}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}The TEdit Paragraph Formatting Menu \rm{}\penalty 2000 \penalty 2000 \mark{The TEdit Paragraph Formatting Menu} \penalty 2000 \vskip10pt \penalty 2000 The Paragraph Looks Menu looks like this: \lisp{}{\nofill{}Paragraph Looks Menu: APPLY SHOW Left Right Centered Justified Page Heading \rm{}type: \lisp{} {\char'173}{\char'175} \rm{}Line leading:\lisp{} {\char'173}{\char'175} \rm{}Paragraph leading:\lisp{} {\char'173}{\char'175} \rm{}New Page: \lisp{} Before After \rm{}Tab Type:\lisp{} Left Right Centered Decimal \rm{}Default Tab Size:\lisp{} {\char'173}{\char'175}\par}\rm{} Below this menu is a solid black rectangle, used for setting indentations, and a ruler, used for setting tab stops. As with the Character Looks Menu, you select the text you want to change, set the entries in this menu up as you want the text to appear, then make the change by hitting the \lisp{}APPLY\rm{} button. If you have a paragraph whose looks you want to copy, select the text and hit the \lisp{}SHOW\rm{} button. The menu will be filled in to match that text's looks. You can then \lisp{}APPLY\rm{} it elsewhere, perhaps after modifying things slightly. The second line of the menu is for specifying how the paragraph margins are to be justified. A Left justified paragraph has a ragged right margin, but is justified flush with the left margin. A Right justified paragraph has a ragged left margin, but is justified flush on the right. A Centered paragraph is centered between the two margins. A Justified paragraph is set flush with both the left and right margins. On that line, you may also declare this paragraph to be a page heading (see the Page Layout Menu section), and say what kind of heading it is. The \lisp{}Page Heading\rm{} button is an On-Off-Neutral button; depending on its setting, it will make the paragraph be a page heading, make it stop being a page heading, or leave it alone. The space between lines in a paragraph is called {\lquotes}line leading{\rquotes}. You can specify it, in units of printer's points. You can also leave space in front of a paragraph (without using extra carriage returns) by specifying {\lquotes}paragraph leading,{\rquotes} also in units of printer's points. You may ask that a new page (or column, if you're using multiple columns to the page) be started either before or after this paragraph. These are controlled by the \lisp{}Before\rm{} and \lisp{}After\rm{} buttons, respectively. These are also 3-state buttons, and can be used to set and reset the new-page property or leave it alone. Generally, You set paragraph margins using the margin ruler on the bottom. There are three margin values: The left margin for the paragraph's first line, the left margin for the rest of the paragraph, and the paragraph's right margin. The margin ruler is has three sensitive areas, one for each margin value. Margins are measured in printer's picas (6 to the inch), with a grain of 1{\char'57}2 pica. There are 12 points to the pica. Plans exist for allowing different units (and granularity) in the ruler. The first-line left margin is controlled by the top half of the ruler, left end. To move it, push a mouse button near the left edge, and hold it. Moving the mouse pulls the margin along with it; the margin ruler always shows the current values of the margins. If you push the \lisp{}RIGHT\rm{} mouse button over the margin, it becomes neutral; i.e., \lisp{}APPLY\rm{}ing the paragraph menu won't change the first-line left margins of any paragraphs. The rest-of-paragraph left margin is controlled by the bottom half of the ruler, left end. You move it (and neutralize it) the same way. Likewise for the right margin, which is controlled by the right end of the margin ruler. There are a couple of differences here. First, you can set the right margin to 0, which will create a {\lquotes}floating{\rquotes} right margin (one that follows the right edge of the edit window or of the printed page). This is signalled by a margin ruler that is as wide as the window, but shows a value of 0 at its right end. Since the editing window may be narrower than the document, you can also set the right margin beyond the edge of the window, by pulling it with the mouse, and pulling past the window edge. A right margin you can't see is represented by a double wavy line at the right edge. To make a margin {\lquotes}neutral{\rquotes}, so that \lisp{}APPLY\rm{}ing it won't change that margin setting, move the margin with the right mouse button. The margin will become gray, to indicate that it is neutralized. You can also set tab stops using the margin ruler. The space below the ruler markings is sensitive to all three mouse buttons, and is used to represent tab stops. To set a tab, you first need to choose what kind of tab you want, using the line starting with {\lquotes}Tab Type:.{\rquotes} Make your choice of tab type the same way you'd choose a font family. Left tabs are regular typewriter type tabs; Right tabs take the succeeding text and push it so it is flush-right against the tab stop location; Centered tabs cause the succeeding text to be centered about the tab stop; Decimal tabs (not implemented) cause the succeeding text to have its decimal point lined up on the tab stop. Tab stops are shown in the margin ruler as small arrows with suggestive tails. To create a new tab stop, use the middle mouse button. In the region below the ruler markings (and the numbers!), point to where you want the tab to be, and press the middle mouse button. The tab should appear; as long as you hold the button down, the tab will follow the mouse around, so you can adjust its location. To move a tab stop, point at it and press the left mouse button. As long as you hold it down, the tab stop will follow the mouse. To delete a tab stop, point at it and press the right mouse button. \vskip10pt \bf{}\noindent\save0\hbox{1.5}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}The TEdit Page Layout Menu \rm{}\penalty 2000 \penalty 2000 \mark{The TEdit Page Layout Menu} \penalty 2000 \vskip10pt \penalty 2000 The Paragraph Looks Menu looks like this: \lisp{}{\nofill{}APPLY SHOW \rm{}For page:\lisp{} First(&Default) Other Left Other Right \rm{}Page numbers:\lisp{} No Yes X: {\char'173}{\char'175} y: {\char'173}{\char'175} \rm{}Alignment:\lisp{} Left Centered Right \rm{}Margins:\lisp{} \rm{}Left:\lisp{} {\char'173}{\char'175} \rm{}Right:\lisp{} {\char'173}{\char'175}\rm{}Top:\lisp{} {\char'173}{\char'175} \rm{}Bottom:\lisp{} {\char'173}{\char'175} \rm{}Columns:\lisp{} {\char'173}{\char'175} \rm{}Col width:\lisp{} {\char'173}{\char'175} \rm{}Space between cols:\lisp{} {\char'173}{\char'175} Page Headings: Heading Type: {\char'173}{\char'175} X: {\char'173}{\char'175} Y: {\char'173}{\char'175} Heading Type: {\char'173}{\char'175} X: {\char'173}{\char'175} Y: {\char'173}{\char'175} Heading Type: {\char'173}{\char'175} X: {\char'173}{\char'175} Y: {\char'173}{\char'175} Heading Type: {\char'173}{\char'175} X: {\char'173}{\char'175} Y: {\char'173}{\char'175} Character Looks for Page Numbers \sl{}[just like character looks menu from here on]\lisp{} \par}\rm{} There are three kinds of pages in a document: The first page, all other left-hand (even, or verso) pages, and all other right-hand (odd, or recto) pages. For each class of page, you may specify separate layout and headings. Specify which class of page you are setting up on the second line of the menu, by choosing one of the options \lisp{}First(&Default)\rm{}, \lisp{}Other Left\rm{} or \lisp{}Other Right\rm{}. If you want the entire document laid out uniformly, you need only set up (and APPLY) parameters for the first page. If you want to modify an existing page layout, choose the page class you want to modify and hit the \lisp{}SHOW\rm{} button. The menu will be filled in from the existing layout specifications. When you have the menu set up as you want the layout to be, hit the \lisp{}APPLY\rm{} button, and your specifications will be saved as part of the document. There will be no noticible change in the document---page layout only happens when a document is hardcopied. SETTING UP PAGE NUMBERS: A given class of pages may or may not have page numbers. Set this by choosing one of the buttons \lisp{}Yes\rm{} or \lisp{}No\rm{} on the {\lquotes}Page Numbers{\rquotes} line. If you decide to have page numbers, you must specify where you want them. The \lisp{}X\rm{} and \lisp{}Y\rm{} fill-in blanks let you do this. Specify the page number's location as distances from the lower, left corner of the paper; the distances are measured in picas (6 to the inch). Next, you must specify how to align the page number with the location you specified. If you specify \lisp{}Left\rm{} alignment, the left edge of the page number will print at the location you gave; \lisp{}Centered\rm{} alignment centers the page number at the spot you specified; \lisp{}Right\rm{} alignment puts the right edgge of the page number at the location you specified. Suppose you want to have page numbers lined up against the page's margin, toward the outside edge of each page. Then you would specify \lisp{}Right\rm{} alignment for recto pages and \lisp{}Left\rm{} alignment for verso pages. SETTING UP PAGE HEADINGS: You may have up to four kinds of page headings{\char'57}footings on any page. (This limit will be relaxed in the future). For each type, specify a name (which must be a \lisp{}LITATOM\rm{}), and a location for the left end of the topmost line of text in the heading. Within text, headings appear as separate paragraphs. Use the {\lquotes}Paragraph Looks{\rquotes} menu to declare that a paragraph is to be a page heading. You will have to fill in the {\lquotes}heading type{\rquotes} field with the same name you used in the {\lquotes}Heading Type{\rquotes} field in this menu. SETTING CHARACTER LOOKS FOR PAGE NUMBERS: The page layout menu has a special section for setting the character looks used to print page numbers. Set the looks just as you would set regular character looks; the settings you give will take effect when you \lisp{}APPLY\rm{} the page layout menu. \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{2}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}TEDIT FUNCTIONAL INTERFACE \rm{}\penalty 2000 \penalty 2000 \mark{TEDIT FUNCTIONAL INTERFACE} \penalty 2000 \vskip10pt \penalty 2000 The top-level entry to TEdit is: \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT \arg{}TEXT WINDOW DONTSPAWN PROPS\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent \arg{}TEXT\rm{} may be a (litatom) file name, an open \lisp{}STREAM\rm{}, a string, or an arbitrary [\lisp{}MKSTRING\rm{}-able] Lisp object. The text is displayed in an editing window, and may be edited there. If \arg{}TEXT\rm{} is other than a file name, a \lisp{}STREAM\rm{}, or a string, \lisp{}TEDIT\rm{} will call \lisp{}MKSTRING\rm{} on it, and let you edit the result. If \arg{}WINDOW\rm{} is \lisp{}NIL\rm{}, you will be prompted to create a window. If \arg{}WINDOW\rm{} is non-\lisp{}NIL\rm{}, \lisp{}TEDIT\rm{} will use it as the window to edit in. If \arg{}WINDOW\rm{} has a title, \lisp{}TEDIT\rm{} will preserve it; otherwise, \lisp{}TEDIT\rm{} will provide a descriptive title for the window. \lisp{}TEDIT\rm{} will normally spawn a new process to run the edit, so you can edit in parallel with other work; indeed, it is possible to have several editing windows active on the screen. You can have the editing done in your process---and have TEdit return the result of the edit---by calling \lisp{}TEDIT\rm{} with \arg{}DONTSPAWN\rm{} set to \lisp{}T\rm{}. \arg{}PROPS\rm{} is a prop-list-like collection of properties which control the editing session. The following options are possible: \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}FONT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The default character looks (font, size, etc.) to be used in the edit window. This can be a \lisp{}FONTDESCRIPTOR\rm{}, or a property list of character looks properties such as \lisp{}TEDIT.LOOKS\rm{} would accept, or a \lisp{}CHARLOOKS\rm{} data structure describing the character looks. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}QUITFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A function (or list of functions) to call when the user \lisp{}Quit\rm{}s. If any of the functions is \lisp{}T\rm{} or returns \lisp{}T\rm{}, the user will not be asked to confirm the \lisp{}Quit\rm{}---even if he'll potentially lose something. If any of the functions returns \lisp{}DON'T\rm{}, the \lisp{}Quit\rm{} is aborted before the user is asked for confirmation. \parshape 1 92 pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}LOOPFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A function to be called each time thru the character-read loop. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}CHARFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A function to be called for each character typed in. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}SELFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A function to be called each time a mouse selection is made in this edit window. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166 pt 296pt {}\save0\hbox{\lisp{}TERMTABLE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}If you want characters displayed other than TEdit's default way, set this to a Terminal table with the correct settings. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}READTABLE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}If you want command characters which are local to this edit session, set this to a Read table with the appropriate settings. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}BOUNDTABLE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}If you want word breaks to happen other than the default way, set this to a Read table with the appropriate settings. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}READONLY\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}If the value of this property is non-\lisp{}NIL\rm{}, then the edit window will be read-only, i.e., you can only shift-select in it. \parshape 1 92 pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}CACHE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}If the value of this property is non-\lisp{}NIL\rm{}, then the file being edited will be cached locally instead of being read as needed from the remote server. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}SEL\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}Tells what text should be selected initially. This can be a \lisp{}SELECTION\rm{} (see below) describing the selected text, or a character number, or a two-element list of first character number and number of characters to select. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}MENU\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}Describes the menu to be displayed when the \lisp{}MIDDLE\rm{} mouse button is pressed in the edit window's title region. If it is a \lisp{}MENU\rm{}, that menu will appear. If it is a list of menu items, a new menu will be constructed. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166 pt 296pt {}\save0\hbox{\lisp{}AFTERQUITFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A function to be called \sl{}after\rm{} TEdit has quit. This can be used for cleanup of side-effects by TEdit client programs. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}TITLEMENUFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A function to get called instead of bringing up the usual TEdit command menu when the user \lisp{}LEFT\rm{}- or \lisp{}MIDDLE\rm{}-buttons in the edit window's title region. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}PARALOOKS\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The default paragraph looks to be used for paragraphs in this document. This can be either a \lisp{}FMTSPEC\rm{} data structure, or a property list of paragraph formatting information such as \lisp{}TEDIT.PARALOOKS\rm{} would accept. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}CARETLOOKSFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A function that is called whenever new caret looks are being set. \parshape 1 92 pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}LEAVETTY\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}If this is non-\lisp{}NIL\rm{}, TEdit will not take control of the keyboard when it is started. Instead, it will wait until you first button in the editing window with the mouse. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}PROMPTWINDOW\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A window that is to be used for unscheduled user interactions, in place of the prompting window that TEdit usually provides. If this is the atom \lisp{}DON'T\rm{}, no window will be provided, and the main prompt window will be used. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}OVERFLOWFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}FILL THIS IN. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166 pt 296pt {}\save0\hbox{\lisp{}CLEARGET\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}FILL THIS IN. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}CLEARPUT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}FILL THIS IN. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}NOEXTENT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}FILL THIS IN. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}NOTITLE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}FILL THIS IN. \parshape 1 92 pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}PROMTPWINDOWHEIGHT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}in lines. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}TTYWINDOW\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}No reason to use this. It's the window used to back the TEdit process's TTYDISPLAYSTREAM. Normally, TEdit makes a closed window that serves the purpose, which is as a path for copy-selected items to get to the edit window. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}SLOWUPDATE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}Forces TEdit to bypass optimizations in its screen update. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166 pt 296pt {}\save0\hbox{\lisp{}INTERRUPTS\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A list of Lisp interrupts, in the same form as \lisp{}TEDIT.INTERRUPTS\rm{} which will be enabled while this TEdit is running. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}PUTFN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}Called both before and after the TEdit PUT command is performed, with arguments \arg{}TextStream\rm{} \arg{}FullFileNmae\rm{} and one of the atoms \lisp{}BEFORE\rm{} or \lisp{}AFTER\rm{}. When called before the PUT, this function may return the atom \lisp{}DON'T\rm{}, which aborts the PUT process. Generally, this function is present for TEdit client systems to perform their own cleanup. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}REGION\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}Specifies a sub-region of the window in which TEdit is to operate. BEWARE: If this is used, the client system must control scrolling, mouse interaction, and a variety of other things. This facility is not fully debugged. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}TEDIT.TENTATIVE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}If this is non-\lisp{}NIL\rm{}, TEdit will keep track of text which is {\lquotes}new{\rquotes} during the session, and will record that fact as part of the file at PUT time. This is present for the use of the EDITMARKS package. \parshape 1 92 pt 370pt {} Any \arg{}PROPS\rm{} specified will be appended to the front of whatever is the value of \lisp{}TEDIT.DEFAULT.PROPS\rm{}; respecified properties will override anything in the defaults. This provides client applications with a way to set default edit properties. \parshape 1 0pt 462pt {} \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{3}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}TEDIT FUNCTIONAL INTERFACE \rm{}\penalty 2000 \penalty 2000 \mark{TEDIT FUNCTIONAL INTERFACE} \penalty 2000 \vskip10pt \penalty 2000 The {\lquotes}Text Stream{\rquotes} Data Structure TEdit keeps a \lisp{}STREAM\rm{} which describes the current state of the text you're editing. You can use most of the usual stream operations on that stream: \lisp{}BIN\rm{}, \lisp{}SETFILEPTR\rm{}, \lisp{}GETFILEPTR\rm{}, and \lisp{}GETEOFPTR\rm{} do the usual things. \lisp{}BOUT\rm{} inserts a character in the stream just in front of the next character you'd read if you \lisp{}BIN\rm{}ned. You can get the stream by calling \lisp{}(TEXTSTREAM \arg{}EditWindow\lisp{})\rm{}. If you need to save the state of an edit, you can save this stream. Calling \lisp{}TEDIT\rm{} with the stream as the \arg{}TEXT\rm{} argument will let you continue from where you left off. There is a datatype called \lisp{}TEXTSTREAM\rm{} which defines several fields that are of interest within the stream: \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}TEXTOBJ\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The \lisp{}TEXTOBJ\rm{} which describes the edit session. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}PIECE\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The \lisp{}PIECE\rm{} which describes the text at the file pointer. \parshape 1 0pt 462pt {} The {\lquotes}Text Object{\rquotes} Data Structure TEdit keeps a variety of other information about each edit window, in a data structure called a \lisp{}TEXTOBJ\rm{}. Field \lisp{}TEXTOBJ\rm{} of a text \lisp{}STREAM\rm{} points to the associated \lisp{}TEXTOBJ\rm{}, which contains these fields of interest: \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}{\char'134}WINDOW\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The edit window which contains the text. If this is \lisp{}NIL\rm{}, there is no edit window for this text. \parshape 1 0 pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}SEL\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The most recent selection made in this text. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}SCRATCHSEL\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}A scratch \lisp{}SELECTION\rm{}, used by the mouse handler for the edit window, but otherwise available for scratch use. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}TEXTLEN\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The current length of the edited text. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92 pt 370pt {}\save0\hbox{\lisp{}STREAMHINT\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Points to the text \lisp{}STREAM\rm{} which describes the text. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}EDITFINISHEDFLG\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}If this is non-\lisp{}NIL\rm{}, TEdit will halt after the next time through the keyboard polling loop. No check will be made for unsaved changes. Unless it is \lisp{}T\rm{}, the value of \lisp{}EDITFINISHEDFLG\rm{} will be returned as the result of TEdit. \parshape 1 0pt 462pt {} The {\lquotes}Selection{\rquotes} Data Structure The selected text is described by an object of type \lisp{}SELECTION\rm{}, whose fields are as follows: \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}CH{\char'43}\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The character number of the first character in the selection. The first character in the text being edited is numbered 1. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}CHLIM\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The character number of the last character in the selection. Must be {$\char'425$} \lisp{}CH{\char'43}\rm{}. \parshape 1 0 pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}DCH\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The number of characters in the selection. If \lisp{}DCH\rm{} is zero, then no characters are selected, and the Selection can be used only to describe a place to insert text. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}ONFLG\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Tells whether the Selection is indicated in the edit window. If \lisp{}T\rm{}, it is; if \lisp{}NIL\rm{}, it's not. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}{\char'134}TEXTOBJ\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The \lisp{}TEXTOBJ\rm{} that describes the selected text. You can use this to get to the Stream itself. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92 pt 370pt {}\save0\hbox{\lisp{}X0\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The X position (edit-window-relative) of the left edge of the first selected character. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}Y0\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The Y position of the bottom of the first selected character (not the character's base line, the bottom of its descent). \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}XLIM\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The X position of the right edge of the last character selected. If \lisp{}DCH\rm{} is zero (a {\lquotes}point{\rquotes} selection), \lisp{}XLIM\rm{}=\lisp{}X0\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}YLIM\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The bottom of the last character in the selection. \parshape 1 0 pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}DX\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The width of the selection. If \lisp{}DCH\rm{} is zero, this will be also. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}SELOBJ\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}This is for a future object-oriented editing interface. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}POINT\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Tells which side of the selection the caret should appear on. It will be one of the atoms \lisp{}LEFT\rm{} and \lisp{}RIGHT\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92 pt 370pt {}\save0\hbox{\lisp{}SET\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}\lisp{}T\rm{} if this selection is currently valid, \lisp{}NIL\rm{} if it is obsolete or has never been set. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}SELKIND\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}What kind of selection this is. One of the atoms \lisp{}CHAR\rm{}, \lisp{}WORD\rm{}, \lisp{}LINE\rm{}, or \lisp{}PARA\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}HOW\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}A \lisp{}TEXTURE\rm{}, which will be used to highlight the selecton. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}HOWHEIGHT\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}How high the highlighting is to extend. A selection's highlight starts at the bottom of the lowest descender, and extends upward for \lisp{}HOWHEIGHT\rm{} pixels. To always get highlighting a full line tall, set this to 16384. \parshape 1 0 pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}HASCARET\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}\lisp{}T\rm{} if this selection should have a caret flashing next to it, \lisp{}NIL\rm{} otherwise. \parshape 1 0pt 462pt {} \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{4}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}TEDIT INTERFACE FUNCTIONS \rm{}\penalty 2000 \penalty 2000 \mark{TEDIT INTERFACE FUNCTIONS} \penalty 2000 \vskip10pt \penalty 2000 TEdit exports the following functions for use in custom interfaces: \vskip 10pt \formatdef{462pt}{\lisp{}(OPENTEXTSTREAM \arg{}TEXT WINDOW START END PROPS\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Creates a text \lisp{}STREAM\rm{} describing \arg{}TEXT\rm{}, and returns it. If \arg{}WINDOW\rm{} is specified, the text will be displayed there, and any changes to the text will be reflected there as they happen. You will also be able to scroll the window and select things there as usual. \arg{}TEXT\rm{} may be an existing \lisp{}TEXTOBJ\rm{} or text \lisp{}STREAM\rm{}. If \arg{}START\rm{} and \arg{}END\rm{} are given, then only the section of \arg{}TEXT\rm{} delimited is edited (if that portion of the file looks itself like a TEdit-structured file, then TEdit will honor the font, paragraph, and IMAGEOBJ information. Otherwise, it will be treated as a plain-text file). \arg{}PROPS\rm{} is the same as for \lisp{}TEDIT\rm{}. Given the \lisp{}STREAM\rm{}, you can use a number of functions to change the text in an edit window, under program control. The edit window gets updated as the text is changed. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.SETSEL \arg{}STREAM CH{$\char'561$}orSEL LEN POINT PENDINGDEL? LEAVECARETLOOKS\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Sets the selection in \arg{}STREAM\rm{}. If \arg{}CH{$\char'561$}orSEL\rm{} is a \lisp{}SELECTION\rm{}, it is used as-is. Otherwise, \arg{}CH{$\char'561$}orSEL\rm{} is the first character in the selection, and \arg{}LEN\rm{} is the number of characters to select (zero is allowed, and gives just an insertion point). \arg{}POINT\rm{} tells which side of the selection the caret should come on. It must be one of the atoms \lisp{}LEFT\rm{} or \lisp{}RIGHT\rm{}. If \arg{}PENDINGDEL?\rm{} is non-\lisp{}NIL\rm{}, the selection will be a pending-delete selection--the selected text will be deleted at the next type-in (or if text is copied or moved there). Otherwise, the selection will be a normal selection. Normally, the act of making a selection sets the {\lquotes}caret{\rquotes} looks--the looks for any characters typed at the caret. This can be suppressed by passing in a non-\lisp{}NIL\rm{} \arg{}LEAVECARETLOOKS\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.GETSEL \arg{}STREAM\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92 pt 370pt {} \noindent Returns the \lisp{}SELECTION\rm{} which describes the current selection in the edit window described by \arg{}STREAM\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.SHOWSEL \arg{}STREAM ONFLG SEL\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Lets you turn the highlighting of the selection \arg{}SEL\rm{} on and off. If \arg{}ONFLG\rm{} is \lisp{}T\rm{}, the selection \arg{}SEL\rm{} in \arg{}STREAM\rm{} will be highlit in the edit window; if \lisp{}NIL\rm{}, any highlighting will be turned off. If \arg{}SEL\rm{} is \lisp{}NIL\rm{}, it defaults to the current selection in \arg{}STREAM\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.SEL.AS.STRING \arg{}STREAM SEL\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Returns the currently-selected text as a string. If \arg{}SEL\rm{} is non-\lisp{}NIL\rm{}, the text it describes will be returned. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(COERCETEXTOBJ \arg{}STREAM TYPE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Converts a text stream, \lisp{}TEXTOBJ\rm{}, or edit window into another form, specified by \arg{}TYPE\rm{}. The possible values for \arg{}TYPE\rm{} are: \vskip 10pt \vskip-10pt \parshape 1 166 pt 296pt {}\save0\hbox{\lisp{}STRINGP\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}COERCETEXTOBJ will return a string (with any formatting and font information stripped out). \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}FILE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}COERCETEXTOBJ will return a file containing the document's text (complete with formatting and font information). \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}STREAM\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}COERCETEXTOBJ will return a stream from which you may BIN or otherwise read the document \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}SPLIT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}COERCETEXTOBJ will return list of two files. The first contains the text for the document, and the second contains the formatting information. If these files are concatenated, they make a complete, legal TEdit file. \parshape 1 92 pt 370pt {} \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.INSERT \arg{}STREAM TEXT CH{$\char'561$}orSEL LOOKS DONTSCROLL\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Inserts the string \arg{}TEXT\rm{} into \arg{}STREAM\rm{}, as though it had been typed in. \arg{}CH{$\char'561$}orSEL\rm{} tells where to insert the text: If it's \lisp{}NIL\rm{}, the text goes in where the caret is. If it's a \lisp{}FIXP\rm{}, the text is inserted in front of the corresponding character (The first character in the stream is numbered 1). If it's a \lisp{}SELECTION\rm{}, the text is inserted accordingly. If the \arg{}LOOKS\rm{} argument is provided, it must be a font descriptor. The inserted text will appear in that font. Normally, TEdit scrolls the editing window so that each change is visible as it is made. If you want the window left where it is instead, the \arg{}DONTSCROLL\rm{} argument should be non-\lisp{}NIL\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.DELETE \arg{}STREAM CH{$\char'561$}orSEL LEN\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Deletes text from \arg{}STREAM\rm{}. If \arg{}CH{$\char'561$}orSEL\rm{} is a \lisp{}SELECTION\rm{}, the text it describes will be deleted; if \arg{}CH{$\char'561$}orSEL\rm{} is a \lisp{}FIXP\rm{}, it is the character number of the first character to delete. In that case, \arg{}LEN\rm{} must also be present; it is the number of characters to be deleted. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.INCLUDE \arg{}TEXTOBJ FILE START END\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Performs the TEdit {\lquotes}Include{\rquotes} command, inserting the text from file \arg{}FILE\rm{} into \arg{}TEXTOBJ\rm{}. If \arg{}START\rm{} and \arg{}END\rm{} are supplied, only the specified portion of the file is included. \parshape 1 0 pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.PUT \arg{}STREAM FILE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Performs the TEdit {\lquotes}Put{\rquotes} command, saving the text from \arg{}TEXTOBJ\rm{} onto the file \arg{}FILE\rm{}. If \arg{}FILE\rm{} is not supplied, the user will be asked for a file name. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.FIND \arg{}STREAM TEXT START{$\char'561$} END{$\char'561$} WILDCARDS?\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Searches for the next occurence of \arg{}TEXT\rm{} inside \arg{}STREAM\rm{}. If \arg{}START{$\char'561$}\rm{} is present, the search starts there; otherwise, the search starts from the caret. If \arg{}END{$\char'561$}\rm{} is present, the search will end at that character; otherwise, it ends at the end of the text. If a match is found, \lisp{}TEDIT.FIND\rm{} returns the character number of the first character in the matching text. If no match is found, it returns \lisp{}NIL\rm{}. If \arg{}WILDCARDS?\rm{} is non-\lisp{}NIL\rm{}, the search pattern can contain wildcard characters: {\lquotes}{\char'43}{\rquotes} matches any single character, {\lquotes}*{\rquotes} matches any sequence of characters, and {\lquotes}'{\rquotes} can be used to quote one of the wildcards. When wildcards are enabled, \lisp{}TEDIT.FIND\rm{} returns a list consisting of the character numbers of the first and last characters in the matching text. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.HARDCOPY \arg{}STREAM FILE DONTSEND BREAKPAGETITLE SERVER PRINTOPTIONS\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Sends the text contained in \arg{}STREAM\rm{} to the printer. If a file name is given in \arg{}FILE\rm{}, the press file will be left there for you to use. If \arg{}DONTSEND\rm{} is non-\lisp{}NIL\rm{}, the file will not be sent to the printer; use this if you only want to create a press file for later use. If \arg{}BREAKPAGETITLE\rm{} is non-\lisp{}NIL\rm{}, it is used as the title on the {\lquotes}break page{\rquotes} printed before the text. You can specify the print server where the hardcopy is to be sent, using the \arg{}SERVER\rm{} argument; if it is \lisp{}NIL\rm{}, TEdit uses \lisp{}DEFAULTPRINTINGHOST\rm{}. You may also specify printing options (number of copies, whether to print on both sides of the paper, etc.) using \arg{}PRINTOPTIONS\rm{}. It is a {\lquotes}property list{\rquotes} in the form accepted by \lisp{}SEND.FILE.TO.PRINTER\rm{} (see page X.XX). \arg{}FILE\rm{} may aslo be an open image stream of type PRESS or INTERPRESS. If so, the hardcopy output wil lbe appended to the already-open stream, and the stream will be left open when TEdit is finished. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.LOOKS \arg{}STREAM NEWLOOKS SELORCH{$\char'561$} LEN\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92 pt 370pt {} \noindent Changes the character looks of selected characters, e.g., the font, character size, etc. \arg{}SELORCH{$\char'561$}\rm{} can be a \lisp{}SELECTION\rm{}, an integer, or \lisp{}NIL\rm{}. If \arg{}SELORCH{$\char'561$}\rm{} is a \lisp{}SELECTION\rm{}, the text it describes will be changed; if it is a \lisp{}FIXP\rm{}, it is the character number of the first character to changed. In that case, \arg{}LEN\rm{} must also be present; it is the number of characters to be changed. A \arg{}SELORCH{$\char'561$}\rm{} of \lisp{}NIL\rm{} will use the current selection. \arg{}NEWLOOKS\rm{} is a property-list-like description of the changes to be made. The property names tell what to change, and the property values describe the change. Any property which isn't changed explicitly retains its old value. Thus, it is possible to make a piece of text all bold without changing the fonts the text is in. The possible list entries are as follows: \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}FAMILY\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The name of the font family. All the selected text is changed to be in that font. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}FACE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The face for the new font. This may be in either of the two forms acceptable to \lisp{}FONTCREATE\rm{}: a list such as \lisp{}(BOLD ITALIC REGULAR)\rm{}, or an atom such as \lisp{}MRR\rm{}. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}WEIGHT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The new weight for the font. This must be one of \lisp{}LIGHT\rm{}, \lisp{}MEDIUM\rm{}, or \lisp{}BOLD\rm{}. Specifying this \sl{}disables\rm{} the \lisp{}FACE\rm{} parameter. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166 pt 296pt {}\save0\hbox{\lisp{}SLOPE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The new slope for the font. This must be one of \lisp{}REGULAR\rm{} or \lisp{}ITALIC\rm{}. Specifying this \sl{}disables\rm{} the \lisp{}FACE\rm{} parameter. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}EXPANSION\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The new weight for the font. This must be one of \lisp{}CONDENSED\rm{}, \lisp{}REGULAR\rm{}, or \lisp{}EXPANDED\rm{}. Specifying this \sl{}disables\rm{} the \lisp{}FACE\rm{} parameter. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}SIZE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The new point size. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}UNDERLINE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The value for this property must be one of the atoms \lisp{}ON\rm{} or \lisp{}OFF\rm{}. The text will be underscored or not, accordingly. \parshape 1 92 pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}OVERLINE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The value for this property must be one of the atoms \lisp{}ON\rm{} or \lisp{}OFF\rm{}. The text will be overscored or not, accordingly. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}STRIKEOUT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The value for this property must be one of the atoms \lisp{}ON\rm{} or \lisp{}OFF\rm{}. The text will be struck through with a single line or not, accordingly. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}SUPERSCRIPT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A distance, in points. The text will be raised above the normal baseline by that amount. This is mutually exclusive with \lisp{}SUBSCRIPT\rm{}. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166 pt 296pt {}\save0\hbox{\lisp{}SUBSCRIPT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}A distance, in points. The text will be raised above the normal baseline by that amount. This is mutually exclusive with \lisp{}SUPERSCRIPT\rm{}. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}PROTECTED\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The value for this property must be one of the atoms \lisp{}ON\rm{} or \lisp{}OFF\rm{}. If it is \lisp{}ON\rm{}, the text will be protected from mouse selection and from deletion. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}SELECTPOINT\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The value for this property must be one of the atoms \lisp{}ON\rm{} or \lisp{}OFF\rm{}. If a character has this property, the user can make a point selection just after it, even if the character is also \lisp{}PROTECTED\rm{}. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}INVISIBLE\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The value for this property must be one of the atoms \lisp{}ON\rm{} or \lisp{}OFF\rm{}. If a character has this property, the character will not appear on the screen or on hardcopy. \parshape 1 92 pt 370pt {} \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.GET.LOOKS \arg{}STREAM SELORCH{$\char'561$}\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Returns a P-list describing the character looks of the specified character(s). This P-list is suitable for passing to \lisp{}TEDIT.LOOKS\rm{}. \arg{}SELORCH{$\char'561$}\rm{} can be a \lisp{}SELECTION\rm{}, an integer, or \lisp{}NIL\rm{}. If \arg{}SELORCH{$\char'561$}\rm{} is a \lisp{}SELECTION\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.PARALOOKS \arg{}STREAM NEWLOOKS SELORCH{$\char'561$} LEN\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Changes the paragraph looks of selected paragraphs, e.g., the margins, line leading, etc. \arg{}SELORCH{$\char'561$}\rm{} can be a \lisp{}SELECTION\rm{}, an integer, or \lisp{}NIL\rm{}. If \arg{}SELORCH{$\char'561$}\rm{} is a \lisp{}SELECTION\rm{}, the text it describes will be changed; if it is a \lisp{}FIXP\rm{}, it is the character number of the first character to changed. In that case, \arg{}LEN\rm{} must also be present; it is the number of characters to be changed. A \arg{}SELORCH{$\char'561$}\rm{} of \lisp{}NIL\rm{} will use the current selection. In all cases, \lisp{}TEDIT.PARALOOKS\rm{} operates on \sl{}whole paragraphs\rm{}. If any portion of a paragraph is included in the selection, the entire paragraph's looks will be changed. \arg{}NEWLOOKS\rm{} is a property-list-like description of the changes to be made. The property names tell what to change, and the property values describe the change. Any property which isn't changed explicitly retains its old value. Thus, it is possible to make a paragraph indented without changing its tab stops. The possible list entries are as follows: \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}QUAD\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}One of \lisp{}LEFT\rm{} (for flush-left, ragged-right), \lisp{}CENTERED\rm{} (for centered lines), \lisp{}RIGHT\rm{} (for flush-right, ragged-left), or \lisp{}JUSTIFIED\rm{} (for flush-left and -right). \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166 pt 296pt {}\save0\hbox{\lisp{}1STLEFTMARGIN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The left margin for the first line of the paragraph, in points. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}LEFTMARGIN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The left margin for the rest of the paragraph, in points. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}RIGHTMARGIN\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The right margin for all lines of the paragraph, in points. If this value is 0, one gets a {\lquotes}floating{\rquotes} right margin, which adjusts to the width of the edit window or paper. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}TABS\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}This is a \lisp{}CONS\rm{} pair, whose \lisp{}CAR\rm{} is a relative tab width and whose \lisp{}CDR\rm{} is a list of absolute tab stops. A tab advances the cursor to the next absolute tab stop to the right of the current position. Should there be no absolute tab stop to the right of the cursor, the cursor is advanced by the relative tab width. The relative tab width defaults to .5 inches (= 36 pts). Each absolute tab stop is a \lisp{}CONS\rm{} pair with the car being the position, and the \lisp{}CDR\rm{} being one of \lisp{}LEFT\rm{}, \lisp{}RIGHT\rm{} or \lisp{}CENTER\rm{}. This value indicates how the word following the tab will be justified with respect to the tab. For instance, \lisp{}LEFT\rm{} indicates that the left edge of the word following the tab will be at the tab position indicated in the \lisp{}CAR\rm{}. For a \lisp{}RIGHT\rm{} tab, the right edge of the word following the tab would have been located at the position indicated in the \lisp{}CAR\rm{}. \lisp{}CENTER\rm{} indicates that the word following the tab will be centered at the position in the \lisp{}CAR\rm{}. \parshape 1 92 pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}LINELEADING\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}The space to be left before each line of the paragraph, in points. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}PARALEADING\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}Additional space to be left before the first line of the paragraph, in points. \parshape 1 92pt 370pt {} \vskip 10pt \vskip-10pt \parshape 1 166pt 296pt {}\save0\hbox{\lisp{}POSTPARALEADING\rm{}}\noindent\ifdimen 1wd0>66pt{\hskip-74pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-74pt\box0\hskip0pt plus 1000pt minus 1000pt}}Additional space to be left after the last line of the paragraph, in points. \parshape 1 92pt 370pt {} \parshape 1 0 pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.QUIT \arg{}STREAM VALUE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent \arg{}STREAM\rm{} must be the text stream associated with a running TEdit. \lisp{}TEDIT.QUIT\rm{} causes the editing session to end. If \arg{}VALUE\rm{} is given, it is returned as TEdit's result; otherwise, TEdit will return the usual result. The user is not asked to confirm his desire to stop editing. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.KILL \arg{}STREAM\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent \arg{}STREAM\rm{} must be the text stream, \lisp{}TEXTOBJ\rm{}, or edit window associated with a running TEdit. \lisp{}TEDIT.KILL\rm{} kills the TEdit process, and cleans up its data structures. It does not cause TEdit to return a result. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.ADD.MENUITEM \arg{}MENU ITEM\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Adds a menu \arg{}ITEM\rm{} to \arg{}MENU\rm{}. This will update the menu's image so that the newly-added item will appear the next time the menu pops up. This is only guaranteed to work right with pop-up menus which aren't visible. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.REMOVE.MENUITEM \arg{}MENU ITEM\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92 pt 370pt {} \noindent Removes a menu \arg{}ITEM\rm{} from \arg{}MENU\rm{}. This will update the menu's image so that the newly-added item will appear the next time the menu pops up. This is only guaranteed to work right with pop-up menus which aren't visible. \arg{}ITEM\rm{} may be either the whole menu item, or just the indicator which appears in the menu's image. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEXTOBJ \arg{}STREAM{\char'57}WINDOW\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Given a text stream, or a TEdit editing window, returns the associated \lisp{}TEXTOBJ\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEXTSTREAM \arg{}TEXTOBJ{\char'57}WINDOW\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Given a \lisp{}TEXTOBJ\rm{} or a TEdit editing window, returns the associated text stream. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEXTPROP \arg{}TEXTOBJ{\char'57}STREAM PROPNAME VALUE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Queries or sets the value of editor properties, such as the ones passed to \lisp{}TEDIT\rm{} or \lisp{}OPENTEXTSTREAM\rm{} in their \arg{}PROPS\rm{} arguments. This can also be used to associate user data with an editing session. If {\char'173}VALUE{\char'175} is omitted, the current value associated with \arg{}PROPNAME\rm{} is returned; if \arg{}VALUE\rm{} is present, it becomes \arg{}PROPNAME\rm{}'s associated value. \parshape 1 0 pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.FORMATTEDFILEP \arg{}STREAM\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Tells whether a given text stream is plain text (result is \lisp{}NIL\rm{}) or must be stored as a special TEdit-format file (result is one of the atoms \lisp{}CHARLOOKS\rm{}, \lisp{}PARALOOKS\rm{}, or \lisp{}IMAGEOBJ\rm{}, depending on the amount of formatting information that must be stored). \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.CARETLOOKS \arg{}STREAM FONT\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent The looks of newly-typed characters are controlled by the looks that are {\lquotes}attached to the caret{\rquotes}. This function lets you set those looks for a given document. \arg{}FONT\rm{} is either a font descriptor or a \lisp{}CHARLOOKS\rm{}. Any text inserted or typed in thereafter will appear in that font (or with those looks). \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.STREAMCHANGEDP \arg{}STREAM RESET?\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Returns \lisp{}T\rm{} if the text represented by the \arg{}STREAM\rm{} has been modified since it was last saved. If \arg{}RESET?\rm{} is non-\lisp{}NIL\rm{}, then the change indicator will be reset--i.e., TEdit will then believe that the text is unchanged, and will not ask for confirmation of the \lisp{}Quit\rm{} and \lisp{}Get\rm{} operations. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.NORMALIZECARET \arg{}STREAM SEL\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92 pt 370pt {} \noindent Makes sure that the caret is visible in the editing window; if not, the document is scrolled to place the caret on the top line of the window. This is normally controlled by the existing selection for the given text stream. However, if \arg{}SEL\rm{} is specified, it is used to decide the caret's location. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(COPYTEXTSTREAM \arg{}STREAM CROSSCOPY\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Makes a fresh copy of the text stream \arg{}STREAM\rm{}. If \arg{}CROSSCOPY\rm{} is non-\lisp{}NIL\rm{}, the new stream will not share structure with the old one---it can be edited without affecting the original stream. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.SELECTED.PIECES \arg{}TEXTOBJ SEL CROSSCOPY PIECEMAPFN FNARG1 FNARG2\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Returns a list of \lisp{}PIECE\rm{}s that describe the text selected in the selection \arg{}SEL\rm{} out of the document \arg{}TEXTOBJ\rm{}. If \arg{}CROSSCOPY\rm{} is non-\lisp{}NIL\rm{}, the pieces will be copied. \arg{}PIECEMAPFN\rm{}, if given, is applied in turn to arguments (\arg{}PIECE\rm{}, \arg{}TEXTOBJ\rm{}, \arg{}FNARG1\rm{} and \arg{}FNARG2\rm{}), and the value it returns is used in place of the piece (or its copy). \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.PROMPTPRINT \arg{}TEXTOBJ MSG CLEAR?\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Prints a message in the TEdit prompting window associated with the given \arg{}TEXTOBJ\rm{}. If \arg{}CLEAR?\rm{} is non-\lisp{}NIL\rm{}, the window will be cleared first. \parshape 1 0 pt 462pt {} \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{5}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}USER-FUNCTION {\lquotes}HOOKS{\rquotes} IN TEDIT \rm{}\penalty 2000 \penalty 2000 \mark{USER-FUNCTION {\lquotes}HOOKS{\rquotes} IN TEDIT} \penalty 2000 \vskip10pt \penalty 2000 TEdit provides a number of hooks where a user-supplied function can be called. To supply a function, attach it to the edit window under the appropriate indicator, using \lisp{}WINDOWPROP\rm{}. Every user-supplied function is \lisp{}APPLY\rm{}ed to the text \lisp{}STREAM\rm{} which describes the text. Some of these functions can also be supplied using the \arg{}PROPS\rm{} argument to \lisp{}TEDIT\rm{} or \lisp{}OPENTEXTSTREAM\rm{}; the descriptions below contain the details. \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.QUITFN\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A function to be called whenever the user ends an editing session. This may do anything; if it returns the atom \lisp{}DON'T\rm{}, TEdit will not terminate. Any other result permits TEdit to do its normal cleanup and termination. This can also be supplied using the \lisp{}PROPS\rm{} argument to \lisp{}TEDIT\rm{} or \lisp{}OPENTEXTSTREAM\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.AFTERQUITFN\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A function to be called after the user ends an editing session. This may perform any cleanup of side effects that you desire. This can also be supplied using the \lisp{}PROPS\rm{} argument to \lisp{}TEDIT\rm{} or \lisp{}OPENTEXTSTREAM\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.CMD.LOOPFN\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A function that gets called, for effect only, each time through TEdit's main command loop. This can also be supplied using the \lisp{}PROPS\rm{} argument to \lisp{}TEDIT\rm{} or \lisp{}OPENTEXTSTREAM\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.CMD.CHARFN\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92 pt 370pt {} \noindent A function that gets called, for effect only, once for each character typed into TEdit. The character code is passed to the function as its second argument. This can also be supplied using the \lisp{}PROPS\rm{} argument to \lisp{}TEDIT\rm{} or \lisp{}OPENTEXTSTREAM\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.CMD.SELFN\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A function that gets called, each time the user tries to select something with the mouse: \lisp{}(SELFN \arg{}TEXTOBJ\lisp{} \arg{}SELECTION\lisp{} \arg{}SELECTMODE\lisp{} \arg{}FINAL?\lisp{})\rm{}. It is called once for each tentative selection (e.g., while the mouse button is still down, but gets moved), and once---for effect only---for the final selection. The new \lisp{}SELECTION\rm{} is passed as the function's second argument, and an atom describing the kind of selection (one of \lisp{}NORMAL\rm{}, \lisp{}COPY\rm{}, \lisp{}MOVE\rm{}, \lisp{}PENDINGDEL\rm{} (for an extended selection that will be deleted on type-in), or \lisp{}DELETE\rm{}) as the third. When the function is being called with a candidate selection, \arg{}FINAL?\rm{} will be the atom \lisp{}TENTATIVE\rm{}; when being called with the final selection, \arg{}FINAL?\rm{} is the atom \lisp{}FINAL\rm{}. When the function is called with a candidate selection, it may veto that selection by returning the atom \lisp{}DON'T\rm{}. This can be used to limit selections to items of interest. If a selection is vetoed, the old selection will remain highlighted; the effect is that of the user being unable to move the selection from its old location. This can also be supplied using the \lisp{}PROPS\rm{} argument to \lisp{}TEDIT\rm{} or \lisp{}OPENTEXTSTREAM\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.PRESCROLLFN\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Called just before TEdit scrolls the edit window. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.POSTSCROLLFN\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Called just after TEdit scrolls the edit window. \parshape 1 0 pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}OVERFLOWFN\rm{}}{TEdit Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Called when TEdit is about to move some text off-screen, with the edit window and the \lisp{}TEXTOBJ\rm{} as arguments. This function may handle the text overflow itself (say by reshaping the window), or it may let TEdit take its normal course. If the function handles the problem, it must return a non-\lisp{}NIL\rm{} result. If TEdit is to handle the overflow, the value returned must be \lisp{}NIL\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.TITLEMENUFN\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Called whenever the user presses the \lisp{}LEFT\rm{} or \lisp{}MIDDLE\rm{} mouse button in the edit window's title region. Can also be supplied using the \lisp{}PROPS\rm{} argument to \lisp{}TEDIT\rm{} or \lisp{}OPENTEXTSTREAM\rm{}. Normally, this is the function \lisp{}TEDIT.DEFAULT.MENUFN\rm{}, which brings up the usual TEdit command menu. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}CARETLOOKSFN\rm{}}{TEdit Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Called whenever TEdit is about to set the caret looks for an edit window. This function, called as \lisp{}(CARETLOOKSFN \arg{}NEWLOOKS\lisp{} \arg{}TEXTOBJ\lisp{})\rm{} may perform whatever checking it likes, and then return either the atom \lisp{}DON'T\rm{}, meaning that the caret looks are not to be changed, \lisp{}NIL\rm{}, meaning that \arg{}NEWLOOKS\rm{} should be used as the caret looks, or a new \lisp{}CHARLOOKS\rm{} which will be used as the caret looks. Note: if this function returns a new \lisp{}CHARLOOKS\rm{}, it must \sl{}not\rm{} be a smashed version of \arg{}NEWLOOKS\rm{}. \parshape 1 0pt 462pt {} TEdit also saves pointers to its data structures on each edit window. They are available for any user function's use. \vskip 10pt \formatdef{462pt}{\lisp{}TEXTOBJ\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92 pt 370pt {} \noindent The \lisp{}TEXTOBJ\rm{} which describes the current editing session. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEXTSTREAM\rm{}}{Window Property} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent The text \lisp{}STREAM\rm{} which describes the text of the document. \parshape 1 0pt 462pt {} \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{6}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}CHANGING THE TEDIT COMMAND MENU \rm{}\penalty 2000 \penalty 2000 \mark{CHANGING THE TEDIT COMMAND MENU} \penalty 2000 \vskip10pt \penalty 2000 You may replace the \lisp{}MIDDLE\rm{}-button command menu with one of your own. When you press the \lisp{}MIDDLE\rm{} button inside an edit window's title region, TEDIT calls the value of the \lisp{}TEDIT.TITLMENUFN\rm{} window property with the window as its argument. Normally, what gets called is \lisp{}TEDIT.DEFAULT.MENUFN\rm{}, but you may change it to anything you like. \lisp{}TEDIT.DEFAULT.MENUFN\rm{} brings up a menu of commands. If the edit window has a property \lisp{}TEDIT.MENU\rm{}, that menu is used. If not, TEdit looks for the window property \lisp{}TEDIT.MENU.COMMANDS\rm{} (a list of menu items) and constructs a menu from that. Failing that, it uses \lisp{}TEDIT.DEFAULT.MENU\rm{}. This means that you can control the command menu by setting the appropriate window properties. Alternatively, you may add your own menu buttons to the default menu, \lisp{}TEDIT.DEFAULT.MENU\rm{}. \lisp{}{\nofill{}(TEDIT.ADD.MENUITEM TEDIT.DEFAULT.MENU \arg{}ITEM\lisp{})\par}\rm{} will add \arg{}ITEM\rm{} to the TEdit menu. Menu items should be in the form \lisp{}(\arg{}NAME\lisp{} (QUOTE \arg{}FUNCTION\lisp{}))\rm{}, where \arg{}NAME\rm{} is what appears in the menu, and \arg{}FUNCTION\rm{} will be applied to the text stream, and can perform any operation you desire. Finally, you may \sl{}remove\rm{} menu items from the default menu, by doing \lisp{}{\nofill{}(TEDIT.REMOVE.MENUITEM TEDIT.DEFAULT.MENU \arg{}ITEM\lisp{})\par}\rm{} \arg{}ITEM\rm{} can be either a complete menu item, or just the text that appears in the menu; either will do the job. \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{7}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}VARIABLES WHICH CONTROL TEDIT \rm{}\penalty 2000 \penalty 2000 \mark{VARIABLES WHICH CONTROL TEDIT} \penalty 2000 \vskip10pt \penalty 2000 There are a number of global variables which control TEdit, or which contain state information for editing sessions in progress: \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.EXTEND.PENDING.DELETE\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent If this is non-\lisp{}NIL\rm{}, extending a selection makes it into a pending-delete selection. See the selection section. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.DEFAULT.FONT\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A \lisp{}FONTDESCRIPTOR\rm{}. This is the font for displaying TEdit documents which don't specify their own font information. \parshape 1 0 pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.DEFAULT.FMTSPEC\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A paragraph-looks description. This contains the default looks for a paragraph. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.SELECTION\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A \lisp{}SELECTION\rm{}. This is the most recent regular selection made in \sl{}any\rm{} TEdit window. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.SHIFTEDSELECTION\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A \lisp{}SELECTION\rm{}. This is the most recent \lisp{}SHIFT\rm{}-selection made in \sl{}any\rm{} TEdit window. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.MOVESELECTION\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92 pt 370pt {} \noindent A \lisp{}SELECTION\rm{}. This is the most recent \lisp{}CTRL\rm{}-\lisp{}SHIFT\rm{}-selection made in \sl{}any\rm{} TEdit window. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.READTABLE\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A read table, this is used to translate typed-in characters into TEdit commands. See the section on TEdit readtables. This can be overridden using the \lisp{}READTABLE\rm{} property argument to \lisp{}TEDIT\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.WORDBOUND.READTABLE\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent The read table which controls TEdit's concept of word boundaries. The syntax classes in this table aslo determine which characters TEdit thinks are white space (which gets deleted by control-W along with the preceding word). This can be overridden using the \lisp{}BOUNDTABLE\rm{} property argument to \lisp{}TEDIT\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}TEDIT.DEFAULT.PROPS\rm{}}{Variable} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent A default set of PROPS arguments for TEDIT or OPENTEXTSTREAM. Any PROPS the user specifies are APPENDed to a copy of the default. The effect is that any user specifications override the defaults. \parshape 1 0 pt 462pt {} \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{8}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}TEDIT'S TERMINAL TABLE AND READTABLES \rm{}\penalty 2000 \penalty 2000 \mark{TEDIT'S TERMINAL TABLE AND READTABLES} \penalty 2000 \vskip10pt \penalty 2000 When TEdit reads a character from the keyboard, the first thing it does is check to see if it's a command character. TEdit first looks at its default readtable, \lisp{}TEDIT.READTABLE\rm{}, or at the readtable supplied as the \lisp{}READTABLE\rm{} property. Failing that, TEdit then looks to the system terminal table. Characters with terminal sytax-classes \lisp{}CHARDELETE\rm{}, \lisp{}WORDDELETE\rm{}, or \lisp{}LINEDELETE\rm{} act as follows: \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}CHARDELETE\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}acts as a character-backspace. \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}WORDDELETE\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}acts like control-W (in fact, this is how control-W is implemented.) \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}LINEDELETE\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}acts like \lisp{}DEL\rm{}. \parshape 1 0pt 462pt {} Since the system terminal table is used to implement these functions, you can assign them to other keys at will. Failing that, TEdit inserts the character at the current insertion point in the document. The TEdit default readtable is named \lisp{}TEDIT.READTABLE\rm{}, and it is global. You can use the functions \lisp{}TEDIT.SETSYNTAX\rm{} and \lisp{}TEDIT.GETSYNTAX\rm{} to read it and make changes: \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.SETSYNTAX \arg{}CHARCODE CLASS TABLE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92 pt 370pt {} \noindent Sets the readtable syntax of the character whose charcode is \arg{}CHARCODE\rm{} to be \arg{}CLASS\rm{} in the read-table \arg{}TABLE\rm{}. The possible syntax classes are listed below. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.GETSYNTAX \arg{}CHARCODE TABLE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Returns the TEdit syntax class of the character whose charcode is \arg{}CHARCODE\rm{}, according to the read-table \arg{}TABLE\rm{}. The possible syntax classes are listed below. An illegal syntax will be returned as \lisp{}NIL\rm{}. \parshape 1 0pt 462pt {} The allowable syntax classes are: \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}CHARDELETE\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Typing this character acts like backspace \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}WORDDELETE\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Typing this character acts like control-W \parshape 1 0 pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}DELETE\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Typing this character acts like \lisp{}DEL\rm{} \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}UNDO\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Typing this character causes \lisp{}Undo\rm{} \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}REDO\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Typing this character acts like \lisp{}ESC\rm{} \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92 pt 370pt {}\save0\hbox{\lisp{}FN\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Typing this character calls a specified function (see below) \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}NONE\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Typing this character simply inserts it in the document. \lisp{}NIL\rm{} also has this effect. \parshape 1 0pt 462pt {} You can also cause a keystroke to invoke a function for you. To do so, use the function \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.SETFUNCTION \arg{}CHARCODE FN TABLE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Sets up the TEdit readtable \arg{}TABLE\rm{} so that typing the character with charcode \arg{}CHARCODE\rm{} will \lisp{}APPLY\rm{} \arg{}FN\rm{} to the text \lisp{}STREAM\rm{} and the \lisp{}TEXTOBJ\rm{} for the document being edited. The function may have arbitrary side-effects. \parshape 1 0pt 462pt {} The abbreviation feature described below is implemented using this function-call facility. Finally, TEdit uses the read table \lisp{}TEDIT.WORDBOUND.READTABLE\rm{} to decide where word boundaries are. Whenever two adjacent characters have different syntax classes, there is a word boundary between them. The state of this table can be controlled by the functions \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.WORDGET \arg{}CHAR TABLE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Returns the syntax class (a small integer) for a given character. \arg{}CHAR\rm{} may be either a character or a charcode; \arg{}TABLE\rm{} defaults to \lisp{}TEDIT.WORDBOUND.READTABLE\rm{}. \parshape 1 0 pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.WORDSET \arg{}CHAR CLASS TABLE\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Sets the syntax class for a character. Again, \arg{}CHAR\rm{} is either a character or a charcode; \arg{}TABLE\rm{} defaults to \lisp{}TEDIT.WORDBOUND.READTABLE\rm{}; \arg{}CLASS\rm{} may be either a small integer as returned by \lisp{}TEDIT.WORDGET\rm{}, or one of the atoms \lisp{}WHITESPACE\rm{}, \lisp{}TEXT\rm{}, or \lisp{}PUNCTUATION\rm{}. Those represent the syntax classes in the default \lisp{}TEDIT.WORDBOUND.READTABLE\rm{}. \parshape 1 0pt 462pt {} The initial \lisp{}TEDIT.WORDBOUND.READTABLE\rm{} assigns every character to one of the above classes, along pretty obvious lines. For purposes of control-W, whitespace between the caret and the word being deleted is also removed. This, too, can be over-ridden for a specific edit session using the \lisp{}BOUNDTABLE\rm{} property in the call to TEdit. \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{9}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}THE TEDIT ABBREVIATION FACILITY \rm{}\penalty 2000 \penalty 2000 \mark{THE TEDIT ABBREVIATION FACILITY} \penalty 2000 \vskip10pt \penalty 2000 The list \lisp{}TEDIT.ABBREVS\rm{} is a list of {\lquotes}abbreviations known to TEdit.{\rquotes} Each element of the list is a dotted pair of two strings. The first is the abbreviation (case does matter), and the second is what the abbreviation expands to. To expand an abbreviation, select it and type control-X. It will be replaced by its expansion. You can also expand single-character abbreviations while typing. Hitting control-X when no characters are underlined (i.e., after you have typed something) will expand the \sl{}single-character\rm{} abbreviation to the left of the caret. Here is a list of the default abbreviations and their expansions: \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}b\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The bullet ({$\bullet$}) \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}m\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The M-dash ({---}) \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92 pt 370pt {}\save0\hbox{\lisp{}n\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}The figure dash ({--}) \parshape 1 0pt 462pt {} \vskip 10pt \vskip-10pt \parshape 1 92pt 370pt {}\save0\hbox{\lisp{}"\rm{}}\noindent\ifdimen 1wd0>82pt{\hskip-92pt\box0\hskip0pt plus 1000pt\linebreak\null}\else{\hbox to 0pt{\hskip-92pt\box0\hskip0pt plus 1000pt minus 1000pt}}Open double-quotes ({\lquotes}) which can be matched by two normal quotes ({\rquotes}) \parshape 1 0pt 462pt {} \vfill\eject\def\noheaderonce{T} \bf{}\noindent\save0\hbox{10}\ifdimen 1wd0>30pt{\box0\hskip10pt }\else{\hbox to 40pt{\vbox{\box0}\hfill}}THE TEDIT IMAGEOBJ INTERFACE \rm{}\penalty 2000 \penalty 2000 \mark{THE TEDIT IMAGEOBJ INTERFACE} \penalty 2000 \vskip10pt \penalty 2000 \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.INSERT.OBJECT \arg{}STREAM OBJECT SELorCH{$\char'561$}\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Inserts the \lisp{}IMAGEOBJ\rm{} \arg{}OBJECT\rm{} into the document \arg{}STREAM\rm{} at the place specified by \arg{}SELorCH{$\char'561$}\rm{}. \parshape 1 0pt 462pt {} \vskip 10pt \formatdef{462pt}{\lisp{}(TEDIT.OBJECT.CHANGED \arg{}STREAM OBJECT\lisp{})\arg{}\lisp{}\rm{}}{Function} \penalty 2000\vskip-10pt\penalty 2000 \parshape 1 92pt 370pt {} \noindent Notifies TEdit that the \lisp{}IMAGEOBJ\rm{} \arg{}OBJECT\rm{} has changed and the display should be updated. This is called by object editing functions after they have updated the object's internal information. \parshape 1 0 pt 462pt {} {\char'1}¢GACHA {\char'1}¢{\char'1}z¸ \vfill\end