From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24369: Docu of prefix-numeric-value Date: Mon, 05 Sep 2016 20:57:31 +0300 Message-ID: <83wpiqb56c.fsf@gnu.org> References: <2a6635c0-e538-ad1b-4308-a3311a36f59a@easy-emacs.de> <93121a7b-21c7-4174-a295-052f18fde722@default> <9cd42ba9-014d-91be-24a4-0077c4e85ac4@easy-emacs.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1473098365 19227 195.159.176.226 (5 Sep 2016 17:59:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Sep 2016 17:59:25 +0000 (UTC) Cc: 24369@debbugs.gnu.org To: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 05 19:59:21 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgyAx-0004PJ-KF for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Sep 2016 19:59:19 +0200 Original-Received: from localhost ([::1]:56059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgyAv-000841-BG for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Sep 2016 13:59:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgy9n-0007Ld-GR for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2016 13:58:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgy9i-0005Lp-ID for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2016 13:58:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgy9i-0005Li-En for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2016 13:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bgy9i-0000LJ-7a for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2016 13:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Sep 2016 17:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24369 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24369-submit@debbugs.gnu.org id=B24369.14730982691299 (code B ref 24369); Mon, 05 Sep 2016 17:58:02 +0000 Original-Received: (at 24369) by debbugs.gnu.org; 5 Sep 2016 17:57:49 +0000 Original-Received: from localhost ([127.0.0.1]:50596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgy9U-0000Kt-QR for submit@debbugs.gnu.org; Mon, 05 Sep 2016 13:57:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgy9S-0000Kh-Us for 24369@debbugs.gnu.org; Mon, 05 Sep 2016 13:57:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgy9I-0005FD-Vx for 24369@debbugs.gnu.org; Mon, 05 Sep 2016 13:57:41 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgy9I-0005F9-Sh; Mon, 05 Sep 2016 13:57:36 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3447 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bgy9F-0004cy-Vp; Mon, 05 Sep 2016 13:57:36 -0400 In-reply-to: <9cd42ba9-014d-91be-24a4-0077c4e85ac4@easy-emacs.de> (message from Andreas =?UTF-8?Q?R=C3=B6hler?= on Mon, 5 Sep 2016 19:44:28 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122968 Archived-At: > From: Andreas Röhler > 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.