aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorChong Yidong2011-10-01 17:54:33 -0400
committerChong Yidong2011-10-01 17:54:33 -0400
commit550f41cdba7ebc49996d8fd17eacff86a2456f35 (patch)
treebc1581afa5519355c866d4a550f0acfa572c45d7 /doc/lispref
parentce3cefcca3227944d27d75e7de0f1e4f4b6d11a6 (diff)
downloademacs-550f41cdba7ebc49996d8fd17eacff86a2456f35.tar.gz
emacs-550f41cdba7ebc49996d8fd17eacff86a2456f35.zip
Document some Emacs 24 scrolling changes.
* doc/emacs/basic.texi (Moving Point): * doc/emacs/custom.texi (Mouse Buttons): * doc/emacs/rmail.texi (Rmail Scrolling): * doc/emacs/search.texi (Isearch Scroll): * doc/emacs/display.texi (Scrolling): Replace scroll-up/down with scroll-up/down-command. Fix scroll-preserve-screen-position description. Document scroll-error-top-bottom. * doc/lispref/windows.texi (Textual Scrolling): Document scroll-up-command, scroll-down-command, scroll-error-top-bottom, and the scroll-command symbol property.
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/windows.texi136
2 files changed, 86 insertions, 56 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index afd32ad4ebe..7755fd65bff 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,9 @@
12011-10-01 Chong Yidong <cyd@stupidchicken.com>
2
3 * windows.texi (Textual Scrolling): Document scroll-up-command,
4 scroll-down-command, scroll-error-top-bottom, and the
5 scroll-command symbol property.
6
12011-09-28 Juanma Barranquero <lekktu@gmail.com> 72011-09-28 Juanma Barranquero <lekktu@gmail.com>
2 8
3 * windows.texi (Splitting Windows): Fix typos. 9 * windows.texi (Splitting Windows): Fix typos.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 6a7206f459d..2ba52ef8b59 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -3100,67 +3100,77 @@ text line, @var{ypos} is negative.
3100@cindex scrolling textually 3100@cindex scrolling textually
3101 3101
3102 @dfn{Textual scrolling} means moving the text up or down through a 3102 @dfn{Textual scrolling} means moving the text up or down through a
3103window. It works by changing the value of the window's display-start 3103window. It works by changing the window's display-start location. It
3104location. It may also change the value of @code{window-point} to keep 3104may also change the value of @code{window-point} to keep point on the
3105point on the screen. 3105screen (@pxref{Window Point}).
3106 3106
3107 Textual scrolling was formerly called ``vertical scrolling,'' but we 3107 The basic textual scrolling functions are @code{scroll-up} (which
3108changed its name to distinguish it from the new vertical fractional 3108scrolls forward) and @code{scroll-down} (which scrolls backward). In
3109scrolling feature (@pxref{Vertical Scrolling}). 3109these function names, ``up'' and ``down'' refer to the direction of
3110 3110motion of the buffer text relative to the window. Imagine that the
3111 In the commands @code{scroll-up} and @code{scroll-down}, the directions 3111text is written on a long roll of paper and that the scrolling
3112``up'' and ``down'' refer to the motion of the text in the buffer at which 3112commands move the paper up and down. Thus, if you are looking at the
3113you are looking through the window. Imagine that the text is 3113middle of a buffer and repeatedly call @code{scroll-down}, you will
3114written on a long roll of paper and that the scrolling commands move the 3114eventually see the beginning of the buffer.
3115paper up and down. Thus, if you are looking at text in the middle of a
3116buffer and repeatedly call @code{scroll-down}, you will eventually see
3117the beginning of the buffer.
3118 3115
3119 Some people have urged that the opposite convention be used: they 3116 Some people have urged that the opposite convention be used: they
3120imagine that the window moves over text that remains in place. Then 3117imagine the window moving over text that remains in place, so that
3121``down'' commands would take you to the end of the buffer. This view is 3118``down'' commands take you to the end of the buffer. This convention
3122more consistent with the actual relationship between windows and the 3119is consistent with fact that such a command is bound to a key named
3123text in the buffer, but it is less like what the user sees. The 3120@key{PageDown} on modern keyboards. We have not switched to this
3124position of a window on the terminal does not move, and short scrolling 3121convention as that is likely to break existing Emacs Lisp code.
3125commands clearly move the text up or down on the screen. We have chosen 3122
3126names that fit the user's point of view. 3123 Textual scrolling functions (aside from @code{scroll-other-window})
3127 3124have unpredictable results if the current buffer is not the one
3128 The textual scrolling functions (aside from 3125displayed in the selected window. @xref{Current Buffer}.
3129@code{scroll-other-window}) have unpredictable results if the current 3126
3130buffer is different from the buffer that is displayed in the selected 3127 If the window contains a row taller than the height of the window
3131window. @xref{Current Buffer}. 3128(for example in the presence of a large image), the scroll functions
3132 3129will adjust the window's vertical scroll position to scroll the
3133 If the window contains a row which is taller than the height of the 3130partially visible row. Lisp callers can disable this feature by
3134window (for example in the presence of a large image), the scroll 3131binding the variable @code{auto-window-vscroll} to @code{nil}
3135functions will adjust the window's vertical scroll position to scroll 3132(@pxref{Vertical Scrolling}).
3136the partially visible row. To disable this feature, Lisp code may bind
3137the variable @code{auto-window-vscroll} to @code{nil} (@pxref{Vertical
3138Scrolling}).
3139 3133
3140@deffn Command scroll-up &optional count 3134@deffn Command scroll-up &optional count
3141This function scrolls the text in the selected window upward 3135This function scrolls forward by @var{count} lines in the selected
3142@var{count} lines. If @var{count} is negative, scrolling is actually 3136window.
3143downward.
3144 3137
3145If @var{count} is @code{nil} (or omitted), then the length of scroll 3138If @var{count} is negative, it scrolls backward instead. If
3146is @code{next-screen-context-lines} lines less than the usable height of 3139@var{count} is @code{nil} (or omitted), the distance scrolled is
3147the window (not counting its mode line). 3140@code{next-screen-context-lines} lines less than the height of the
3141window's text area.
3148 3142
3149@code{scroll-up} returns @code{nil}, unless it gets an error 3143If the selected window cannot be scrolled any further, this function
3150because it can't scroll any further. 3144signals an error. Otherwise, it returns @code{nil}.
3151@end deffn 3145@end deffn
3152 3146
3153@deffn Command scroll-down &optional count 3147@deffn Command scroll-down &optional count
3154This function scrolls the text in the selected window downward 3148This function scrolls backward by @var{count} lines in the selected
3155@var{count} lines. If @var{count} is negative, scrolling is actually 3149window.
3156upward. 3150
3151If @var{count} is negative, it scrolls forward instead. If
3152@var{count} is omitted or @code{nil}, the distance scrolled is
3153@code{next-screen-context-lines} lines less than the height of the
3154window's text area.
3157 3155
3158If @var{count} is omitted or @code{nil}, then the length of the scroll 3156If the selected window cannot be scrolled any further, this function
3159is @code{next-screen-context-lines} lines less than the usable height of 3157signals an error. Otherwise, it returns @code{nil}.
3160the window (not counting its mode line). 3158@end deffn
3159
3160@deffn Command scroll-up-command &optional count
3161This behaves like @code{scroll-up}, except that if the selected window
3162cannot be scrolled any further and the value of the variable
3163@code{scroll-error-top-bottom} is @code{t}, it tries to move to the
3164end of the buffer instead. If point is already there, it signals an
3165error.
3166@end deffn
3161 3167
3162@code{scroll-down} returns @code{nil}, unless it gets an error because 3168@deffn Command scroll-down-command &optional count
3163it can't scroll any further. 3169This behaves like @code{scroll-down}, except that if the selected
3170window cannot be scrolled any further and the value of the variable
3171@code{scroll-error-top-bottom} is @code{t}, it tries to move to the
3172beginning of the buffer instead. If point is already there, it
3173signals an error.
3164@end deffn 3174@end deffn
3165 3175
3166@deffn Command scroll-other-window &optional count 3176@deffn Command scroll-other-window &optional count
@@ -3190,7 +3200,6 @@ line reappears after the echo area momentarily displays the message
3190@samp{Beginning of buffer}. 3200@samp{Beginning of buffer}.
3191@end deffn 3201@end deffn
3192 3202
3193@c Emacs 19 feature
3194@defvar other-window-scroll-buffer 3203@defvar other-window-scroll-buffer
3195If this variable is non-@code{nil}, it tells @code{scroll-other-window} 3204If this variable is non-@code{nil}, it tells @code{scroll-other-window}
3196which buffer's window to scroll. 3205which buffer's window to scroll.
@@ -3245,13 +3254,18 @@ only by precisely @var{n} lines, not a smaller number. This feature
3245does not work with @code{scroll-margin}. The default value is zero. 3254does not work with @code{scroll-margin}. The default value is zero.
3246@end defopt 3255@end defopt
3247 3256
3257@cindex @code{scroll-command} property
3248@defopt scroll-preserve-screen-position 3258@defopt scroll-preserve-screen-position
3249If this option is @code{t}, scrolling which would move the current 3259If this option is @code{t}, whenever a scrolling command moves point
3250point position out of the window chooses the new position of point 3260off-window, Emacs tries to adjust point to keep the cursor at its old
3251so that the vertical position of the cursor is unchanged, if possible. 3261vertical position in the window, rather than the window edge.
3262
3263If the value is non-@code{nil} and not @code{t}, Emacs adjusts point
3264to keep the cursor at the same vertical position, even if the
3265scrolling command didn't move point off-window.
3252 3266
3253If it is non-@code{nil} and not @code{t}, then the scrolling functions 3267This option affects all scroll commands that have a non-@code{nil}
3254always preserve the vertical position of point, if possible. 3268@code{scroll-command} symbol property.
3255@end defopt 3269@end defopt
3256 3270
3257@defopt next-screen-context-lines 3271@defopt next-screen-context-lines
@@ -3262,6 +3276,16 @@ bottom of the window appear instead at the top. The default value is
3262@code{2}. 3276@code{2}.
3263@end defopt 3277@end defopt
3264 3278
3279@defopt scroll-error-top-bottom
3280If this option is @code{nil} (the default), @code{scroll-up-command}
3281and @code{scroll-down-command} simply signal an error when no more
3282scrolling is possible.
3283
3284If the value is @code{t}, these commands instead move point to the
3285beginning or end of the buffer (depending on scrolling direction);
3286only if point is already on that position do they signal an error.
3287@end defopt
3288
3265@deffn Command recenter &optional count 3289@deffn Command recenter &optional count
3266@cindex centering point 3290@cindex centering point
3267This function scrolls the text in the selected window so that point is 3291This function scrolls the text in the selected window so that point is