1#i linuxdoc.tm
2
3#d slang \bf{S-lang}
4#d kw#1 \tt{$1}
5#d exmp#1 \tt{$1}
6#d var#1 \tt{$1}
7#d ldots ...
8#d chapter#1 <chapt>$1<p>
9#d preface <preface>
10#d tag#1 <tag>$1</tag>
11
12#d function#1 \section{<bf>$1</bf>\label{$1}}<descrip>
13#d variable#1 \section{<bf>$1</bf>\label{$1}}<descrip>
14#cd function#1 <p><bf>$1</bf>\label{$1}<p><descrip>
15#d synopsis#1 <tag> Synopsis </tag> $1
16#d keywords#1 <tag> Keywords </tag> $1
17#d usage#1 <tag> Usage </tag> <tt>$1</tt>
18#d description <tag> Description </tag>
19#d example <tag> Example </tag>
20#d notes <tag> Notes </tag>
21#d seealso#1 <tag> See Also </tag> <tt>$1</tt>
22#d documentstyle article
23#d r#1 \ref{$1}{$1}
24#d done </descrip><p>
25
26#d user-manual \bf{A Guide to the S-Lang Language}
27
28\linuxdoc
29\begin{\documentstyle}
30
31\title Jed Intrinsic Function Reference Manual
32\author John E. Davis, \tt{davis@space.mit.edu}
33\date \__today__
34
35\toc
36
37
38\function{setkey}
39\synopsis{setkey}
40\usage{Void setkey(String fun, String key);}
41\description
42  This function may be used to define a key sequence specified by the
43  string \var{key} to the function \var{fun}.  \var{key} can contain the \exmp{^}
44  character which denotes that the following character is to be
45  interpreted as a control character, e.g.,
46#v+
47        setkey("bob", "^Kt");
48#v-
49  sets the key sequence \exmp{Ctrl-K t} to the function \var{bob}.
50
51  The \var{fun} argument is usually the name of an internal or a user
52  defined S-Lang function.  However, if may also be a sequence of
53  functions or even another keysequence (a keyboard macro).  For
54  example,
55#v+
56        setkey ("bol;insert(string(whatline()))", "^Kw");
57#v-
58  assigns the key sequence \exmp{Ctrl-K w} to move to the beginning of a line
59  and insert the current line number.  For more information about this
60  important function, see the JED User Manual.
61
62  Note that \var{setkey} works on the "global" keymap.
63\seealso{unsetkey, definekey}
64\done
65
66\function{_autoload}
67\synopsis{_autoload}
68\usage{Void _autoload (String fun, String fn, ..., Integer n);}
69\description
70  The \var{_autoload} function is like the \var{autoload} function except that
71  it takes \var{n} pairs of function name (\var{fun}) / filename (\var{fn}) pairs.
72  For example,
73#v+
74        _autoload ("fun_a", "file_a", "fun_b", "file_b", 2);
75#v-
76  is equivalent to
77#v+
78        autoload ("fun_a", "file_a");
79        autoload ("fun_b", "file_b");
80#v-
81\seealso{autoload}
82\done
83
84\function{push_mark}
85\synopsis{push_mark}
86\usage{Void push_mark();}
87\description
88  This function marks the current position as the beginning of a region.
89  and pushes other marks onto a stack.  A region is defined by this
90  mark and the editing point.  The mark is removed from the stack only
91  when the function \var{pop_mark} is called.
92  For example,
93#v+
94        define mark_buffer ()
95        {
96          bob ();
97          push_mark ();
98          eob ();
99        }
100#v-
101  marks the entire buffer as a region.
102\seealso{pop_mark, push_spot, markp, dupmark, check_region}
103\done
104
105\function{bol}
106\synopsis{bol}
107\usage{Void bol();}
108\description
109  This function moves the current editing point to the beginning of the
110  current line.  The function \var{bolp} may be used to see if one is already
111  at the beginning of a line.
112\seealso{eol, bob, eob, bolp}
113\done
114
115\function{insert}
116\synopsis{insert}
117\usage{Void insert (String str);}
118\description
119  Inserts string \var{str} into buffer at the current position.  The editing
120  point is moved to the end of the of the string that was inserted.
121\seealso{insert_char, del, insert_file, insbuf}
122\done
123
124\function{insert_char}
125\synopsis{insert_char}
126\description
127  Undocumented
128\done
129
130\function{eol}
131\synopsis{eol}
132\usage{Void eol();}
133\description
134  Moves the current position to the end of the current line.  The function
135  \var{eolp} may be used to see if one is at the end of a line or not.
136\seealso{eolp, bol, bob, eob}
137\done
138
139\function{setbuf}
140\synopsis{setbuf}
141\usage{Void setbuf(String buf);}
142\description
143  Changes the default buffer to one named \var{buf}.  If the buffer does not
144  exist, it will be created.
145  Note: This change only lasts until top
146  level of editor loop is reached at which point the the buffer
147  associated with current window will be made the default.  That is this
148  change should only be considered as temporary.  To make a long lasting
149  change, use the function \var{sw2buf}.
150\seealso{sw2buf, pop2buf, whatbuf, pop2buf_whatbuf}
151\done
152
153\function{_add_completion}
154\synopsis{_add_completion}
155\usage{Void _add_completion (String f1, String f2, ..., Integer n);}
156\description
157  The \var{_add_completion} function is like the \var{add_completion} function
158  except that it takes \var{n} names \var{f1}, ... \var{fn}.
159  For example,
160#v+
161        _add_completion ("fun_a", "fun_b", 2);
162#v-
163  is equivalent to
164#v+
165        add_completion ("fun_a");
166        add_completion ("fun_b");
167#v-
168\seealso{add_completion}
169\done
170
171\function{del_region}
172\synopsis{del_region}
173\usage{Void del_region ();}
174\description
175  This function deletes the region defined by the mark and the current
176  editing point.  For example,
177#v+
178        define delete_this_line ()
179        {
180          bol (); push_mark (); eol ();
181          del_region ();
182        }
183#v-
184  defines a function that deletes all characters on the current line
185  from the beginning of the line until the end of the line.  It does not
186  delete the line itself.
187\seealso{push_mark, markp, check_region}
188\done
189
190\function{bufsubstr}
191\synopsis{bufsubstr}
192\usage{String bufsubstr ();}
193\description
194  This function returns a string that contains the characters in the
195  region specified by a mark and the current editing point.
196  If the region crosses lines, the string will contain newline
197  characters.
198\seealso{insbuf, push_mark}
199\done
200
201\function{right}
202\synopsis{right}
203\usage{Integer right(Integer n);}
204\description
205  This function moves the editing position forward forward \var{n}
206  characters. It returns the number of characters actually moved.  The
207  number returned will be smaller than \var{n} if the end of the buffer is
208  reached.
209\seealso{left, up, down, eol, eob}
210\done
211
212\function{definekey}
213\synopsis{definekey}
214\usage{Void definekey(String f, String key, String kmap);}
215\description
216  Unlike \var{setkey} which operates on the global keymap, this function is
217  used for binding keys to functions in a specific keymap.  Here \var{f} is
218  the function to be bound, \var{key} is a string of characters that make up
219  the key sequence and \var{kmap} is the name of the keymap to be used.  See
220  \var{setkey} for more information about the arguments.
221\seealso{setkey, undefinekey, make_keymap, use_keymap}
222\done
223
224\function{left}
225\synopsis{left}
226\usage{Integer left(Integer n);}
227\description
228  \var{left} moves the editing point backward \var{n} characters and returns the
229  number actually moved.  The number returned will be less than \var{n} only
230  if the top of the buffer is reached.
231\seealso{right, up, down, bol, bob}
232\done
233
234\function{whatbuf}
235\synopsis{whatbuf}
236\usage{String what_buffer();}
237\description
238  \var{whatbuf} returns the name of the current buffer.  It is usually used
239  in functions when one wants to work with more than one buffer.  The
240  function \var{setbuf_info} may be used to change the name of the buffer.
241\seealso{getbuf_info, bufferp}
242\done
243
244\function{getbuf_info}
245\synopsis{getbuf_info}
246\usage{getbuf_info ();}
247\description
248  This function returns values to the stack.  The four values from the
249  top are:
250#v+
251        Integer  % buffer flags
252        String   % name of buffer
253        String   % directory associated with buffer
254        String   % name of file associated with buffer (if any).
255#v-
256  The integer that corresponds to the buffer flags are encoded as:
257#v+
258        bit 0: buffer modified
259        bit 1: auto save mode
260        bit 2: file on disk modified
261        bit 3: read only bit
262        bit 4: overwrite mode
263        bit 5: undo enabled
264        bit 6: buffer buried
265        bit 7: Force save upon exit.
266        bit 8: Do not backup
267        bit 9: File associated with buffer is a binary file
268        bit 10: Add CR to end of lines when writing buffer to disk.
269        bit 11: Abbrev mode
270#v-
271  For example,
272#v+
273        (file,,,flags) = getbuf_info();
274#v-
275  returns the file and the flags associated with the current buffer.
276\seealso{setbuf_info, whatbuf}
277\done
278
279\function{otherwindow}
280\synopsis{otherwindow}
281\usage{Void otherwindow ();}
282\description
283  This function will make the next window in the ring of windows as the
284  default window. For example,
285#v+
286        define zoom_next_window ()
287        {
288          otherwindow (); onewindow ();
289        }
290#v-
291  defines a function that moves to the next window and then makes it the
292  only window on the screen.
293\seealso{nwindows, onewindow}
294\seealso{MINIBUFFER_ACTIVE}
295\done
296
297\function{is_internal}
298\synopsis{is_internal}
299\usage{Integer is_internal(String f);}
300\description
301  \var{is_internal} returns non-zero is function \var{f} is defined as an
302  internal function or returns zero if not.  Internal functions not
303  immediately accessable from S-Lang; rather, they must be called using
304  the \var{call} function.  See also the related S-Lang function
305  \var{is_defined} in the S-Lang Programmer's Reference.
306\seealso{call}
307\done
308
309\function{setbuf_info}
310\synopsis{setbuf_info}
311\usage{Void setbuf_info(String file, String dir, String buf, Integer flags);}
312\description
313  This function may be used to change attributes regarding the current
314  buffer.  It performs the opposite function of the related function
315  \var{getbuf_info}.   Here \var{file} is the name of the file to be associated
316  with the buffer; \var{dir} is the directory to be associated with the
317  buffer; \var{buf} is the name to be assigned to the buffer, and \var{flags}
318  describe the buffer attributes.  See \var{getbuf_info} for a discussion of
319  \var{flags}.  Note that the actual file associated with the buffer is
320  located in directory \var{dir} with the name \var{file}.
321  For example, the function
322#v+
323        define set_overwrite_mode ()
324        {
325           variable dir, file, flags, name;
326           (file, dir, name, flags) = getbuf_info ();
327           flags = flags | (1 shl 4);
328           setbuf_info (file, dir, name, flags);
329        }
330#v-
331  may be used to turn on overwrite mode for the current buffer.  Note
332  that it is better exploit the fact that S-Lang is a stack based language
333  and simply write the above function as:
334#v+
335        define set_overwrite_mode ()
336        {
337           setbuf_info (getbuf_info () | 0x10);
338        }
339#v-
340  Here, \exmp{(1 shl 4)} has been written as the hexidecimal number \exmp{0x10}.
341\seealso{getbuf_info, setbuf, whatbuf}
342\done
343
344\function{up}
345\synopsis{up}
346\usage{Integer up(Integer n);}
347\description
348  This function moves the current point up \var{n} lines and returns the
349  number of lines actually moved.  The number returned will be less than
350  \var{n} only if the top of the buffer is reached.
351\seealso{down, left, right}
352\done
353
354\function{down}
355\synopsis{down}
356\usage{Integer down(Integer n);}
357\description
358  The \var{down} function is used to move the editing point down a number of
359  lines specified by the integer \var{n}.  It returns the number of lines
360  actually moved.  The number returned will be less than \var{n} only if the
361  last line of the buffer has been reached.  The editing point will be
362  left at the beginning of the line if it succeeds in going down more
363  than one line.
364  Example: The function
365#v+
366        define trim_buffer
367        {
368          bob ();
369          do
370            {
371               eol (); trim ();
372            }
373          while (down (1));
374        }
375#v-
376  removes excess whitespace from the end of every line in the buffer.
377\seealso{down, left, right, goto_line}
378\done
379
380\function{call}
381\synopsis{call}
382\usage{Void call(String f);}
383\description
384  The \var{call} function is used to execute an internal function which is
385  not directly accessable to the S-Lang interpreter.
386\seealso{is_internal}
387\done
388
389\function{eob}
390\synopsis{eob}
391\usage{Void eob();}
392\description
393  The \var{eob} function is used to move the current point to the end of the
394  buffer.  The function \var{eobp} may be used to see if the current
395  position is at the end of the buffer.
396\seealso{eobp, bob, bol, eol}
397\done
398
399\function{unsetkey}
400\synopsis{unsetkey}
401\usage{Void unsetkey(String key);}
402\description
403  This function is used to remove the definition of the key sequence
404  \var{key} from the "global" keymap.  This is sometimes necessary to bind
405  new key sequences which conflict with other ones.  For example, the
406  "global" keymap binds the keys \exmp{"^[[A"}, \exmp{"^[[B"}, \exmp{"^[[C"}, and
407  \exmp{"^[[D"} to the character movement functions.  Using
408  \exmp{unsetkey("^[[A")} will remove the binding of \exmp{"^[[A"} from the global
409  keymap but the other three will remain.  However, \exmp{unsetkey("^[[")}
410  will remove the definition of all the above keys.  This might be
411  necessary to bind, say, \exmp{"^[["} to some function.
412\seealso{setkey, undefinekey}
413\done
414
415\function{bob}
416\synopsis{bob}
417\usage{Void bob ();}
418\description
419  The function \var{bob} is used to move the current editing point to the
420  beginning of the buffer.  The function \var{bobp} may be used to determine
421  if the editing point is at the beginning of the buffer or not.
422\seealso{bobp, eob, bol, eol}
423\done
424
425\function{looking_at}
426\synopsis{looking_at}
427\usage{Integer looking_at (String s);}
428\description
429  This function returns non-zero if the characters immediately following
430  the current editing point match the string specified by \var{s}.  Whether
431  the match is case-sensitive or not depends upon the value of the
432  variable \var{CASE_SEARCH}.  The function returns zero if there is no match.
433\seealso{ffind, fsearch, re_fsearch, bfind}
434\done
435
436\function{del}
437\synopsis{del}
438\usage{Void del ();}
439\description
440  The \var{del} function deletes the character at the current editing
441  position.  If the position is at the end of the buffer, nothing happens.
442  If the deletion occurs at the end of a line, the next line will be joined
443  with the current one.
444\seealso{eobp, erase_buffer, insert}
445\done
446
447\function{markp}
448\synopsis{markp}
449\usage{Void markp ();}
450\description
451  This function returns a non-zero value if the mark is set; otherwise, it
452  returns zero.  If a mark is set, a region is defined.
453\seealso{push_mark, pop_mark, check_region, push_spot}
454\done
455
456\function{nwindows}
457\synopsis{nwindows}
458\usage{Integer nwindows ();}
459\description
460  The \var{nwindows} function returns the number of windows currently visible.
461  If the variable \var{MINIBUFFER_ACTIVE} is non-zero, the minibuffer is busy and
462  contributes to the number of windows.
463\seealso{splitwindow, onewindow, window_size}
464\seealso{MINIBUFFER_ACTIVE}
465\done
466
467\function{add_completion}
468\synopsis{add_completion}
469\usage{Void add_completion(String f);}
470\description
471  The \var{add_completion} function adds the user defined S-Lang function
472  with name specified by the string \var{f} to the list of functions that
473  are eligible for mini-buffer completion.  The function specified by
474  \var{f} must be already defined before this function is called.  The
475  S-Lang function \var{is_defined} may be used to test whether or not the
476  function is defined.
477\seealso{read_with_completion, _add_completion}
478\done
479
480\function{what_column}
481\synopsis{what_column}
482\usage{Integer what_column ();}
483\description
484  The \var{what_column} function returns the current column number expanding
485  tabs, control characters, etc...  The beginning of the line is at
486  column number one.
487\seealso{whatline, whatpos, goto_column, bolp, eolp}
488\done
489
490\function{eobp}
491\synopsis{eobp}
492\usage{Integer eobp ();}
493\description
494  The functio \var{eobp} is used to determine if the current position is at
495  the end of the buffer or not.  It returns a non-zero value if at the
496  end of the buffer or zero if not.
497\seealso{eob, bolp, eolp}
498\done
499
500\function{set_mode}
501\synopsis{set_mode}
502\usage{ Void set_mode(String mode, Integer flags);}
503\description
504  This function sets buffer mode flags and status line mode name.  \var{mode}
505  is a string which is displayed on the status line if the \exmp{%m} status
506  line format specifier is used. The second argument, \var{flags} is an
507  integer with the possible values:
508#v+
509        0 : no mode. Very generic
510        1 : Wrap mode.  Lines are automatically wrapped at wrap column.
511        2 : C mode.
512        4 : Language mode.  Mode does not wrap but is useful for computer
513            languages.
514        8 : S-Lang mode
515        16: Fortran mode highlighting
516        32: TeX mode highlighting
517#v-
518\seealso{whatmode, getbuf_info, setbuf_info.}
519\done
520
521\function{buffer_visible}
522\synopsis{buffer_visible}
523\usage{Integer buffer_visible (String buf);}
524\description
525  This function is used to determine whether or not a buffer with name
526  specified by the string \var{buf} is in a window or not.  More explicitly,
527  it returns the number of windows containing \var{buf}.  This means that if
528  \var{buf} does not occupy a window, it returns zero.  For Example,
529#v+
530        define find_buffer_in_window (buf)
531        {
532           !if (buffer_visible (buf)) return 0;
533           pop2buf (buf);
534           return 1;
535        }
536#v-
537  is a function that moves to the window containing \var{buf} if \var{buf} is in
538  a window.
539\seealso{bufferp, nwindows}
540\done
541
542\function{exit_jed}
543\synopsis{exit_jed}
544\usage{Void exit_jed ();}
545\description
546  This function should be called to exit JED is a graceful and safe
547  manner.  If any buffers have been modified but not saved, the user is
548  queried about whether or not to save each one first.  \var{exit_jed} calls
549  the S-Lang hook \var{exit_hook} if it is defined.  If \var{exit_hook} is
550  defined, it must either call \var{quit_jed} or \var{exit_jed} to really exit
551  the editor.  If \var{exit_jed} is called from \var{exit_hook}, \var{exit_hook} will
552  not be called again.  For example:
553#v+
554        define exit_hook ()
555        {
556          flush ("Really Exit?");
557
558          forever
559            {
560              switch (getkey () & 0x20)    % map to lowercase
561               { case 'y': exit_jed (); }
562               { case 'n': return; }
563              beep ();
564            }
565        }
566#v-
567  may be used to prompt user for confirmation of exit.
568\seealso{quit_jed, suspend, flush, getkey}
569\seealso{BATCH}
570\done
571
572\function{set_color}
573\synopsis{set_color}
574\usage{Void set_color(String obj, String fg, String bg);}
575\description
576  This function sets the foreground and background colors of an object
577  specified by the string \var{obj} to \var{fg} and \var{bg}.  The exact values of
578  the strings \var{fg} and \var{bg} are system dependent.  For the X-Window
579  system, they can be any string that the server understands, e.g.,
580  \exmp{"SteelBlue"}.  For other systems, the color must be one of the
581  following:
582#v+
583        "black"            "gray"
584        "red"              "brightred"
585        "green"            "brightgreen"
586        "brown"            "yellow"
587        "blue"             "brightblue"
588        "magenta"          "brightmagenta"
589        "cyan"             "brightcyan"
590        "lightgray"        "white"
591#v-
592  One most terminals, the values in the second column have no affect
593  when used as the background color.
594
595  The valid names for \var{obj} are:
596#v+
597        "normal"      Default foreground/background
598        "status"      The status window line
599        "region"      Highlighted Regions
600        "cursor"      Text Cursor (X-Windows)
601        "menu"        The menu bar
602        "error"       Error messages
603        "message"     Other messages
604        "dollar"      Color of the indicator that text extends beyond the
605                       boundary of the window.
606#v-
607  If color syntax highlighting is enabled, the following object names
608  are also meaningful:
609#v+
610        "number"      Numbers in C-mode and Equations in TeX-mode
611        "delimiter"   Commas, semi-colons, etc...
612        "keyword"     Language dependent
613        "string"      Literal strings
614        "comment"     Comments
615        "operator"    Such as +, -, etc...
616        "preprocess"  Preprocessor lines
617#v-
618  If line attributes are available, then you may also specifiy the color
619  of the hidden line indicator:
620#v+
621        "..."         Hidden line indicator
622#v-
623  See a discussion in the JED User Manual for more discussion.
624\seealso{set_color_esc, set_column_colors, set_color_object}
625\seealso{WANT_SYNTAX_HIGHLIGHT, USE_ANSI_COLORS}
626\done
627
628\function{color_number}
629\synopsis{color_number}
630\usage{Integer color_number (String obj);}
631\description
632  This function returns the object number associated with the
633  string \var{obj}.  Valid names for \var{obj} are as per \var{set_color}.
634\seealso{set_color, set_column_colors}
635\seealso{WANT_SYNTAX_HIGHLIGHT, USE_ANSI_COLORS}
636\done
637
638\function{set_color_esc}
639\synopsis{set_color_esc}
640\usage{Void set_color_esc (String object, String esc_seq);}
641\description
642  This function may be used to associate an escape sequence with an
643  object.  The escape sequence will be sent to the terminal prior to
644  sending updating the object.  It may be used on mono terminals to
645  underline objects, etc...  The object names are the same names used by
646  the \var{set_color} function.
647  Note: Care should be exercised when using
648  this function.  Also, one may need to experiment around a little to
649  get escape sequences that work together.
650\seealso{set_color}
651\done
652
653\function{extract_filename}
654\synopsis{extract_filename}
655\usage{String extract_filename (String filespec);}
656\description
657  This function may be used to separate the file name from the path of
658  of a file specified by \var{filespec}.  For example, under Unix, the
659  expression
660#v+
661        extract_filename ("/tmp/name");
662#v-
663  returns the string \exmp{"name"}.
664\seealso{expand_filename}
665\done
666
667\function{trim}
668\synopsis{trim}
669\usage{Void trim ();}
670\description
671  The \var{trim} function removes all whitespace around the current editing
672  point.  In this context, whitespace is considered to be any
673  combination of tab and space characters.  In particular, it does not
674  include the newline character.  This means that the \var{trim} function
675  will not delete across lines.
676\seealso{skip_chars, skip_white, del, del_region}
677\done
678
679\function{pop2buf}
680\synopsis{pop2buf}
681\usage{Void pop2buf (String buf);}
682\description
683  The \var{pop2buf} function will switch to another window and display the
684  buffer specified by \var{buf} in it.  If \var{buf} does not exist, it will be
685  created. If \var{buf} already exists in a window, the window containing
686  \var{buf} will become the active one.  This function will create a new
687  window if necessary.  All that is guaranteed is that the current
688  window will continue to display the same buffer before and after the
689  call to \var{pop2buf}.
690\seealso{whatbuf, pop2buf_whatbuf, setbuf, sw2buf, nwindows}
691\done
692
693\function{pop2buf_whatbuf}
694\synopsis{pop2buf_whatbuf}
695\usage{String pop2buf_whatbuf (String buf);}
696\description
697  This function performs the same function as \var{pop2buf} except that the
698  name of the buffer that \var{buf} replaced in the window is returned.
699  This allows one to restore the buffer in window to what it was before
700  the call to \var{pop2buf_whatbuf}.
701\seealso{pop2buf, whatbuf}
702\done
703
704\function{copy_file}
705\synopsis{copy_file}
706\usage{Integer copy_file (String src, String dest);}
707\description
708  This function may be used to copy a file named \var{src} to a new file
709  named \var{dest}.  It attempts to preserve the file access and modification
710  times as well as the ownership and protection.
711
712  It returns \exmp{0} upon success and \exmp{-1} upon failure.
713\seealso{rename_file, file_status}
714\done
715
716\function{copy_region}
717\synopsis{copy_region}
718\usage{Void copy_region (String buf);}
719\description
720  This function may be used to copy a region defined by a mark and the
721  current position to the buffered specified by the name \var{buf}. It does
722  not delete the characters in region but it does pop the mark that
723  determines the region.
724\seealso{insbuf, bufsubstr, push_mark, pop_mark, bufferp}
725\done
726
727\function{insbuf}
728\synopsis{insbuf}
729\usage{Void insbuf (String buf);}
730\description
731  This function may be used to insert the contents of a buffer specified
732  by the name \var{buf} into the current buffer.  The editing position is
733  advanced to the end of the insertion.
734\seealso{copy_region, narrow, narrow_to_region}
735\done
736
737\function{bolp}
738\synopsis{bolp}
739\usage{Integer bolp ();}
740\description
741  \var{bolp} is used to test if the current position is at the beginning of
742  a line or not.  It returns non-zero if the position is at the
743  beginning of a line or zero if not.
744\seealso{bol, eolp, bobp, eobp}
745\done
746
747\function{beep}
748\synopsis{beep}
749\usage{Void beep ();}
750\description
751  The \var{beep} function causes the terminal to beep according to the value
752  of the variable \var{IGNORE_BEEP}.
753\seealso{tt_send}
754\seealso{IGNORE_BEEP}
755\done
756
757\function{onewindow}
758\synopsis{onewindow}
759\usage{Void onewindow ();}
760\description
761  This function deletes all other windows except the current window and
762  the mini-buffer window.
763\seealso{nwindows, splitwindow, enlargewin}
764\seealso{MINIBUFFER_ACTIVE}
765\done
766
767\function{pop_spot}
768\synopsis{pop_spot}
769\usage{Void pop_spot ();}
770\description
771  This function is used after a call to \var{push_spot} to return to the
772  editing position at the last call to \var{push_spot} in the current buffer.
773\seealso{push_spot, pop_mark}
774\done
775
776\function{push_spot}
777\synopsis{push_spot}
778\usage{Void push_spot ();}
779\description
780  \var{push_spot} pushes the location of the current buffer location onto a
781  stack.  This function does not set the mark.  The function \var{push_mark}
782  should be used for that purpose. The spot can be returned to using the
783  function \var{pop_spot}.
784  Note: Spots are local to each buffer.  It is not
785  possible to call \var{push_spot} from one buffer and then subsequently
786  call \var{pop_spot} from another buffer to return to the position in the
787  first buffer.  For this purpose, one must use user marks instead.
788\seealso{pop_spot, push_mark, create_user_mark}
789\done
790
791\function{sw2buf}
792\synopsis{sw2buf}
793\usage{Void sw2buf (String buf);}
794\description
795  This function is used to switch to another buffer whose name is
796  specified by the parameter \var{buf}.  If the buffer specified by \var{buf}
797  does not exist, one will be created.
798  Note: Unlike \var{setbuf}, the change
799  to the new buffer is more permanent in the sense that when control
800  passed back out of S-Lang to the main editor loop, if the current
801  buffer at that time is the buffer specified here, this buffer will be
802  attached to the window.
803\seealso{setbuf, pop2buf, bufferp}
804\done
805
806\function{tt_send}
807\synopsis{tt_send}
808\usage{Void tt_send (String s);}
809\description
810  This function may be used to send a string specified by \var{s} directly
811  to the terminal with no interference by the editor.  One should
812  exercise caution when using this routine since it may interfere with
813  JED's screen management routines forcing one to redraw the screen.
814  Nevertheless, it can serve a useful purpose.  For example, when run in
815  an XTerm window, using
816#v+
817        tt_send ("\e[?9h");
818#v-
819  will enable sending mouse click information to JED encoded as
820  keypresses.
821\seealso{beep}
822\done
823
824\function{eolp}
825\synopsis{eolp}
826\usage{Integer eolp ();}
827\description
828  This function may be used to determine whether or not the current
829  position is at the end of a line ot not.  If it is, the routine
830  returns a non-zero value; otherwise it returns zero.
831\seealso{eol, bolp, eobp, bobp}
832\done
833
834\function{what_keymap}
835\synopsis{what_keymap}
836\usage{String what_keymap ();}
837\description
838  This function returns the name of the keymap associated with the
839  current buffer.
840\seealso{create_keymap, keymap_p}
841\done
842
843\function{find_file}
844\synopsis{find_file}
845\usage{Integer find_file (String name);}
846\description
847  The \var{find_file} function switches to the buffer associated with the
848  file specified by \var{name}.  If no such buffer exists, one is created
849  and the file specified by \var{name} is read from the disk and associated
850  with the new buffer.  The buffer will also become attached to the
851  current window.  Use the \var{read_file} function to find a file but not
852  associate it with the current window.
853\seealso{read_file}
854\done
855
856\function{set_status_line}
857\synopsis{set_status_line}
858\usage{set_status_line (String format, Integer flag);}
859\description
860  This function may be used to customize the status line of the current
861  window according to the string \var{format}.  If the second parameter
862  \var{flag} is non-zero, \var{format} will apply to the global format string;
863  otherwise it applies to current buffer only.  Newly created buffer
864  inherit the global format string when they appear in a window.
865  The format string may contain the following format specifiers:
866#v+
867        %b   buffer name
868        %f   file name
869        %v   JED version
870        %t   current time --- only used if variable DISPLAY_TIME is non-zero
871        %p   line number or percent string
872        %%   literal '%' character
873        %m   mode string
874        %a   If abbrev mode, expands to "abbrev"
875        %n   If buffer is narrowed, expands to "Narrow"
876        %o   If overwrite mode, expands to "Ovwrt"
877        %c   If the variable LINENUMBERS is 2, this expands to the current
878               column number.
879#v-
880  For example, the default status line used by JED's EDT emulation uses
881  the format string:
882#v+
883        "(Jed %v) EDT: %b   (%m%a%n%o)  %p,%c   Advance   %t"
884#v-
885\seealso{set_mode, narrow, whatbuf, getbuf_info}
886\seealso{DISPLAY_TIME,LINENUMBERS}
887\done
888
889\function{bury_buffer}
890\synopsis{bury_buffer}
891\usage{Void bury_buffer (String name);}
892\description
893  The \var{bury_buffer} function may be used to make it unlikely for the
894  buffer specified by the paramter \var{name} to appear in a window.
895\seealso{sw2buf, getbuf_info}
896\done
897
898\function{dupmark}
899\synopsis{dupmark}
900\usage{Integer dupmark ();}
901\description
902  This function returns zero if the mark is not set or, if the mark is
903  set, a duplicate of it is pushed onto the mark stack and a non-zero
904  value is returned.
905\seealso{push_mark, markp, pop_mark}
906\done
907
908\function{erase_buffer}
909\synopsis{erase_buffer}
910\usage{erase_buffer ();}
911\description
912  The \var{erase_buffer} function erases all text from the current buffer.
913  However, it does not delete the buffer itself.
914
915  Note: This function destroys all undo information associated with the
916  buffer making it impossible to undo the result of this function.
917\seealso{delbuf, del}
918\done
919
920\function{window_info}
921\synopsis{window_info}
922\usage{Integer window_info(Integer item);}
923\description
924  The \var{window_info} function returns information concerning the current
925  window.  The actual information that is returned depends on the \var{item}
926  parameter.  Acceptable values of \var{item} and the description of the
927  information returned is given in the following table:
928#v+
929        'r'  : Number of rows
930        'w'  : Width of window
931        'c'  : Starting column (from 1)
932        't'  : Screen line of top line of window (from 1)
933\seealso{otherwindow, nwindows}
934#v-
935\seealso{SCREEN_HEIGHT,SCREEN_WIDTH}
936\done
937
938\function{copy_region_to_kill_array}
939\synopsis{copy_region_to_kill_array}
940\usage{Void copy_region_to_kill_array (Integer n);}
941\description
942  This function copies the currently defined region to the nth element,
943  specified by \var{n}, of an internal array of character strings replacing
944  what is currently there.
945
946  Note: This function is not available on 16 bit systems.
947\seealso{insert_from_kill_array, append_region_kill_array}
948\seealso{KILL_ARRAY_SIZE}
949\done
950
951\function{append_region_to_kill_array}
952\synopsis{append_region_to_kill_array}
953\usage{Void append_region_to_kill_array (Integer n);}
954\description
955  This function appends the currently defined region to the contents of
956  nth element, specified by \var{n}, of an internal array of character strings.
957
958  Note: This function is not available on 16 bit systems.
959\seealso{insert_from_kill_array, copy_region_to_kill_array}
960\seealso{KILL_ARRAY_SIZE}
961\done
962
963\function{insert_from_kill_array}
964\synopsis{insert_from_kill_array}
965\usage{Void insert_from_kill_array (Integer n);}
966\description
967  This function inserts the contents of the nth element, specified by
968  \var{n}, of an internal array of character strings.
969
970  Note: This function is not available on 16 bit systems.
971\seealso{insert_from_kill_array, copy_region_to_kill_array}
972\seealso{KILL_ARRAY_SIZE}
973\done
974
975\function{goto_column}
976\synopsis{goto_column}
977\usage{Void goto_column (Integer n);}
978\description
979  This function moves the current editing point to the column specified
980  by the parameter \var{n}.  It will insert a combination of spaces and tabs
981  if necessary to achieve the goal.
982  Note: The actual character number offset from the beginning of the
983  line depends upon tab settings and the visual expansion of other
984  control characters.
985\seealso{goto_column_best_try, what_column, left, right, goto_line}
986\seealso{TAB,TAB_DEFAULT,DISPLAY_EIGHT_BIT}
987\done
988
989\function{goto_column_best_try}
990\synopsis{goto_column_best_try}
991\usage{Integer goto_column_best_try (Integer c);}
992\description
993  This function is like \var{goto_column} except that it will not insert
994  whitespace.  This means that it may fail to achieve the column number
995  specified by the argument \var{c}.  It returns the current column number.
996\seealso{goto_column, what_column}
997\done
998
999\function{goto_line}
1000\synopsis{goto_line}
1001\usage{Void goto_line (Integer n);}
1002\description
1003  The \var{goto_line} function may be used to move to a specific line number
1004  specified by the parameter \var{n}.
1005  Note: The actual column that the editing point will be left in is
1006  indeterminate.
1007\seealso{what_line, goto_column, down, up.}
1008\done
1009
1010\function{pop_mark}
1011\synopsis{pop_mark}
1012\usage{pop_mark (Integer g);}
1013\description
1014  \var{pop_mark} pops the most recent mark pushed onto the mark stack.  If
1015  the argument \var{g} is non-zero, the editing position will be moved to
1016  the location of the mark.  However, if \var{g} is zero, the editing
1017  position will be unchanged.
1018\seealso{push_mark, pop_spot, markp, check_region, goto_user_mark}
1019\done
1020
1021\function{read_mini}
1022\synopsis{read_mini}
1023\usage{String read_mini (String prompt, String dflt, String init);}
1024\description
1025  The \var{read_mini} function reads a line of input from the user in the
1026  mini-buffer.  The first parameter, \var{prompt}, is used to prompt the
1027  user.  The second parameter, \var{dflt}, is what is returned as a default
1028  value if the user simply presses the return key.  The final parameter,
1029  \var{init}, is stuffed into the mini-buffer for editing by the user.
1030  For example,
1031#v+
1032        define search_whole_buffer ()
1033        {
1034          variable str;
1035          str = read_mini ("Search for:", "", "");
1036          !if (strlen (str)) return;
1037          !if (fsearch (str))
1038             {
1039               push_mark (); bob ();
1040               if (fsearch (str)) pop_mark (0);
1041               else pop_mark (1);
1042                 {
1043                    pop_mark (1);
1044                    error ("Not found");
1045                 }
1046             }
1047        }
1048#v-
1049  reads a string from the user and then searches forward for it and if
1050  not found, it resumes the search from the beginning of the buffer.
1051  Note: If the user aborts the function \var{mini_read} by pressing the
1052  keyboard quit character (e.g., Ctrl-G), an error is signaled.  This
1053  error can be caught by an \var{ERROR_BLOCK} and the appropriate action
1054  taken. Also if the mini-buffer is already in use, this function should
1055  not be called.  The variable \var{MINIBUFFER_ACTIVE} may be checked to
1056  determine if this is the case or not.
1057\seealso{read_with_completion, getkey, input_pending}
1058\seealso{MINIBUFFER_ACTIVE}
1059\done
1060
1061\function{file_status}
1062\synopsis{file_status}
1063\usage{Integer file_status (String filename);}
1064\description
1065  The \var{file_status} function returns information about a file specified
1066  by the name \var{filename}.  It returns an integer describing the file
1067  type:
1068   2     file is a directory
1069   1     file exists and is not a directory
1070   0     file does not exist.
1071  -1     no access.
1072  -2     path invalid
1073  -3     unknown error
1074\done
1075
1076\function{skip_white}
1077\synopsis{skip_white}
1078\usage{Void skip_white ();}
1079\description
1080  The \var{skip_white} function moves the current point forward until it
1081  reaches a non-whitespace character or the end of the current line,
1082  whichever happens first.  In this context, whitespace is considered to
1083  be any combination of space and tab characters.  To skip newline
1084  characters as well, the function \var{skip_chars} may be used.
1085\seealso{bskip_chars, what_char, trim, right}
1086\done
1087
1088\function{bobp}
1089\synopsis{bobp}
1090\usage{Integer bobp ();}
1091\description
1092  The \var{bolp} function is used to determine if the current position is at
1093  the beginning of the buffer or not.  If so, it returns a non-zero
1094  value.  However, if it is not, it returns zero.  This simple example,
1095#v+
1096        define is_buffer_empty ()
1097        {
1098          return bobp () and eobp ();
1099        }
1100#v-
1101  returns non-zero if the buffer is empty; otherwise, it returns zero.
1102\seealso{bob, eobp, bolp, eolp}
1103\done
1104
1105\function{flush}
1106\synopsis{flush}
1107\usage{Void flush (String msg);}
1108\description
1109  The \var{flush} function behaves like \var{message} except that it immediately
1110  displays its argument \var{msg} as a message in the mini-buffer.  That is,
1111  it is not necessary to call \var{update} to see the message appear.
1112\seealso{message, error}
1113\done
1114
1115\function{input_pending}
1116\synopsis{input_pending}
1117\usage{Integer input_pending (Integer tsecs);}
1118\description
1119  This function is used to see if keyboard input is available to be read
1120  or not. The paramter \var{tsecs} is the amount of time to wait for input
1121  before returning if input is not available.  The time unit for \var{tsecs}
1122  is one-tenth of a second.  That is, to wait up to one second, pass a
1123  value of ten to this routine.  It returns zero if no input is
1124  available, otherwise it returns non-zero.  As an example,
1125#v+
1126        define peek_key ()
1127        {
1128          variable ch;
1129          !if (input_pending (0)) return -1;
1130          ch = getkey ();
1131          ungetkey (ch);
1132          return ch;
1133        }
1134#v-
1135  returns the value of the next character to be read if one is
1136  available; otherwise, it returns -1.
1137\seealso{getkey, ungetkey}
1138\done
1139
1140\function{usleep}
1141\synopsis{usleep}
1142\usage{Void usleep (Integer ms);}
1143\description
1144  A call to usleep will cause the editor to pause for \var{ms} milliseconds.
1145\seealso{input_psnding}
1146\done
1147
1148\function{insert_file}
1149\synopsis{insert_file}
1150\usage{Integer insert_file (String f);}
1151\description
1152  This function may be used to insert the contents of a file named \var{f}
1153  into the buffer at the current position.  The current editing point
1154  will be placed at the end of the inserted text.  The function returns
1155  \exmp{-1} if the file was unable to be opened; otherwise it returns the
1156  number of lines inserted.  This number can be zero if the file is empty.
1157\seealso{read_file, find_file, insert}
1158\done
1159
1160\function{keymap_p}
1161\synopsis{keymap_p}
1162\usage{Integer keymap_p (String kmap);}
1163\description
1164  The \var{keymap_p} function may be used to determine whether or not a
1165  keymap with name \var{kmap} exists.  If the keymap specified by \var{kmap}
1166  exists, the function returns non-zero.  It returns zero if the keymap
1167  does not exist.
1168\seealso{make_keymap, definekey}
1169\done
1170
1171\function{what_char}
1172\synopsis{what_char}
1173\usage{Integer what_char ();}
1174\description
1175  The \var{what_char} function returns the value of the character at the
1176  current position as an integer in the range 0 to 256.  This simple
1177  example,
1178#v+
1179        while (not (eolp ()))
1180          {
1181             if (what_char () == '_')
1182               {
1183                  del (); insert ("\\_");
1184               }
1185          }
1186#v-
1187  has the effect of replacing all underscore characters on the current
1188  line with a backslash-underscore combination.
1189\seealso{looking_at}
1190\done
1191
1192\function{recenter}
1193\synopsis{recenter}
1194\usage{Void recenter (Integer nth);}
1195\description
1196  This function may be used to scroll the window such that the \var{nth} line
1197  of the window contains the current line.  If \var{nth} is zero, the current
1198  line will be placed at the center of the window and the screen will be
1199  completely redrawn.
1200\seealso{nwindows, window_info}
1201\done
1202
1203\function{bufferp}
1204\synopsis{bufferp}
1205\usage{Integer bufferp (String buf);}
1206\description
1207  This function is used to see if a buffer exists or not.  If a buffer with
1208  name \var{buf} exists, it returns a non-zero value.  If it does not exist,
1209  it returns zero.
1210\seealso{setbuf, getbuf_info}
1211\done
1212
1213\function{get_key_function}
1214\synopsis{get_key_function}
1215\usage{String get_key_function ();}
1216\description
1217  \var{get_key_function} waits for a key to be pressed and returns a string
1218  that represents the binding of the key.  If the key has no binding
1219  the empty string is returned.  Otherwise, it also returns an integer
1220  that describes whether or not the function is an internal one.  If
1221  the function is internal, \var{1} will be returned; otherwise zero will
1222  be returned to indicate that the binding is either to an S-Lang
1223  function or a macro.  If it is a macro, the first character of the
1224  of returned string will be the \exmp{@} character.
1225\seealso{getkey, input_pending}
1226\done
1227
1228\function{dump_bindings}
1229\synopsis{dump_bindings}
1230\usage{Void dump_bindings(String map);}
1231\description
1232  This functions inserts a formatted list of keybindings for the keymap
1233  specified by \var{map} into the buffer at the current point.
1234\seealso{get_key_function}
1235\done
1236
1237\function{undefinekey}
1238\synopsis{undefinekey}
1239\usage{Void undefinekey (String key, String kmap);}
1240\description
1241  This function may be used to remove a keybinding from a specified
1242  keymap.  The key sequence is given by the parameter \var{key} and the
1243  keymap is specified by the second parameter \var{kmap}.
1244\seealso{unsetkey, definekey, what_keymap}
1245\done
1246
1247\function{getpid}
1248\synopsis{getpid}
1249\usage{Integer getpid ();}
1250\description
1251  This function returns the process identification number for the current
1252  editor process.
1253\done
1254
1255\function{update}
1256\synopsis{update}
1257\usage{Void update (Integer f);}
1258\description
1259  This function may be called to update the display.  If the parameter
1260  \var{f} is non-zero, the display will be updated even if there is input
1261  pending.  If \var{f} is zero, the display may only be partially updated if
1262  input is pending.
1263\seealso{input_pending, flush}
1264\done
1265
1266\function{skip_word_chars}
1267\synopsis{skip_word_chars}
1268\usage{Void skip_word_chars ();}
1269\description
1270  This function moves the current editing point forward across all
1271  characters that constitute a word until a non-word character is
1272  encountered. Characters that make up a word are set by the
1273  \var{define_word} function.
1274\seealso{define_word, skip_non_word_chars, skip_chars, bskip_word_chars}
1275\done
1276
1277\function{skip_non_word_chars}
1278\synopsis{skip_non_word_chars}
1279\usage{Void skip_non_word_chars ();}
1280\description
1281  This function moves the current editing point forward past all
1282  non-word characters until a word character is encountered.
1283  Characters that make up a word are set by the \var{define_word} function.
1284\seealso{define_word, skip_word_chars, skip_chars, bskip_non_word_chars}
1285\done
1286
1287\function{bskip_word_chars}
1288\synopsis{bskip_word_chars}
1289\usage{Void bskip_word_chars ();}
1290\description
1291  This function moves the current editing point backward past all
1292  word characters until a non-word character is encountered.
1293  Characters that make up a word are set by the \var{define_word} function.
1294\seealso{define_word, skip_word_chars, bskip_chars, bskip_non_word_chars}
1295\done
1296
1297\function{bskip_non_word_chars}
1298\synopsis{bskip_non_word_chars}
1299\usage{Void bskip_word_chars ();}
1300\description
1301  This function moves the current editing point backward past all
1302  non-word characters until a word character is encountered.
1303  Characters that make up a word are set by the \var{define_word} function.
1304\seealso{define_word, skip_non_word_chars, bskip_chars, bskip_word_chars}
1305\done
1306
1307\function{which_key}
1308\synopsis{which_key}
1309\usage{Integer which_key (String f);}
1310\description
1311  The \var{which_key} function returns the the number of keys that are
1312  bound to the function \var{f} in the current keymap.  It also returns
1313  that number of key sequences with control characters expanded as the
1314  two character sequence \exmp{^} and the the whose ascii value is the
1315  control character + 64. For example,
1316#v+
1317        define insert_key_bindings (f)
1318        {
1319           variable n, key;
1320           n = which_key (f);
1321           loop (n)
1322             {
1323                 str = ();
1324                 insert (str);
1325                 insert ("\n");
1326             }
1327        }
1328#v-
1329  inserts into the buffer all the key sequences that are bound to the
1330  function \var{f}.
1331\seealso{get_key_function, setkey, what_keymap}
1332\done
1333
1334\function{whitespace}
1335\synopsis{whitespace}
1336\usage{whitespace (Integer n);}
1337\description
1338  The \var{whitespace} function inserts white space of length \var{n} into the
1339  current buffer using a combination of spaces and tabs.  The actual
1340  combination of spaces and tabs used depends upon the buffer local
1341  variable \var{TAB}.  In particular, if \var{TAB} is zero, no tab characters
1342  will be used for the expansion.
1343\seealso{insert, trim, goto_column}
1344\seealso{TAB,TAB_DEFAULT}
1345\done
1346
1347\function{enlargewin}
1348\synopsis{enlargewin}
1349\usage{Void enlargewin ();}
1350\description
1351  This function increases the size of the current window by one line by
1352  adjusting the size of the other windows accordingly.
1353\seealso{window_info, onewindow}
1354\done
1355
1356\function{splitwindow}
1357\synopsis{splitwindow}
1358\usage{Void splitwindow ();}
1359\description
1360  This function splits the current window vertically creating another
1361  window that carries the current window's buffer.
1362\seealso{onewindow, enlargewin, window_info}
1363\done
1364
1365\function{file_time_compare}
1366\synopsis{file_time_compare}
1367\usage{Integer file_time_cmp (String file1, String file2);}
1368\description
1369  This function compares the modification times of two files,
1370  \var{file1} and \var{file2}. It returns an integer that is either
1371  positive, negative, or zero integer for \exmp{file1 > file2},
1372  \exmp{file1 < file2}, or \exmp{file1 == file2}, respectively.  In
1373  this context, the comparison operators are comparing file
1374  modification times.  That is, the operator \exmp{>} should be read
1375  ``is more recent than''.  The convention adopted by this routine is
1376  that if a file does not exist, its modification time is taken to be
1377  at the beginning of time.  Thus, if \var{f} exists, but \var{g} does
1378  not, the \exmp{file_time_compare (f, g)} will return a positive
1379  number.
1380\seealso{file_status, time}
1381\done
1382
1383\function{xform_region}
1384\synopsis{xform_region}
1385\usage{Void xform_region (Integer how);}
1386\description
1387  This function changes the characters in the region in a way specified
1388  by the parameter \var{how}.  This is an integer that can be any of of the
1389  following:
1390#v+
1391        'u'       Upcase_region
1392        'd'       Downcase_region
1393        'c'       Capitalize region
1394#v-
1395  Anything else will change case of region.
1396\seealso{translate_region, define_case}
1397\done
1398
1399\function{skip_chars}
1400\synopsis{skip_chars}
1401\usage{Void skip_chars(String s);}
1402\description
1403  This fnction may be used to move the editing point forward past all
1404  characters in string \var{s} which contains the chars to skip, or a range
1405  of characters.  A character range is denoted by two charcters
1406  separated by a hyphen.  If the first character of the string \var{s} is a
1407  \exmp{'^'} character, then the list of characters actually denotes the
1408  complement of the set of characters to be skipped.  To explicitly
1409  include the hyphen character in the list, it must be either the first
1410  or the second character of the string, depending upon whether or not
1411  the \exmp{'^'} character is present. So for example,
1412#v+
1413        skip_chars ("- \t0-9ai-o_");
1414#v-
1415  will skip the hyphen, space, tab, numerals \exmp{0} to \var{9}, the letter \var{a},
1416  the letters \var{i} to \var{o}, and underscore.  An example which illustrates
1417  the complement of a range is
1418#v+
1419        skip_chars("^A-Za-z");
1420#v-
1421  which skips all characters except the letters.
1422  Note: The backslash character may be used to escape only the first
1423  character in the string.  That is, \exmp{"\\\\^"} is to be used to skip over
1424  \exmp{^} characters.
1425\seealso{bskip_chars, skip_white}
1426\done
1427
1428\function{set_file_translation}
1429\synopsis{set_file_translation}
1430\usage{set_file_translation (Integer n);}
1431\description
1432  This function affects only the way the next file is opened.  Its
1433  affect does not last beyond that.  If it the value of the parameter
1434  is 1, the next file will be opened in binary mode.  If the parameter is
1435  zero, the file will be opened in text mode.
1436\done
1437
1438\function{pipe_region}
1439\synopsis{pipe_region}
1440\usage{Integer pipe_region (String cmd);}
1441\description
1442  The \var{pipe_region} function executes \var{cmd} in a separate process and
1443  sends the region of characters defined by the mark and the current
1444  point to the standard input of the process.  It successful, it returns
1445  the exit status of the process.  Upon failure it signals an error.
1446  Note: This function is only available for Unix and OS/2 systems.
1447\seealso{run_shell_cmd, push_mark}
1448\done
1449
1450\function{run_shell_cmd}
1451\synopsis{run_shell_cmd}
1452\usage{Void run_shell_cmd (String cmd);}
1453\description
1454  The \var{run_shell_cmd} function may be used to run \var{cmd} in a separate
1455  process.  Any output generated by the process is inserted into the
1456  buffer at the current point.  It generates a S-Lang error if the
1457  process specified by \var{cmd} could not be opened.  Otherwise, it
1458  returns the exit status of the process.
1459\done
1460
1461\function{append_region_to_file}
1462\synopsis{append_region_to_file}
1463\usage{Integer append_region_to_file (String file);}
1464\description
1465  Appends a marked region to \var{file} returning number of lines
1466  written or \-1 on error.  This does NOT modify a buffer visiting the
1467  file; however, it does flag the buffer as being changed on disk.
1468\done
1469
1470\function{autosave}
1471\synopsis{autosave}
1472\usage{Void autosave ();}
1473\description
1474  The \var{autosave} function saves the current buffer in an auto save file
1475  if the buffer has been marked for the auto save operation.
1476\seealso{setbuf_info, autosaveall}
1477\seealso{MAX_HITS}
1478\done
1479
1480\function{autosaveall}
1481\synopsis{autosaveall}
1482\usage{Void autosaveall ();}
1483\description
1484  This function is like \var{autosave} except that it causes all files
1485  marked for the auto save operation to be auto-saved.
1486\seealso{autosave, setbuf_info}
1487\seealso{MAX_HITS}
1488\done
1489
1490\function{backward_paragraph}
1491\synopsis{backward_paragraph}
1492\usage{Void backward_paragraph ();}
1493\description
1494  This function moves the current editing point backward past the
1495  current paragraph to the line that is a paragraph separator.  Such a
1496  line is determined by the S-Lang hook \var{is_paragraph_separator}.  This
1497  hook can be modified on a buffer by buffer basis by using the
1498  function \var{set_buffer_hook}.
1499\seealso{forward_paragraph, set_buffer_hook}
1500\done
1501
1502\function{blank_rect}
1503\synopsis{blank_rect}
1504\description
1505   The \var{blank_rect} function replaces all text in the rectangle defined by
1506  the current editing point and the mark by spaces.
1507\seealso{push_mark, kill_rect, insert_rect, copy_rect}
1508\done
1509
1510\function{bskip_chars}
1511\synopsis{bskip_chars}
1512\usage{Void bskip_chars (String str);}
1513\description
1514  This function may be used to skip past all characters defined by the
1515  string \var{str}.  See \var{skip_chars} for the definition of \var{str}.
1516  The following example illustrates how to skip past all whitespace
1517  including newline characters:
1518#v+
1519        bskip_chars (" \t\n");
1520#v-
1521\seealso{skip_chars, left}
1522\done
1523
1524\function{buffer_list}
1525\synopsis{buffer_list}
1526\usage{Integer buffer_list ();}
1527\description
1528  This function returns an integer indicating the number of buffers and
1529  leaves the names of the buffers on the stack.  For example, the
1530  following function displays the names of all buffers attached to
1531  files:
1532#v+
1533        define show_buffers ()
1534        {
1535           variable b, str = "", file;
1536           loop (buffer_list ())
1537             {
1538                 b = ();
1539                 setbuf (b);
1540                 (file,,,) = getbuf_info ();
1541                 if (strlen (file)) str = strcat (str, strcat (" ", b));
1542             }
1543           message (str);
1544        }
1545#v-
1546\seealso{getbuf_info, whatbuf}
1547\done
1548
1549\function{check_region}
1550\synopsis{check_region}
1551\usage{Void check_region (Integer ps);}
1552\description
1553  This function checks to see if a region is defined and may exchange
1554  the current editing point and the mark to define a canonical region.
1555  If the mark is not set, it signals an S-Lang error.  A canonical
1556  region is one with the mark set earlier in the buffer than than the
1557  editing point.  Always call this if using a region which requires
1558  such a situation.
1559
1560  If the argument \var{ps} is non-zero, \var{push_spot} will be called,
1561  otherwise, \var{ps} is zero and it will not be called.
1562
1563  As an example, the following function counts the number of lines in
1564  a region:
1565#v+
1566        define count_lines_region ()
1567        {
1568           variable n;
1569           check_region (1);   % spot pushed
1570           narrow ();
1571           n = what_line ();
1572           widen ();
1573           pop_spot ();
1574           return n;
1575         }
1576#v-
1577\seealso{markp, push_mark}
1578\done
1579
1580\function{copy_rect}
1581\synopsis{copy_rect}
1582\usage{Void copy_rect ();}
1583\description
1584  The \var{copy_rect} function is used to copy the contents of the
1585  currently defined rectangle to the rectangle buffer.  It overwrites
1586  the previous contents of the rectangle buffer.  A rectangle is defined
1587  by the diagonal formed by the mark and the current point.
1588\seealso{insert_rect, kill_rect, blank_rect}
1589\done
1590
1591\function{define_word}
1592\synopsis{define_word}
1593\usage{Void define_word (String s);}
1594\description
1595  This function is used to define the set of characters that form a
1596  word. The string \var{s} consists of those characters or ranges of
1597  characters that define the word.  For example, to define only the
1598  characters \exmp{A-Z} and \exmp{a-z} as word characters, use:
1599#v+
1600        define_word ("A-Za-z");
1601#v-
1602  To include a hyphen as part of a word, it must be the first character
1603  of the control string \var{s}.  So for example,
1604#v+
1605        define_word ("-i-n");
1606#v-
1607  defines a word to consist only of the letters \var{i} to \var{n} and the
1608  hyphen character.
1609\done
1610
1611\function{delbuf}
1612\synopsis{delbuf}
1613\usage{Void delbuf (String buf);}
1614\description
1615  \var{delbuf} may be used to delete a buffer with the name specified by
1616  \var{buf}.  If the buffer does not exist, a S-Lang error will be generated.
1617\seealso{whatbuf, bufferp, sw2buf}
1618\done
1619
1620\function{delete_file}
1621\synopsis{delete_file}
1622\usage{Integer delete_file (String file);}
1623\description
1624  This function may be used to delete a file specified by the \var{file}
1625  parameter.  It returns non-zero if the file was sucessfully deleted
1626  or zero otherwise.
1627\seealso{rmdir}
1628\done
1629
1630\function{directory}
1631\synopsis{directory}
1632\description
1633   returns number of files and list of files which match filename.
1634      On unix, this defaults to filename*.  It is primarily useful for
1635      DOS and VMS to expand wildcard filenames
1636\done
1637
1638\function{evalbuffer}
1639\synopsis{evalbuffer}
1640\usage{Void evalbuffer ();}
1641\description
1642  This function causes the current buffer to be sent to the S-Lang
1643  interpreter for evaluation.  If an error is encountered while parsing
1644  the buffer, the cursor will be placed at the location of the error.
1645\seealso{evalfile}
1646\done
1647
1648\function{expand_filename}
1649\synopsis{expand_filename}
1650\usage{String expand_filename (String file);}
1651\description
1652  The \var{expand_filename} function expands a file to a canonical form.
1653  For example, under Unix, if \var{file} has the value \exmp{"/a/b/../c/d"}, it
1654  returns \exmp{"/a/c/d"}.  Similarly, if \var{file} has the value
1655  \exmp{"/a/b/c//d/e"}, \exmp{"/d/e"} is returned.
1656\done
1657
1658\function{file_changed_on_disk}
1659\synopsis{file_changed_on_disk}
1660\usage{Integer file_changed_on_disk (String fn);}
1661\description
1662  This function may be used to determine if the disk file specified by the
1663  parameter \var{fn} is more recent than the current buffer.
1664\seealso{file_time_compare, check_buffers}
1665\done
1666
1667\function{forward_paragraph}
1668\synopsis{forward_paragraph}
1669\usage{Void forward_paragraph ();}
1670\description
1671  This function moves the current editing point forward past the end of
1672  the current paragraph.  Paragraph delimiters are defined through either
1673  a buffer hook or via the hook \var{is_paragraph_separator}.
1674\seealso{backward_paragraph, set_buffer_hook}
1675\done
1676
1677\function{getkey}
1678\synopsis{getkey}
1679\usage{Integer getkey ();}
1680\description
1681  The \var{getkey} function may be used to read an input character from the
1682  keyboard.  It returns an integer in the range 0 to 256 which represents
1683  the ASCII or extended ASCII value of the character.
1684\seealso{input_pending, ungetkey}
1685\done
1686
1687\function{indent_line}
1688\synopsis{indent_line}
1689\usage{Void indent_line ();}
1690\description
1691  The \var{indent_line} line function indents the current line in a manner
1692  which depends upon the current buffer.  The actual function that gets
1693  called is set via a prior call the \var{set_buffer_hook} to set the indent
1694  hook.  The default value is to indent the line to the indentation
1695  level of the previous line.
1696\seealso{set_buffer_hook}
1697\done
1698
1699\function{insert_rect}
1700\synopsis{insert_rect}
1701\usage{insert_rect ();}
1702\description
1703  The \var{insert_rect} function inserts the contents of the rectangle buffer
1704  at the current editing point.  The rectangle buffer is not modified.
1705  Any text that the rectangle would overwrite is moved to the right by an
1706  amount that is equal to the width of the rectangle.
1707\seealso{kill_rect, blank_rect, copy_rect}
1708\done
1709
1710\function{kill_rect}
1711\synopsis{kill_rect}
1712\usage{Void kill_rect ();}
1713\description
1714  This function deletes the rectangle defined by the mark and the current
1715  point.  The contents of the rectangle are saved in the rectangle buffer
1716  for later retrieval via the \var{insert_rect} function.  The previous
1717  contents of the rectangle buffer will be lost.
1718\seealso{insert_rect, blank_rect, copy_rect}
1719\done
1720
1721\function{make_keymap}
1722\synopsis{make_keymap}
1723\usage{Void make_keymap (String km);}
1724\description
1725  The \var{make_keymap} function creates a keymap with a name specified by
1726  the \var{km} parameter.  The new keymap is an exact copy of the
1727  pre-defined \exmp{"global"} keymap.
1728\seealso{use_keymap, keymap_p, definekey, setkey}
1729\done
1730
1731\function{map_input}
1732\synopsis{map_input}
1733\usage{Void map_input (Integer x, Integer y);}
1734\description
1735  The \var{map_input} function may be used to remap an input character with
1736  ascii value \var{x} from the keyboard to a different character with ascii
1737  value \var{y}.  This mapping can be quite useful because it takes place
1738  before the editor interprets the character. One simply use of this
1739  function is to swap the backspace and delete characters.  Since the
1740  backspace character has an ascii value of \var{8} and the delete character
1741  has ascii value \var{127}, the statement
1742#v+
1743        map_input (8, 127);
1744#v-
1745  maps the backspace character to a delete character and
1746#v+
1747        map_input (127, 8);
1748#v-
1749  maps the delete character to a backspace character.  Used together,
1750  these two statement effectively swap the delete and backspace keys.
1751\seealso{getkey}
1752\done
1753
1754\function{narrow_to_region}
1755\synopsis{narrow_to_region}
1756\usage{Void narrow_to_region (void);}
1757\description
1758  The \var{narrow_to_region} function behaves like the \var{narrow} function
1759  that \var{narrow} operates on lines and \var{narrow_to_region} restricts
1760  editing to only characters within the region.
1761\seealso{widen_region, narrow.}
1762\done
1763
1764\function{narrow}
1765\synopsis{narrow}
1766\usage{Void narrow ();}
1767\description
1768  This function may be used to restict editing to the region of lines
1769  between the mark and the editing point.  The region includes the line
1770  containing the mark as well as the line at the current point. All
1771  other lines outside this region are completely inacessable without
1772  first lifting the restriction using the \var{widen} function. As a simple
1773  example, suppose that there is a function called \var{print_buffer} that
1774  operates on the entire buffer.  Then the following function will work
1775  on a region of lines:
1776#v+
1777        define print_region ()
1778        {
1779           narrow ();
1780           print_buffer ();
1781           widen ();
1782        }
1783#v-
1784  The \var{narrow} function will signal an error if the mark is not set.
1785  Note also that the narrow function may be used recursively in the
1786  sense that a narrowed region may be further restricted using the
1787  \var{narrow} function.  For each narrow, the \var{widen} function must be called
1788  to lift each restriction.
1789\seealso{widen, narrow_to_region}
1790\done
1791
1792\function{open_rect}
1793\synopsis{open_rect}
1794\usage{Void open_rect ();}
1795\description
1796  The \var{open_rect} function may be used to insert a blank rectangle whose
1797  size is determined by the mark and the current editing point.  Any text
1798  that lies in the region of the rectangle will be pushed to the right.
1799\seealso{insert_rect, kill_rect, copy_rect}
1800\done
1801
1802\function{quit_jed}
1803\synopsis{quit_jed}
1804\usage{Void quit_jed ();}
1805\description
1806  This function quits the editor immediately.  No buffers are
1807  auto-saved and no hooks are called.  The function \var{exit_jed} should be
1808  called when it is desired to exit in a safe way.
1809\seealso{exit_jed}
1810\done
1811
1812\function{read_file}
1813\synopsis{read_file}
1814\usage{Integer read_file (string fn);}
1815\description
1816  The \var{read_file} function may be used to read a file specified by \var{fn}
1817  into its own buffer.  It returns a non-zero value upon success and
1818  signals an error upon failure.  The hook \var{find_file_hook} is called
1819  after the file is read in.  Unlike the related function, \var{find_file},
1820  this function does not create a window for the newly created buffer.
1821\seealso{find_file, file_status, write_buffer}
1822\done
1823
1824\function{read_with_completion}
1825\synopsis{read_with_completion}
1826\usage{Void read_with_completion (String prt, String dflt, String s, Integer type);}
1827\description
1828  This function may be used to read one of the objects specified by the
1829  last parameter \var{type}.  The first parameter, \var{prt}, is used as a
1830  prompt, the second parameter, \var{dflt}, is used to specify a default,
1831  and the third parameter, \var{s}, is used to initialize the string to
1832  be read.
1833  \var{type} is an integer with the following meanings:
1834#v+
1835        'f'   file name
1836        'b'   buffer name
1837        'F'   function name
1838        'V'   variable name.
1839
1840#v-
1841  Finally, if \var{type} has the value \exmp{'s'}, then the set of completions
1842  will be defined by a zeroth parameter, \var{list}, to the function call.
1843  This parameter is simple a comma separated list of completions.
1844  For example,
1845#v+
1846        read_with_completion ("Larry,Curly,Moe", "Favorite Stooge:",
1847                              "Larry", "", 's');
1848#v-
1849  provides completion over the set of three stooges.
1850  The function returns the string read.
1851\seealso{read_mini}
1852\done
1853
1854\function{set_abort_char}
1855\synopsis{set_abort_char}
1856\usage{Void set_abort_char (Integer ch);}
1857\description
1858  This function may be used to change the keyboard character that
1859  generates an S-Lang interrupt.  The parameter \var{ch} is the ASCII value
1860  of the character that will become the new abort character. The
1861  default abort character \exmp{Ctrl-G} corresponds to \exmp{ch=7}.
1862\done
1863
1864\function{suspend}
1865\synopsis{suspend}
1866\usage{Void suspend ();}
1867\description
1868  The action of this command varies with the operating system.
1869  Under Unix, the editor will be suspended and control will pass to the
1870  parent process.  Under VMS and MSDOS, a new subprocess will be spawned.
1871  Before suspension, \var{suspend_hook} is called.  When the editor is
1872  resumed, \var{resume_hook} will be called.  These hooks are user-defined
1873  functions that take no arguments and return no values.
1874\done
1875
1876\function{ungetkey}
1877\synopsis{ungetkey}
1878\usage{Void ungetkey (Integer ch);}
1879\description
1880  This function may be used to push a character \var{ch} represented by its
1881  ASCII value, onto the input stream.  This means that the next keyboard
1882  to be read will be \var{ch}.
1883\seealso{buffer_keystring, getkey, get_key_function}
1884\done
1885
1886\function{buffer_keystring}
1887\synopsis{buffer_keystring}
1888\usage{Void buffer_keystring (String str);}
1889\description
1890  Append string \var{str} to the end of the input stream to be read by JED's
1891  getkey routines.
1892\seealso{ungetkey, getkey}
1893\done
1894
1895\function{use_keymap}
1896\synopsis{use_keymap}
1897\usage{Void use_keymap (String km);}
1898\description
1899  This function may be used to dictate which keymap will be used by the
1900  current buffer.  \var{km} is a string value that corresponds to the name
1901  of a keymap.
1902\seealso{make_keymap, keymap_p, what_keymap}
1903\done
1904
1905\function{w132}
1906\synopsis{w132}
1907\usage{Void w132 ();}
1908\description
1909  This function may be used to set the number of columns on a vtxxx
1910  compatable terminal to 132.
1911\seealso{w80, set_term_vtxxx}
1912\done
1913
1914\function{w80}
1915\synopsis{w80}
1916\usage{Void w80 ();}
1917\description
1918  This function may be used to set the number of columns on a vtxxx
1919  compatable terminal to 80.
1920\seealso{w132, set_term_vtxxx}
1921\done
1922
1923\function{what_mode}
1924\synopsis{what_mode}
1925\usage{(String name, Integer flags) = Integer what_mode ();}
1926\description
1927  This function may be used to obtain the mode flags and mode name of the
1928  current buffer.  See \var{set_mode} for more details.
1929\seealso{set_mode, getbuf_info, setbuf_info}
1930\done
1931
1932\function{widen}
1933\synopsis{widen}
1934\usage{Void widen ();}
1935\description
1936  This function undoes the effect of \var{narrow}.  Consult the documentation
1937  for \var{narrow} for more information.
1938\seealso{widen_region, narrow}
1939\done
1940
1941\function{widen_region}
1942\synopsis{widen_region}
1943\usage{Void widen_region ();}
1944\description
1945  This function undoes the effect of \var{narrow_to_region}.  Consult the
1946  documentation for \var{narrow_to_region} for more information.
1947\seealso{widen, narrow_to_region}
1948\done
1949
1950\function{window_line}
1951\synopsis{window_line}
1952\usage{Integer window_line ();}
1953\description
1954  This function returns the number of rows from the top of the current
1955  window for the current line.  If the current line is the very first line
1956  in the window, a value of \var{1} will be returned, i.e., it is the first
1957  line of the window.
1958\seealso{window_info, nwindows}
1959\seealso{TOP_WINDOW_ROW}
1960\done
1961
1962\function{write_buffer}
1963\synopsis{write_buffer}
1964\usage{Integer write_buffer (String filename);}
1965\description
1966  This function may be used to write the current buffer out to a file
1967  specified by \var{filename}.  The buffer will then become associated with
1968  that file.  The number of lines written to the file is returned.  An
1969  error condition will be signaled upon error.
1970\seealso{write_region_to_file, setbuf_info}
1971\done
1972
1973\function{write_region_to_file}
1974\synopsis{write_region_to_file}
1975\usage{Integer write_region_to_file (String filename);}
1976\description
1977  This function may be used to write a region of the current buffer to
1978  the file specified by \var{filename}.  It returns the number of lines
1979  written to the file or signals an error upon failure.
1980\seealso{write_buffer, append_region_to_file, push_mark}
1981\done
1982
1983\function{count_chars}
1984\synopsis{count_chars}
1985\usage{String count_chars ();}
1986\description
1987  This function returns information about the size of the current buffer
1988  and current position in the buffer.  The string returned is of the form:
1989#v+
1990        'h'=104/0x68/0150, point 90876 of 127057
1991#v-
1992\seealso{what_char}
1993\done
1994
1995\function{get_yes_no}
1996\synopsis{get_yes_no}
1997\usage{Integer get_yes_no (String s);}
1998\description
1999  This function may be used to get a yes or no response from the
2000  user.  The string parameter \var{s} will be used to construct the prompt
2001  by concating the string \exmp{"? (yes/no)"} to \var{s}.
2002  It returns \var{1} if the answer is yes or \exmp{0} if the answer is no.
2003\seealso{getkey, flush, message}
2004\done
2005
2006\function{rename_file}
2007\synopsis{rename_file}
2008\usage{Integer rename_file (String old_name, String new_name);}
2009\description
2010  This function may be used to change the name of a disk file from
2011  \var{old_name} to \var{new_name}.  Upon success, zero is returned.  Any other
2012  value indicates failure.
2013  Note: Both filenames must refer to the same file system.
2014\seealso{file_status, stat_file}
2015\done
2016
2017\function{change_default_dir}
2018\synopsis{change_default_dir}
2019\usage{Integer change_default_dir (String new_dir);}
2020\description
2021  This function may be used to change the current working directory
2022  of the editor to \var{new_dir}.  It returns zero upon success or \exmp{-1} upon
2023  failure.
2024  Note: Each buffer has its own working directory.  This function does not
2025  change the working directory of the buffer.  Rather, it changes the
2026  working directory of the whole editor.  This has an effect on functions
2027  such as \var{rename_file} when such functions are passed relative filenames.
2028\seealso{setbuf_info, getbuf_info, rename_file}
2029\done
2030
2031\function{prefix_argument}
2032\synopsis{prefix_argument}
2033\usage{Integer prefix_argument (Integer dflt);}
2034\description
2035  This function may be used to determine whether or not the user has entered
2036  a prefix argument from the keyboard.  If a prefix argument is present,
2037  its value is returned; otherwise, \var{dflt} is returned.  Calling this
2038  function cancels the prefix argument.
2039  For example,
2040#v+
2041        variable arg = prefix_argument (-9999);
2042        if (arg == -9999)
2043          message ("No Prefix Argument");
2044        else
2045          message (Sprintf ("Prefix argument: %d", arg, 1));
2046#v-
2047  displays the prefix argument in the message area.
2048  Note: This function is incapable of distinguishing between the case of
2049  no prefix argument and when the argument's value is \var{dflt}.  Currently,
2050  this is not a problem because the editor does not allow negative prefix
2051  arguments.
2052\seealso{set_prefix_argument}
2053\done
2054
2055\function{set_prefix_argument}
2056\synopsis{Set the prefix argument}
2057\usage{Void set_prefix_argument (Int_Type n)}
2058\description
2059  This function may be used to set the prefix argument to the value
2060  specified by \var{n}.  If \var{n} is less than zero, then the prefix
2061  argument is cancelled.
2062\seealso{prefix_argument}
2063\done
2064
2065\function{set_buffer_hook}
2066\synopsis{set_buffer_hook}
2067\usage{Void set_buffer_hook (String hook, String f);}
2068\description
2069  Set current buffer hook \var{hook} to function \var{f}. \var{f} is a user
2070  defined S-Lang function.  Currently, \var{hook} can be any one of:
2071#v+
2072         "par_sep"  -- returns zero if the current line does not
2073              constitute the beginning or end of a paragraph.
2074              It returns non-zero otherwise.  The default value of hook is
2075              is_paragraph_separator.
2076         "indent_hook" -- returns nothing.  It is called by the indent line
2077              routines.
2078         "wrap_hook"   hook that is called after a line is wrapped.  Returns
2079              nothing.
2080         "newline_indent_hook"  --- returns nothing.  If this hook is defined,
2081              it will be called instead of the internal function
2082              newline_and_indent is called.
2083         "bob_eob_error_hook"  --- returns nothing.  If this hook is defined,
2084              it will be called whenever an error one of the internal cursor
2085              movement functions would have generated an end of buffer or beginning of
2086              buffer error.  It is passed an integer that indicates which function
2087              would have generated the error.  Specifically:
2088
2089                       -1  previous_line_cmd
2090                       -2  previous_char_cmd
2091                       -3  page_up
2092                        1  next_line_cmd
2093                        2  next_char_cmd
2094                        3  page_down
2095         "mouse_down", "mouse_up", "mouse_drag" "mouse_2click" "mouse_3click"
2096              These hooks are used to override default hooks defined by the
2097              mouse_set_default_hook function.
2098#v-
2099\seealso{unset_buffer_hook, mouse_set_default_hook}
2100\done
2101
2102\function{insert_file_region}
2103\synopsis{insert_file_region}
2104\usage{Integer insert_file_region (String file, String beg, String end);}
2105\description
2106  This function may be used to insert a region specified by the strings
2107  \var{beg} and \var{end} of the file with name \var{file} into the current buffer.
2108  The file is scanned line by line until a line that begins with the
2109  string given by \var{beg} is encountered.  Then, that line and all
2110  successive lines up to the one that starts with the string specified
2111  by \var{end} is inserted into the buffer.  The line beginning with the
2112  value of \var{end} is not inserted although the one beginning with \var{beg} is.
2113  The function returns the number of lines inserted or \exmp{-1} upon failure
2114  to open the file.
2115
2116  Note that a zero length \var{beg} corresponds to the first line
2117  and that a zero length \var{end} corresponds to the last line.
2118\seealso{insert_file}
2119\done
2120
2121\function{search_file}
2122\synopsis{search_file}
2123\usage{Integer search_file (String filename, String re, Integer nmax);}
2124\description
2125  This function may be used to search for strings in a disk file
2126  matching the regular expression \var{re}.  The first argument \var{filename}
2127  specifies which file to search.  The last argument \var{nmax} specifies
2128  how many matches to return.  Each line that is matched is pushed onto
2129  the S-Lang stack.  The number of matches (limited by \var{nmax}) is returned.
2130  If the file contains no matches, zero is returned.
2131\done
2132
2133\function{random}
2134\synopsis{random}
2135\usage{Integer random (Integer seed, Integer nmax);}
2136\description
2137  The \var{random} function returns a random number in the range 0 to, but
2138  not including, \var{nmax}.  If the first parameter \var{seed} is 0, the
2139  number generated depends on a previous seed.  If \var{seed} is -1, the
2140  current time and process id will be used to seed the random number
2141  generator; otherwise \var{seed} will be used.
2142
2143  Example: generate 1000 random integers in the range 0-500 and insert
2144  them into buffer:
2145#v+
2146        () = random (-1, 0);  % seed generator usingtime and pid
2147        loop (1000)
2148          insert (Sprintf ("%d\n", random (0, 500), 1));
2149#v-
2150  Note: The random number is generated via the expression:
2151#v+
2152        r = r * 69069UL + 1013904243UL;
2153#v-
2154\done
2155
2156\function{set_term_vtxxx}
2157\synopsis{set_term_vtxxx}
2158\description
2159   Set terminal display appropriate for a vtxxx terminal.  This function
2160  takes a single integer parameter.  If non-zero, the terminal type is set
2161  for a vt100.  This means the terminal lacks the ability to insert/delete
2162  lines and characters.  If the parameter is zero, the terminal is assumed
2163  to be vt102 compatable.  Unless you are using a VERY old terminal or
2164  a primitive emulator, use zero as the parameter.
2165\done
2166
2167\function{mouse_get_event_info}
2168\synopsis{mouse_get_event_info}
2169\usage{(x, y, state) = mouse_get_event_info ();}
2170\description
2171  This function returns the position of the last processed
2172  mouse event, and the state of the mouse buttons and shift
2173  keys before the event.
2174
2175  \var{x} and \var{y} represent the column and row, respectively, where
2176  the event took place. They are measured with relative to the
2177  top left corner of the editor's display.
2178
2179  \var{state} is a bitmapped integer whose bits are defined as follows:
2180#v+
2181         1  Left button pressed
2182         2  Middle button pressed
2183         4  Right button pressed
2184         8  Shift key pressed
2185        16  Ctrl key pressed
2186#v-
2187  Other information such as the button that triggered the event is
2188  available when the mouse handler is called.  As a result, this information
2189  is not returned by \var{mouse_get_event_info}.
2190\seealso{mouse_set_default_hook, set_buffer_hook.}
2191\done
2192
2193\function{mouse_set_current_window}
2194\synopsis{mouse_set_current_window}
2195\usage{Void mouse_set_current_window ();}
2196\description
2197  Use of this function results in changing windows to the window that
2198  was current at the time of the mouse event.
2199\seealso{mouse_set_default_hook}
2200\done
2201
2202\function{mouse_set_default_hook}
2203\synopsis{mouse_set_default_hook}
2204\usage{Void set_default_mouse_hook (String name, String fun);}
2205\description
2206  This function associates a slang function \var{fun} with the mouse event
2207  specified by \var{name}.  The first parameter \var{name} must be one of the
2208  following:
2209#v+
2210            "mouse_up"          "mouse_status_up"
2211            "mouse_down"        "mouse_status_down"
2212            "mouse_drag"        "mouse_status_drag"
2213            "mouse_2click"      "mouse_status_2click"
2214            "mouse_3click"      "mouse_status_3click"
2215#v-
2216  The meaning of these names should be obvious.  The second parameter,
2217  \var{fun} must be defined as
2218#v+
2219           define fun (line, column, btn, shift)
2220#v-
2221  and it must return an integer.  The parameters \var{line} and
2222  \var{column} correspond to the line and column numbers in the
2223  buffer where the event took place. \var{btn} is an integer that
2224  corresonds to the button triggering the event.  It can take
2225  on values \var{1}, \var{2}, and \var{4} corresponding to the left,
2226  middle, and right buttons, respectively.  \var{shift} can take on
2227  values \exmp{0}, \var{1}, or \var{2} where \exmp{0} indicates that no modifier
2228  key was pressed, \var{1} indicates that the SHIFT key was
2229  pressed, and \var{2} indicates that the CTRL key was pressed.
2230  For more detailed information about the modifier keys, use
2231  the function \var{mouse_get_event_info}.
2232
2233  When the hook is called, the editor will automatically change
2234  to the window where the event occured.  The return value of
2235  the hook is used to dictate whether or not hook handled the
2236  event or whether the editor should switch back to the window
2237  prior to the event.  Specifically, the return value is interpreted
2238  as follows:
2239
2240#v+
2241          -1     Event not handled, pass to default hook.
2242           0     Event handled, return active window prior to event
2243           1     Event handled, stay in current window.
2244#v-
2245\seealso{mouse_get_event_info, mouse_set_current_window, set_buffer_hook}
2246\done
2247
2248\function{mouse_map_buttons}
2249\synopsis{mouse_map_buttons}
2250\usage{Void mouse_map_buttons (Integer x, Integer y);}
2251\description
2252  This function may be used to map one mouse button to another.  The
2253  button represented by \var{x} will appear as \var{y}.
2254\done
2255
2256\function{vms_get_help}
2257\synopsis{vms_get_help}
2258\usage{Void vms_get_help (String hlp_file, String hlp_topic);}
2259\description
2260  This function may be used on VMS systems to interact with the VMS help
2261  system from within the editor.  \var{hlp_file} is the name of the help file
2262  to use and \var{hlp_topic} is the topic for which help is desired.
2263\done
2264
2265\function{vms_send_mail}
2266\synopsis{vms_send_mail}
2267\usage{Integer vms_send_mail (String recip_lis, String subj);}
2268\description
2269  This VMS specific function provides an interface to the VMS callable
2270  mail facility.  The first argument, \var{recip_lis}, is a comma separated list
2271  of email addresses and \var{subj} is a string that represents the subject of
2272  the email.  The current buffer will be emailed.  It returns \var{1} upon
2273  success and \exmp{0} upon failure.
2274\done
2275
2276\function{enable_flow_control}
2277\synopsis{enable_flow_control}
2278\usage{Void enable_flow_control (Integer flag);}
2279\description
2280  This Unix specific function may be used to turn XON/XOFF flow control
2281  on or off.  If \var{flag} is non-zero, flow control is turned on; otherwise,
2282  it is turned off.
2283\done
2284
2285\function{core_dump}
2286\synopsis{core_dump}
2287\usage{Void core_dump(String msg, Integer severity);}
2288\description
2289  \var{core_dump} will exit the editor dumping the state of some crucial
2290  variables. If \var{severity} is \var{1}, a core dump will result.  Immediately
2291  before dumping, \var{msg} will be displayed.
2292\seealso{exit_jed, quit_jed, message, error}
2293\done
2294
2295\function{get_last_macro}
2296\synopsis{get_last_macro}
2297\usage{String get_last_macro ();}
2298\description
2299  This function returns characters composing the last keyboard macro.  The
2300  charactors that make up the macro are encoded as themselves except the
2301  following characters:
2302#v+
2303        '\n'    ---->   \J
2304        null    ---->   \@
2305         \      ---->   \\
2306         '"'    ---->   \"
2307#v-
2308\done
2309
2310\function{IsHPFSFileSystem}
2311\synopsis{IsHPFSFileSystem}
2312\usage{Integer IsHPFSFileSystem(String path);}
2313\description
2314  Returns non-zero if drive of \var{path} (possibly the default drive) is
2315  HPFS.
2316\done
2317
2318\function{msdos_fixup_dirspec}
2319\synopsis{msdos_fixup_dirspec}
2320\usage{String msdos_fixup_dirspec (String dir);}
2321\description
2322  The motivation behind this is that DOS does not like a trailing
2323  backslash except if it is for the root dir.  This function makes
2324  \var{dir} conform to that.
2325\done
2326
2327\function{set_top_status_line}
2328\synopsis{set_top_status_line}
2329\usage{String set_top_status_line (String str);}
2330\description
2331  This functions sets the string to be displayed at the top of the
2332  display. It returns the value of the line that was previously
2333  displayed.
2334\seealso{enable_top_status_line}
2335\done
2336
2337\function{enable_top_status_line}
2338\synopsis{enable_top_status_line}
2339\usage{Void enable_top_status_line (Integer x);}
2340\description
2341  If x is non-zero, the top status line is enabled.  If x is zero, the
2342  top status line is disabled and hidden.
2343\seealso{set_top_status_line}
2344\done
2345
2346\function{create_line_mark}
2347\synopsis{create_line_mark}
2348\usage{User_Mark create_line_mark (Integer c);}
2349\description
2350  The function \var{create_line_mark} returns an object of the type
2351  \var{User_Mark}.  This object contains information regarding the current
2352  position and current buffer.  The parameter \var{c} is used to specify the
2353  color to use when the line is displayed.
2354\seealso{create_user_mark, set_color_object}
2355\done
2356
2357\function{create_user_mark}
2358\synopsis{create_user_mark}
2359\usage{User_Mark create_user_mark ();}
2360\description
2361  The function \var{create_user_mark} returns an object of the type
2362  \var{User_Mark}. This object contains information regarding the current
2363  position and current buffer.
2364\seealso{move_user_mark, goto_user_mark, user_mark_buffer}
2365\done
2366
2367\function{goto_user_mark}
2368\synopsis{goto_user_mark}
2369\usage{Void goto_user_mark (User_Mark mark);}
2370\description
2371  This function returns to the position of the User Mark \var{mark}.  Before
2372  this function may be called, the current buffer must be the buffer
2373  associated with the makr.
2374\seealso{move_user_mark, create_user_mark, user_mark_buffer}
2375\done
2376
2377\function{move_user_mark}
2378\synopsis{move_user_mark}
2379\usage{Void move_user_mark (User_Mark mark);}
2380\description
2381  This function call takes a previously created User Mark, \var{mark}, and
2382  moves it to the current position and buffer.  This means that if one
2383  subsequently calls \var{goto_user_mark} with this mark as an argument, the
2384  the position will be set to what it is prior to the call to
2385  \var{move_user_mark}.
2386  Note: This function call is not equivalent to simply using
2387#v+
2388        mark = create_user_mark ();
2389#v-
2390  because independent copies of a User Mark are not created uponn
2391  assignment.  That is, if one has
2392#v+
2393        variable mark1, mark2;
2394        setbuf ("first");
2395        mark1 = create_user_mark ();
2396        mark2 = mark1;
2397        setbuf ("second");
2398#v-
2399  and then calls
2400#v+
2401        move_user_mark (mark1);
2402#v-
2403  both user marks, \var{mark1} and \var{mark2} will be moved since they refer to
2404  the same mark.
2405\seealso{goto_user_mark, create_user_mark, user_mark_buffer}
2406\done
2407
2408\function{user_mark_buffer}
2409\synopsis{user_mark_buffer}
2410\usage{String user_mark_buffer (User_Mark m);}
2411\description
2412  This function returns the name of the buffer associated with the
2413  User Mark specified by \var{m}.
2414\seealso{goto_user_mark, create_user_mark, move_user_mark, is_user_mark_in_narrow}
2415\done
2416
2417\function{is_user_mark_in_narrow}
2418\synopsis{is_user_mark_in_narrow}
2419\usage{Integer is_user_mark_in_narrow (User_Mark m);}
2420\description
2421  This function returns non-zero if the user mark \var{m} refers to a
2422  position that is within the current narrow restriction of the current
2423  buffer.  It returns zero if the mark lies outside the restriction.
2424  An error will be generated if \var{m} does not represent a mark for the current
2425  buffer.
2426\seealso{goto_user_mark, move_user_mark}
2427\done
2428
2429\function{list_abbrev_tables}
2430\synopsis{list_abbrev_tables}
2431\usage{Integer list_abbrev_tables ();}
2432\description
2433  This function returns the names of all currently defined
2434  abbreviation tables.  The top item on the stack will be the number of
2435  tables followed by the names of the tables.
2436\done
2437
2438\function{use_abbrev_table}
2439\synopsis{use_abbrev_table}
2440\usage{Void use_abbrev_table (String table);}
2441\description
2442  Use the abbreviation table named \var{table} as the abbreviation table for
2443  the current buffer.  By default, the "Global" table is used.
2444\done
2445
2446\function{create_abbrev_table}
2447\synopsis{create_abbrev_table}
2448\usage{Void create_abbrev_table (String name, String word);}
2449\description
2450  Create an abbreviation table with name \var{name}.  The second parameter
2451  \var{word} is the list of characters used to represent a word for the
2452  table. If the empty string is passed for \var{word}, the characters that
2453  currently constitute a word are used.
2454\done
2455
2456\function{define_abbrev}
2457\synopsis{define_abbrev}
2458\usage{Void define_abbrev (String tbl, String abbrv, String expans);}
2459\description
2460  This function is used to define an abbreviation \var{abbrv} that will be
2461  expanded to \var{expans}.  The definition will be placed in the table with
2462  name \var{tbl}.
2463\done
2464
2465\function{abbrev_table_p}
2466\synopsis{abbrev_table_p}
2467\usage{Integer abbrev_table_p (String name);}
2468\description
2469  Returns non-zero if an abbreviation table with called \var{name} exists. If
2470  the table does not exist, it returns zero.
2471\done
2472
2473\function{dump_abbrev_table}
2474\synopsis{dump_abbrev_table}
2475\usage{Void dump_abbrev_table (String name);}
2476\description
2477  This function inserts the contents of the abbreviation table called
2478  \var{name} into the current buffer.
2479\done
2480
2481\function{what_abbrev_table}
2482\synopsis{what_abbrev_table}
2483\usage{(String, String) what_abbrev_table ();}
2484\description
2485  This functions returns both the name of the abbreviation table and the
2486  definition of the word for the table currently associated with the
2487  current buffer.  If none is defined it returns two empty strings.
2488\done
2489
2490\function{delete_abbrev_table}
2491\synopsis{delete_abbrev_table}
2492\usage{Void delete_abbrev_table (String name);}
2493\description
2494  Delete the abbrev table specified by \var{name}.
2495\done
2496
2497\function{set_column_colors}
2498\synopsis{set_column_colors}
2499\usage{Void set_column_colors (Integer color, Integer c0, Integer c1);}
2500\description
2501  This function associates a color with columns \exmp{c0} through \var{c1} in the
2502  current buffer.  That is, if there is no syntax highlighting already
2503  defined for the current buffer, when the current buffer is displayed,
2504  columns \exmp{c0} through \var{c1} will be displayed with the attributes of the
2505  \var{color} object.  The parameters \exmp{c0} and \var{c1} are restricted to the range
2506  1 through \var{SCREEN_WIDTH}.  Use the function \var{set_color_object} to assign
2507  attributes to the \var{color} object.
2508\seealso{set_color_object}
2509\done
2510
2511\function{set_color_object}
2512\synopsis{set_color_object}
2513\usage{Void set_color_object (Integer obj, String fg, String bg);}
2514\description
2515  Associate colors fg and bg with object obj.  Valid values for \var{obj}
2516  are in the range 30 to 128.  All other values are reserved.  Values for
2517  the strings \var{fg} and \var{bg} are as given by the description for \var{set_color}.
2518\seealso{set_column_colors, set_color}
2519\done
2520
2521\function{translate_region}
2522\synopsis{translate_region}
2523\usage{Void translate_region ();}
2524\description
2525  This function uses the global character array \var{TRANSLATE_ARRAY} to
2526  modify the characters in a region based on the mapping defined by the
2527  array.  The only restriction is that the newline character cannot be
2528  mapped.  This example
2529#v+
2530        define swap_a_and_b ()
2531        {
2532          variable i;
2533          _for (0; 255, 1)
2534            {
2535               i = ();
2536               TRANSLATE_ARRAY[i] = i;
2537            }
2538          TRANSLATE_ARRAY['a'] = 'b';
2539          TRANSLATE_ARRAY['b'] = 'a';
2540          bob (); push_mark (); eob ();
2541          translate_region ();
2542        }
2543#v-
2544  uses \var{translate_region} to swap the \exmp{'a'} and \exmp{'b'} characters in the
2545  current buffer.
2546\seealso{insert, delete, what_char}
2547\seealso{TRANSLATE_ARRAY}
2548\done
2549
2550\function{set_current_kbd_command}
2551\synopsis{set_current_kbd_command}
2552\usage{Void set_current_kbd_command (String s);}
2553\description
2554  Undocumented
2555\done
2556
2557\function{find_matching_delimiter}
2558\synopsis{find_matching_delimiter}
2559\usage{Integer find_matching_delimiter (Integer ch);}
2560\description
2561  This function scans either forward or backward looking for the
2562  delimiter that matches the character specified by \var{ch}.  The actual
2563  direction depends upon the syntax of the character \var{ch}.  The
2564  matching delimiter pair must be declared as such by a prior call to
2565  \var{define_syntax}.  This function returns one of the following values:
2566#v+
2567         1    Match found
2568         0    Match not found
2569        -1    A match was attempted from within a string.
2570        -2    A match was attempted from within a comment
2571         2    No information
2572#v-
2573  In addition, the current point is left either at the match or is left
2574  at the place where the routine either detected a mismatch or gave up.
2575  In the case of a comment or a string (return values of -2 or -1), the
2576  current point is left at the beginning of a comment.
2577  Note: If the of \var{ch} is zero, the character at the current point will be
2578  used.
2579\seealso{blink_match, create_syntax_table, define_syntax, parse_to_point}
2580\done
2581
2582\function{blink_match}
2583\synopsis{blink_match}
2584\usage{Void blink_match ();}
2585\description
2586  This function will attempt to blink the matching delimiter immediately
2587  before the editing point.
2588\seealso{find_matching_delimiter, define_syntax}
2589\done
2590
2591\function{parse_to_point}
2592\synopsis{parse_to_point}
2593\usage{Integer parse_to_point ();}
2594\description
2595  This function attempts to determine the syntactic context of the
2596  current editing point.  That is, it tries to determine whether or not
2597  the current point is in a comment, a string, or elsewhere.
2598  It returns:
2599#v+
2600        -2   In a comment
2601        -1   In a string or a character
2602         0   Neither of the above
2603#v-
2604  Note: This routine is rather simplistic since it makes the assumption
2605  that the character at the beginning of the current line is not in a
2606  comment nor is in a string.
2607\seealso{define_syntax, find_matching_delimiter}
2608\done
2609
2610\function{set_syntax_flags}
2611\synopsis{set_syntax_flags}
2612\usage{Void set_syntax_flags (String table, Integer flag);}
2613\description
2614  This function may be used to set the flags in the syntax table
2615  specified by the \var{table} parameter.  The \var{flag} parameter may take
2616  any of the following values or any combination bitwise or-ed together:
2617#v+
2618      0x01     Keywords are case insensitive
2619      0x02     Comments are Fortran-like
2620      0x04     Comments are C-like
2621      0x08     Keywords are TeX-like
2622      0x20     Syntax highlight whole preprocessor line in same color
2623#v-
2624  A Fortran-like comment means that any line that begins with certain
2625  specified characters is considered to be a comment.  This special
2626  subset of characters must be specified via a call to the
2627  \var{set_fortran_comment_chars} function.
2628
2629  C-like comment means that any line that starts with \exmp{"* "} preceeded
2630  by any ammount of whitespace is to be highlighted as a comment.
2631
2632  A TeX-like keyword is any word that follows the quote character.
2633\seealso{define_syntax, set_fortran_comment_chars}
2634\done
2635
2636\function{set_fortran_comment_chars}
2637\synopsis{Specify characters for fortran-like comments}
2638\usage{Void set_fortran_comment_chars (String_Type table, String_Type list}
2639\description
2640  This function may be used to specify the set of characters that
2641  denote fortran style comments.  The first parameter \var{table} is
2642  the name of a previously defined syntax table, and \var{list}
2643  denotes the set of characters that specify the fortran-style
2644  comment.
2645
2646  The string \var{list} is simply a set of characters and may include
2647  character ranges.  If the first character of \var{list} is
2648  \var{'^'}, then the meaning is that only those characters that do
2649  not specify fortran sytle comments are included in the list.
2650\example
2651  Fortran mode uses the following:
2652#v+
2653     set_fortran_comment_chars ("FORTRAN", "^0-9 \t\n");
2654#v-
2655  This means that if any line that begins with any character
2656  except the characters \exmp{0} to \exmp{9}, the space, tab, and
2657  newline characters will denote a comment.
2658\notes
2659  The usefulness of this function is not limited to fortran modes.  In
2660  fact, many languages have fortran-style comments.
2661
2662  This function is meaningful only if the syntax table has
2663  fortran-style comments as specified via the \var{set_syntax_flags}
2664  function.
2665\seealso{define_syntax, set_syntax_flags}
2666\done
2667
2668
2669\function{define_syntax}
2670\synopsis{define_syntax}
2671\usage{Void define_syntax (..., Integer type, String name);}
2672\description
2673  This function adds a syntax entry to the table specified by the last
2674  parameter \var{name}.  The actual number of parameters vary according to
2675  the next to the last parameter \var{type}.
2676
2677  If \var{type} is \exmp{'"'} or \exmp{'\\''}, a string or character delimiter syntax is
2678  defined. In this case, \var{define_syntax} only takes three parameters
2679  where the first parameter is an integer that represents the character
2680  for which the syntax is to be applied.
2681
2682  Similarly, if \var{type} is \exmp{'\\\\'}, then a quote syntax is defined and
2683  again \var{define_syntax} only takes three parameters where the first
2684  parameter is an integer that represents the character for which the
2685  syntax is to be applied.  A quote character is one in which the
2686  syntax of the following character is not treated as special.
2687
2688  If \var{type} is \exmp{'('}, then \var{define_syntax} takes four parameters where
2689  the first two parameters are strings that represent a matching set of
2690  delimiters.  The first string contains the set of opening delimiters
2691  and the second string specifies the set of closing delimiters that
2692  match the first set.  If a character from the closing set is entered
2693  into the buffer, the corresponding delimiter from the opening set
2694  will be blinked.  For example, if the C language syntax table is
2695  called \exmp{"C"}, then one would use
2696#v+
2697        define_syntax ("([{", ")]}", '(', "C");
2698#v-
2699  to declare the matching delimiter set.  Note that the order of the
2700  characters in the two strings must correspond.  That is, the above
2701  example says that \exmp{'('} matches \exmp{')'} and so on.
2702
2703  If \var{type} is \exmp{'%'}, a comment syntax is defined.  As in the
2704  previous case, \var{define_syntax} takes four parameters where there
2705  first two parameters are strings that represent the begin and end
2706  comment delimiters.  If the comment syntax is such that the comment
2707  ends at the end of a line, the second string must either be the empty
2708  string, \exmp{""}, or a newline \exmp{"\\n"}.  In the current implementation, at
2709  most the begin and end comment strings can consist of at most two
2710  characters.
2711
2712  If \var{type} is \exmp{'+'}, the first parameter is a string whose characters
2713  are given the operator syntax.  If type is \exmp{','}, the first parameter
2714  is a string composed of characters that are condered to be
2715  delimiters.  If type is '0', the first parameter is a string composed
2716  of characters that make up a number.
2717
2718  If \var{type} is \exmp{<}, the first parameter is a string whose successive
2719  characters form begin and end keyword highlight directives.
2720
2721  Finally, if \var{type} is \exmp{'#'}, the first parameter is an integer whose
2722  value corresponds to the character used to begin preprocessor lines.
2723
2724  As an example, imagine a language in which the dollar sign character
2725  \exmp{$} is used as a string delimiter, the backward quote character \exmp{`}
2726  is used as a quote character, comments begin with a semi-colon and
2727  end at the end of a line, and the characters \exmp{'<'} and \exmp{'>'} form
2728  matching delimiters.  The one might use
2729#v+
2730        create_syntax_table ("strange");
2731        define_syntax ('$',        '"',  "strange");
2732        define_syntax ('`',        '\\', "strange");
2733        define_syntax (";", "",    '%',  "strange");
2734        define_syntax ("<", ">",   '(',  "strange");
2735#v-
2736  to create a syntax table called \exmp{"strange"} and define the
2737  syntax entries for appropriate this example.
2738\seealso{create_syntax_table, use_syntax_table, find_matching_delimiter}
2739\seealso{BLINK}
2740\done
2741
2742\function{use_syntax_table}
2743\synopsis{use_syntax_table}
2744\usage{Void use_syntax_table (String n);}
2745\description
2746  This function associates the current buffer with the syntax table
2747  specified by the name \var{n}.  Until another syntax table is associated
2748  with the buffer, the syntax table named \var{n} will be used in all
2749  operations that require a syntax.  This includes parenthesis matching,
2750  indentation, etc.
2751\seealso{create_syntax_table, define_syntax}
2752\done
2753
2754\function{create_syntax_table}
2755\synopsis{create_syntax_table}
2756\usage{Void create_syntax_table (String name);}
2757\description
2758  This the purpose of this function is to create a new syntax table
2759  with the name specified by \var{name}.  If the table already exists, this
2760  function does nothing.
2761\seealso{define_syntax, use_syntax_table, define_keywords}
2762\done
2763
2764\function{define_keywords_n}
2765\synopsis{define_keywords_n}
2766\usage{String define_keywords_n (String table, String kws, Integer len, Integer n);}
2767\description
2768  This function is used to define a set of keywords that will be color
2769  syntax highlighted in the keyword color associated with the table
2770  specified by \var{n}.  The first parameter, \var{table}, specifies which
2771  syntax table is to be used for the definition. The second parameter,
2772  \var{kws}, is a string that is the concatenation of keywords of length
2773  specified by the last parameter \var{len}.  The list of keywords specified
2774  by \var{kws} must be in alphabetic order.  The function returns the
2775  previous list of keywords of length \var{len}. For example, C mode uses
2776  the statement
2777#v+
2778        () = define_keywords_n ("C", "asmforintnewtry", 3, 0);
2779#v-
2780  to define the four three-letter keywords \var{asm}, \var{for}, \var{int}, \var{new},
2781  and \var{try}.  Note that in the above example, the return value is not used.
2782\seealso{define_syntax, set_color}
2783\seealso{WANT_SYNTAX_HIGHLIGHT,USE_ANSI_COLORS}
2784\done
2785
2786\function{set_highlight_cache_dir}
2787\synopsis{set_highlight_cache_dir}
2788\usage{Void set_highlight_cache_dir (String dir);}
2789\description
2790  This function sets the directory where the dfa syntax highlighting
2791  cache files are located.
2792  See also: \var{enable_highlight_cache}
2793\done
2794
2795\function{define_highlight_rule}
2796\synopsis{define_highlight_rule}
2797\usage{Void define_highlight_rule (String rule, String color, String n);}
2798\description
2799  This function adds an enhanced highlighting rule to the
2800  syntax table specified by the name \var{n}. The rule is described
2801  as a regular expression by the string \var{rule}, and the
2802  associated color is given by the string \var{color}, in the same
2803  format as is passed to \var{set_color}. For example:
2804#v+
2805        create_syntax_table ("demo");
2806        define_highlight_rule ("[A-Za-z][A-Za-z0-9]*", "keyword", "demo");
2807        define_highlight_rule ("//.*$", "comment", "demo");
2808        build_highlight_table ("demo");
2809#v-
2810  causes a syntax table to be defined in which any string of
2811  alphanumeric characters beginning with an alphabetic is
2812  highlighted in keyword color, and anything after "//" on a
2813  line is highlighted in comment color.
2814
2815  The regular expression syntax understands character classes
2816  like \exmp{[a-z]} and \exmp{[^a-z0-9]}, parentheses, \exmp{+}, \exmp{*}, \exmp{?}, \exmp{|}
2817  and \exmp{.}. Any metacharacter can be escaped using a backslash
2818  so that it can be used as a normal character, but beware that
2819  due to the syntax of S-Lang strings the backslash has to be
2820  doubled when specified as a string constant. For example:
2821#v+
2822        define_highlight_rule ("^[ \t]*\\*+[ \t].*$", "comment", "C");
2823#v-
2824  defines any line beginning with optional whitespace, then one
2825  or more asterisks, then more whitespace to be a comment. Note
2826  the doubled backslash before the \exmp{*}.
2827
2828  Note also that \var{build_highlight_table} must be called before
2829  the syntax highlighting can take effect.
2830\seealso{create_syntax_table, use_syntax_table, build_highlight_table}
2831\seealso{WANT_SYNTAX_HIGHLIGHT,USE_ANSI_COLORS}
2832\done
2833
2834\function{build_highlight_table}
2835\synopsis{build_highlight_table}
2836\usage{Void build_highlight_table (String n);}
2837\description
2838  This function builds a DFA table for the enhanced syntax
2839  highlighting scheme specified for the syntax table specified
2840  by the name \var{n}. This must be called before any syntax
2841  highlighting will be done for that syntax table.
2842\seealso{create_syntax_table, use_syntax_table, define_highlight_rule, enable_highlight_cache}
2843\seealso{WANT_SYNTAX_HIGHLIGHT,USE_ANSI_COLORS}
2844\done
2845
2846\function{enable_highlight_cache}
2847\synopsis{enable_highlight_cache}
2848\usage{Void enable_highlight_cache (String file, String n);}
2849\description
2850  This function enables caching of the DFA table for the
2851  enhanced syntax highlighting scheme belonging to the syntax
2852  table specified by the name \var{n}. This should be called before
2853  any calls to \var{define_highlight_rule} or to
2854  \var{build_highlight_table}. The parameter \var{file}
2855  specifies the name of the file (stored in the directory set by the
2856  \var{set_highlight_cache_dir} function) which should be used as a cache.
2857
2858  For example, in \exmp{cmode.sl} one might write
2859#v+
2860        enable_highlight_cache ("cmode.dfa", "C");
2861#v-
2862  to enable caching of the DFA. If caching were not enabled for
2863  C mode, the DFA would take possibly a couple of seconds to
2864  compute every time Jed was started.
2865
2866  Transferring cache files between different computers is
2867  theoretically possible but not recommended. Transferring them
2868  between different versions of Jed is not guaranteed to work.
2869\seealso{create_syntax_table, use_syntax_table, define_highlight_rule, build_highlight_table}
2870\seealso{WANT_SYNTAX_HIGHLIGHT,USE_ANSI_COLORS}
2871\done
2872
2873\function{set_expansion_hook}
2874\synopsis{set_expansion_hook}
2875\usage{Void set_expansion_hook (String fname);}
2876\description
2877  This function may be used to specify a function that will be called to
2878  expand a filename upon TAB completion.  The function \var{fname} must
2879  already be defined.  When \var{fname} is called, it is given a string to
2880  be expanded. If it changes the string, it must return a non-zero value
2881  and the modified string.  If the string is not modified, it must simply
2882  return zero.
2883\done
2884
2885\function{get_passwd_info}
2886\synopsis{get_passwd_info}
2887\usage{(dir, shell, pwd, uid, gid) = get_passwd_info (String username);}
2888\description
2889  This function returns password information about the user with name
2890  \var{username}.  The returned variables have the following meaning:
2891#v+
2892        dir:     login directory
2893        shell:   login shell
2894        pwd:     encripted password
2895        uid:     user identification number
2896        gid:     group identification number
2897#v-
2898  If the user does not exist, or the system call fails, the function
2899  returns with \var{uid} and \var{gid} set to \exmp{-1}.
2900\done
2901
2902\function{get_termcap_string}
2903\synopsis{get_termcap_string}
2904\usage{String get_termcap_string (String cap);}
2905\description
2906  This function may be used to extract the string associated with the
2907  termcap capability associated with \var{cap}.
2908  Note: This function is only available on Unix systems.
2909\done
2910
2911\function{get_doc_string}
2912\synopsis{get_doc_string}
2913\usage{Integer get_doc_string (String obj, String filename);}
2914\description
2915  This function may be used to extract the documentation for a variable
2916  or function from a jed documentation file given by \var{filename}.
2917  If successful, it returns non-zero as well as the documentation string.
2918  It returns zero upon failure.  The first character of \var{obj} determines
2919  whether \var{obj} refers to a function or to a variable.  The rest of the
2920  characters specify the name of the object.
2921\done
2922
2923\function{kill_process}
2924\synopsis{kill_process}
2925\usage{Void kill_process (Integer id);}
2926\description
2927  Kill the subprocess specified by the process handle \var{id}.
2928\done
2929
2930\function{send_process}
2931\synopsis{send_process}
2932\usage{Void send_process (Integer id, String s);}
2933\description
2934  Undocumented
2935\done
2936
2937\function{open_process}
2938\synopsis{open_process}
2939\usage{Integer open_process (name, argv1, argv2, ..., argvN, N);}
2940\description
2941  Returns id of process, -1 upon failure.
2942\done
2943
2944\function{process_mark}
2945\synopsis{process_mark}
2946\usage{User_Mark process_mark (Integer id);}
2947\description
2948  This function returns the user mark that contains the position of the
2949  last output by the process.
2950\done
2951
2952\function{set_process}
2953\synopsis{set_process}
2954\usage{Void set_process (Integer pid, String what, String value);}
2955\description
2956  \var{pid} is the process hendle returned by \var{open_process}.  The second
2957  parameter, \var{what}, specifies what to set.  It must be one of the
2958  strings:
2959#v+
2960        "signal" :  indicates that 'value' is the name of a function to call
2961                    when the process status changed.  The function specified
2962                    by 'value' must be declared to accept an argument list:
2963                    (pid, flags) where 'pid' has the same meaning as above and
2964                    flags is an integer with the meanings:
2965                      1: Process Running
2966                      2: Process Stopped
2967                      4: Process Exited Normally
2968                      8: Process Exited via Signal
2969                    To obtain more information about the process, e.g., exit_status,
2970                    use the function 'get_process_status'.
2971                    Note: when this function is called, the current buffer is
2972                    guaranteed to be the buffer associated with the process.
2973
2974        output" :   This parameter determines how output from the process is
2975                    is processed.  If the 'value' is the empty string "", output
2976                    will go to the end of the buffer associated with the process
2977                    and the point will be left there.
2978                    If value is ".", output will go at the current buffer position.
2979                    If value is "@", output will go to the end of the buffer but
2980                    the point will not move.  Otherwise, 'value' is the name of
2981                    a slang function with arguments: (pid, data) where pid has
2982                    the above meaning and data is the output from the process.
2983#v-
2984\done
2985
2986\function{send_process_eof}
2987\synopsis{send_process_eof}
2988\usage{send_process_eof (Integer pid);}
2989\description
2990  This function closes the \var{stdin} of the process specified by the
2991  handle \var{pid}.
2992\done
2993
2994\function{get_process_input}
2995\synopsis{get_process_input}
2996\usage{Void get_process_input (Integer tsecs);}
2997\description
2998  Read all pending input by all subprocesses.  If no input is
2999  available, this function will wait for input until \var{tsecs} tenth of
3000  seconds have expired.
3001\done
3002
3003\function{signal_process}
3004\synopsis{signal_process}
3005\usage{Void signal_process (Integer pid, Integer signum);}
3006\description
3007  This function may be used to send a signal to the process whose
3008  process handle is given by \var{pid}.  The \var{pid} must be a valid handle
3009  that was returned by \var{open_process}.
3010\seealso{open_process, kill_process, send_process_eof}
3011\done
3012
3013\function{clear_message}
3014\synopsis{clear_message}
3015\usage{Void clear_message ();}
3016\description
3017  This function may be used to clear the message line of the display.
3018\seealso{message, update, error, flush}
3019\done
3020
3021\function{flush_input}
3022\synopsis{flush_input}
3023\usage{Void flush_input ();}
3024\description
3025  This function may be used to remove all forms of queued input.
3026\seealso{input_pending, getkey}
3027\done
3028
3029\function{set_buffer_umask}
3030\synopsis{set_buffer_umask}
3031\usage{Integer set_buffer_umask (Integer cmask);}
3032\description
3033  The function may be used to set the process file creation mask
3034  for the appropriate operations associated with the current
3035  buffer.  This makes it possible to have a buffer-dependent
3036  umask setting. The function takes the desired umask setting and
3037  returns the previous setting.  If \var{cmask} is zero, the default
3038  process umask setting will be used for operations while the buffer
3039  is current.  If \var{cmask} is -1, the umask associated with the buffer
3040  will not be changed.
3041\done
3042
3043\function{fsearch}
3044\synopsis{fsearch}
3045\usage{Integer fsearch (String str);}
3046\description
3047  This function may be used to search forward in buffer looking for the
3048  string \var{str}.  If not found, this functions returns zero.  However,
3049  if found, the length of the string is returned and the current point
3050  is moved to the to the start of the match.  It respects the setting
3051  of the variable \var{CASE_SEARCH}.  If the string that one is searching
3052  for is known to be at the beginning of a line, the function
3053  \var{bol_fsearch} should be used instead.
3054
3055  Note: This function cannot find a match that crosses lines.
3056\seealso{ffind, fsearch_char, bsearch, bol_fsearch, re_fsearch, looking_at}
3057\seealso{CASE_SEARCH}
3058\done
3059
3060\function{bsearch}
3061\synopsis{bsearch}
3062\usage{Integer bsearch (String str);}
3063\description
3064  The \var{bsearch} function searches backward from the current position
3065  for the string \var{str}.  If \var{str} is found, this function will return
3066  the length of \var{str} and move the current position to the beginning of
3067  the matched text.  If a match is not found, zero will be returned and
3068  the position will not change.  It respects the value of the variable
3069  \var{CASE_SEARCH}.
3070\seealso{fsearch, bol_bsearch, re_bsearch}
3071\done
3072
3073\function{bfind}
3074\synopsis{bfind}
3075\usage{Integer bfind (String str);}
3076\description
3077  \var{bfind} searches backward from the current position to the beginning
3078  of the line for the string \var{str}.  If a match is found, the length of
3079  \var{str} is returned and the current point is moved to the start of the
3080  match. If no match is found, zero is returned.
3081  Note: This function respects the setting of the \var{CASE_SEARCH} variable.
3082\seealso{bsearch, ffind, bol_bsearch, re_bsearch}
3083\seealso{CASE_SEARCH}
3084\done
3085
3086\function{ffind}
3087\synopsis{ffind}
3088\usage{Integer ffind (String s);}
3089\description
3090  \var{ffind} searches forward from the current position to the end of the
3091  line for the string \var{str}.  If a match is found, the length of \var{str}
3092  is returned and the current point is moved to the start of the match.
3093  If no match is found, zero is returned.
3094  Note: This function respects the setting of the \var{CASE_SEARCH} variable.
3095  To perform a search that includes multiple lines, use the \var{fsearch}
3096  function.
3097\seealso{fsearch, bfind, re_fsearch, bol_fsearch}
3098\done
3099
3100\function{bol_fsearch}
3101\synopsis{bol_fsearch}
3102\usage{Integer bol_fsearch (str);}
3103\description
3104  \var{bol_fsearch} searches forward from the current point until the end
3105  of the buffer for occurrences of the string \var{str} at the beginning of
3106  a line.  If a match is found, the length of \var{str} is returned and the
3107  current point is moved to the start of the match.  If no match is
3108  found, zero is returned.
3109  Note: \var{bol_fsearch} is much faster than using \var{re_fsearch} to perform
3110  a search that matches the beginning of a line.
3111\seealso{bol_bsearch, fsearch, ffind, re_fsearch}
3112\seealso{CASE_SEARCH}
3113\done
3114
3115\function{bol_bsearch}
3116\synopsis{bol_bsearch}
3117\usage{Integer bol_bsearch (str);}
3118\description
3119  \var{bol_bsearch} searches backward from the current point until the
3120  beginning of the buffer for the occurrences of the string \var{str} at
3121  the beginning of a line.  If a match is found, the length of \var{str} is
3122  returned and the current point is moved to the start of the match. If
3123  no match is found, zero is returned.
3124
3125  Note: \var{bol_bsearch} is much faster than using \var{re_bsearch} to perform
3126  a search that matches the beginning of a line.
3127\seealso{bol_fsearch, bsearch, bfind, re_bsearch}
3128\seealso{CASE_SEARCH}
3129\done
3130
3131\function{bol_fsearch_char}
3132\synopsis{bol_fsearch_char}
3133\usage{Integer bol_fsearch_char (Integer ch);}
3134\description
3135  This function searches forward for a character \var{ch} at the beginning
3136  of a line.  If it is found, \var{1} is returned; otherwise \exmp{0} is returned.
3137\seealso{bol_fsearch, bol_bsearch_char, fsearch_char}
3138\seealso{CASE_SEARCH}
3139\done
3140
3141\function{bol_bsearch_char}
3142\synopsis{bol_bsearch_char}
3143\usage{Integer bol_fsearch_char (Integer ch);}
3144\description
3145  This function searches backward for a character \var{ch} at the beginning
3146  of a line.  If it is found, \var{1} is returned; otherwise \exmp{0} is returned.
3147\seealso{bol_bsearch, bol_fsearch_char, bsearch_char}
3148\seealso{CASE_SEARCH}
3149\done
3150
3151\function{fsearch_char}
3152\synopsis{fsearch_char}
3153\usage{Integer fsearch_char (Integer ch);}
3154\description
3155  This function searches forward for a character \var{ch}.  If it is
3156  found, \var{1} is returned; otherwise \exmp{0} is returned.
3157\seealso{fsearch, ffind_char, bsearch_char}
3158\seealso{CASE_SEARCH}
3159\done
3160
3161\function{bsearch_char}
3162\synopsis{bsearch_char}
3163\usage{Integer fsearch_char (Integer ch);}
3164\description
3165  This function searches backward for a character \var{ch}.  If it is
3166  found, \var{1} is returned; otherwise \exmp{0} is returned.
3167\seealso{fsearch_char, ffind_char, fsearch}
3168\seealso{CASE_SEARCH}
3169\done
3170
3171\function{bfind_char}
3172\synopsis{bfind_char}
3173\usage{Integer fsearch_char (Integer ch);}
3174\description
3175  This function searches backward on the current line for a character
3176  \var{ch}.  If it is found, \var{1} is returned; otherwise \exmp{0} is returned.
3177\seealso{fsearch_char, ffind_char, fsearch}
3178\seealso{CASE_SEARCH}
3179\done
3180
3181\function{ffind_char}
3182\synopsis{ffind_char}
3183\usage{Integer fsearch_char (Integer ch);}
3184\description
3185  This function searches forwardward on the current line for a character
3186  \var{ch}.  If it is found, \var{1} is returned; otherwise \exmp{0} is returned.
3187\seealso{fsearch_char, bfind_char, fsearch}
3188\seealso{CASE_SEARCH}
3189\done
3190
3191\function{replace}
3192\synopsis{replace}
3193\usage{Void replace(String old, String new);}
3194\description
3195  This function may be used to replace all occurances of the string
3196  \var{old} with the string, \var{new}, from current editing point to the end
3197  of the buffer. The editing point is returned to the initial location.
3198  That is, this function does not move the editing point.
3199\seealso{replace_chars, fsearch, re_fsearch, bsearch, ffind, del}
3200\seealso{REPLACE_PRESERVE_CASE}
3201\done
3202
3203\function{replace_chars}
3204\synopsis{replace_chars}
3205\usage{Void replace_chars (Integer n, String new);}
3206\description
3207  This function may be used to replace the next \var{n} characters at the
3208  editing position by the string \var{new}.  After the replacement, the editing
3209  point will be moved to the end of the inserted string.  The length of
3210  the replacement string \var{new} is returned.
3211\seealso{fsearch, re_fsearch, bsearch, ffind, del}
3212\seealso{REPLACE_PRESERVE_CASE}
3213\done
3214
3215\function{regexp_nth_match}
3216\synopsis{regexp_nth_match}
3217\usage{String regexp_nth_match (Integer n);}
3218\description
3219  This function returns the nth sub-expression matched by the last regular
3220  expression search.  If the parameter \var{n} is zero, the entire match is
3221  returned.
3222  Note: The value returned by this function is meaningful only if the
3223  editing point has not been moved since the match.
3224\seealso{re_fsearch, re_bsearch}
3225\done
3226
3227\function{replace_match}
3228\synopsis{replace_match}
3229\usage{Integer replace_match(String s, Integer how);}
3230\description
3231  This function replaces text previously matched with \var{re_fsearch} or
3232  \var{re_bsearch} at the current editing point with string \var{s}.  If \var{how} is
3233  zero, \var{s} is a specially formatted string of the form described below.
3234  If \var{how} is non-zero, \var{s} is regarded as a simple string and is used
3235  literally.  If the replacement fails, this function returns zero
3236  otherwise, it returns non-zero.
3237\done
3238
3239\function{re_fsearch}
3240\synopsis{re_fsearch}
3241\usage{Integer re_fsearch(String pattern);}
3242\description
3243  Search forward for regular expression \var{pattern}.  This function returns
3244  the 1 + length of the string  matched.  If no match is found, it returns
3245  0.
3246\seealso{fsearch, bol_fsearch, re_bsearch}
3247\done
3248
3249\function{re_bsearch}
3250\synopsis{re_bsearch}
3251\usage{Integer re_bsearch(String pattern);}
3252\description
3253  Search backward for regular expression \var{pattern}.  This function returns
3254  the 1 + length of the string  matched.  If no match is found, it returns
3255  0.
3256\seealso{bsearch, bol_bsearch, re_fsearch}
3257\done
3258
3259\function{is_visible_mark}
3260\synopsis{is_visible_mark}
3261\usage{is_visible_mark ();}
3262\description
3263  This function may be used to test whether or not the mark is a visible
3264  mark.  A visible mar is one which causes the region defined by it to
3265  be highlighted.
3266  It returns \var{1} is the mark is visible, or \exmp{0} if the mark
3267  is not visible or does not exist.
3268\seealso{markp, push_mark}
3269\done
3270
3271\function{push_narrow}
3272\synopsis{push_narrow}
3273\usage{Void push_narrow ();}
3274\description
3275  This function saves the current narrow context.  This is useful when
3276  one wants to restore this context after widening the buffer.
3277\seealso{pop_narrow, narrow, widen, widen_buffer}
3278\done
3279
3280\function{pop_narrow}
3281\synopsis{pop_narrow}
3282\usage{Void pop_narrow ();}
3283\description
3284  The purpose of this function is to restore the last narrow
3285  context that was saved via \var{push_narrow}.
3286\seealso{push_narrow, widen, widen_buffer}
3287\done
3288
3289\function{set_blocal_var}
3290\synopsis{set_blocal_var}
3291\usage{Void set_blocal_var (val, String v);}
3292\description
3293  This function sets the value of the buffer local variable with name \var{v}
3294  to value \var{val}.  The buffer local variable specified by \var{v} must have
3295  been previously created by the \var{create_blocal_var} function.  \var{val} must
3296  have the type that was declared when \var{create_blocal_var} was called.
3297\seealso{get_blocal_var, create_blocal_var}
3298\done
3299
3300\function{get_blocal_var}
3301\synopsis{get_blocal_var}
3302\usage{get_blocal_var (String name);}
3303\description
3304  This function returns the value of the buffer local variable specified
3305  by \var{name}.
3306\seealso{set_blocal_var, create_blocal_var}
3307\done
3308
3309\function{create_blocal_var}
3310\synopsis{create_blocal_var}
3311\usage{Void create_blocal_var (String name);}
3312\description
3313  This function is used to create a buffer local variable named
3314  \var{name}. A buffer local variable is a variable whose value is
3315  local to the current buffer.
3316\seealso{get_blocal_var, set_blocal_var}
3317\done
3318
3319\function{count_narrows}
3320\synopsis{count_narrows}
3321\usage{Integer count_narrows ();}
3322\description
3323  This function returns the narrow depth of the current buffer.
3324\seealso{narrow, widen, widen_buffer, push_narrow}
3325\done
3326
3327\function{widen_buffer}
3328\synopsis{widen_buffer}
3329\usage{Void widen_buffer ();}
3330\description
3331  This function widens the whole buffer.  If one intends to restore the
3332  narrow context after calling this function, the narrow context should be
3333  saved via \var{push_narrow}.
3334\seealso{narrow, widen, push_narrow, pop_narrow}
3335\done
3336
3337\function{get_jed_library_path}
3338\synopsis{get_jed_library_path}
3339\usage{String get_jed_library_path ();}
3340\description
3341  This function returns the current search path for jed library files.
3342  The path may be set using the function \var{set_jed_library_path}.
3343\seealso{set_jed_library_path}
3344\done
3345
3346\function{set_jed_library_path}
3347\synopsis{set_jed_library_path}
3348\usage{Void set_jed_library_path (String p);}
3349\description
3350  This function may be used to set the search path for library files.
3351  Its parameter \var{p} may be a comma separated list of directories to
3352  search.  When the editor is first started, the path is initialized
3353  from the \var{JED_ROOT}, or \var{JED_LIBRARY} environment variables.
3354\seealso{get_jed_library_path}
3355\done
3356
3357\function{set_line_readonly}
3358\synopsis{set_line_readonly}
3359\usage{Void set_line_readonly (Integer flag);}
3360\description
3361  This function may be used to turn on or off the read-only state of the
3362  current line.  If the integer parameter \var{flag} is non-zero, the line
3363  will be made read-only.  If the paramter is zero, the read-only state
3364  will be turned off.
3365\seealso{getbuf_info}
3366\done
3367
3368\function{set_line_hidden}
3369\synopsis{set_line_hidden}
3370\usage{Void set_line_hidden (Integer flag);}
3371\description
3372  If the parameter \var{flag} is non-zero, the current line will be given
3373  the hidden attribute.  This means that it will not be displayed.  If the
3374  parameter is zero, the hidden attribute will be turned off.
3375\seealso{set_region_hidden, is_line_hidden}
3376\done
3377
3378\function{set_region_hidden}
3379\synopsis{set_region_hidden}
3380\usage{Void set_region_hidden (Integer flag);}
3381\description
3382  This function may be used to hide the lines in a region.  If \var{flag} is
3383  non-zero, all lines in the region will be hidden.  If it is zero, the
3384  lines in the region will be made visible.
3385\seealso{set_line_hidden, is_line_hidden, skip_hidden_lines_forward}
3386\done
3387
3388\function{is_line_hidden}
3389\synopsis{is_line_hidden}
3390\usage{Integer is_line_hidden ();}
3391\description
3392  This function returns a non-zero value if the current line is hidden.  It
3393  will return zero if the current line is visible.
3394\seealso{set_line_hidden}
3395\done
3396
3397\function{skip_hidden_lines_backward}
3398\synopsis{skip_hidden_lines_backward}
3399\usage{Void skip_hidden_lines_backward (Integer type);}
3400\description
3401  This function may be used to move backward across either hidden or non-hidden
3402  lines depending upon whether the parameter \var{type} is non-zero or zero.
3403  If \var{type} is non-zero, the Point is moved backward across hidden lines
3404  until a visible line is reached.  If \var{type} is zero, visible lines will
3405  be skipped instead.  If the top of the buffer is reached before the
3406  appropriate line is reached, the Point will be left there.
3407
3408  Note: The functions \var{up} and \var{down} are insensitive to whether or not
3409  a line is hidden.
3410\seealso{skip_hidden_lines_forward, is_line_hidden}
3411\done
3412
3413\function{skip_hidden_lines_forward}
3414\synopsis{skip_hidden_lines_forward}
3415\usage{Void skip_hidden_lines_forward (Integer type);}
3416\description
3417  This function may be used to move forward across either hidden or non-hidden
3418  lines depending upon whether the parameter \var{type} is non-zero or zero.
3419  If \var{type} is non-zero, the Point is moved forward across hidden lines
3420  until a visible line is reached.  If \var{type} is zero, visible lines will
3421  be skipped instead.  If the end of the buffer is reached before the
3422  appropriate line is reached, the Point will be left there.
3423
3424  Note: The functions \var{up} and \var{down} are insensitive to whether or not
3425  a line is hidden.
3426\seealso{skip_hidden_lines_backward, is_line_hidden}
3427\done
3428
3429\function{check_buffers}
3430\synopsis{Check to see if any buffers have been changed on the disk}
3431\usage{check_buffers ();}
3432\description
3433  The \var{check_buffers} function checks to see whether or not any of
3434  the disk files that are associated with the editor's buffers have been
3435  modified since the assocation was made.  The buffer flags are
3436  updated accordingly.
3437\seealso{file_time_compare, file_changed_on_disk}
3438\end{\documentstyle}
3439