From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.help Subject: Re: Rationale behind conversion of a nil prefix arg to numeric 1 Date: Tue, 6 Sep 2016 13:27:39 +0200 Message-ID: References: <87y437c0qg.fsf@bertrandrussell.Speedport_W_723V_1_40_000> <83oa43d9r8.fsf@gnu.org> <06d4a7f1-f116-fb5c-9bd2-c4d1f98934c9@easy-emacs.de> <83k2ercy5u.fsf@gnu.org> <83bn02cs54.fsf@gnu.org> <83ed1411-dbc1-2fe1-5fe9-4fdc7a4d1b21@online.de> <83shteb26t.fsf@gnu.org> <20160906071015.GB15537@tuxteam.de> <87inu98ipz.fsf@bertrandrussell.Speedport_W_723V_1_40_000> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1473160947 27872 195.159.176.226 (6 Sep 2016 11:22:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2016 11:22:27 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.2.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 06 13:22:24 2016 Return-path: Envelope-to: geh-help-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 1bhESK-0006QV-S1 for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Sep 2016 13:22:20 +0200 Original-Received: from localhost ([::1]:60762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhESI-0001nn-Ez for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Sep 2016 07:22:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhERQ-0001k2-Bv for help-gnu-emacs@gnu.org; Tue, 06 Sep 2016 07:21:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhERK-0005PC-BQ for help-gnu-emacs@gnu.org; Tue, 06 Sep 2016 07:21:23 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:60689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhERK-0005P5-0f for help-gnu-emacs@gnu.org; Tue, 06 Sep 2016 07:21:18 -0400 Original-Received: from [192.168.178.35] ([77.12.16.203]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0Mf6Az-1bSChB1dNp-00OZ9D for ; Tue, 06 Sep 2016 13:21:16 +0200 In-Reply-To: <87inu98ipz.fsf@bertrandrussell.Speedport_W_723V_1_40_000> X-Provags-ID: V03:K0:occYw4wWCYpUSv+iWeMYIt/qzXfIcMCClhuBElRIhWHlttFTH57 +J5AjEvyHlXM+5irZiz9qBE0RR4S/DynLI7KZAPpJXnckuMOkAx1pfUGZ85f5a9736VmQ9Y RUFSn+pWt9v0mv8VsMNvE/ov0zcKGfog8O2T8HfysHpJCTmsyrEsPB7vk7cM9R4Eb9vfGjy jD8XWmQbgY/Pe0phMeEYw== X-UI-Out-Filterresults: notjunk:1;V01:K0:te2OCP8Ili4=:/RnF9xMOI7i8TyG9X1/86s njvEOA7Jfmc7SIgKDWu5g+TeTnMo5Tq3gch0lb2Gl2rsqzjEszTrN19Uc+ZVKccIaKhBf3JTO Mtykfuh9Sk+wCwUTRhoLbFQCGhlDO2NfINVWM+JXYxbKjBl5vcs9AI7W8/+iqQ8PtGv5NDqeO 8SFAiLY6498J6kS/WjBFikhoXXd3841XvOXEmFKiuXQ/VM8dVs5ijskkMjSDk3qIRjb5v+FgF eHmLdjo6pgbPQ1VG8A2JLymCAdFwXugZtLRBH9FY4KX9piffrdXvqk9RUl6AwVYX2R6GM1yVG Kqp8WQ8zt5f5clUV01+E4ihtypIo6Zs9t3vTT8wl0d6ycaNeNjxlfTQJO+upRWMuam1qP12UG 52I1pH0TTrT/04LrIBP0fIoS2kYxZB1D1NiTiuP9P4m61mFXcBmVPt9PTfyqat5pezYiC55cZ l6OAcBzMNqd/Ewmh/EoC1e0yEObvZ/EZxWKYTdgeR0UFWkb7LwWw+K1WSuPhYTP8nmWelpgaP E0+D6bb0icknVuLB8d6rk1+e4Mbw9vbgA2nI8rdYXN3hj1DgOpbXrqpXqd5MPmc6AktYBa/TS HM2bStbly7kfi1hVm3J5a2iLkgZQzhyCg5FPr6PpOImu3vOdYz0qVY6a7lztOErNtDi/t0Bji OZUkR2jEMhi1o04HrmJO/nqKsJ45dZ9pA6i4PuQnMu6lpKSwnnu3xEBc4WBl7dA1hCIsx8kMW bJdfG7xKnIDFXUnE X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111283 Archived-At: On 06.09.2016 11:45, Florian v. Savigny wrote: > > Alternatively, for Andreas the axiom "the default value is always 0" > > holds ;-P > > I do sympathise with him, because my question started out supposing > exactly the same thing. It just seems intuitive that nil translates to > the number 0, if any, and when things are intuitive, this is (I think) > generally good. > > It all becomes immediately clear when you understand that the numeric > prefix arg has a special purpose, i.e. is conceived as a repeat > counter (and NOT simply a number), but only then. In other words, > `prefix-arg-as-repeat-counter' might be the kind of name that would be > more readily understandable (and would even arguably be more accurate) > than `prefix-numeric-value'. IIUC `prefix-numeric-value' is a more complex thing than providing a repeat counter - which it does for lower p. prefix-numeric-value of C-u is 4 in contrast. But let's go back to the simplest case of lower p in interactive spec: What is easier to read/grasp (setq counter (or arg 1) or (setq counter (prefix-numeric-value arg)) IOW: in favor of avoiding these complex, tricky things. Let's have the code as explicit as possible.