[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

28.9 Windows and Point

Each window has its own value of point, independent of the value of point in other windows displaying the same buffer. This makes it useful to have multiple windows showing one buffer.

Voir la section Positions, for more details on buffer positions.

As far as the user is concerned, point is where the cursor is, and when the user switches to another buffer, the cursor jumps to the position of point in that buffer.

Function: window-point &optional window

This function returns the current position of point in window. For a nonselected window, this is the value point would have (in that window's buffer) if that window were selected. If window is nil, the selected window is used.

When window is the selected window and its buffer is also the current buffer, the value returned is the same as point in that buffer.

Strictly speaking, it would be more correct to return the “top-level” value of point, outside of any save-excursion forms. But that value is hard to find.

Function: set-window-point window position

This function positions point in window at position position in window's buffer. It returns position.

If window is selected, and its buffer is current, this simply does goto-char.


[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.