diff options
author | Eli Zaretskii <eliz@gnu.org> | 2011-03-30 22:59:42 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2011-03-30 22:59:42 +0200 |
commit | 09725d2628e9b8a796d128d24e7255a57c2424f3 (patch) | |
tree | 795b8a5d289a6c13e8d1cc115b8713ee031f03da | |
parent | 492001e973aa9cbd43f213d12b9ea2717b306b9b (diff) | |
download | emacs-09725d2628e9b8a796d128d24e7255a57c2424f3.tar.gz |
Documentation parts of the scroll fix.
src/xdisp.c (syms_of_xdisp) <scroll-conservatively>: Document the
threshold of 100 lines for never-recentering scrolling.
doc/emacs/display.texi (Auto Scrolling): Document the limit of 100
lines for never-recentering scrolling with `scroll-conservatively'.
-rw-r--r-- | doc/emacs/ChangeLog | 6 | ||||
-rw-r--r-- | doc/emacs/display.texi | 18 | ||||
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/xdisp.c | 9 |
4 files changed, 36 insertions, 2 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a30ffc07971..7e95e1b6d30 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,9 @@ +2011-03-30 Eli Zaretskii <eliz@gnu.org> + + * display.texi (Auto Scrolling): Document the limit of 100 lines + for never-recentering scrolling with `scroll-conservatively'. + (Bug#6671) + 2011-03-12 Eli Zaretskii <eliz@gnu.org> * msdog.texi (Windows HOME): Fix the wording to clarify how Emacs sets diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 5eaf2e7e3ca..405ee26312f 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -183,7 +183,20 @@ visible portion of the text. if you set @code{scroll-conservatively} to a small number @var{n}, then if you move point just a little off the screen (less than @var{n} lines), Emacs scrolls the text just far enough to bring point back on -screen. By default, @code{scroll-conservatively} is@tie{}0. +screen. By default, @code{scroll-conservatively} is@tie{}0. If you +set @code{scroll-conservatively} to a large number (larger than 100), +Emacs will never center point as result of scrolling, even if point +moves far away from the text previously displayed in the window. With +such a large value, Emacs will always scroll text just enough for +bringing point into view, so point will end up at the top or bottom of +the window, depending on the scroll direction. + +@vindex scroll-step + The variable @code{scroll-step} determines how many lines to scroll +the window when point moves off the screen. If moving by that number +of lines fails to bring point back into view, point is centered +instead. The default value is zero, which causes point to always be +centered after scrolling. @cindex aggressive scrolling @vindex scroll-up-aggressively @@ -204,6 +217,9 @@ down. The value specifies how far point should be placed from the bottom of the window; thus, as with @code{scroll-up-aggressively}, a larger value is more aggressive. + These two variables are ignored if either @code{scroll-step} or +@code{scroll-conservatively} are set to a non-zero value. + @vindex scroll-margin The variable @code{scroll-margin} restricts how close point can come to the top or bottom of a window. Its value is a number of screen diff --git a/src/ChangeLog b/src/ChangeLog index dda98bc73a7..6e9a169e8a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-30 Eli Zaretskii <eliz@gnu.org> + + * xdisp.c (syms_of_xdisp) <scroll-conservatively>: Document the + threshold of 100 lines for never-recentering scrolling. + 2011-03-29 Eli Zaretskii <eliz@gnu.org> * xdisp.c (try_scrolling): When scrolling down aggressively, diff --git a/src/xdisp.c b/src/xdisp.c index 7983c118134..9e331739cd9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13003,7 +13003,10 @@ enum SCROLLING_NEED_LARGER_MATRICES }; -/* If scroll-conservatively is more than this, never recenter. */ +/* If scroll-conservatively is more than this, never recenter. + + If you change this, don't forget to update the doc string of + `scroll-conservatively' and the Emacs manual. */ #define SCROLL_LIMIT 100 static int @@ -26605,6 +26608,10 @@ If point moves off-screen, redisplay will scroll by up to onto the screen again. If that cannot be done, then redisplay recenters point as usual. +If the value is greater than 100, redisplay will never recenter point, +but will always scroll just enough text to bring point into view, even +if you move far away. + A value of zero means always recenter point if it moves off screen. */); scroll_conservatively = 0; |