diff options
| author | Chong Yidong | 2011-10-01 17:54:33 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-10-01 17:54:33 -0400 |
| commit | 550f41cdba7ebc49996d8fd17eacff86a2456f35 (patch) | |
| tree | bc1581afa5519355c866d4a550f0acfa572c45d7 /doc/lispref | |
| parent | ce3cefcca3227944d27d75e7de0f1e4f4b6d11a6 (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 136 |
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 @@ | |||
| 1 | 2011-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 | |||
| 1 | 2011-09-28 Juanma Barranquero <lekktu@gmail.com> | 7 | 2011-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 |
| 3103 | window. It works by changing the value of the window's display-start | 3103 | window. It works by changing the window's display-start location. It |
| 3104 | location. It may also change the value of @code{window-point} to keep | 3104 | may also change the value of @code{window-point} to keep point on the |
| 3105 | point on the screen. | 3105 | screen (@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 |
| 3108 | changed its name to distinguish it from the new vertical fractional | 3108 | scrolls forward) and @code{scroll-down} (which scrolls backward). In |
| 3109 | scrolling feature (@pxref{Vertical Scrolling}). | 3109 | these function names, ``up'' and ``down'' refer to the direction of |
| 3110 | 3110 | motion of the buffer text relative to the window. Imagine that the | |
| 3111 | In the commands @code{scroll-up} and @code{scroll-down}, the directions | 3111 | text 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 | 3112 | commands move the paper up and down. Thus, if you are looking at the |
| 3113 | you are looking through the window. Imagine that the text is | 3113 | middle of a buffer and repeatedly call @code{scroll-down}, you will |
| 3114 | written on a long roll of paper and that the scrolling commands move the | 3114 | eventually see the beginning of the buffer. |
| 3115 | paper up and down. Thus, if you are looking at text in the middle of a | ||
| 3116 | buffer and repeatedly call @code{scroll-down}, you will eventually see | ||
| 3117 | the 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 |
| 3120 | imagine that the window moves over text that remains in place. Then | 3117 | imagine 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 |
| 3122 | more consistent with the actual relationship between windows and the | 3119 | is consistent with fact that such a command is bound to a key named |
| 3123 | text 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 |
| 3124 | position of a window on the terminal does not move, and short scrolling | 3121 | convention as that is likely to break existing Emacs Lisp code. |
| 3125 | commands clearly move the text up or down on the screen. We have chosen | 3122 | |
| 3126 | names that fit the user's point of view. | 3123 | Textual scrolling functions (aside from @code{scroll-other-window}) |
| 3127 | 3124 | have unpredictable results if the current buffer is not the one | |
| 3128 | The textual scrolling functions (aside from | 3125 | displayed in the selected window. @xref{Current Buffer}. |
| 3129 | @code{scroll-other-window}) have unpredictable results if the current | 3126 | |
| 3130 | buffer 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 |
| 3131 | window. @xref{Current Buffer}. | 3128 | (for example in the presence of a large image), the scroll functions |
| 3132 | 3129 | will 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 | 3130 | partially visible row. Lisp callers can disable this feature by |
| 3134 | window (for example in the presence of a large image), the scroll | 3131 | binding the variable @code{auto-window-vscroll} to @code{nil} |
| 3135 | functions will adjust the window's vertical scroll position to scroll | 3132 | (@pxref{Vertical Scrolling}). |
| 3136 | the partially visible row. To disable this feature, Lisp code may bind | ||
| 3137 | the variable @code{auto-window-vscroll} to @code{nil} (@pxref{Vertical | ||
| 3138 | Scrolling}). | ||
| 3139 | 3133 | ||
| 3140 | @deffn Command scroll-up &optional count | 3134 | @deffn Command scroll-up &optional count |
| 3141 | This function scrolls the text in the selected window upward | 3135 | This function scrolls forward by @var{count} lines in the selected |
| 3142 | @var{count} lines. If @var{count} is negative, scrolling is actually | 3136 | window. |
| 3143 | downward. | ||
| 3144 | 3137 | ||
| 3145 | If @var{count} is @code{nil} (or omitted), then the length of scroll | 3138 | If @var{count} is negative, it scrolls backward instead. If |
| 3146 | is @code{next-screen-context-lines} lines less than the usable height of | 3139 | @var{count} is @code{nil} (or omitted), the distance scrolled is |
| 3147 | the window (not counting its mode line). | 3140 | @code{next-screen-context-lines} lines less than the height of the |
| 3141 | window's text area. | ||
| 3148 | 3142 | ||
| 3149 | @code{scroll-up} returns @code{nil}, unless it gets an error | 3143 | If the selected window cannot be scrolled any further, this function |
| 3150 | because it can't scroll any further. | 3144 | signals 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 |
| 3154 | This function scrolls the text in the selected window downward | 3148 | This function scrolls backward by @var{count} lines in the selected |
| 3155 | @var{count} lines. If @var{count} is negative, scrolling is actually | 3149 | window. |
| 3156 | upward. | 3150 | |
| 3151 | If @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 | ||
| 3154 | window's text area. | ||
| 3157 | 3155 | ||
| 3158 | If @var{count} is omitted or @code{nil}, then the length of the scroll | 3156 | If the selected window cannot be scrolled any further, this function |
| 3159 | is @code{next-screen-context-lines} lines less than the usable height of | 3157 | signals an error. Otherwise, it returns @code{nil}. |
| 3160 | the window (not counting its mode line). | 3158 | @end deffn |
| 3159 | |||
| 3160 | @deffn Command scroll-up-command &optional count | ||
| 3161 | This behaves like @code{scroll-up}, except that if the selected window | ||
| 3162 | cannot 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 | ||
| 3164 | end of the buffer instead. If point is already there, it signals an | ||
| 3165 | error. | ||
| 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 |
| 3163 | it can't scroll any further. | 3169 | This behaves like @code{scroll-down}, except that if the selected |
| 3170 | window 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 | ||
| 3172 | beginning of the buffer instead. If point is already there, it | ||
| 3173 | signals 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 |
| 3195 | If this variable is non-@code{nil}, it tells @code{scroll-other-window} | 3204 | If this variable is non-@code{nil}, it tells @code{scroll-other-window} |
| 3196 | which buffer's window to scroll. | 3205 | which buffer's window to scroll. |
| @@ -3245,13 +3254,18 @@ only by precisely @var{n} lines, not a smaller number. This feature | |||
| 3245 | does not work with @code{scroll-margin}. The default value is zero. | 3254 | does 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 |
| 3249 | If this option is @code{t}, scrolling which would move the current | 3259 | If this option is @code{t}, whenever a scrolling command moves point |
| 3250 | point position out of the window chooses the new position of point | 3260 | off-window, Emacs tries to adjust point to keep the cursor at its old |
| 3251 | so that the vertical position of the cursor is unchanged, if possible. | 3261 | vertical position in the window, rather than the window edge. |
| 3262 | |||
| 3263 | If the value is non-@code{nil} and not @code{t}, Emacs adjusts point | ||
| 3264 | to keep the cursor at the same vertical position, even if the | ||
| 3265 | scrolling command didn't move point off-window. | ||
| 3252 | 3266 | ||
| 3253 | If it is non-@code{nil} and not @code{t}, then the scrolling functions | 3267 | This option affects all scroll commands that have a non-@code{nil} |
| 3254 | always 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 | ||
| 3280 | If this option is @code{nil} (the default), @code{scroll-up-command} | ||
| 3281 | and @code{scroll-down-command} simply signal an error when no more | ||
| 3282 | scrolling is possible. | ||
| 3283 | |||
| 3284 | If the value is @code{t}, these commands instead move point to the | ||
| 3285 | beginning or end of the buffer (depending on scrolling direction); | ||
| 3286 | only 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 |
| 3267 | This function scrolls the text in the selected window so that point is | 3291 | This function scrolls the text in the selected window so that point is |