mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
In Elisp manual warn about unpredictable changes of point (Bug#79927)
* doc/lispref/positions.texi (Point): Define "buffer point". * doc/lispref/windows.texi (Window Point): Say that buffer point can change in unpredictable ways when windows get selected (Bug#79927).
This commit is contained in:
parent
b64e39f1b9
commit
6841869126
2 changed files with 22 additions and 6 deletions
|
|
@ -57,14 +57,18 @@ buffer size plus 1. If narrowing is in effect (@pxref{Narrowing}), then
|
||||||
point is constrained to fall within the accessible portion of the buffer
|
point is constrained to fall within the accessible portion of the buffer
|
||||||
(possibly at one end of it).
|
(possibly at one end of it).
|
||||||
|
|
||||||
|
@cindex buffer point
|
||||||
Each buffer has its own value of point, which is independent of the
|
Each buffer has its own value of point, which is independent of the
|
||||||
value of point in other buffers. Each window also has a value of point,
|
value of point in other buffers. Each window also has a value of point,
|
||||||
which is independent of the value of point in other windows on the same
|
which is independent of the value of point in other windows showing the
|
||||||
buffer. This is why point can have different values in various windows
|
same buffer. This is why the cursor may appear at different positions
|
||||||
that display the same buffer. When a buffer appears in only one window,
|
in various windows that display the same buffer. Wherever necessary, we
|
||||||
the buffer's point and the window's point normally have the same value,
|
use the terms @dfn{buffer point} for the unique position of point of a
|
||||||
so the distinction is rarely important. @xref{Window Point}, for more
|
specific buffer and the term @dfn{window point} for the position of
|
||||||
details.
|
point in a specific window showing that buffer. When a buffer appears
|
||||||
|
in only one window, its buffer's point and that window's point normally
|
||||||
|
have the same value, so the distinction is rarely important.
|
||||||
|
@xref{Window Point}, for more details.
|
||||||
|
|
||||||
@defun point
|
@defun point
|
||||||
@cindex current buffer position
|
@cindex current buffer position
|
||||||
|
|
|
||||||
|
|
@ -5872,6 +5872,18 @@ the other windows are stored in those windows.
|
||||||
@item
|
@item
|
||||||
As long as the selected window displays the current buffer, the window's
|
As long as the selected window displays the current buffer, the window's
|
||||||
point and the buffer's point always move together; they remain equal.
|
point and the buffer's point always move together; they remain equal.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Many Emacs functions temporarily select a window in order to operate on
|
||||||
|
its contents. This will move the buffer point (@pxref{Point}) of that
|
||||||
|
window's buffer to the position of the window point of that window and
|
||||||
|
not restore the buffer point to its previous position when terminating
|
||||||
|
the temporary selection. This means that when one and the same buffer
|
||||||
|
is simultaneously displayed in more than one window, its buffer point
|
||||||
|
may change in unpredictable ways to the position of window point of any
|
||||||
|
of these windows as a side-effect of things like redisplay, calling
|
||||||
|
@code{with-selected-window} (@pxref{Selecting Windows}) or running
|
||||||
|
@code{window-configuration-change-hook} (@pxref{Window Hooks}).
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@cindex cursor
|
@cindex cursor
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue