[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 369da28: Improve documentation of 'window-scroll-
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 369da28: Improve documentation of 'window-scroll-functions' |
Date: |
Sat, 4 Nov 2017 12:09:58 -0400 (EDT) |
branch: emacs-26
commit 369da28702a60543391bf9576eb904d21ca8ea09
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Improve documentation of 'window-scroll-functions'
* doc/lispref/windows.texi (Window Hooks): Clarify the values of
arguments of 'window-scroll-functions' functions.
* src/xdisp.c (syms_of_xdisp) <window-scroll-functions>: Doc fix.
---
doc/lispref/windows.texi | 5 ++++-
src/xdisp.c | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index fc642fe..e1eac45 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -5127,7 +5127,10 @@ redisplaying a window with scrolling. Displaying a
different buffer in
the window also runs these functions.
This variable is not a normal hook, because each function is called with
-two arguments: the window, and its new display-start position.
+two arguments: the window, and its new display-start position. At the
+time of the call, the display-start position of the window argument is
+already set to its new value, and the buffer to be displayed in the
+window is already set as the current buffer.
These functions must take care when using @code{window-end}
(@pxref{Window Start and End}); if you need an up-to-date value, you
diff --git a/src/xdisp.c b/src/xdisp.c
index b8bb6ba..baf075b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -32569,6 +32569,9 @@ display-start position.
These functions are called whenever the `window-start' marker is modified,
either to point into another buffer (e.g. via `set-window-buffer') or another
place in the same buffer.
+When each function is called, the `window-start' marker of its window
+argument has been already set to the new value, and the buffer which that
+window will display is set to be the current buffer.
Note that the value of `window-end' is not valid when these functions are
called.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 369da28: Improve documentation of 'window-scroll-functions',
Eli Zaretskii <=