unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Florian v. Savigny" <florian@fsavigny.de>, help-gnu-emacs@gnu.org
Subject: RE: Rationale behind conversion of a nil prefix arg to numeric 1
Date: Sun, 4 Sep 2016 17:52:06 -0700 (PDT)	[thread overview]
Message-ID: <d9db9607-fbe9-492f-9c6d-a32ddd61f7a2@default> (raw)
In-Reply-To: <<87d1kjjmys.fsf@bertrandrussell.Speedport_W_723V_1_40_000>>

>   > 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



  parent reply	other threads:[~2016-09-05  0:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-04 12:23 Rationale behind conversion of a nil prefix arg to numeric 1 Florian v. Savigny
2016-09-04 14:23 ` Eli Zaretskii
2016-09-04 17:11   ` Andreas Röhler
2016-09-04 18:33     ` Eli Zaretskii
2016-09-05  7:16       ` Andreas Röhler
2016-09-05 14:56         ` Eli Zaretskii
2016-09-05 15:22           ` Kaushal Modi
2016-09-05 16:32             ` Drew Adams
2016-09-05 18:41             ` Andreas Röhler
2016-09-05 19:02               ` Eli Zaretskii
2016-09-06  7:10                 ` tomas
2016-09-06  9:45                   ` Florian v. Savigny
2016-09-06 10:27                     ` tomas
2016-09-06 11:27                     ` Andreas Röhler
2016-09-06 13:27                       ` Florian v. Savigny
2016-09-06 15:22                         ` Drew Adams
2016-09-06 14:20                       ` Kaushal Modi
2016-09-06 16:44                         ` Andreas Röhler
2016-09-06 16:41                           ` Kaushal Modi
2016-09-07 23:11                         ` Charles Millar
2016-09-08 13:10                           ` Kaushal Modi
2016-09-08 14:42                             ` Charles Millar
2016-09-08 15:40                           ` Drew Adams
2016-09-06  7:22                 ` Andreas Röhler
2016-09-05 17:04         ` Drew Adams
2016-09-05 21:39           ` Florian v. Savigny
     [not found]           ` <<877faqvxfp.fsf@bertrandrussell.Speedport_W_723V_1_40_000>
2016-09-05 23:32             ` Drew Adams
2016-09-06  3:45               ` B.V. Raghav
2016-09-04 22:53   ` Florian v. Savigny
     [not found]   ` <<87d1kjjmys.fsf@bertrandrussell.Speedport_W_723V_1_40_000>
2016-09-05  0:52     ` Drew Adams [this message]
2016-09-15 12:47 ` Thien-Thi Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d9db9607-fbe9-492f-9c6d-a32ddd61f7a2@default \
    --to=drew.adams@oracle.com \
    --cc=florian@fsavigny.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).