766 |
<h2 class="section"> 4.9 Numeric Arguments </h2> |
<h2 class="section"> 4.9 Numeric Arguments </h2> |
767 |
|
|
768 |
<p> In mathematics and computer usage, the word <em>argument</em> means |
<p> In mathematics and computer usage, the word <em>argument</em> means |
769 |
"data provided to a function or operation." Any Emacs command can be |
“data provided to a function or operation.” Any Emacs command can be |
770 |
given a <em>numeric argument</em> (also called a <em>prefix argument</em>). |
given a <em>numeric argument</em> (also called a <em>prefix argument</em>). |
771 |
Some commands interpret the argument as a repetition count. For |
Some commands interpret the argument as a repetition count. For |
772 |
example, giving an argument of ten to the key <kbd>C-f</kbd> (the command |
example, giving an argument of ten to the key <kbd>C-f</kbd> (the command |
802 |
without digits normally means -1. |
without digits normally means -1. |
803 |
</p> |
</p> |
804 |
<p> <kbd>C-u</kbd> followed by a character which is neither a digit nor a minus |
<p> <kbd>C-u</kbd> followed by a character which is neither a digit nor a minus |
805 |
sign has the special meaning of "multiply by four". It multiplies the |
sign has the special meaning of “multiply by four”. It multiplies the |
806 |
argument for the next command by four. <kbd>C-u</kbd> twice multiplies it by |
argument for the next command by four. <kbd>C-u</kbd> twice multiplies it by |
807 |
sixteen. Thus, <kbd>C-u C-u C-f</kbd> moves forward sixteen characters. This |
sixteen. Thus, <kbd>C-u C-u C-f</kbd> moves forward sixteen characters. This |
808 |
is a good way to move forward "fast", since it moves about 1/5 of a line |
is a good way to move forward “fast”, since it moves about 1/5 of a line |
809 |
in the usual size frame. Other useful combinations are <kbd>C-u C-n</kbd>, |
in the usual size frame. Other useful combinations are <kbd>C-u C-n</kbd>, |
810 |
<kbd>C-u C-u C-n</kbd> (move down a good fraction of a frame), <kbd>C-u C-u |
<kbd>C-u C-u C-n</kbd> (move down a good fraction of a frame), <kbd>C-u C-u |
811 |
C-o</kbd> (make "a lot" of blank lines), and <kbd>C-u C-k</kbd> (kill four |
C-o</kbd> (make “a lot” of blank lines), and <kbd>C-u C-k</kbd> (kill four |
812 |
lines). |
lines). |
813 |
</p> |
</p> |
814 |
<p> Some commands care only about whether there is an argument and not about |
<p> Some commands care only about whether there is an argument and not about |
841 |
digit to insert from the argument, type another <kbd>C-u</kbd>; for example, |
digit to insert from the argument, type another <kbd>C-u</kbd>; for example, |
842 |
<kbd>C-u 6 4 C-u 1</kbd> does insert 64 copies of the character <samp>`1'</samp>. |
<kbd>C-u 6 4 C-u 1</kbd> does insert 64 copies of the character <samp>`1'</samp>. |
843 |
</p> |
</p> |
844 |
<p> We use the term "prefix argument" as well as "numeric argument" to |
<p> We use the term “prefix argument” as well as “numeric argument” to |
845 |
emphasize that you type the argument before the command, and to |
emphasize that you type the argument before the command, and to |
846 |
distinguish these arguments from minibuffer arguments that come after |
distinguish these arguments from minibuffer arguments that come after |
847 |
the command. |
the command. |