help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Rationale behind conversion of a nil prefix arg to numeric 1


From: Drew Adams
Subject: RE: Rationale behind conversion of a nil prefix arg to numeric 1
Date: Sun, 4 Sep 2016 17:52:06 -0700 (PDT)

>   > Yes.  Most commands use the argument as a repeat count, so having it
>   > default to one makes perfect sense.
> 
> Ahh! You mean, like, C-u 80
> 
> conveniently draws a line across the screen. Yes, that makes it
> understandable indeed. Sounds like the prefix argument was more or
                                    ^
                                 numeric
> less conceived as a repeat count.

Yes.  It's a feature.  There are several forms a raw prefix argument
can take, and one `prefix-numeric-value' of it, whatever the form.
The latter is called the numeric prefix argument.

A command can test the numeric value (an integer) and do different
things, depending on the value.

A command can also test the raw prefix argument: test for its
presence (non-nil) and even test for its specific non-nil form.

See the Emacs manual, node `Arguments'
http://www.gnu.org/software/emacs/manual/html_node/emacs/Arguments.html

And see the Elisp manual, nodes:

* `Prefix Command Arguments'
http://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html

* `Interactive Codes' (`p' and `P')
http://www.gnu.org/software/emacs/manual/html_node/elisp/Interactive-Codes.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]