Go to the first, previous, next, last section, table of contents.


Position Components

As previously noted, each position object has two components; one number defining the column, the other defining the line that the position represents. These components can be accessed individually.

Function: pos-col pos
Returns the column which the position object pos points to.

(pos-col (pos 1 2))
    => 1

Function: pos-line pos
This function returns the line number which pos points to.

Function: set-pos-col pos new-col
Sets the number of the column which the position object pos points to, to new-col (an integer), then returns col.

(setq x (pos 1 2))
    => #<pos 1 2>
(set-pos-col x 3)
    => 3
x
    => #<pos 3 2>

Function: set-pos-line pos new-line
Similar to set-pos-col except the line number is modified.


Go to the first, previous, next, last section, table of contents.