aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-04-21 12:31:05 -0700
committerGlenn Morris2012-04-21 12:31:05 -0700
commit09ebefe1e00416b16c27c9c85d1a30498ed3c047 (patch)
tree0c2cef943e3fdb7abf94e08700c55fb38b2d00e3
parent581b67880c0d1d9193707b64b9c6b1aee2743338 (diff)
downloademacs-09ebefe1e00416b16c27c9c85d1a30498ed3c047.tar.gz
emacs-09ebefe1e00416b16c27c9c85d1a30498ed3c047.zip
More small edits for doc/lispref/windows.texi
* doc/lispref/windows.texi (Textual Scrolling, Coordinates and Windows) (Window Configurations, Window Parameters, Window Hooks): Copyedits. (Textual Scrolling): Mention recenter-redisplay, recenter-top-bottom, and recenter-positions. Remove recenter example. * admin/FOR-RELEASE: Related markup.
-rw-r--r--admin/FOR-RELEASE2
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/windows.texi144
3 files changed, 83 insertions, 69 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 6bcd8703674..f53b74e98c4 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -229,7 +229,7 @@ syntax.texi cyd
229text.texi cyd 229text.texi cyd
230tips.texi rgm 230tips.texi rgm
231variables.texi cyd 231variables.texi cyd
232windows.texi 232windows.texi rgm (skimmed)
233 233
234 234
235Local variables: 235Local variables:
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index fe63359fad2..7b30b0e7ac3 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -4,12 +4,16 @@
4 (Resizing Windows, Deleting Windows, Selecting Windows) 4 (Resizing Windows, Deleting Windows, Selecting Windows)
5 (Choosing Window Options, Horizontal Scrolling) 5 (Choosing Window Options, Horizontal Scrolling)
6 (Cyclic Window Ordering, Window History, Dedicated Windows) 6 (Cyclic Window Ordering, Window History, Dedicated Windows)
7 (Quitting Windows, Window Configurations): Copyedits. 7 (Quitting Windows, Window Configurations, Textual Scrolling):
8 (Coordinates and Windows, Window Configurations)
9 (Window Parameters, Window Hooks): Copyedits.
8 (Splitting Windows, Deleting Windows): 10 (Splitting Windows, Deleting Windows):
9 Fix ignore-window-parameters logic. 11 Fix ignore-window-parameters logic.
10 (Selecting Windows, Choosing Window Options): Markup fixes. 12 (Selecting Windows, Choosing Window Options): Markup fixes.
11 (Window Start and End): Remove pointless example. 13 (Window Start and End): Remove pointless example.
12 Remove cross-reference to deleted count-lines content. 14 Remove cross-reference to deleted count-lines content.
15 (Textual Scrolling): Mention recenter-redisplay, recenter-top-bottom,
16 and recenter-positions. Remove recenter example.
13 17
14 * elisp.texi, vol1.texi, vol2.texi: Bump VERSION and DATE. 18 * elisp.texi, vol1.texi, vol2.texi: Bump VERSION and DATE.
15 19
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 2e4657328eb..c8a9316bcfa 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2507,12 +2507,16 @@ commands move the paper up and down. Thus, if you are looking at the
2507middle of a buffer and repeatedly call @code{scroll-down}, you will 2507middle of a buffer and repeatedly call @code{scroll-down}, you will
2508eventually see the beginning of the buffer. 2508eventually see the beginning of the buffer.
2509 2509
2510 Some people have urged that the opposite convention be used: they 2510 Unfortunately, this sometimes causes confusion, because some people
2511tend to think in terms of the opposite convention: they
2511imagine the window moving over text that remains in place, so that 2512imagine the window moving over text that remains in place, so that
2512``down'' commands take you to the end of the buffer. This convention 2513``down'' commands take you to the end of the buffer. This convention
2513is consistent with fact that such a command is bound to a key named 2514is consistent with fact that such a command is bound to a key named
2514@key{PageDown} on modern keyboards. We have not switched to this 2515@key{PageDown} on modern keyboards.
2515convention as that is likely to break existing Emacs Lisp code. 2516@ignore
2517We have not switched to this convention as that is likely to break
2518existing Emacs Lisp code.
2519@end ignore
2516 2520
2517 Textual scrolling functions (aside from @code{scroll-other-window}) 2521 Textual scrolling functions (aside from @code{scroll-other-window})
2518have unpredictable results if the current buffer is not the one 2522have unpredictable results if the current buffer is not the one
@@ -2542,13 +2546,8 @@ signals an error. Otherwise, it returns @code{nil}.
2542This function scrolls backward by @var{count} lines in the selected 2546This function scrolls backward by @var{count} lines in the selected
2543window. 2547window.
2544 2548
2545If @var{count} is negative, it scrolls forward instead. If 2549If @var{count} is negative, it scrolls forward instead. In other
2546@var{count} is omitted or @code{nil}, the distance scrolled is 2550respects, it behaves the same way as @code{scroll-up} does.
2547@code{next-screen-context-lines} lines less than the height of the
2548window's text area.
2549
2550If the selected window cannot be scrolled any further, this function
2551signals an error. Otherwise, it returns @code{nil}.
2552@end deffn 2551@end deffn
2553 2552
2554@deffn Command scroll-up-command &optional count 2553@deffn Command scroll-up-command &optional count
@@ -2578,8 +2577,8 @@ already displayed, @code{scroll-other-window} displays it in some
2578window. 2577window.
2579 2578
2580When the selected window is the minibuffer, the next window is normally 2579When the selected window is the minibuffer, the next window is normally
2581the one at the top left corner. You can specify a different window to 2580the leftmost one immediately above it. You can specify a different
2582scroll, when the minibuffer is selected, by setting the variable 2581window to scroll, when the minibuffer is selected, by setting the variable
2583@code{minibuffer-scroll-window}. This variable has no effect when any 2582@code{minibuffer-scroll-window}. This variable has no effect when any
2584other window is selected. When it is non-@code{nil} and the 2583other window is selected. When it is non-@code{nil} and the
2585minibuffer is selected, it takes precedence over 2584minibuffer is selected, it takes precedence over
@@ -2591,7 +2590,7 @@ window is the one at the bottom right corner. In this case,
2591@code{scroll-other-window} attempts to scroll the minibuffer. If the 2590@code{scroll-other-window} attempts to scroll the minibuffer. If the
2592minibuffer contains just one line, it has nowhere to scroll to, so the 2591minibuffer contains just one line, it has nowhere to scroll to, so the
2593line reappears after the echo area momentarily displays the message 2592line reappears after the echo area momentarily displays the message
2594@samp{Beginning of buffer}. 2593@samp{End of buffer}.
2595@end deffn 2594@end deffn
2596 2595
2597@defvar other-window-scroll-buffer 2596@defvar other-window-scroll-buffer
@@ -2690,12 +2689,12 @@ If @var{count} is a non-negative number, that puts the line containing
2690point @var{count} lines down from the top of the window. If 2689point @var{count} lines down from the top of the window. If
2691@var{count} is a negative number, then it counts upward from the 2690@var{count} is a negative number, then it counts upward from the
2692bottom of the window, so that @minus{}1 stands for the last usable 2691bottom of the window, so that @minus{}1 stands for the last usable
2693line in the window. If @var{count} is a non-@code{nil} list, then it 2692line in the window.
2694stands for the line in the middle of the window.
2695 2693
2696If @var{count} is @code{nil}, @code{recenter} puts the line containing 2694If @var{count} is @code{nil} (or a non-@code{nil} list),
2697point in the middle of the window, then clears and redisplays the entire 2695@code{recenter} puts the line containing point in the middle of the
2698selected frame. 2696window. If @var{count} is @code{nil}, this function may redraw the
2697frame, according to the value of @code{recenter-redisplay}.
2699 2698
2700When @code{recenter} is called interactively, @var{count} is the raw 2699When @code{recenter} is called interactively, @var{count} is the raw
2701prefix argument. Thus, typing @kbd{C-u} as the prefix sets the 2700prefix argument. Thus, typing @kbd{C-u} as the prefix sets the
@@ -2704,22 +2703,32 @@ prefix argument. Thus, typing @kbd{C-u} as the prefix sets the
2704top. 2703top.
2705 2704
2706With an argument of zero, @code{recenter} positions the current line at 2705With an argument of zero, @code{recenter} positions the current line at
2707the top of the window. This action is so handy that some people make a 2706the top of the window. The command @code{recenter-top-bottom} offers
2708separate key binding to do this. For example, 2707a more convenient way to achieve this.
2708@end deffn
2709 2709
2710@example 2710@defopt recenter-redisplay
2711@group 2711If this variable is non-@code{nil}, calling @code{recenter} with a
2712(defun line-to-top-of-window () 2712@code{nil} argument redraws the frame. The default value is
2713 "Scroll current line to top of window. 2713@code{tty}, which means only redraw the frame if it is a tty frame.
2714Replaces three keystroke sequence C-u 0 C-l." 2714@end defopt
2715 (interactive)
2716 (recenter 0))
2717 2715
2718(global-set-key [kp-multiply] 'line-to-top-of-window) 2716@deffn Command recenter-top-bottom &optional count
2719@end group 2717This command, which is the default binding for @kbd{C-l}, acts like
2720@end example 2718@code{recenter}, except if called with no argument. In that case,
2719successive calls place point according to the cycling order defined
2720by the variable @code{recenter-positions}.
2721@end deffn 2721@end deffn
2722 2722
2723@defopt recenter-positions
2724This variable controls how @code{recenter-top-bottom} behaves when
2725called with no argument. The default value is @code{(middle top
2726bottom)}, which means that successive calls of
2727@code{recenter-top-bottom} with no argument cycle between placing
2728point at the middle, top, and bottom of the window.
2729@end defopt
2730
2731
2723@node Vertical Scrolling 2732@node Vertical Scrolling
2724@section Vertical Fractional Scrolling 2733@section Vertical Fractional Scrolling
2725@cindex vertical fractional scrolling 2734@cindex vertical fractional scrolling
@@ -3005,7 +3014,7 @@ frame.
3005 3014
3006@defun coordinates-in-window-p coordinates window 3015@defun coordinates-in-window-p coordinates window
3007This function checks whether a window @var{window} occupies the 3016This function checks whether a window @var{window} occupies the
3008frame-relative coordinates @var{coordinates}, and if so which part of 3017frame-relative coordinates @var{coordinates}, and if so, which part of
3009the window that is. @var{window} should be a live window. 3018the window that is. @var{window} should be a live window.
3010@var{coordinates} should be a cons cell of the form @code{(@var{x} 3019@var{coordinates} should be a cons cell of the form @code{(@var{x}
3011. @var{y})}, where @var{x} and @var{y} are frame-relative coordinates. 3020. @var{y})}, where @var{x} and @var{y} are frame-relative coordinates.
@@ -3103,14 +3112,14 @@ for the current buffer.
3103 You can bring back an entire frame layout by restoring a previously 3112 You can bring back an entire frame layout by restoring a previously
3104saved window configuration. If you want to record the layout of all 3113saved window configuration. If you want to record the layout of all
3105frames instead of just one, use a frame configuration instead of a 3114frames instead of just one, use a frame configuration instead of a
3106window configuration; see @ref{Frame Configurations}. 3115window configuration. @xref{Frame Configurations}.
3107 3116
3108@defun current-window-configuration &optional frame 3117@defun current-window-configuration &optional frame
3109This function returns a new object representing @var{frame}'s current 3118This function returns a new object representing @var{frame}'s current
3110window configuration. The default for @var{frame} is the selected 3119window configuration. The default for @var{frame} is the selected
3111frame. The variable @code{window-persistent-parameters} specifies 3120frame. The variable @code{window-persistent-parameters} specifies
3112whether and which window parameters are saved by this function, see 3121which window parameters (if any) are saved by this function.
3113@ref{Window Parameters} for details. 3122@xref{Window Parameters}.
3114@end defun 3123@end defun
3115 3124
3116@defun set-window-configuration configuration 3125@defun set-window-configuration configuration
@@ -3127,7 +3136,7 @@ change and triggers execution of the @code{window-size-change-functions}
3127know how to tell whether the new configuration actually differs from the 3136know how to tell whether the new configuration actually differs from the
3128old one. 3137old one.
3129 3138
3130If the frame which @var{configuration} was saved from is dead, all this 3139If the frame from which @var{configuration} was saved is dead, all this
3131function does is restore the three variables @code{window-min-height}, 3140function does is restore the three variables @code{window-min-height},
3132@code{window-min-width} and @code{minibuffer-scroll-window}. In this 3141@code{window-min-width} and @code{minibuffer-scroll-window}. In this
3133case, the function returns @code{nil}. Otherwise, it returns @code{t}. 3142case, the function returns @code{nil}. Otherwise, it returns @code{t}.
@@ -3212,8 +3221,8 @@ configurations.
3212 3221
3213 The objects returned by @code{current-window-configuration} die 3222 The objects returned by @code{current-window-configuration} die
3214together with the Emacs process. In order to store a window 3223together with the Emacs process. In order to store a window
3215configuration on disk and read it back in another Emacs session, the 3224configuration on disk and read it back in another Emacs session, you
3216functions described next can be used. These functions are also useful 3225can use the functions described next. These functions are also useful
3217to clone the state of a frame into an arbitrary live window 3226to clone the state of a frame into an arbitrary live window
3218(@code{set-window-configuration} effectively clones the windows of a 3227(@code{set-window-configuration} effectively clones the windows of a
3219frame into the root window of that very frame only). 3228frame into the root window of that very frame only).
@@ -3230,13 +3239,13 @@ state will be written to disk and read back in another session.
3230 3239
3231Together, the argument @var{writable} and the variable 3240Together, the argument @var{writable} and the variable
3232@code{window-persistent-parameters} specify which window parameters are 3241@code{window-persistent-parameters} specify which window parameters are
3233saved by this function, see @ref{Window Parameters} for details. 3242saved by this function. @xref{Window Parameters}.
3234@end defun 3243@end defun
3235 3244
3236The value returned by @code{window-state-get} can be used in the same 3245The value returned by @code{window-state-get} can be used in the same
3237session to make a clone of a window in another window. It can be also 3246session to make a clone of a window in another window. It can be also
3238written to disk and read back in another session. In either case, use 3247written to disk and read back in another session. In either case, use
3239the function described next to restore the state of the window. 3248the following function to restore the state of the window.
3240 3249
3241@defun window-state-put state &optional window ignore 3250@defun window-state-put state &optional window ignore
3242This function puts the window state @var{state} into @var{window}. The 3251This function puts the window state @var{state} into @var{window}. The
@@ -3245,9 +3254,9 @@ earlier invocation of @code{window-state-get}, see above. The optional
3245argument @var{window} must specify a live window and defaults to the 3254argument @var{window} must specify a live window and defaults to the
3246selected one. 3255selected one.
3247 3256
3248The optional argument @var{ignore} non-@code{nil} means to ignore 3257If the optional argument @var{ignore} is non-@code{nil}, it means to ignore
3249minimum window sizes and fixed size restrictions. If @var{ignore} 3258minimum window sizes and fixed-size restrictions. If @var{ignore}
3250equals @code{safe}, this means windows can get as small as one line 3259is @code{safe}, this means windows can get as small as one line
3251and/or two columns. 3260and/or two columns.
3252@end defun 3261@end defun
3253 3262
@@ -3267,8 +3276,8 @@ setting for @var{parameter}, this function returns @code{nil}.
3267 3276
3268@defun window-parameters &optional window 3277@defun window-parameters &optional window
3269This function returns all parameters of @var{window} and their values. 3278This function returns all parameters of @var{window} and their values.
3270The default for @var{window} is the selected window. The return value, 3279The default for @var{window} is the selected window. The return value
3271if non-@code{nil} is an association list whose elements have the form 3280is either @code{nil}, or an association list whose elements have the form
3272@code{(@var{parameter} . @var{value})}. 3281@code{(@var{parameter} . @var{value})}.
3273@end defun 3282@end defun
3274 3283
@@ -3278,34 +3287,34 @@ This function sets @var{window}'s value of @var{parameter} to
3278is the selected window. 3287is the selected window.
3279@end defun 3288@end defun
3280 3289
3281By default, functions saving and restoring window configurations or the 3290By default, the functions that save and restore window configurations or the
3282states of windows (@pxref{Window Configurations}) do not care about 3291states of windows (@pxref{Window Configurations}) do not care about
3283window parameters. This means, that when you change the value of a 3292window parameters. This means that when you change the value of a
3284parameter within the body of a @code{save-window-excursion}, the 3293parameter within the body of a @code{save-window-excursion}, the
3285previous value is not restored upon exit of that macro. It also means 3294previous value is not restored when that macro exits. It also means
3286that when you restore via @code{window-state-put} a window state saved 3295that when you restore via @code{window-state-put} a window state saved
3287earlier by @code{window-state-get}, all cloned windows have their 3296earlier by @code{window-state-get}, all cloned windows have their
3288parameters reset to @code{nil}. The following variable allows to 3297parameters reset to @code{nil}. The following variable allows you to
3289override the standard behavior. 3298override the standard behavior:
3290 3299
3291@defvar window-persistent-parameters 3300@defvar window-persistent-parameters
3292This variable is an alist specifying which parameters get saved by 3301This variable is an alist specifying which parameters get saved by
3293@code{current-window-configuration} and @code{window-state-get} and 3302@code{current-window-configuration} and @code{window-state-get}, and
3294subsequently restored by @code{set-window-configuration} and 3303subsequently restored by @code{set-window-configuration} and
3295@code{window-state-put}, see @ref{Window Configurations}. 3304@code{window-state-put}. @xref{Window Configurations}.
3296 3305
3297The @sc{car} of each entry of this alist is the symbol specifying the 3306The @sc{car} of each entry of this alist is a symbol specifying the
3298parameter. The @sc{cdr} should be one of the following: 3307parameter. The @sc{cdr} should be one of the following:
3299 3308
3300@table @asis 3309@table @asis
3301@item @code{nil} 3310@item @code{nil}
3302This value means the parameter is neither saved by 3311This value means the parameter is saved neither by
3303@code{window-state-get} nor by @code{current-window-configuration}. 3312@code{window-state-get} nor by @code{current-window-configuration}.
3304 3313
3305@item @code{t} 3314@item @code{t}
3306This value specifies that the parameter is saved by 3315This value specifies that the parameter is saved by
3307@code{current-window-configuration} and, provided its @var{writable} 3316@code{current-window-configuration} and (provided its @var{writable}
3308argument is @code{nil}, by @code{window-state-get}. 3317argument is @code{nil}) by @code{window-state-get}.
3309 3318
3310@item @code{writable} 3319@item @code{writable}
3311This means that the parameter is saved unconditionally by both 3320This means that the parameter is saved unconditionally by both
@@ -3316,8 +3325,8 @@ may fail with an @code{invalid-read-syntax} error.
3316@end table 3325@end table
3317@end defvar 3326@end defvar
3318 3327
3319Some functions, notably @code{delete-window}, 3328Some functions (notably @code{delete-window},
3320@code{delete-other-windows} and @code{split-window} may behave specially 3329@code{delete-other-windows} and @code{split-window}), may behave specially
3321when their @var{window} argument has a parameter set. You can override 3330when their @var{window} argument has a parameter set. You can override
3322such special behavior by binding the following variable to a 3331such special behavior by binding the following variable to a
3323non-@code{nil} value: 3332non-@code{nil} value:
@@ -3325,7 +3334,7 @@ non-@code{nil} value:
3325@defvar ignore-window-parameters 3334@defvar ignore-window-parameters
3326If this variable is non-@code{nil}, some standard functions do not 3335If this variable is non-@code{nil}, some standard functions do not
3327process window parameters. The functions currently affected by this are 3336process window parameters. The functions currently affected by this are
3328@code{split-window}, @code{delete-window}, @code{delete-other-windows} 3337@code{split-window}, @code{delete-window}, @code{delete-other-windows},
3329and @code{other-window}. 3338and @code{other-window}.
3330 3339
3331An application can bind this variable to a non-@code{nil} value around 3340An application can bind this variable to a non-@code{nil} value around
@@ -3359,18 +3368,19 @@ This parameter marks the window as not selectable by @code{other-window}
3359(@pxref{Cyclic Window Ordering}). 3368(@pxref{Cyclic Window Ordering}).
3360 3369
3361@item @code{clone-of} 3370@item @code{clone-of}
3362This parameter specifies the window this one has been cloned from and is 3371This parameter specifies the window that this one has been cloned
3363installed by @code{window-state-get}, see @ref{Window Configurations}. 3372from. It is installed by @code{window-state-get} (@pxref{Window
3373Configurations}).
3364 3374
3365@item @code{quit-restore} 3375@item @code{quit-restore}
3366This parameter tells how to proceed with a window when the buffer it 3376This parameter specifies what to do with a window when the buffer it
3367shows is no more needed. It is installed by the buffer display 3377shows is not needed any more. It is installed by the buffer display
3368functions (@pxref{Choosing Window}) and consulted by the function 3378functions (@pxref{Choosing Window}), and consulted by the function
3369@code{quit-window} (@pxref{Quitting Windows}). 3379@code{quit-window} (@pxref{Quitting Windows}).
3370@end table 3380@end table
3371 3381
3372In addition, the parameters @code{window-atom} and @code{window-side} 3382There are additional parameters @code{window-atom} and @code{window-side};
3373are reserved and should not be used by applications. 3383these are reserved and should not be used by applications.
3374 3384
3375 3385
3376@node Window Hooks 3386@node Window Hooks
@@ -3392,7 +3402,7 @@ the window also runs these functions.
3392This variable is not a normal hook, because each function is called with 3402This variable is not a normal hook, because each function is called with
3393two arguments: the window, and its new display-start position. 3403two arguments: the window, and its new display-start position.
3394 3404
3395These functions must be careful in using @code{window-end} 3405These functions must take care when using @code{window-end}
3396(@pxref{Window Start and End}); if you need an up-to-date value, you 3406(@pxref{Window Start and End}); if you need an up-to-date value, you
3397must use the @var{update} argument to ensure you get it. 3407must use the @var{update} argument to ensure you get it.
3398 3408
@@ -3430,7 +3440,7 @@ of an existing frame. This includes splitting or deleting windows,
3430changing the sizes of windows, or displaying a different buffer in a 3440changing the sizes of windows, or displaying a different buffer in a
3431window. 3441window.
3432 3442
3433The buffer-local part of this hook is run once per each window on the 3443The buffer-local part of this hook is run once for each window on the
3434affected frame, with the relevant window selected and its buffer 3444affected frame, with the relevant window selected and its buffer
3435current. The global part is run once for the modified frame, with that 3445current. The global part is run once for the modified frame, with that
3436frame selected. 3446frame selected.