GNU bug report logs - #24369
Docu of prefix-numeric-value

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Mon, 5 Sep 2016 07:47:02 UTC

Severity: wishlist

Tags: notabug

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 24369 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: bug#24369: Docu of prefix-numeric-value
Date: Mon, 05 Sep 2016 20:57:31 +0300
> From: Andreas Röhler <andreas.roehler <at> 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.




This bug report was last modified 8 years and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.