From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: more than one prefix argument Date: Wed, 27 Jul 2011 12:21:32 +0200 Message-ID: <4E2FE6AC.8070706@online.de> References: <4E2F1C8C.9010802@easy-emacs.de> <4E2F1F1C.2040100@gmail.com> <850340AFD6324E979275501249A9240C@us.oracle.com> <4E2FAF6D.2050905@online.de> <4E2FDC71.5070305@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1311762116 28576 80.91.229.12 (27 Jul 2011 10:21:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2011 10:21:56 +0000 (UTC) Cc: Daniel Colascione , Drew Adams , emacs-devel@gnu.org To: Tim Cross Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 27 12:21:51 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qm1FN-0001Z0-C7 for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2011 12:21:49 +0200 Original-Received: from localhost ([::1]:44771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm1FJ-0001OO-PO for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2011 06:21:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm1FF-0001O0-TE for emacs-devel@gnu.org; Wed, 27 Jul 2011 06:21:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm1FB-0003X4-Tc for emacs-devel@gnu.org; Wed, 27 Jul 2011 06:21:41 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.9]:52402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm1FB-0003VJ-Ee for emacs-devel@gnu.org; Wed, 27 Jul 2011 06:21:37 -0400 Original-Received: from [192.168.178.27] (brln-4dbc767f.pool.mediaWays.net [77.188.118.127]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0Lp6ay-1ROOKm2f8G-00eunH; Wed, 27 Jul 2011 12:21:33 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 In-Reply-To: X-Provags-ID: V02:K0:bofQfdGzRhmRWShziBG60PQ9E5Jrb7LhmTuRMI0ecpx EiAetIJJZrgCpUgJoD1KV9ZPnWTjfVEAeen7OYtWi4LMGbSrFD 5wF3RJV1Z5IToFEx4g1L/pS9JWxHL+8BQDczghV2IfLcPPZd4g PH9dOBD2ExehOwCzZH538MzILKrPZgYPnN5RJ2ZAAUenFSm9Gq Bo6JyEtbi0s1Zr2w0DAI6fit/t72caB04K/uZxjXB8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.17.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142374 Archived-At: Am 27.07.2011 11:48, schrieb Tim Cross: [ ... ] >> Don't suggest additional code but a better use of "P" - no parallel >> implementations. Having "P" as a branch-flag not affected by "p" >> > > Sorry, just not quite following your argument. > > If we were to get rid of one, it would have to be the numeric version > (i.e. p) rather than P as sometimes you need to be able to distinguish > between nil and 1. Could you give a case for that? IMHO we have to distinguish between nil and t at these occasions. Looks like wrongly reffered c-style limitation, which we gladly don't have business with. > Essentially, we would need the raw form. why? We need a number or a boolean. "p" should send a number, 1 as default. "P" a boolean, nil as default. This means > that whenever you need to process the prefix argument as a number you > will need to test and convert it to distinguish nil and extract the > value from the list - this would be additional code ini your function. > > I don't understand what you mean by having a handy code for branching. > Can you give an example of how this code would work and how a command > using this code would be called? > How do you switch an alternative now? Quite often that is done with an negative or positive numeric value. (abbrev-mode -1) (abbrev-mode 1) Bad style IMHO, C-like obfuscating the code. much better would be (abbrev-mode nil) (abbrev-mode t) Cheers, Andreas > tim >