Do not use backslash-b to select backspaces.
[mp-5.x.git] / doc / mp_function_reference.rhtml
blob89f17eeadc9ab2aae3377d2a8e1d9c933cf64181
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <HTML>
3 <HEAD>
4         <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
5         <TITLE></TITLE>
6         <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.2  (Linux)">
7         <META NAME="CREATED" CONTENT="20071206;23050600">
8         <META NAME="CHANGEDBY" CONTENT="Lee Page">
9         <META NAME="CHANGED" CONTENT="20071231;15203900">
10         <STYLE TYPE="text/css">
11         <!--
12                 @page { size: 8.5in 11in; margin: 0.79in }
13                 P { margin-bottom: 0.08in }
14                 H1 { margin-bottom: 0.08in; color: #0000aa; font-family: "trebuchet ms", "arial" }
15                 H2 { margin-bottom: 0.08in }
16                 H2.western { font-family: "Nimbus Sans L", sans-serif; font-size: 14pt; font-style: italic }
17                 H2.cjk { font-size: 14pt; font-style: italic }
18                 H2.ctl { font-size: 14pt; font-style: italic }
19         -->
20         </STYLE>
21 </HEAD>
22 <BODY LANG="en-US" DIR="LTR">
23 <H1>Minimum Profit Function Reference</H1>
24 <P> Lee Page &lt;lrpage AT mindspring POINT com&gt;</P>
25 <P><BR><BR>
26 </P>
27 <TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
28         <COL WIDTH=128*>
29         <COL WIDTH=128*>
30         <TR VALIGN=TOP>
31                 <TD WIDTH=50%>
32                         <UL>
33                                 <LI><P ALIGN=LEFT><A HREF="#Clipboard">Clipboard
34                                 (mp_clipboard.mpsl)</A></P>
35                                 <LI><P ALIGN=LEFT><A HREF="#Core">Core (mp_core.mpsl)</A></P>
36                                 <LI><P ALIGN=LEFT><A HREF="#Crypt">Crypt (mp_crypt.mpsl)</A></P>
37                                 <LI><P ALIGN=LEFT><A HREF="#Editor Action">Editor Actions
38                                 (mp_drv.mpsl)</A></P>
39                                 <LI><P ALIGN=LEFT><A HREF="#Editor">Editor (mp_edit.mpsl)</A></P>
40                                 <LI><P ALIGN=LEFT><A HREF="#File">File (mp_file.mpsl)</A></P>
41                                 <LI><P ALIGN=LEFT><A HREF="#Keys">Keys (mp_keyseq.mpsl)</A></P>
42                                 <LI><P ALIGN=LEFT><A HREF="#Macros">Macros (mp_macro.mpsl)</A></P>
43                                 <LI><P ALIGN=LEFT><A HREF="#Misc">Misc. (mp_misc.mpsl)</A></P>
44                         </UL>
45                 </TD>
46                 <TD WIDTH=50%>
47                         <UL>
48                                 <LI><P ALIGN=LEFT><A HREF="#Movement">Movement (mp_move.mpsl)</A></P>
49                                 <LI><P ALIGN=LEFT><A HREF="#Search">Search (mp_search.mpsl)</A></P>
50                                 <LI><P ALIGN=LEFT><A HREF="#Sessions">Sessions (mp_session.mpsl)</A></P>
51                                 <LI><P ALIGN=LEFT><A HREF="#Spell">Spell (mp_ispell.mpsl)</A></P>
52                                 <LI><P ALIGN=LEFT><A HREF="#Syntax Highlighting">Syntax
53                                 Highlighting (mp_syntax.mpsl)</A></P>
54                                 <LI><P ALIGN=LEFT><A HREF="#Tags">Tags (mp_tags.mpsl)</A></P>
55                                 <LI><P ALIGN=LEFT><A HREF="#Templates">Templates
56                                 (mp_templates.mpsl)</A></P>
57                                 <LI><P ALIGN=LEFT><A HREF="#TUI">TUI (mp_tui.mpsl)</A></P>
58                         </UL>
59                 </TD>
60         </TR>
61 </TABLE>
62 <H2 CLASS="western"><A NAME="Clipboard"></A>Clipboard
63 (mp_clipboard.mpsl)</H2>
64 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
65         <COL WIDTH=254>
66         <COL WIDTH=393>
67         <TR VALIGN=TOP>
68                 <TD WIDTH=254>
69                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.unmark(doc)</FONT></PRE>
70                 </TD>
71                 <TD WIDTH=393>
72                         <P>Unmarks the block.</P>
73                 </TD>
74         </TR>
75         <TR VALIGN=TOP>
76                 <TD WIDTH=254>
77                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.mark(doc)</FONT></PRE>
78                 </TD>
79                 <TD WIDTH=393>
80                         <P>Marks the start or end of the block.</P>
81                 </TD>
82         </TR>
83         <TR VALIGN=TOP>
84                 <TD WIDTH=254>
85                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.get_active_area(doc)</FONT></PRE>
86                 </TD>
87                 <TD WIDTH=393>
88                         <P>Returns the active area:  the selection, or the full document.</P>
89                 </TD>
90         </TR>
91         <TR VALIGN=TOP>
92                 <TD WIDTH=254>
93                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.copy(doc)</FONT></PRE>
94                 </TD>
95                 <TD WIDTH=393>
96                         <P>Copies the mark to the clipboard.</P>
97                 </TD>
98         </TR>
99         <TR VALIGN=TOP>
100                 <TD WIDTH=254>
101                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.delete_mark(doc)</FONT></PRE>
102                 </TD>
103                 <TD WIDTH=393>
104                         <P>Deletes current selection.</P>
105                 </TD>
106         </TR>
107         <TR VALIGN=TOP>
108                 <TD WIDTH=254>
109                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.cut(doc)</FONT></PRE>
110                 </TD>
111                 <TD WIDTH=393>
112                         <P>Cut (copy + delete) selected mark.</P>
113                 </TD>
114         </TR>
115         <TR VALIGN=TOP>
116                 <TD WIDTH=254>
117                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.paste(doc)</FONT></PRE>
118                 </TD>
119                 <TD WIDTH=393>
120                         <P>Pastes from the clipboard to the cursor position.</P>
121                 </TD>
122         </TR>
123 </TABLE>
124 <H2 CLASS="western"><A NAME="Core"></A>Core (mp_core.mpsl)</H2>
125 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
126         <COL WIDTH=254>
127         <COL WIDTH=393>
128         <TR VALIGN=TOP>
129                 <TD WIDTH=254>
130                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.active()</FONT></PRE>
131                 </TD>
132                 <TD WIDTH=393>
133                         <P>Returns the active document.</P>
134                 </TD>
135         </TR>
136         <TR VALIGN=TOP>
137                 <TD WIDTH=254>
138                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.process_action(a)</FONT></PRE>
139                 </TD>
140                 <TD WIDTH=393>
141                         <P>Processes an action.</P>
142                 </TD>
143         </TR>
144         <TR VALIGN=TOP>
145                 <TD WIDTH=254>
146                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.process_event(k)</FONT></PRE>
147                 </TD>
148                 <TD WIDTH=393>
149                         <P>Processes a key event.</P>
150                 </TD>
151         </TR>
152         <TR VALIGN=TOP>
153                 <TD WIDTH=254>
154                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.build_status_line()</FONT></PRE>
155                 </TD>
156                 <TD WIDTH=393>
157                         <P>Returns the string to be drawn in the status line.</P>
158                 </TD>
159         </TR>
160         <TR VALIGN=TOP>
161                 <TD WIDTH=254>
162                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.backslash_codes(s, d)</FONT></PRE>
163                 </TD>
164                 <TD WIDTH=393>
165                         <P>Encodes (d == 0) or decodes (d == 1) backslash codes.</P>
166                 </TD>
167         </TR>
168         <TR VALIGN=TOP>
169                 <TD WIDTH=254>
170                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.long_op(func, a1, a2, a3)</FONT></PRE>
171                 </TD>
172                 <TD WIDTH=393>
173                         <P>Executes a potentially long function (sets as busy).</P>
174                 </TD>
175         </TR>
176         <TR VALIGN=TOP>
177                 <TD WIDTH=254>
178                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.get_history(key)</FONT></PRE>
179                 </TD>
180                 <TD WIDTH=393>
181                         <P>Returns a history for the specified key.</P>
182                 </TD>
183         </TR>
184         <TR VALIGN=TOP>
185                 <TD WIDTH=254>
186                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.menu_label(action)</FONT></PRE>
187                 </TD>
188                 <TD WIDTH=393>
189                         <P>Returns a label for the menu for an action.</P>
190                 </TD>
191         </TR>
192         <TR VALIGN=TOP>
193                 <TD WIDTH=254>
194                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.usage()</FONT></PRE>
195                 </TD>
196                 <TD WIDTH=393>
197                         <P>Set mp.exit_message with a usage message (--help).</P>
198                 </TD>
199         </TR>
200         <TR VALIGN=TOP>
201                 <TD WIDTH=254>
202                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.process_cmdline()</FONT></PRE>
203                 </TD>
204                 <TD WIDTH=393>
205                         <P>Process the command line arguments (ARGV).</P>
206                 </TD>
207         </TR>
208         <TR VALIGN=TOP>
209                 <TD WIDTH=254>
210                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.load_profile()</FONT></PRE>
211                 </TD>
212                 <TD WIDTH=393>
213                         <P>Loads <FONT FACE="Courier, monospace">~/.mp.mpsl</FONT>.</P>
214                 </TD>
215         </TR>
216         <TR VALIGN=TOP>
217                 <TD WIDTH=254>
218                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.normalize_version(vs)</FONT></PRE>
219                 </TD>
220                 <TD WIDTH=393>
221                         <P>Converts a version string to something usable with <FONT FACE="Courier, monospace">cmp()</FONT>.</P>
222                 </TD>
223         </TR>
224         <TR VALIGN=TOP>
225                 <TD WIDTH=254>
226                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.assert_version(found, minimal, package)</FONT></PRE>
227                 </TD>
228                 <TD WIDTH=393>
229                         <P>Asserts that 'found' version of 'package' is at least
230                         'minimal', or generate a warning otherwise.</P>
231                 </TD>
232         </TR>
233         <TR VALIGN=TOP>
234                 <TD WIDTH=254>
235                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.test_versions()</FONT></PRE>
236                 </TD>
237                 <TD WIDTH=393>
238                         <P>Tests component versions.</P>
239                 </TD>
240         </TR>
241 </TABLE>
242 <H2 CLASS="western"><A NAME="Crypt"></A>Crypt (mp_crypt.mpsl)</H2>
243 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
244         <COL WIDTH=254>
245         <COL WIDTH=393>
246         <TR VALIGN=TOP>
247                 <TD WIDTH=254>
248                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.arcfour_byte()</FONT></PRE>
249                 </TD>
250                 <TD WIDTH=393>
251                         <P>Gets next ARCFOUR byte next char is <FONT FACE="Courier, monospace">chr(ord(getchar(l))
252                         ^ mp.arcfour_byte())</FONT>.</P>
253                 </TD>
254         </TR>
255         <TR VALIGN=TOP>
256                 <TD WIDTH=254>
257                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.arcfour_init(key)</FONT></PRE>
258                 </TD>
259                 <TD WIDTH=393>
260                         <P>Initializes an ARCFOUR cypher.</P>
261                 </TD>
262         </TR>
263         <TR VALIGN=TOP>
264                 <TD WIDTH=254>
265                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.crypt1_load(fd, password)</FONT></PRE>
266                 </TD>
267                 <TD WIDTH=393>
268                         <P>Loads a crypt1 encrypted file into lines.</P>
269                 </TD>
270         </TR>
271         <TR VALIGN=TOP>
272                 <TD WIDTH=254>
273                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.crypt1_save(fd, lines, password)</FONT></PRE>
274                 </TD>
275                 <TD WIDTH=393>
276                         <P>Saves the lines as a crypt1 encrypted file.</P>
277                 </TD>
278         </TR>
279         <TR VALIGN=TOP>
280                 <TD WIDTH=254>
281                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.crypt1_detect(fd)</FONT></PRE>
282                 </TD>
283                 <TD WIDTH=393>
284                         <P>Detects if fd is an mpcrypt1-type file.</P>
285                 </TD>
286         </TR>
287 </TABLE>
288 <H2 CLASS="western"><A NAME="Editor Action"></A>Editor Actions
289 (mp_drv.mpsl)</H2>
290 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
291         <COL WIDTH=254>
292         <COL WIDTH=393>
293         <TR VALIGN=TOP>
294                 <TD WIDTH=254>
295                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.menu()</FONT></PRE>
296                 </TD>
297                 <TD WIDTH=393>
298                         <PRE></PRE>
299                 </TD>
300         </TR>
301         <TR VALIGN=TOP>
302                 <TD WIDTH=254>
303                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.clip_to_sys()</FONT></PRE>
304                 </TD>
305                 <TD WIDTH=393>
306                         <PRE></PRE>
307                 </TD>
308         </TR>
309         <TR VALIGN=TOP>
310                 <TD WIDTH=254>
311                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.sys_to_clip()</FONT></PRE>
312                 </TD>
313                 <TD WIDTH=393>
314                         <PRE></PRE>
315                 </TD>
316         </TR>
317         <TR VALIGN=TOP>
318                 <TD WIDTH=254>
319                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.update_ui()</FONT></PRE>
320                 </TD>
321                 <TD WIDTH=393>
322                         <PRE></PRE>
323                 </TD>
324         </TR>
325         <TR VALIGN=TOP>
326                 <TD WIDTH=254>
327                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.timer(msecs,func)</FONT></PRE>
328                 </TD>
329                 <TD WIDTH=393>
330                         <PRE></PRE>
331                 </TD>
332         </TR>
333         <TR VALIGN=TOP>
334                 <TD WIDTH=254>
335                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.busy(onoff)</FONT></PRE>
336                 </TD>
337                 <TD WIDTH=393>
338                         <PRE></PRE>
339                 </TD>
340         </TR>
341         <TR VALIGN=TOP>
342                 <TD WIDTH=254>
343                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.update_ui()</FONT></PRE>
344                 </TD>
345                 <TD WIDTH=393>
346                         <PRE></PRE>
347                 </TD>
348         </TR>
349         <TR VALIGN=TOP>
350                 <TD WIDTH=254>
351                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.alert(msg)</FONT></PRE>
352                 </TD>
353                 <TD WIDTH=393>
354                         <PRE></PRE>
355                 </TD>
356         </TR>
357         <TR VALIGN=TOP>
358                 <TD WIDTH=254>
359                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.confirm(msg)</FONT></PRE>
360                 </TD>
361                 <TD WIDTH=393>
362                         <PRE></PRE>
363                 </TD>
364         </TR>
365         <TR VALIGN=TOP>
366                 <TD WIDTH=254>
367                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.openfile(prompt)</FONT></PRE>
368                 </TD>
369                 <TD WIDTH=393>
370                         <PRE></PRE>
371                 </TD>
372         </TR>
373         <TR VALIGN=TOP>
374                 <TD WIDTH=254>
375                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.savefile(prompt)</FONT></PRE>
376                 </TD>
377                 <TD WIDTH=393>
378                         <PRE></PRE>
379                 </TD>
380         </TR>
381         <TR VALIGN=TOP>
382                 <TD WIDTH=254>
383                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.form(widgets)</FONT></PRE>
384                 </TD>
385                 <TD WIDTH=393>
386                         <PRE></PRE>
387                 </TD>
388         </TR>
389         <TR VALIGN=TOP>
390                 <TD WIDTH=254>
391                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.timer(msecs,func)</FONT></PRE>
392                 </TD>
393                 <TD WIDTH=393>
394                         <PRE></PRE>
395                 </TD>
396         </TR>
397         <TR VALIGN=TOP>
398                 <TD WIDTH=254>
399                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.busy(onoff)</FONT></PRE>
400                 </TD>
401                 <TD WIDTH=393>
402                         <PRE></PRE>
403                 </TD>
404         </TR>
405 </TABLE>
406 <H2 CLASS="western"><A NAME="Editor"></A>Editor (mp_edit.mpsl)</H2>
407 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
408         <COL WIDTH=254>
409         <COL WIDTH=393>
410         <TR VALIGN=TOP>
411                 <TD WIDTH=254>
412                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.break_line(doc, col)</FONT></PRE>
413                 </TD>
414                 <TD WIDTH=393>
415                         <P>Breaks current line in two (inserts a newline).</P>
416                 </TD>
417         </TR>
418         <TR VALIGN=TOP>
419                 <TD WIDTH=254>
420                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.join_line(doc)</FONT></PRE>
421                 </TD>
422                 <TD WIDTH=393>
423                         <P>Joins the current line with the next one.</P>
424                 </TD>
425         </TR>
426         <TR VALIGN=TOP>
427                 <TD WIDTH=254>
428                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.delete_line(doc)</FONT></PRE>
429                 </TD>
430                 <TD WIDTH=393>
431                         <P>Deletes the current line.</P>
432                 </TD>
433         </TR>
434         <TR VALIGN=TOP>
435                 <TD WIDTH=254>
436                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.delete_char(doc)</FONT></PRE>
437                 </TD>
438                 <TD WIDTH=393>
439                         <P>Deletes the current char.</P>
440                 </TD>
441         </TR>
442         <TR VALIGN=TOP>
443                 <TD WIDTH=254>
444                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.delete_range(doc, bx, by, ex, ey)</FONT></PRE>
445                 </TD>
446                 <TD WIDTH=393>
447                         <P>Deletes a range of characters from a document.</P>
448                 </TD>
449         </TR>
450         <TR VALIGN=TOP>
451                 <TD WIDTH=254>
452                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.insert_string(doc, str)</FONT></PRE>
453                 </TD>
454                 <TD WIDTH=393>
455                         <P>Inserts a string into the cursor position.  Note:  newlines are
456                         not allowed.  You must call <FONT FACE="Courier, monospace">mp.insert_newline()</FONT>
457                         to manually insert a newline.</P>
458                 </TD>
459         </TR>
460         <TR VALIGN=TOP>
461                 <TD WIDTH=254>
462                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.insert(doc, a)</FONT></PRE>
463                 </TD>
464                 <TD WIDTH=393>
465                         <P>Inserts an array of text into a document.</P>
466                 </TD>
467         </TR>
468         <TR VALIGN=TOP>
469                 <TD WIDTH=254>
470                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.wrap_words(doc)</FONT></PRE>
471                 </TD>
472                 <TD WIDTH=393>
473                         <P>Do word wrapping.</P>
474                 </TD>
475         </TR>
476         <TR VALIGN=TOP>
477                 <TD WIDTH=254>
478                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.insert_space(doc)</FONT></PRE>
479                 </TD>
480                 <TD WIDTH=393>
481                         <P>Inserts a space, taking word wrapping into account.</P>
482                 </TD>
483         </TR>
484         <TR VALIGN=TOP>
485                 <TD WIDTH=254>
486                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.insert_tab(doc)</FONT></PRE>
487                 </TD>
488                 <TD WIDTH=393>
489                         <P>Inserts a tab.</P>
490                 </TD>
491         </TR>
492         <TR VALIGN=TOP>
493                 <TD WIDTH=254>
494                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.insert_newline(doc)</FONT></PRE>
495                 </TD>
496                 <TD WIDTH=393>
497                         <P>Inserts a newline.</P>
498                 </TD>
499         </TR>
500         <TR VALIGN=TOP>
501                 <TD WIDTH=254>
502                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.insert_keystroke(doc, key)</FONT></PRE>
503                 </TD>
504                 <TD WIDTH=393>
505                         <P>Inserts from a keystroke (with undo).</P>
506                 </TD>
507         </TR>
508         <TR VALIGN=TOP>
509                 <TD WIDTH=254>
510                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.store_undo(doc)</FONT></PRE>
511                 </TD>
512                 <TD WIDTH=393>
513                         <P>Stores the current txt in the undo queue.</P>
514                 </TD>
515         </TR>
516         <TR VALIGN=TOP>
517                 <TD WIDTH=254>
518                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.undo(doc)</FONT></PRE>
519                 </TD>
520                 <TD WIDTH=393>
521                         <P>Undoes the last operation.</P>
522                 </TD>
523         </TR>
524         <TR VALIGN=TOP>
525                 <TD WIDTH=254>
526                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.redo(doc)</FONT></PRE>
527                 </TD>
528                 <TD WIDTH=393>
529                         <P>Redoes the last operation undone.</P>
530                 </TD>
531         </TR>
532         <TR VALIGN=TOP>
533                 <TD WIDTH=254>
534                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.join_paragraph(doc)</FONT></PRE>
535                 </TD>
536                 <TD WIDTH=393>
537                         <P>Joins the current paragraph into just one line.</P>
538                 </TD>
539         </TR>
540         <TR VALIGN=TOP>
541                 <TD WIDTH=254>
542                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.word_wrap_paragraph(doc)</FONT></PRE>
543                 </TD>
544                 <TD WIDTH=393>
545                         <P>Word wraps current paragraph.</P>
546                 </TD>
547         </TR>
548 </TABLE>
549 <H2 CLASS="western"><A NAME="File"></A>File (mp_file.mpsl)</H2>
550 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
551         <COL WIDTH=254>
552         <COL WIDTH=393>
553         <TR VALIGN=TOP>
554                 <TD WIDTH=254>
555                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.chomp(str)</FONT></PRE>
556                 </TD>
557                 <TD WIDTH=393>
558                         <P>Chomps the end of file (should this be:  end of line?) chars
559                         from a string.</P>
560                 </TD>
561         </TR>
562         <TR VALIGN=TOP>
563                 <TD WIDTH=254>
564                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.open_file_for_reading(filename)</FONT></PRE>
565                 </TD>
566                 <TD WIDTH=393>
567                         <P>The three-state file opening of text editors: open if possible,
568                         fail on errors, create new if non-existent.  Note:  this is a
569                         low-level interface.  You probably want to use
570                         <FONT FACE="Courier, monospace"><FONT SIZE=3>mp.open(&nbsp;filename&nbsp;)</FONT></FONT>.</P>
571                 </TD>
572         </TR>
573         <TR VALIGN=TOP>
574                 <TD WIDTH=254>
575                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.save(doc)</FONT></PRE>
576                 </TD>
577                 <TD WIDTH=393>
578                         <P>Saves a file.</P>
579                 </TD>
580         </TR>
581         <TR VALIGN=TOP>
582                 <TD WIDTH=254>
583                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.new(filename, lines)</FONT></PRE>
584                 </TD>
585                 <TD WIDTH=393>
586                         <P>Creates a new document.</P>
587                 </TD>
588         </TR>
589         <TR VALIGN=TOP>
590                 <TD WIDTH=254>
591                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.next()</FONT></PRE>
592                 </TD>
593                 <TD WIDTH=393>
594                         <P>Rotates through the document list.</P>
595                 </TD>
596         </TR>
597         <TR VALIGN=TOP>
598                 <TD WIDTH=254>
599                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.prev()</FONT></PRE>
600                 </TD>
601                 <TD WIDTH=393>
602                         <P>Rotates through the document list, backwards.</P>
603                 </TD>
604         </TR>
605         <TR VALIGN=TOP>
606                 <TD WIDTH=254>
607                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.close()</FONT></PRE>
608                 </TD>
609                 <TD WIDTH=393>
610                         <P>Closes the active document.</P>
611                 </TD>
612         </TR>
613         <TR VALIGN=TOP>
614                 <TD WIDTH=254>
615                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.find_file_by_name(filename)</FONT></PRE>
616                 </TD>
617                 <TD WIDTH=393>
618                         <P>Finds an open file by its name, returns the index to the file
619                         in the document array.</P>
620                 </TD>
621         </TR>
622         <TR VALIGN=TOP>
623                 <TD WIDTH=254>
624                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.open(filename)</FONT></PRE>
625                 </TD>
626                 <TD WIDTH=393>
627                         <P>Opens a new document (uses UI).  This interface checks to make
628                         sure the file isn't already open, as well as checking to see if
629                         the file is encrypted.  Will prompt for a password if it is
630                         encrypted.</P>
631                 </TD>
632         </TR>
633 </TABLE>
634 <H2 CLASS="western"><A NAME="Keys"></A>Keys (mp_keyseq.mpsl)</H2>
635 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
636         <COL WIDTH=254>
637         <COL WIDTH=393>
638         <TR VALIGN=TOP>
639                 <TD WIDTH=254>
640                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.pending_key()</FONT></PRE>
641                 </TD>
642                 <TD WIDTH=393>
643                         <P><BR>
644                         </P>
645                 </TD>
646         </TR>
647         <TR VALIGN=TOP>
648                 <TD WIDTH=254>
649                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.process_keyseq(key)</FONT></PRE>
650                 </TD>
651                 <TD WIDTH=393>
652                         <P><BR>
653                         </P>
654                 </TD>
655         </TR>
656         <TR VALIGN=TOP>
657                 <TD WIDTH=254>
658                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.add_keyseq(seq, keycode)</FONT></PRE>
659                 </TD>
660                 <TD WIDTH=393>
661                         <P><BR>
662                         </P>
663                 </TD>
664         </TR>
665 </TABLE>
666 <H2 CLASS="western"><A NAME="Macros"></A>Macros (mp_macro.mpsl)</H2>
667 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
668         <COL WIDTH=254>
669         <COL WIDTH=393>
670         <TR VALIGN=TOP>
671                 <TD WIDTH=254>
672                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.process_event_and_record(k)</FONT></PRE>
673                 </TD>
674                 <TD WIDTH=393>
675                         <P>Patched version of <FONT FACE="Courier, monospace">mp.process_event()</FONT>.</P>
676                 </TD>
677         </TR>
678         <TR VALIGN=TOP>
679                 <TD WIDTH=254>
680                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.record_macro</FONT></PRE>
681                 </TD>
682                 <TD WIDTH=393>
683                         <P>Start recording a macro.</P>
684                 </TD>
685         </TR>
686         <TR VALIGN=TOP>
687                 <TD WIDTH=254>
688                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.play_macro</FONT></PRE>
689                 </TD>
690                 <TD WIDTH=393>
691                         <P>Play a macro.</P>
692                 </TD>
693         </TR>
694 </TABLE>
695 <H2 CLASS="western"><A NAME="Misc"></A>Misc. (mp_misc.mpsl)</H2>
696 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
697         <COL WIDTH=254>
698         <COL WIDTH=393>
699         <TR VALIGN=TOP>
700                 <TD WIDTH=254>
701                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.dump(v)</FONT></PRE>
702                 </TD>
703                 <TD WIDTH=393>
704                         <P>Overrides the MPSL <FONT FACE="Courier, monospace">dump()</FONT>
705                         function, dumping into the active text document.</P>
706                 </TD>
707         </TR>
708 </TABLE>
709 <H2 CLASS="western"><A NAME="Movement"></A>Movement (mp_move.mpsl)</H2>
710 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
711         <COL WIDTH=254>
712         <COL WIDTH=393>
713         <TR VALIGN=TOP>
714                 <TD WIDTH=254>
715                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move(doc, func)</FONT></PRE>
716                 </TD>
717                 <TD WIDTH=393>
718                         <P>Wrapper for movement functions, with possible shift selection.</P>
719                 </TD>
720         </TR>
721         <TR VALIGN=TOP>
722                 <TD WIDTH=254>
723                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.split_by_words(s)</FONT></PRE>
724                 </TD>
725                 <TD WIDTH=393>
726                         <P>Splits a string by words.</P>
727                 </TD>
728         </TR>
729         <TR VALIGN=TOP>
730                 <TD WIDTH=254>
731                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.split_line_by_words(doc, r)</FONT></PRE>
732                 </TD>
733                 <TD WIDTH=393>
734                         <P>Splits current line by words and returns a three element array
735                         containing the list of words, the list of offsets and the current
736                         position.</P>
737                 </TD>
738         </TR>
739         <TR VALIGN=TOP>
740                 <TD WIDTH=254>
741                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.get_word(doc, r)</FONT></PRE>
742                 </TD>
743                 <TD WIDTH=393>
744                         <P>Returns the word under the cursor.</P>
745                 </TD>
746         </TR>
747         <TR VALIGN=TOP>
748                 <TD WIDTH=254>
749                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.get_range(doc, bx, by, ex, ey)</FONT></PRE>
750                 </TD>
751                 <TD WIDTH=393>
752                         <P>Gets a range or characters from a document.</P>
753                 </TD>
754         </TR>
755         <TR VALIGN=TOP>
756                 <TD WIDTH=254>
757                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.set_x(doc, x)</FONT></PRE>
758                 </TD>
759                 <TD WIDTH=393>
760                         <P>Sets the x position.</P>
761                 </TD>
762         </TR>
763         <TR VALIGN=TOP>
764                 <TD WIDTH=254>
765                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.set_y(doc, y)</FONT></PRE>
766                 </TD>
767                 <TD WIDTH=393>
768                         <P>Sets the y position.</P>
769                 </TD>
770         </TR>
771         <TR VALIGN=TOP>
772                 <TD WIDTH=254>
773                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_up(doc)</FONT></PRE>
774                 </TD>
775                 <TD WIDTH=393>
776                         <P>Moves one line up.</P>
777                 </TD>
778         </TR>
779         <TR VALIGN=TOP>
780                 <TD WIDTH=254>
781                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_down(doc)</FONT></PRE>
782                 </TD>
783                 <TD WIDTH=393>
784                         <P>Moves one line down.</P>
785                 </TD>
786         </TR>
787         <TR VALIGN=TOP>
788                 <TD WIDTH=254>
789                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_pgup(doc)</FONT></PRE>
790                 </TD>
791                 <TD WIDTH=393>
792                         <P>Moves one page up.</P>
793                 </TD>
794         </TR>
795         <TR VALIGN=TOP>
796                 <TD WIDTH=254>
797                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_pgdn(doc)</FONT></PRE>
798                 </TD>
799                 <TD WIDTH=393>
800                         <P>Moves one page down.</P>
801                 </TD>
802         </TR>
803         <TR VALIGN=TOP>
804                 <TD WIDTH=254>
805                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_left(doc)</FONT></PRE>
806                 </TD>
807                 <TD WIDTH=393>
808                         <P>Moves one char left.</P>
809                 </TD>
810         </TR>
811         <TR VALIGN=TOP>
812                 <TD WIDTH=254>
813                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_right(doc)</FONT></PRE>
814                 </TD>
815                 <TD WIDTH=393>
816                         <P>Moves one char right.</P>
817                 </TD>
818         </TR>
819         <TR VALIGN=TOP>
820                 <TD WIDTH=254>
821                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_bol(doc)</FONT></PRE>
822                 </TD>
823                 <TD WIDTH=393>
824                         <P>Moves to the beginning of the line.</P>
825                 </TD>
826         </TR>
827         <TR VALIGN=TOP>
828                 <TD WIDTH=254>
829                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_eol(doc)</FONT></PRE>
830                 </TD>
831                 <TD WIDTH=393>
832                         <P>Moves to the end of the line.</P>
833                 </TD>
834         </TR>
835         <TR VALIGN=TOP>
836                 <TD WIDTH=254>
837                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_bof(doc)</FONT></PRE>
838                 </TD>
839                 <TD WIDTH=393>
840                         <P>Moves to the beginning of the file.</P>
841                 </TD>
842         </TR>
843         <TR VALIGN=TOP>
844                 <TD WIDTH=254>
845                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_eof(doc)</FONT></PRE>
846                 </TD>
847                 <TD WIDTH=393>
848                         <P>Moves to the end of the file.</P>
849                 </TD>
850         </TR>
851         <TR VALIGN=TOP>
852                 <TD WIDTH=254>
853                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_word_left(doc)</FONT></PRE>
854                 </TD>
855                 <TD WIDTH=393>
856                         <P>Moves a word to the left.</P>
857                 </TD>
858         </TR>
859         <TR VALIGN=TOP>
860                 <TD WIDTH=254>
861                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_word_right(doc)</FONT></PRE>
862                 </TD>
863                 <TD WIDTH=393>
864                         <P>Moves a word to the right.</P>
865                 </TD>
866         </TR>
867         <TR VALIGN=TOP>
868                 <TD WIDTH=254>
869                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.move_to_coords_xy(doc, x, y)</FONT></PRE>
870                 </TD>
871                 <TD WIDTH=393>
872                         <P>Move the cursor to the character on the visual coords x and y. 
873                         See also:  <FONT FACE="Courier, monospace">mp.set_x(&nbsp;doc,&nbsp;x&nbsp;),
874                         mp.set_y(&nbsp;doc,&nbsp;y&nbsp;)</FONT>.</P>
875                 </TD>
876         </TR>
877 </TABLE>
878 <H2 CLASS="western"><A NAME="Search"></A>Search (mp_search.mpsl)</H2>
879 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
880         <COL WIDTH=254>
881         <COL WIDTH=393>
882         <TR VALIGN=TOP>
883                 <TD WIDTH=254>
884                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.prefix_regex(str)</FONT></PRE>
885                 </TD>
886                 <TD WIDTH=393>
887                         <P>Set str to be a valid regex.</P>
888                 </TD>
889         </TR>
890         <TR VALIGN=TOP>
891                 <TD WIDTH=254>
892                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.search_dir(doc, str, dir)</FONT></PRE>
893                 </TD>
894                 <TD WIDTH=393>
895                         <P>Search str and put the current position there, with direction.</P>
896                 </TD>
897         </TR>
898         <TR VALIGN=TOP>
899                 <TD WIDTH=254>
900                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.search(doc, str)</FONT></PRE>
901                 </TD>
902                 <TD WIDTH=393>
903                         <P>Search str and put the current position there, downwards.</P>
904                 </TD>
905         </TR>
906         <TR VALIGN=TOP>
907                 <TD WIDTH=254>
908                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.search_back(doc, str)</FONT></PRE>
909                 </TD>
910                 <TD WIDTH=393>
911                         <P>Search str and put the current position there, backwards.</P>
912                 </TD>
913         </TR>
914         <TR VALIGN=TOP>
915                 <TD WIDTH=254>
916                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.replace_1(doc, this, that)</FONT></PRE>
917                 </TD>
918                 <TD WIDTH=393>
919                         <P>Searches 'this' and replaces it with 'that', once.</P>
920                 </TD>
921         </TR>
922         <TR VALIGN=TOP>
923                 <TD WIDTH=254>
924                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.replace(doc, this, that)</FONT></PRE>
925                 </TD>
926                 <TD WIDTH=393>
927                         <P>Replaces 'this' with 'that', may be globally.</P>
928                 </TD>
929         </TR>
930         <TR VALIGN=TOP>
931                 <TD WIDTH=254>
932                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.seek_prev_or_next_char(doc, func)</FONT></PRE>
933                 </TD>
934                 <TD WIDTH=393>
935                         <P>Moves to next or previous occurrence of current char.</P>
936                 </TD>
937         </TR>
938         <TR VALIGN=TOP>
939                 <TD WIDTH=254>
940                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.grep(rx, spec)</FONT></PRE>
941                 </TD>
942                 <TD WIDTH=393>
943                         <P>Greps str in the files in spec. Returns NULL if no file matched
944                         the <FONT FACE="Courier, monospace">glob()</FONT> (or <FONT FACE="Courier, monospace">glob()</FONT>
945                         is unsupported), an empty list if the string was not found or an
946                         array with the matches, that are three-element arrays with the
947                         file name, the line number and the line that matched.</P>
948                 </TD>
949         </TR>
950 </TABLE>
951 <H2 CLASS="western"><A NAME="Sessions"></A>Sessions (mp_session.mpsl)</H2>
952 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
953         <COL WIDTH=254>
954         <COL WIDTH=393>
955         <TR VALIGN=TOP>
956                 <TD WIDTH=254>
957                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.session_file()</FONT></PRE>
958                 </TD>
959                 <TD WIDTH=393>
960                         <P>Returns the appropriate session saving file.</P>
961                 </TD>
962         </TR>
963         <TR VALIGN=TOP>
964                 <TD WIDTH=254>
965                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.save_session()</FONT></PRE>
966                 </TD>
967                 <TD WIDTH=393>
968                         <P>Saves currently open files as a session. Returns: -1, nothing
969                         to save;   -2, error saving; or 0, session correctly saved.</P>
970                 </TD>
971         </TR>
972         <TR VALIGN=TOP>
973                 <TD WIDTH=254>
974                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.load_session()</FONT></PRE>
975                 </TD>
976                 <TD WIDTH=393>
977                         <P>Loads a session. Returns: -1, no session, -2, user cancellation
978                         on closing currently open documents and 0, ok.</P>
979                 </TD>
980         </TR>
981 </TABLE>
982 <H2 CLASS="western"><A NAME="Spell"></A>Spell (mp_ispell.mpsl)</H2>
983 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
984         <COL WIDTH=254>
985         <COL WIDTH=393>
986         <TR VALIGN=TOP>
987                 <TD WIDTH=254>
988                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.open_ispell_pipe</FONT></PRE>
989                 </TD>
990                 <TD WIDTH=393>
991                         <P>Opens the pipe to ispell.</P>
992                 </TD>
993         </TR>
994         <TR VALIGN=TOP>
995                 <TD WIDTH=254>
996                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.close_ispell_pipe</FONT></PRE>
997                 </TD>
998                 <TD WIDTH=393>
999                         <P>Closes the pipe to ispell.</P>
1000                 </TD>
1001         </TR>
1002         <TR VALIGN=TOP>
1003                 <TD WIDTH=254>
1004                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.ispell_word_color_func(w)</FONT></PRE>
1005                 </TD>
1006                 <TD WIDTH=393>
1007                         <P><FONT FACE="Courier, monospace">mp.word_color_func()</FONT> for
1008                         ispell.</P>
1009                 </TD>
1010         </TR>
1011         <TR VALIGN=TOP>
1012                 <TD WIDTH=254>
1013                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.ispell(b)</FONT></PRE>
1014                 </TD>
1015                 <TD WIDTH=393>
1016                         <P>Sets or unsets spell checking (-1, toggle).</P>
1017                 </TD>
1018         </TR>
1019 </TABLE>
1020 <H2 CLASS="western"><A NAME="Syntax Highlighting"></A>Syntax
1021 Highlighting (mp_syntax.mpsl)</H2>
1022 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
1023         <COL WIDTH=254>
1024         <COL WIDTH=393>
1025         <TR VALIGN=TOP>
1026                 <TD WIDTH=254>
1027                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.syn_token_list(l)</FONT></PRE>
1028                 </TD>
1029                 <TD WIDTH=393>
1030                         <P>Initializes the language syntax highlighting lists.</P>
1031                 </TD>
1032         </TR>
1033         <TR VALIGN=TOP>
1034                 <TD WIDTH=254>
1035                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.detect_syntax(doc)</FONT></PRE>
1036                 </TD>
1037                 <TD WIDTH=393>
1038                         <P>Tries to detect the syntax of a document.</P>
1039                 </TD>
1040         </TR>
1041         <TR VALIGN=TOP>
1042                 <TD WIDTH=254>
1043                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.help(doc, word)</FONT></PRE>
1044                 </TD>
1045                 <TD WIDTH=393>
1046                         <P><BR>
1047                         </P>
1048                 </TD>
1049         </TR>
1050 </TABLE>
1051 <H2 CLASS="western"><A NAME="Tags"></A>Tags (mp_tags.mpsl)</H2>
1052 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
1053         <COL WIDTH=254>
1054         <COL WIDTH=393>
1055         <TR VALIGN=TOP>
1056                 <TD WIDTH=254>
1057                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.load_tags(force)</FONT></PRE>
1058                 </TD>
1059                 <TD WIDTH=393>
1060                         <P>Load a 'tags' file.</P>
1061                 </TD>
1062         </TR>
1063         <TR VALIGN=TOP>
1064                 <TD WIDTH=254>
1065                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.open_tag(tag)</FONT></PRE>
1066                 </TD>
1067                 <TD WIDTH=393>
1068                         <P>Opens a tag (interactive).</P>
1069                 </TD>
1070         </TR>
1071         <TR VALIGN=TOP>
1072                 <TD WIDTH=254>
1073                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.complete(d, list, label)</FONT></PRE>
1074                 </TD>
1075                 <TD WIDTH=393>
1076                         <P>Completes the current word given a list (interactive).</P>
1077                 </TD>
1078         </TR>
1079 </TABLE>
1080 <H2 CLASS="western"><A NAME="Templates"></A>Templates
1081 (mp_templates.mpsl)</H2>
1082 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
1083         <COL WIDTH=254>
1084         <COL WIDTH=393>
1085         <TR VALIGN=TOP>
1086                 <TD WIDTH=254>
1087                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.read_templates_file()</FONT></PRE>
1088                 </TD>
1089                 <TD WIDTH=393>
1090                         <P>Reads the <FONT FACE="Courier, monospace">$HOME/.mp_templates</FONT>
1091                         file into mp.templates.</P>
1092                 </TD>
1093         </TR>
1094 </TABLE>
1095 <H2 CLASS="western"><A NAME="TUI"></A>TUI (mp_tui.mpsl)</H2>
1096 <TABLE WIDTH=665 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
1097         <COL WIDTH=254>
1098         <COL WIDTH=393>
1099         <TR VALIGN=TOP>
1100                 <TD WIDTH=254>
1101                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.tui.prompt(prompt)</FONT></PRE>
1102                 </TD>
1103                 <TD WIDTH=393>
1104                         <P>Draw a prompt on screen.</P>
1105                 </TD>
1106         </TR>
1107         <TR VALIGN=TOP>
1108                 <TD WIDTH=254>
1109                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.tui.readline(prompt, history, default, flags)</FONT></PRE>
1110                 </TD>
1111                 <TD WIDTH=393>
1112                         <P>The readline function, with special functionality in 'flags'. 
1113                         Returns the string typed in.</P>
1114                 </TD>
1115         </TR>
1116         <TR VALIGN=TOP>
1117                 <TD WIDTH=254>
1118                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.tui.list(prompt, data, pos)</FONT></PRE>
1119                 </TD>
1120                 <TD WIDTH=393>
1121                         <P>Select from a list.  Returns the index into data that was
1122                         selected.</P>
1123                 </TD>
1124         </TR>
1125         <TR VALIGN=TOP>
1126                 <TD WIDTH=254>
1127                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.alert(msg)</FONT></PRE>
1128                 </TD>
1129                 <TD WIDTH=393>
1130                         <P><BR>
1131                         </P>
1132                 </TD>
1133         </TR>
1134         <TR VALIGN=TOP>
1135                 <TD WIDTH=254>
1136                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.confirm(msg, def)</FONT></PRE>
1137                 </TD>
1138                 <TD WIDTH=393>
1139                         <P><BR>
1140                         </P>
1141                 </TD>
1142         </TR>
1143         <TR VALIGN=TOP>
1144                 <TD WIDTH=254>
1145                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.openfile(prompt)</FONT></PRE>
1146                 </TD>
1147                 <TD WIDTH=393>
1148                         <P><BR>
1149                         </P>
1150                 </TD>
1151         </TR>
1152         <TR VALIGN=TOP>
1153                 <TD WIDTH=254>
1154                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.savefile(prompt)</FONT></PRE>
1155                 </TD>
1156                 <TD WIDTH=393>
1157                         <P><BR>
1158                         </P>
1159                 </TD>
1160         </TR>
1161         <TR VALIGN=TOP>
1162                 <TD WIDTH=254>
1163                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.form(widgets)</FONT></PRE>
1164                 </TD>
1165                 <TD WIDTH=393>
1166                         <P><BR>
1167                         </P>
1168                 </TD>
1169         </TR>
1170         <TR VALIGN=TOP>
1171                 <TD WIDTH=254>
1172                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.menu()</FONT></PRE>
1173                 </TD>
1174                 <TD WIDTH=393>
1175                         <P><BR>
1176                         </P>
1177                 </TD>
1178         </TR>
1179         <TR VALIGN=TOP>
1180                 <TD WIDTH=254>
1181                         <PRE><FONT SIZE=2 STYLE="font-size: 9pt">mp.drv.busy(onoff)</FONT></PRE>
1182                 </TD>
1183                 <TD WIDTH=393>
1184                         <P><BR>
1185                         </P>
1186                 </TD>
1187         </TR>
1188 </TABLE>
1189 <PRE></PRE>
1190 </BODY>
1191 </HTML>