aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Moncayo2012-11-18 14:27:43 +0800
committerChong Yidong2012-11-18 14:27:43 +0800
commitd1a355a1bfb2ff5914e42267c2d0c9e414f08b68 (patch)
tree901b8a59491c31c16e47d5721698c16eb1077315
parent0c93aa38b3f5333d7b026e6cc1e0c9d313a4da71 (diff)
downloademacs-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/ChangeLog6
-rw-r--r--doc/emacs/display.texi99
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 @@
12012-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
12012-11-17 Dani Moncayo <dmoncayo@gmail.com> 72012-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
217visible portion of the text. 218visible portion of the text. Normally, automatic scrolling centers
219point vertically in the window, but there are several ways to alter
220this 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},
221if you set @code{scroll-conservatively} to a small number @var{n}, 224then moving point just a little off the screen (no more than @var{n}
222then if you move point just a little off the screen (less than @var{n} 225lines) causes Emacs to scroll just enough to bring point back on
223lines), Emacs scrolls the text just far enough to bring point back on 226screen; if doing so fails to make point visible, Emacs scrolls just
224screen. If doing so fails to make point visible, Emacs centers point 227far enough to center point in the window. If you set
225in the window. By default, @code{scroll-conservatively} is@tie{}0. 228@code{scroll-conservatively} to a large number (larger than 100),
226If you set @code{scroll-conservatively} to a large number (larger than 229automatic scrolling never centers point, no matter how far point
227100), Emacs will never center point as result of scrolling, even if 230moves; Emacs always scrolls text just enough to bring point into view,
228point moves far away from the text previously displayed in the window. 231either at the top or bottom of the window depending on the scroll
229With such a large value, Emacs will always scroll text just enough for 232direction. By default, @code{scroll-conservatively} is@tie{}0, which
230bringing point into view, so point will end up at the top or bottom of 233means to always center point in the window.
231the 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
235customizing the variable @code{scroll-step}. Its value determines how 237variable @code{scroll-step}. Its value determines the number of lines
236many lines to scroll the window when point moves off the screen. If 238by which to automatically scroll, when point moves off the screen. If
237moving by that number of lines fails to bring point back into view, 239scrolling by that number of lines fails to bring point back into view,
238point is centered instead. The default value is zero, which causes 240point is centered instead. The default value is zero, which (by
239point to always be centered after scrolling. 241default) causes point to always be centered after scrolling.
240
241 Since both @code{scroll-conservatively} and @code{scroll-step}
242control automatic scrolling in contradicting ways, you should set only
243one 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 247variables @code{scroll-up-aggressively} and
251setting 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 249position 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
254fraction @var{f} between 0 and 1. A fraction specifies where on the 251default), or a floating point number @var{f} between 0 and 1. The
255screen to put point when scrolling upward, i.e.@: forward. When point 252latter means that when point goes below the bottom window edge (i.e.@:
256goes off the window end, the new start position is chosen to put point 253scrolling forward), Emacs scrolls the window so that point is @var{f}
257@var{f} parts of the window height from the bottom margin. Thus, 254parts of the window height from the bottom window edge. Thus, larger
258larger @var{f} means more aggressive scrolling: more new text is 255@var{f} means more aggressive scrolling: more new text is brought into
259brought into view. The default value, @code{nil}, is equivalent to 256view. The default value, @code{nil}, is equivalent to 0.5.
2600.5. 257
261 258 Likewise, @code{scroll-down-aggressively} is used when point goes
262 Likewise, @code{scroll-down-aggressively} is used for scrolling 259above the bottom window edge (i.e.@: scrolling backward). The value
263down, i.e.@: backward. The value specifies how far point should be 260specifies how far point should be from the top margin of the window
264placed from the top margin of the window; thus, as with 261after scrolling. Thus, as with @code{scroll-up-aggressively}, a
265@code{scroll-up-aggressively}, a larger value is more aggressive. 262larger 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
267contradictory ways. Therefore, you should pick no more than one of
268these methods to customize automatic scrolling. In case you customize
269multiple 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
298to the window's edges before automatic scrolling occurs. It is 301to the window's left and right edges before automatic scrolling
299measured in columns. For example, if the value is 5, then moving 302occurs. It is measured in columns. For example, if the value is 5,
300point within 5 columns of an edge causes horizontal scrolling away 303then moving point within 5 columns of an edge causes horizontal
301from that edge. 304scrolling 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