bobp
Integer bobp ();
The bolp
function is used to determine if the current position is at
the beginning of the buffer or not. If so, it returns a non-zero
value. However, if it is not, it returns zero. This simple example,
define is_buffer_empty ()
{
return bobp () and eobp ();
}
returns non-zero if the buffer is empty; otherwise, it returns zero.
bob, eobp, bolp, eolp
bolp
Integer bolp ();
bolp
is used to test if the current position is at the beginning of
a line or not. It returns non-zero if the position is at the
beginning of a line or zero if not.
bol, eolp, bobp, eobp
count_chars
String count_chars ();
This function returns information about the size of the current buffer and current position in the buffer. The string returned is of the form:
'h'=104/0x68/0150, point 90876 of 127057
what_char
eobp
Integer eobp ();
The functio eobp
is used to determine if the current position is at
the end of the buffer or not. It returns a non-zero value if at the
end of the buffer or zero if not.
eob, bolp, eolp
eolp
Integer eolp ();
This function may be used to determine whether or not the current position is at the end of a line ot not. If it is, the routine returns a non-zero value; otherwise it returns zero.
eol, bolp, eobp, bobp
Get the currently defined word range
String_Type get_word_chars ()
The get_word_chars
returns the currently defined set of
characters that constitute a word. The set may be returned as a
character range.
define_word
what_char
Integer what_char ();
The what_char
function returns the value of the character at the
current position as an integer in the range 0 to 256. This simple
example,
while (not (eolp ()))
{
if (what_char () == '_')
{
del (); insert ("\\_");
}
}
has the effect of replacing all underscore characters on the current
line with a backslash-underscore combination.
looking_at
what_column
Integer what_column ();
The what_column
function returns the current column number expanding
tabs, control characters, etc... The beginning of the line is at
column number one.
whatline, whatpos, goto_column, bolp, eolp
Get the current line number
Int_Type what_line
The value of the what_line
specifies the current line number.
Lines are numbered from one.
This is a read-only variable.
The actual number is measured from the top of the buffer which is itself is affected by whether the buffer is narrowed or not. For example,
define one ()
{
push_mark (); narrow ();
return what_line;
}
always returns 1.
what_column, goto_line