unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: 24369@debbugs.gnu.org
Subject: bug#24369: Docu of prefix-numeric-value
Date: Mon, 05 Sep 2016 20:57:31 +0300	[thread overview]
Message-ID: <83wpiqb56c.fsf@gnu.org> (raw)
In-Reply-To: <9cd42ba9-014d-91be-24a4-0077c4e85ac4@easy-emacs.de> (message from Andreas Röhler on Mon, 5 Sep 2016 19:44:28 +0200)

> From: Andreas Röhler <andreas.roehler@easy-emacs.de>
> Date: Mon, 5 Sep 2016 19:44:28 +0200
> 
> >> Please add some explanation WRT treatment of the nil-argument.
> >> Also WRT C-u
> > What "treatment" are you asking to be explained?
> > Just what do you think is missing?
> 
> Elisp Info 20.2.2 Code Characters for ‘interactive’
> ----------------------------------------
> 
> p’
>       The numeric prefix argument
> 
> User will expect the argument received by function being consistent with 
> input, i.e. M-x 2 foo... sends 2, M-x 1 foo ... sends 1. From there 
> omitting an argument will be expected to send nothing - which isn't the 
> case.

There's more in the manual than just that one paragraph.

ELisp manual 20.12 Prefix Command Arguments:
-------------------------------------------

   There are two representations of the prefix argument: “raw” and
“numeric”.  The editor command loop uses the raw representation
internally, and so do the Lisp variables that store the information, but
commands can request either representation.

   Here are the possible values of a raw prefix argument:

   • ‘nil’, meaning there is no prefix argument.  Its numeric value is
     1, but numerous commands make a distinction between ‘nil’ and the
     integer 1.
   ...


 -- Function: prefix-numeric-value arg
     This function returns the numeric meaning of a valid raw prefix
     argument value, ARG.  The argument may be a symbol, a number, or a
     list.  If it is ‘nil’, the value 1 is returned; if it is ‘-’, the
     value −1 is returned; if it is a number, that number is returned;
     if it is a list, the CAR of that list (which should be a number) is
     returned.





  parent reply	other threads:[~2016-09-05 17:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05  7:52 bug#24369: Docu of prefix-numeric-value Andreas Röhler
2016-09-05 15:57 ` Drew Adams
2016-09-05 17:44   ` Andreas Röhler
2016-09-05 17:46     ` Drew Adams
2016-09-05 17:57     ` Eli Zaretskii [this message]
2016-09-05 18:33       ` Andreas Röhler
2016-09-05 18:57         ` Eli Zaretskii
2016-09-05 21:03           ` Drew Adams
2017-07-17  1:37             ` npostavs

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=83wpiqb56c.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24369@debbugs.gnu.org \
    --cc=andreas.roehler@easy-emacs.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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