Mercurial > emacs
comparison etc/TUTORIAL @ 22722:ef426e5873e3
Explain "prefix arg". Explain how it can be a flag.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 09 Jul 1998 04:03:27 +0000 |
parents | 98611be1ad61 |
children | 3a0c163d32a6 |
comparison
equal
deleted
inserted
replaced
22721:d023df160219 | 22722:ef426e5873e3 |
---|---|
189 serves as a repeat-count. The way you give a command a repeat count | 189 serves as a repeat-count. The way you give a command a repeat count |
190 is by typing C-u and then the digits before you type the command. If | 190 is by typing C-u and then the digits before you type the command. If |
191 you have a META (or EDIT or ALT) key, there is another alternative way | 191 you have a META (or EDIT or ALT) key, there is another alternative way |
192 to enter a numeric argument: type the digits while holding down the | 192 to enter a numeric argument: type the digits while holding down the |
193 META key. We recommend learning the C-u method because it works on | 193 META key. We recommend learning the C-u method because it works on |
194 any terminal. | 194 any terminal. The numeric argument is also called a "prefix argument", |
195 because you type the argument before the command it applies to. | |
195 | 196 |
196 For instance, C-u 8 C-f moves forward eight characters. | 197 For instance, C-u 8 C-f moves forward eight characters. |
197 | 198 |
198 >> Try using C-n or C-p with a numeric argument, to move the cursor | 199 >> Try using C-n or C-p with a numeric argument, to move the cursor |
199 to a line near this one with just one command. | 200 to a line near this one with just one command. |
200 | 201 |
201 Most commands use the numeric argument as a repeat count. Certain | 202 Most commands use the numeric argument as a repeat count, but some |
202 exceptional commands use it differently. C-v and M-v are among the | 203 commands use it in some other way. Several commands (but none of |
203 exceptions. When given an argument, they scroll the screen up or down | 204 those you have learned so far) use it as a flag--the presence of a |
204 by that many lines, rather than by a screenfuls. For example, C-u 4 | 205 prefix argument, regardless of its value, makes the command do |
205 C-v scrolls the screen by 4 lines. | 206 something different. |
207 | |
208 C-v and M-v are another kind of exception. When given an argument, | |
209 they scroll the screen up or down by that many lines, rather than by a | |
210 screenful. For example, C-u 8 C-v scrolls the screen by 8 lines. | |
206 | 211 |
207 >> Try typing C-u 8 C-v now. | 212 >> Try typing C-u 8 C-v now. |
208 | 213 |
209 This should have scrolled the screen up by 8 lines. If you would like | 214 This should have scrolled the screen up by 8 lines. If you would like |
210 to scroll it down again, you can give an argument to M-v. | 215 to scroll it down again, you can give an argument to M-v. |