Control use of tabs in whitespace
Int_Type USE_TABS
If USE_TABS
is non-zero, the editor may use tab characters
when creating whitespace. If the value of this variable is zero, no
tabs will be used.
TAB, TAB_DEFAULT
Set the column at which wrapping occurs
Int_Type WRAP
The WRAP
variable determines the column number at which
wrapping will occur. When entering text, if the current point goes
beyond this column, the text will automatically wrap to the next
line. This will only happen for those buffers for which the wrap flag
is set.
WRAP_INDENTS, getbuf_info, set_mode
Control indentation after wrapping
Int_Type WRAP_INDENTS
If this variable is non-zero, after a line is wrapped, the new line
will start at the same indentation as the current one. On the other
hand, if the value of WRAP_INDENTS
is zero, the new line will
begin in the first column.
del
Void del ();
The del
function deletes the character at the current editing
position. If the position is at the end of the buffer, nothing happens.
If the deletion occurs at the end of a line, the next line will be joined
with the current one.
eobp, erase_buffer, insert
del_region
Void del_region ();
This function deletes the region defined by the mark and the current editing point. For example,
define delete_this_line ()
{
bol (); push_mark (); eol ();
del_region ();
}
defines a function that deletes all characters on the current line
from the beginning of the line until the end of the line. It does not
delete the line itself.
push_mark, markp, check_region
erase_buffer
erase_buffer ();
The erase_buffer
function erases all text from the current buffer.
However, it does not delete the buffer itself.
Note: This function destroys all undo information associated with the buffer making it impossible to undo the result of this function.
delbuf, del
indent_line
Void indent_line ();
The indent_line
line function indents the current line in a manner
which depends upon the current buffer. The actual function that gets
called is set via a prior call the set_buffer_hook
to set the indent
hook. The default value is to indent the line to the indentation
level of the previous line.
set_buffer_hook
insbuf
Void insbuf (String buf);
This function may be used to insert the contents of a buffer specified
by the name buf
into the current buffer. The editing position is
advanced to the end of the insertion.
copy_region, narrow, narrow_to_region
insert
Void insert (String str);
Inserts string str
into buffer at the current position. The editing
point is moved to the end of the of the string that was inserted.
insert_char, del, insert_file, insbuf
insert_char
Undocumented
insert_file_region
Integer insert_file_region (String file, String beg, String end);
This function may be used to insert a region specified by the strings
beg
and end
of the file with name file
into the current buffer.
The file is scanned line by line until a line that begins with the
string given by beg
is encountered. Then, that line and all
successive lines up to the one that starts with the string specified
by end
is inserted into the buffer. The line beginning with the
value of end
is not inserted although the one beginning with beg
is.
The function returns the number of lines inserted or -1
upon failure
to open the file.
Note that a zero length beg
corresponds to the first line
and that a zero length end
corresponds to the last line.
insert_file
insert_from_kill_array
Void insert_from_kill_array (Integer n);
This function inserts the contents of the nth element, specified by
n
, of an internal array of character strings.
Note: This function is not available on 16 bit systems.
insert_from_kill_array, copy_region_to_kill_array
KILL_ARRAY_SIZE
trim
Void trim ();
The trim
function removes all whitespace around the current editing
point. In this context, whitespace is considered to be any
combination of tab and space characters. In particular, it does not
include the newline character. This means that the trim
function
will not delete across lines.
skip_chars, skip_white, del, del_region
whitespace
whitespace (Integer n);
The whitespace
function inserts white space of length n
into the
current buffer using a combination of spaces and tabs. The actual
combination of spaces and tabs used depends upon the buffer local
variable TAB
. In particular, if TAB
is zero, no tab characters
will be used for the expansion.
insert, trim, goto_column
TAB,TAB_DEFAULT