aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/functions.texi17
-rw-r--r--doc/lispref/positions.texi12
-rw-r--r--doc/lispref/windows.texi88
3 files changed, 110 insertions, 7 deletions
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 8835667b82d..7cc041fa77e 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -861,15 +861,18 @@ into a list. @code{mapc} always returns @var{sequence}.
861 861
862@defun mapconcat function sequence separator 862@defun mapconcat function sequence separator
863@code{mapconcat} applies @var{function} to each element of 863@code{mapconcat} applies @var{function} to each element of
864@var{sequence}: the results, which must be strings, are concatenated. 864@var{sequence}; the results, which must be sequences of characters
865Between each pair of result strings, @code{mapconcat} inserts the string 865(strings, vectors, or lists), are concatenated into a single string
866@var{separator}. Usually @var{separator} contains a space or comma or 866return value. Between each pair of result sequences, @code{mapconcat}
867other suitable punctuation. 867inserts the characters from @var{separator}, which also must be a
868string, or a vector or list of characters. @xref{Sequences Arrays
869Vectors}.
868 870
869The argument @var{function} must be a function that can take one 871The argument @var{function} must be a function that can take one
870argument and return a string. The argument @var{sequence} can be any 872argument and returns a sequence of characters: a string, a vector, or
871kind of sequence except a char-table; that is, a list, a vector, a 873a list. The argument @var{sequence} can be any kind of sequence
872bool-vector, or a string. 874except a char-table; that is, a list, a vector, a bool-vector, or a
875string.
873 876
874@example 877@example
875@group 878@group
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 72b76ce5c8f..9daf5cef059 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -572,6 +572,18 @@ The value returned is the window line number point has moved to, with
572the top line in the window numbered 0. 572the top line in the window numbered 0.
573@end deffn 573@end deffn
574 574
575@vindex move-to-window-group-line-function
576@defun move-to-window-group-line count
577This function is like @code{move-to-window-line}, except that when the
578selected window is a part of a group of windows (@pxref{Window
579Group}), @code{move-to-window-group-line} will move to a position with
580respect to the entire group, not just the single window. This
581condition holds when the buffer local variable
582@code{move-to-window-group-line-function} is set to a function. In
583this case, @code{move-to-window-group-line} calls the function with
584the argument @var{count}, then returns its result.
585@end defun
586
575@defun compute-motion from frompos to topos width offsets window 587@defun compute-motion from frompos to topos width offsets window
576This function scans the current buffer, calculating screen positions. 588This function scans the current buffer, calculating screen positions.
577It scans the buffer forward from position @var{from}, assuming that is 589It scans the buffer forward from position @var{from}, assuming that is
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 5c7947eeca6..e45201b0570 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -133,6 +133,30 @@ This function returns the selected window (which is always a live
133window). 133window).
134@end defun 134@end defun
135 135
136@anchor{Window Group}Sometimes several windows collectively and
137cooperatively display a buffer, for example, under the management of
138Follow Mode (@pxref{Follow Mode,,, emacs}), where the windows together
139display a bigger portion of the buffer than one window could alone.
140It is often useful to consider such a @dfn{window group} as a single
141entity. Several functions such as @code{window-group-start}
142(@pxref{Window Start and End}) allow you to do this by supplying, as
143an argument, one of the windows as a stand in for the whole group.
144
145@defun selected-window-group
146@vindex selected-window-group-function
147When the selected window is a member of a group of windows, this
148function returns a list of the windows in the group, ordered such that
149the first window in the list is displaying the earliest part of the
150buffer, and so on. Otherwise the function returns a list containing
151just the selected window.
152
153The selected window is considered part of a group when the buffer
154local variable @code{selected-window-group-function} is set to a
155function. In this case, @code{selected-window-group} calls it with no
156arguments and returns its result (which should be the list of windows
157in the group).
158@end defun
159
136@node Windows and Frames 160@node Windows and Frames
137@section Windows and Frames 161@section Windows and Frames
138 162
@@ -3098,6 +3122,17 @@ window-start position; if you move point, do not expect the window-start
3098position to change in response until after the next redisplay. 3122position to change in response until after the next redisplay.
3099@end defun 3123@end defun
3100 3124
3125@defun window-group-start &optional window
3126@vindex window-group-start-function
3127This function is like @code{window-start}, except that when
3128@var{window} is a part of a group of windows (@pxref{Window Group}),
3129@code{window-group-start} returns the start position of the entire
3130group. This condition holds when the buffer local variable
3131@code{window-group-start-function} is set to a function. In this
3132case, @code{window-group-start} calls the function with the single
3133argument @var{window}, then returns its result.
3134@end defun
3135
3101@cindex window end position 3136@cindex window end position
3102@defun window-end &optional window update 3137@defun window-end &optional window update
3103This function returns the position where display of its buffer ends in 3138This function returns the position where display of its buffer ends in
@@ -3124,6 +3159,18 @@ way real redisplay would do. It does not alter the
3124text will end if scrolling is not required. 3159text will end if scrolling is not required.
3125@end defun 3160@end defun
3126 3161
3162@vindex window-group-end-function
3163@defun window-group-end window update
3164This function is like @code{window-end}, except that when @var{window}
3165is a part of a group of windows (@pxref{Window Group}),
3166@code{window-group-end} returns the end position of the entire group.
3167This condition holds when the buffer local variable
3168@code{window-group-end-function} is set to a function. In this case,
3169@code{window-group-end} calls the function with the two arguments
3170@var{window} and @var{update}, then returns its result. The argument
3171@var{update} has the same meaning as in @code{window-end}.
3172@end defun
3173
3127@defun set-window-start window position &optional noforce 3174@defun set-window-start window position &optional noforce
3128This function sets the display-start position of @var{window} to 3175This function sets the display-start position of @var{window} to
3129@var{position} in @var{window}'s buffer. It returns @var{position}. 3176@var{position} in @var{window}'s buffer. It returns @var{position}.
@@ -3187,6 +3234,19 @@ off screen at the next redisplay, then redisplay computes a new window-start
3187position that works well with point, and thus @var{position} is not used. 3234position that works well with point, and thus @var{position} is not used.
3188@end defun 3235@end defun
3189 3236
3237@vindex set-window-group-start-function
3238@defun set-window-group-start window position &optional noforce
3239This function is like @code{set-window-start}, except that when
3240@var{window} is a part of a group of windows (@pxref{Window Group}),
3241@code{set-window-group-start} sets the start position of the entire
3242group. This condition holds when the buffer local variable
3243@code{set-window-group-start-function} is set to a function. In this
3244case, @code{set-window-group-start} calls the function with the three
3245arguments @var{window}, @var{position}, and @var{noforce}, then
3246returns its result. The arguments @var{position} and @var{noforce} in
3247this function have the same meaning as in @code{set-window-start}.
3248@end defun
3249
3190@defun pos-visible-in-window-p &optional position window partially 3250@defun pos-visible-in-window-p &optional position window partially
3191This function returns non-@code{nil} if @var{position} is within the 3251This function returns non-@code{nil} if @var{position} is within the
3192range of text currently visible on the screen in @var{window}. It 3252range of text currently visible on the screen in @var{window}. It
@@ -3228,6 +3288,21 @@ Here is an example:
3228@end example 3288@end example
3229@end defun 3289@end defun
3230 3290
3291@vindex pos-visible-in-window-group-p-function
3292@defun pos-visible-in-window-group-p &optional position window partially
3293This function is like @code{pos-visible-in-window-p}, except that when
3294@var{window} is a part of a group of windows (@pxref{Window Group}),
3295@code{pos-visible-in-window-group-p} tests the visibility of @var{pos}
3296in the entire group, not just in the single @var{window}. This
3297condition holds when the buffer local variable
3298@code{pos-visible-in-window-group-p-function} is set to a function.
3299In this case @code{pos-visible-in-window-group-p} calls the function
3300with the three arguments @var{position}, @var{window}, and
3301@var{partially}, then returns its result. The arguments
3302@var{position} and @var{partially} have the same meaning as in
3303@code{pos-visible-in-window-p}.
3304@end defun
3305
3231@defun window-line-height &optional line window 3306@defun window-line-height &optional line window
3232This function returns the height of text line @var{line} in 3307This function returns the height of text line @var{line} in
3233@var{window}. If @var{line} is one of @code{header-line} or 3308@var{window}. If @var{line} is one of @code{header-line} or
@@ -3471,6 +3546,19 @@ the top of the window. The command @code{recenter-top-bottom} offers
3471a more convenient way to achieve this. 3546a more convenient way to achieve this.
3472@end deffn 3547@end deffn
3473 3548
3549@vindex recenter-window-group-function
3550@defun recenter-window-group &optional count
3551This function is like @code{recenter}, except that when the selected
3552window is part of a group of windows (@pxref{Window Group}),
3553@code{recenter-window-group} scrolls the entire group. This condition
3554holds when the buffer local variable
3555@code{recenter-window-group-function} is set to a function. In this
3556case, @code{recenter-window-group} calls the function with the
3557argument @var{count}, then returns its result. The argument
3558@var{count} has the same meaning as in @code{recenter}, but with
3559respect to the entire window group.
3560@end defun
3561
3474@defopt recenter-redisplay 3562@defopt recenter-redisplay
3475If this variable is non-@code{nil}, calling @code{recenter} with a 3563If this variable is non-@code{nil}, calling @code{recenter} with a
3476@code{nil} argument redraws the frame. The default value is 3564@code{nil} argument redraws the frame. The default value is