aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-10-24 10:01:54 +0800
committerChong Yidong2011-10-24 10:01:54 +0800
commite7a3ff06b31baa4e344e0a0b1addde57c16c817f (patch)
tree393ddd21b3657d7dfde2ae400106ced301eb58c6
parent4a623313e379932424a217a417820616c5759ffb (diff)
downloademacs-e7a3ff06b31baa4e344e0a0b1addde57c16c817f.tar.gz
emacs-e7a3ff06b31baa4e344e0a0b1addde57c16c817f.zip
Document scroll-up-line and scroll-down-line in Emacs manual.
* doc/emacs/display.texi (Scrolling): Document scroll-up-line and scroll-down-line. Document scroll-command property. (Recentering): New node, split off from Scrolling. Also, minor copyedits to standardize on the phrase "key binding" rather than "keybinding" in the manual.
-rw-r--r--doc/emacs/ChangeLog6
-rw-r--r--doc/emacs/display.texi175
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/kmacro.texi2
-rw-r--r--doc/emacs/macos.texi2
-rw-r--r--doc/emacs/programs.texi2
-rw-r--r--doc/emacs/rmail.texi11
-rw-r--r--doc/emacs/search.texi4
-rw-r--r--etc/NEWS2
9 files changed, 116 insertions, 89 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 28c61e23b8c..a1310e87b15 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,9 @@
12011-10-24 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (Scrolling): Document scroll-up-line and
4 scroll-down-line. Document scroll-command property.
5 (Recentering): New node, split off from Scrolling.
6
12011-10-23 Chong Yidong <cyd@gnu.org> 72011-10-23 Chong Yidong <cyd@gnu.org>
2 8
3 * frames.texi (Scroll Bars): GTK uses right scroll bars now. 9 * frames.texi (Scroll Bars): GTK uses right scroll bars now.
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index b72e24bf243..8995b1242b1 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -13,6 +13,7 @@ the text is displayed.
13 13
14@menu 14@menu
15* Scrolling:: Commands to move text up and down in a window. 15* Scrolling:: Commands to move text up and down in a window.
16* Recentering:: A scroll command that centers the current line.
16* Auto Scrolling:: Redisplay scrolls text automatically when needed. 17* Auto Scrolling:: Redisplay scrolls text automatically when needed.
17* Horizontal Scrolling:: Moving text left and right in a window. 18* Horizontal Scrolling:: Moving text left and right in a window.
18* Narrowing:: Restricting display and editing to a portion 19* Narrowing:: Restricting display and editing to a portion
@@ -48,15 +49,15 @@ portion of the buffer is displayed.
48 Scrolling ``forward'' or ``up'' advances the portion of the buffer 49 Scrolling ``forward'' or ``up'' advances the portion of the buffer
49displayed in the window; equivalently, it moves the buffer text 50displayed in the window; equivalently, it moves the buffer text
50upwards relative to the window. Scrolling ``backward'' or ``down'' 51upwards relative to the window. Scrolling ``backward'' or ``down''
51moves the displayed portion backwards, and moves the text downwards 52displays an earlier portion of the buffer, and moves the text
52relative to the window. In Emacs, scrolling ``up'' or ``down'' refers 53downwards relative to the window.
53to the direction that the text moves in the window, @emph{not} the 54
54direction that the window moves relative to the text; this terminology 55 In Emacs, scrolling ``up'' or ``down'' refers to the direction that
55was taken up by Emacs before the modern meaning of ``scrolling up'' 56the text moves in the window, @emph{not} the direction that the window
56and ``scrolling down'' became widely adopted. Hence the strange 57moves relative to the text. This terminology was adopted by Emacs
57result that @key{PageDown} scrolls ``up'' in the Emacs sense. In this 58before the modern meaning of ``scrolling up'' and ``scrolling down''
58manual, we refer to scrolling ``forward'' and ``backward'' where 59became widespread. Hence, the strange result that @key{PageDown}
59possible, in order to minimize confusion. 60scrolls ``up'' in the Emacs sense.
60 61
61 The portion of a buffer displayed in a window always contains point. 62 The portion of a buffer displayed in a window always contains point.
62If you move point past the bottom or top of the window, scrolling 63If you move point past the bottom or top of the window, scrolling
@@ -64,11 +65,6 @@ occurs automatically to bring it back onscreen (@pxref{Auto
64Scrolling}). You can also scroll explicitly with these commands: 65Scrolling}). You can also scroll explicitly with these commands:
65 66
66@table @kbd 67@table @kbd
67@item C-l
68Scroll the selected window so that the current line is the center-most
69text line; on subsequent consecutive invocations, make the current
70line the top-most line, the bottom-most line, and so on in cyclic
71order; also, maybe redisplay the screen (@code{recenter-top-bottom}).
72@item C-v 68@item C-v
73@itemx @key{next} 69@itemx @key{next}
74@itemx @key{PageDown} 70@itemx @key{PageDown}
@@ -77,6 +73,86 @@ Scroll forward by nearly a full window (@code{scroll-up-command}).
77@itemx @key{prior} 73@itemx @key{prior}
78@itemx @key{PageUp} 74@itemx @key{PageUp}
79Scroll backward (@code{scroll-down-command}). 75Scroll backward (@code{scroll-down-command}).
76@end table
77
78@kindex C-v
79@kindex M-v
80@kindex next
81@kindex prior
82@kindex PageDown
83@kindex PageUp
84@findex scroll-up-command
85@findex scroll-down-command
86 @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
87whole window height. The effect is to take the two lines at the
88bottom of the window and put them at the top, followed by lines that
89were not previously visible. If point was in the text that scrolled
90off the top, it ends up on the window's new topmost line. The
91@key{next} (or @key{PageDown}) key is equivalent to @kbd{C-v}.
92
93 @kbd{M-v} (@code{scroll-down-command}) scrolls backward in a similar
94way. The @key{prior} (or @key{PageUp}) key is equivalent to
95@kbd{M-v}.
96
97@vindex next-screen-context-lines
98 The number of lines of overlap left by these scroll commands is
99controlled by the variable @code{next-screen-context-lines}, whose
100default value is 2. You can supply the commands with a numeric prefix
101argument, @var{n}, to scroll by @var{n} lines; Emacs attempts to leave
102point unchanged, so that the text and point move up or down together.
103@kbd{C-v} with a negative argument is like @kbd{M-v} and vice versa.
104
105@vindex scroll-error-top-bottom
106 By default, these commands signal an error (by beeping or flashing
107the screen) if no more scrolling is possible, because the window has
108reached the beginning or end of the buffer. If you change the
109variable @code{scroll-error-top-bottom} to @code{t}, the command moves
110point to the farthest possible position. If point is already there,
111the command signals an error.
112
113@vindex scroll-preserve-screen-position
114@cindex @code{scroll-command} property
115 Some users like scroll commands to keep point at the same screen
116position, so that scrolling back to the same screen conveniently
117returns point to its original position. You can enable this behavior
118via the variable @code{scroll-preserve-screen-position}. If the value
119is @code{t}, Emacs adjusts point to keep the cursor at the same screen
120position whenever a scroll command moves it off-window, rather than
121moving it to the topmost or bottommost line. With any other
122non-@code{nil} value, Emacs adjusts point this way even if the scroll
123command leaves point in the window. This variable affects all the
124scroll commands documented in this section, as well as scrolling with
125the mouse wheel (@pxref{Wheeled Mice}); in general, it affects any
126command that has a non-@code{nil} @code{scroll-command} property.
127@xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}.
128
129@vindex scroll-up
130@vindex scroll-down
131@findex scroll-up-line
132@findex scroll-down-line
133 The commands @kbd{M-x scroll-up} and @kbd{M-x scroll-down} behave
134similarly to @code{scroll-up-command} and @code{scroll-down-command},
135except they do not obey @code{scroll-error-top-bottom}. Prior to
136Emacs 24, these were the default commands for scrolling up and down.
137The commands @kbd{M-x scroll-up-line} and @kbd{M-x scroll-down-line}
138scroll the current window by one line at a time. If you intend to use
139any of these commands, you might want to give them key bindings
140(@pxref{Init Rebinding}).
141
142@node Recentering
143@section Recentering
144
145@table @kbd
146@item C-l
147Scroll the selected window so the current line is the center-most text
148line; on subsequent consecutive invocations, make the current line the
149top line, the bottom line, and so on in cyclic order. Possibly
150redisplay the screen too (@code{recenter-top-bottom}).
151
152@item M-x recenter
153Scroll the selected window so the current line is the center-most text
154line. Possibly redisplay the screen too.
155
80@item C-M-l 156@item C-M-l
81Scroll heuristically to bring useful information onto the screen 157Scroll heuristically to bring useful information onto the screen
82(@code{reposition-window}). 158(@code{reposition-window}).
@@ -107,14 +183,13 @@ non-zero value @var{n}, @kbd{C-l} always leaves at least @var{n}
107screen lines between point and the top or bottom of the window 183screen lines between point and the top or bottom of the window
108(@pxref{Auto Scrolling}). 184(@pxref{Auto Scrolling}).
109 185
110 You can also supply @kbd{C-l} with a prefix argument. With a plain 186 You can also give @kbd{C-l} a prefix argument. A plain prefix
111prefix argument, @kbd{C-u C-l}, Emacs simply recenters point. With a 187argument, @kbd{C-u C-l}, simply recenters point. A positive argument
112positive argument @var{n}, it scrolls to place point @var{n} lines 188@var{n} puts point @var{n} lines down from the top of the window. An
113down from the top of the window. An argument of zero puts point on 189argument of zero puts point on the topmost line. A negative argument
114the topmost line. A negative argument @var{-n} puts point @var{n} 190@var{-n} puts point @var{n} lines from the bottom of the window. When
115lines from the bottom of the window. When given an argument, 191given an argument, @kbd{C-l} does not clear the screen or cycle
116@kbd{C-l} does not clear the screen or cycle through different screen 192through different screen positions.
117positions.
118 193
119@vindex recenter-redisplay 194@vindex recenter-redisplay
120 If the variable @code{recenter-redisplay} has a non-@code{nil} 195 If the variable @code{recenter-redisplay} has a non-@code{nil}
@@ -127,62 +202,6 @@ becomes garbled for any reason (@pxref{Screen Garbled}).
127 The more primitive command @kbd{M-x recenter} behaves like 202 The more primitive command @kbd{M-x recenter} behaves like
128@code{recenter-top-bottom}, but does not cycle among screen positions. 203@code{recenter-top-bottom}, but does not cycle among screen positions.
129 204
130@kindex C-v
131@kindex M-v
132@kindex next
133@kindex prior
134@kindex PageDown
135@kindex PageUp
136@findex scroll-up-command
137@findex scroll-down-command
138 @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
139whole window height. The effect is to take the two lines at the
140bottom of the window and put them at the top, followed by lines that
141were not previously visible. If point was in the text that scrolled
142off the top, it ends up on the window's new topmost line.
143
144 Similarly, @kbd{M-v} (@code{scroll-down-command}) scrolls backward.
145
146 We refer to @kbd{C-v} and @kbd{M-v} as @dfn{full-screen scroll
147commands}. The function key @key{next}, or @key{PageDown}, is
148equivalent to @kbd{C-v}; the function key @key{prior}, or
149@key{PageUp}, is equivalent to @kbd{M-v}.
150
151@vindex next-screen-context-lines
152 The variable @code{next-screen-context-lines} controls the number of
153lines of overlap left by the full-screen scroll commands; by default,
154it is 2. You can supply these commands with a numeric prefix argument
155@var{n}. This scrolls the window by @var{n} lines, while attempting
156to leave point unchanged (so that the text and point move up or down
157together). @kbd{C-v} with a negative argument is like @kbd{M-v} and
158vice versa.
159
160@vindex scroll-error-top-bottom
161 By default, the full-screen scroll commands signal an error (by
162beeping or flashing the screen) if no more scrolling is possible,
163because the window has reached the beginning or end of the buffer. If
164you change the variable @code{scroll-error-top-bottom} to @code{t},
165Emacs instead moves point to the farthest possible position. If point
166is already there, the command signals an error.
167
168@vindex scroll-preserve-screen-position
169 Some users like scroll commands to keep point at the same screen
170position. Then, scrolling back to the same screen also conveniently
171returns point to its original position. You can enable this via the
172variable @code{scroll-preserve-screen-position}. If the value is
173@code{t}, Emacs adjusts point to keep it at the same vertical position
174within the window, rather than the window edge, whenever a scroll
175command moves it off the window. With any other non-@code{nil} value,
176Emacs adjusts point this way even if the scroll command leaves point
177in the window.
178
179@vindex scroll-up
180@vindex scroll-down
181 The commands @code{scroll-up} and @code{scroll-down} behave
182similarly to @code{scroll-up-command} and @code{scroll-down-command},
183except they do not obey @code{scroll-error-top-bottom}. Prior to
184Emacs 24, these were the default commands for scrolling up and down.
185
186@kindex C-M-l 205@kindex C-M-l
187@findex reposition-window 206@findex reposition-window
188 @kbd{C-M-l} (@code{reposition-window}) scrolls the current window 207 @kbd{C-M-l} (@code{reposition-window}) scrolls the current window
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index cad0e4db3c0..b25c09aa29d 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -342,6 +342,7 @@ Registers
342Controlling the Display 342Controlling the Display
343 343
344* Scrolling:: Commands to move text up and down in a window. 344* Scrolling:: Commands to move text up and down in a window.
345* Recentering:: A scrolling command that centers the current line.
345* Auto Scrolling:: Redisplay scrolls text automatically when needed. 346* Auto Scrolling:: Redisplay scrolls text automatically when needed.
346* Horizontal Scrolling:: Moving text left and right in a window. 347* Horizontal Scrolling:: Moving text left and right in a window.
347* Narrowing:: Restricting display and editing to a portion 348* Narrowing:: Restricting display and editing to a portion
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index ac81377aec9..4676983fc67 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -147,7 +147,7 @@ beginning of the line and then executing the macro.
147@findex kmacro-start-macro 147@findex kmacro-start-macro
148@findex kmacro-end-macro 148@findex kmacro-end-macro
149 In addition to the @key{F3} and @key{F4} commands described above, 149 In addition to the @key{F3} and @key{F4} commands described above,
150Emacs also supports an older set of keybindings for defining and 150Emacs also supports an older set of key bindings for defining and
151executing keyboard macros. To begin a macro definition, type @kbd{C-x 151executing keyboard macros. To begin a macro definition, type @kbd{C-x
152(} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument 152(} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument
153appends this definition to the last keyboard macro. To end a macro 153appends this definition to the last keyboard macro. To end a macro
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index f4a5a2858cf..5a97fa8460b 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -36,7 +36,7 @@ Support}), but we hope to improve it in the future.
36 36
37 By default, the @key{alt} and @key{option} keys are the same as 37 By default, the @key{alt} and @key{option} keys are the same as
38@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and 38@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and
39Emacs provides a set of keybindings using this modifier key that mimic 39Emacs provides a set of key bindings using this modifier key that mimic
40other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You 40other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You
41can change these bindings in the usual way (@pxref{Key Bindings}). 41can change these bindings in the usual way (@pxref{Key Bindings}).
42 42
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 5745dd7c66c..2357902341e 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1441,7 +1441,7 @@ parsed, and move point there (@code{semantic-complete-jump}).
1441@kindex C-c , @key{SPC} 1441@kindex C-c , @key{SPC}
1442Display a list of possible completions for the symbol at point 1442Display a list of possible completions for the symbol at point
1443(@code{semantic-complete-analyze-inline}). This also activates a set 1443(@code{semantic-complete-analyze-inline}). This also activates a set
1444of special keybindings for choosing a completion: @key{RET} accepts 1444of special key bindings for choosing a completion: @key{RET} accepts
1445the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible 1445the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible
1446completions, @key{TAB} completes as far as possible and then cycles, 1446completions, @key{TAB} completes as far as possible and then cycles,
1447and @kbd{C-g} or any other key aborts completion. 1447and @kbd{C-g} or any other key aborts completion.
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index 9e30b657284..71c23655608 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -1242,11 +1242,12 @@ coding system, the result should be readable.
1242@node Rmail Editing 1242@node Rmail Editing
1243@section Editing Within a Message 1243@section Editing Within a Message
1244 1244
1245 Most of the usual Emacs keybindings are available in Rmail mode, though a 1245 Most of the usual Emacs key bindings are available in Rmail mode,
1246few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by Rmail for 1246though a few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by
1247other purposes. However, the Rmail buffer is normally read only, and 1247Rmail for other purposes. However, the Rmail buffer is normally read
1248most of the letters are redefined as Rmail commands. If you want to 1248only, and most of the letters are redefined as Rmail commands. If you
1249edit the text of a message, you must use the Rmail command @kbd{e}. 1249want to edit the text of a message, you must use the Rmail command
1250@kbd{e}.
1250 1251
1251@table @kbd 1252@table @kbd
1252@item e 1253@item e
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 31b5aa37f83..a8bd1cdf18d 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -268,8 +268,8 @@ use it (@pxref{Rebinding}).
268 268
269@vindex isearch-mode-map 269@vindex isearch-mode-map
270 When incremental search is active, you can type @kbd{C-h C-h} to 270 When incremental search is active, you can type @kbd{C-h C-h} to
271access interactive help options, including a list of special 271access interactive help options, including a list of special key
272keybindings. These keybindings are part of the keymap 272bindings. These key bindings are part of the keymap
273@code{isearch-mode-map} (@pxref{Keymaps}). 273@code{isearch-mode-map} (@pxref{Keymaps}).
274 274
275@node Isearch Yank 275@node Isearch Yank
diff --git a/etc/NEWS b/etc/NEWS
index 24aea694902..d6b0bdb484c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -293,7 +293,7 @@ of buffer at first key-press (instead move to top/bottom of buffer)
293when `scroll-error-top-bottom' is non-nil. 293when `scroll-error-top-bottom' is non-nil.
294+++ 294+++
295*** New variable `scroll-error-top-bottom' (see above). 295*** New variable `scroll-error-top-bottom' (see above).
296 296+++
297*** New scrolling commands `scroll-up-line' and `scroll-down-line' 297*** New scrolling commands `scroll-up-line' and `scroll-down-line'
298scroll a line instead of full screen. 298scroll a line instead of full screen.
299+++ 299+++