Next: , Previous: , Up: Controlling the Display   [Contents][Index]


10.4 Cursor Positions

A cursor position is an absolute position within a window’s coordinate system. The origin is in the upper-left-hand corner and the unit is character positions.

Function: mark-to-cursorpos mark window

Returns as multiple values the X and Y position on which mark is being displayed in window, or nil if it is not within the bounds displayed.

Function: cursorpos-to-mark X Y window

Returns as a mark the text position which corresponds to the given (X, Y) position within window, or nil if that position does not correspond to any text within window.

Function: last-key-event-cursorpos

Interprets mouse input. It returns as multiple values the (X, Y) position and the window where the pointing device was the last time some key event happened. If the information is unavailable, this returns nil.

Function: mark-column mark

This function returns the X position at which mark would be displayed, supposing its line was displayed on an infinitely wide screen. This takes into consideration strange characters such as tabs.

Function: move-to-column mark column &optional line

This function is analogous to move-to-position, except that it moves mark to the position on line which corresponds to the specified column. Line defaults to the line that mark is currently on. If the line would not reach to the specified column, then nil is returned and mark is not modified. Note that since a character may be displayed on more than one column on the screen, several different values of column may cause mark to be moved to the same position.

Function: show-mark mark window time

This function highlights the position of mark within window for time seconds, possibly by moving the cursor there. The wait may be aborted if there is pending input. If mark is positioned outside the text displayed by window, then this returns nil, otherwise t.


Next: Redisplay, Previous: Window Functions, Up: Controlling the Display   [Contents][Index]