aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorEli Zaretskii2019-04-06 11:22:13 +0300
committerEli Zaretskii2019-04-06 11:22:13 +0300
commita30a6c3019ac09ede1cc47671083b2e9ecdbffdf (patch)
tree7ea60b51caf504fc472e4b83b3766935d5ed1535 /src/window.c
parent92ce2dd48bd3f31b848f0258ad79af01a7197b44 (diff)
downloademacs-a30a6c3019ac09ede1cc47671083b2e9ecdbffdf.tar.gz
emacs-a30a6c3019ac09ede1cc47671083b2e9ecdbffdf.zip
Improve documentation of set-window-start
* doc/lispref/windows.texi (Window Start and End): * src/window.c (Fset_window_start): Document that reliable setting of a window start position requires to adjust point to be visible. (Bug#34038)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index 04183abb7c5..dfac3b5b879 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1704,7 +1704,12 @@ DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0,
1704 doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. 1704 doc: /* Make display in WINDOW start at position POS in WINDOW's buffer.
1705WINDOW must be a live window and defaults to the selected one. Return 1705WINDOW must be a live window and defaults to the selected one. Return
1706POS. Optional third arg NOFORCE non-nil inhibits next redisplay from 1706POS. Optional third arg NOFORCE non-nil inhibits next redisplay from
1707overriding motion of point in order to display at this exact start. */) 1707overriding motion of point in order to display at this exact start.
1708
1709For reliable setting of WINDOW start position, make sure point is
1710at a position that will be visible when that start is in effect,
1711otherwise there's a chance POS will be disregarded, e.g., if point
1712winds up in a partially-visible line. */)
1708 (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce) 1713 (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce)
1709{ 1714{
1710 register struct window *w = decode_live_window (window); 1715 register struct window *w = decode_live_window (window);