diff options
| author | Dani Moncayo | 2012-11-18 14:27:43 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-11-18 14:27:43 +0800 |
| commit | d1a355a1bfb2ff5914e42267c2d0c9e414f08b68 (patch) | |
| tree | 901b8a59491c31c16e47d5721698c16eb1077315 | |
| parent | 0c93aa38b3f5333d7b026e6cc1e0c9d313a4da71 (diff) | |
| download | emacs-d1a355a1bfb2ff5914e42267c2d0c9e414f08b68.tar.gz emacs-d1a355a1bfb2ff5914e42267c2d0c9e414f08b68.zip | |
Emacs manual fixes regarding automatic scrolling.
* display.texi (Auto Scrolling): Fix some inaccuracies, plus
clarifications.
(Horizontal Scrolling): Clarifications.
Fixes: debbugs:12865
| -rw-r--r-- | doc/emacs/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/emacs/display.texi | 99 |
2 files changed, 57 insertions, 48 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 5f8a252b5d6..56001d6e29e 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-11-18 Dani Moncayo <dmoncayo@gmail.com> | ||
| 2 | |||
| 3 | * display.texi (Auto Scrolling): Fix some inaccuracies, plus | ||
| 4 | clarifications (Bug#12865). | ||
| 5 | (Horizontal Scrolling): Clarifications. | ||
| 6 | |||
| 1 | 2012-11-17 Dani Moncayo <dmoncayo@gmail.com> | 7 | 2012-11-17 Dani Moncayo <dmoncayo@gmail.com> |
| 2 | 8 | ||
| 3 | * mark.texi (Disabled Transient Mark): Doc fixes (Bug#12746). | 9 | * mark.texi (Disabled Transient Mark): Doc fixes (Bug#12746). |
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index b6ab4913f9c..876c46bdf1a 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -213,59 +213,62 @@ entire current defun onto the screen if possible. | |||
| 213 | @node Auto Scrolling | 213 | @node Auto Scrolling |
| 214 | @section Automatic Scrolling | 214 | @section Automatic Scrolling |
| 215 | 215 | ||
| 216 | @cindex automatic scrolling | ||
| 216 | Emacs performs @dfn{automatic scrolling} when point moves out of the | 217 | Emacs performs @dfn{automatic scrolling} when point moves out of the |
| 217 | visible portion of the text. | 218 | visible portion of the text. Normally, automatic scrolling centers |
| 219 | point vertically in the window, but there are several ways to alter | ||
| 220 | this behavior. | ||
| 218 | 221 | ||
| 219 | @vindex scroll-conservatively | 222 | @vindex scroll-conservatively |
| 220 | Normally, this centers point vertically within the window. However, | 223 | If you set @code{scroll-conservatively} to a small number @var{n}, |
| 221 | if you set @code{scroll-conservatively} to a small number @var{n}, | 224 | then moving point just a little off the screen (no more than @var{n} |
| 222 | then if you move point just a little off the screen (less than @var{n} | 225 | lines) causes Emacs to scroll just enough to bring point back on |
| 223 | lines), Emacs scrolls the text just far enough to bring point back on | 226 | screen; if doing so fails to make point visible, Emacs scrolls just |
| 224 | screen. If doing so fails to make point visible, Emacs centers point | 227 | far enough to center point in the window. If you set |
| 225 | in the window. By default, @code{scroll-conservatively} is@tie{}0. | 228 | @code{scroll-conservatively} to a large number (larger than 100), |
| 226 | If you set @code{scroll-conservatively} to a large number (larger than | 229 | automatic scrolling never centers point, no matter how far point |
| 227 | 100), Emacs will never center point as result of scrolling, even if | 230 | moves; Emacs always scrolls text just enough to bring point into view, |
| 228 | point moves far away from the text previously displayed in the window. | 231 | either at the top or bottom of the window depending on the scroll |
| 229 | With such a large value, Emacs will always scroll text just enough for | 232 | direction. By default, @code{scroll-conservatively} is@tie{}0, which |
| 230 | bringing point into view, so point will end up at the top or bottom of | 233 | means to always center point in the window. |
| 231 | the window, depending on the scroll direction. | ||
| 232 | 234 | ||
| 233 | @vindex scroll-step | 235 | @vindex scroll-step |
| 234 | An alternative way of controlling how Emacs scrolls text is by | 236 | Another way to control automatic scrolling is to customize the |
| 235 | customizing the variable @code{scroll-step}. Its value determines how | 237 | variable @code{scroll-step}. Its value determines the number of lines |
| 236 | many lines to scroll the window when point moves off the screen. If | 238 | by which to automatically scroll, when point moves off the screen. If |
| 237 | moving by that number of lines fails to bring point back into view, | 239 | scrolling by that number of lines fails to bring point back into view, |
| 238 | point is centered instead. The default value is zero, which causes | 240 | point is centered instead. The default value is zero, which (by |
| 239 | point to always be centered after scrolling. | 241 | default) causes point to always be centered after scrolling. |
| 240 | |||
| 241 | Since both @code{scroll-conservatively} and @code{scroll-step} | ||
| 242 | control automatic scrolling in contradicting ways, you should set only | ||
| 243 | one of them. If you customize both, the value of | ||
| 244 | @code{scroll-conservatively} takes precedence. | ||
| 245 | 242 | ||
| 246 | @cindex aggressive scrolling | 243 | @cindex aggressive scrolling |
| 247 | @vindex scroll-up-aggressively | 244 | @vindex scroll-up-aggressively |
| 248 | @vindex scroll-down-aggressively | 245 | @vindex scroll-down-aggressively |
| 249 | When the window does scroll by a distance longer than | 246 | A third way to control automatic scrolling is to customize the |
| 250 | @code{scroll-step}, you can control how aggressively it scrolls by | 247 | variables @code{scroll-up-aggressively} and |
| 251 | setting the variables @code{scroll-up-aggressively} and | 248 | @code{scroll-down-aggressively}, which directly specify the vertical |
| 252 | @code{scroll-down-aggressively}. The value of | 249 | position of point after scrolling. The value of |
| 253 | @code{scroll-up-aggressively} should be either @code{nil}, or a | 250 | @code{scroll-up-aggressively} should be either @code{nil} (the |
| 254 | fraction @var{f} between 0 and 1. A fraction specifies where on the | 251 | default), or a floating point number @var{f} between 0 and 1. The |
| 255 | screen to put point when scrolling upward, i.e.@: forward. When point | 252 | latter means that when point goes below the bottom window edge (i.e.@: |
| 256 | goes off the window end, the new start position is chosen to put point | 253 | scrolling forward), Emacs scrolls the window so that point is @var{f} |
| 257 | @var{f} parts of the window height from the bottom margin. Thus, | 254 | parts of the window height from the bottom window edge. Thus, larger |
| 258 | larger @var{f} means more aggressive scrolling: more new text is | 255 | @var{f} means more aggressive scrolling: more new text is brought into |
| 259 | brought into view. The default value, @code{nil}, is equivalent to | 256 | view. The default value, @code{nil}, is equivalent to 0.5. |
| 260 | 0.5. | 257 | |
| 261 | 258 | Likewise, @code{scroll-down-aggressively} is used when point goes | |
| 262 | Likewise, @code{scroll-down-aggressively} is used for scrolling | 259 | above the bottom window edge (i.e.@: scrolling backward). The value |
| 263 | down, i.e.@: backward. The value specifies how far point should be | 260 | specifies how far point should be from the top margin of the window |
| 264 | placed from the top margin of the window; thus, as with | 261 | after scrolling. Thus, as with @code{scroll-up-aggressively}, a |
| 265 | @code{scroll-up-aggressively}, a larger value is more aggressive. | 262 | larger value is more aggressive. |
| 266 | 263 | ||
| 267 | These two variables are ignored if either @code{scroll-step} or | 264 | Note that the variables @code{scroll-conservatively}, |
| 268 | @code{scroll-conservatively} are set to a non-zero value. | 265 | @code{scroll-step}, and @code{scroll-up-aggressively} / |
| 266 | @code{scroll-down-aggressively} control automatic scrolling in | ||
| 267 | contradictory ways. Therefore, you should pick no more than one of | ||
| 268 | these methods to customize automatic scrolling. In case you customize | ||
| 269 | multiple variables, the order of priority is: | ||
| 270 | @code{scroll-conservatively}, then @code{scroll-step}, and finally | ||
| 271 | @code{scroll-up-aggressively} / @code{scroll-down-aggressively}. | ||
| 269 | 272 | ||
| 270 | @vindex scroll-margin | 273 | @vindex scroll-margin |
| 271 | The variable @code{scroll-margin} restricts how close point can come | 274 | The variable @code{scroll-margin} restricts how close point can come |
| @@ -295,10 +298,10 @@ the cursor is left at the edge instead.) | |||
| 295 | 298 | ||
| 296 | @vindex hscroll-margin | 299 | @vindex hscroll-margin |
| 297 | The variable @code{hscroll-margin} controls how close point can get | 300 | The variable @code{hscroll-margin} controls how close point can get |
| 298 | to the window's edges before automatic scrolling occurs. It is | 301 | to the window's left and right edges before automatic scrolling |
| 299 | measured in columns. For example, if the value is 5, then moving | 302 | occurs. It is measured in columns. For example, if the value is 5, |
| 300 | point within 5 columns of an edge causes horizontal scrolling away | 303 | then moving point within 5 columns of an edge causes horizontal |
| 301 | from that edge. | 304 | scrolling away from that edge. |
| 302 | 305 | ||
| 303 | @vindex hscroll-step | 306 | @vindex hscroll-step |
| 304 | The variable @code{hscroll-step} determines how many columns to | 307 | The variable @code{hscroll-step} determines how many columns to |