[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: |
Eli Zaretskii |
Subject: |
Re: Rationale behind conversion of a nil prefix arg to numeric 1 |
Date: |
Sun, 04 Sep 2016 21:33:49 +0300 |
> From: Andreas Röhler <andreas.roehler@easy-emacs.de>
> Date: Sun, 4 Sep 2016 19:11:31 +0200
>
> >> I am still wondering about the
> >> rationale of representing nil as the number one. Does this make sense,
> >> or is it useful, in some way?
> > Yes. Most commands use the argument as a repeat count, so having it
> > default to one makes perfect sense.
> >
>
> There a difference between "p" sending 1 and nil - which is the result
> from non-interactive use.
"p" is documented as the _numeric_ value of the argument. So it
obviously cannot yield nil.
> If a function needs a repeat count, it should provide some.
That'd mean changes in 90% of commands. Quite silly, I'd say.
In any case, the OP asked what was the rationale, and I tried to
answer that. Whether or not Emacs should have been designed
differently is another argument for another rainy day.
- Rationale behind conversion of a nil prefix arg to numeric 1, Florian v. Savigny, 2016/09/04
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Eli Zaretskii, 2016/09/04
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Andreas Röhler, 2016/09/04
- Re: Rationale behind conversion of a nil prefix arg to numeric 1,
Eli Zaretskii <=
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Andreas Röhler, 2016/09/05
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Eli Zaretskii, 2016/09/05
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Kaushal Modi, 2016/09/05
- RE: Rationale behind conversion of a nil prefix arg to numeric 1, Drew Adams, 2016/09/05
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Andreas Röhler, 2016/09/05
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Eli Zaretskii, 2016/09/05
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, tomas, 2016/09/06
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Florian v. Savigny, 2016/09/06
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, tomas, 2016/09/06
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Andreas Röhler, 2016/09/06