Next: , Previous: , Up: Altering and Searching Text   [Contents][Index]


4.2 Text Predicates

Function: start-line-p mark

Returns t if the mark points before the first character in a line, nil otherwise.

Function: end-line-p mark

Returns t if the mark points after the last character in a line and before the newline, nil otherwise.

Function: empty-line-p mark

Return t of the line which mark points to contains no characters.

Function: blank-line-p line

Returns t if line contains only characters with a Whitespace attribute of 1. See chapter character-attributes for discussion of character attributes.

Function: blank-before-p mark
Function: blank-after-p mark

These functions test if all the characters preceding or following mark on the line it is on have a Whitespace attribute of 1.

Function: same-line-p mark1 mark2

Returns t if mark1 and mark2 point to the same line, or nil otherwise; That is,

(same-line-p a b) <==> (eq (mark-line a) (mark-line b))
Function: mark< mark1 mark2
Function: mark<= mark1 mark2
Function: mark= mark1 mark2
Function: mark/= mark1 mark2
Function: mark>= mark1 mark2
Function: mark> mark1 mark2

These predicates test the relative ordering of two marks in a piece of text, that is a mark is mark> another if it points to a position after it. If the marks point into different, non-connected pieces of text, such as different buffers, then it is an error to test their ordering; for such marks mark= is always false and mark/= is always true.

Function: line< line1 line2
Function: line<= line1 line2
Function: line>= line1 line2
Function: line> line1 line2

These predicates test the ordering of line1 and line2. If the lines are in unconnected pieces of text it is an error to test their ordering.

Function: lines-related line1 line2

This function returns t if line1 and line2 are in the same piece of text, or nil otherwise.

Function: first-line-p mark
Function: last-line-p mark

first-line-p returns t if there is no line before the line mark is on, and nil otherwise. Last-line-p similarly tests tests whether there is no line after mark.


Next: Kill Ring, Previous: Altering Text, Up: Altering and Searching Text   [Contents][Index]