Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Tue, 11 Aug 2009 13:53:41 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n7BBrd2u011334 for ; Tue, 11 Aug 2009 13:53:39 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n7BBnivu030849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Aug 2009 13:49:45 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n7B7w65M010332; Tue, 11 Aug 2009 13:49:43 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 289962 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 11 Aug 2009 13:49:43 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n7BBnhs1022253 for ; Tue, 11 Aug 2009 13:49:43 +0200 Received: from ueamailgate02.uea.ac.uk (ueamailgate02.uea.ac.uk [139.222.131.185]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n7BBnTwa030051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 11 Aug 2009 13:49:32 +0200 Received: from ueams01.uea.ac.uk (ueams01.uea.ac.uk [139.222.131.78]) by ueamailgate02.uea.ac.uk (8.13.1/8.13.1) with ESMTP id n7BBnSXk012821 for ; Tue, 11 Aug 2009 12:49:28 +0100 Received: from [139.222.202.22] by ueams01.uea.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1Mapr5-0003oE-D7 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 11 Aug 2009 12:49:27 +0100 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 References: <4A7921CF.5020803@morningstar2.co.uk> <4A7A1505.4040604@residenset.net> <4A7AD930.2090106@residenset.net> <8516B615-51AA-4D90-BB7D-A9E122AA0335@gmail.com> <4A804317.6050909@morningstar2.co.uk> <4A80508F.3030904@elzevir.fr> <0C83E480-14E3-4CD8-924E-3B9EA602E004@gmail.com> <4A810D6E.5050207@morningstar2.co.uk> <4A815596.6090308@elzevir.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Canit-CHI2: 0.00 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN, outgoing) X-CanItPRO-Stream: UEA:outgoing (inherits from UEA:default,base:default) X-Canit-Stats-ID: 27968967 - 0cd5482a0981 X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 X-Scanned-By: CanIt (www . roaringpenguin . com) on 139.222.131.185 Message-ID: <4A815ACD.1040706@morningstar2.co.uk> Date: Tue, 11 Aug 2009 12:49:33 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: xparse To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4A815596.6090308@elzevir.fr> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 11 Aug 2009 11:53:41.0967 (UTC) FILETIME=[5F3D5DF0:01CA1A7A] Status: R X-Status: X-Keywords: X-UID: 5881 Manuel Pégourié-Gonnard wrote: > Maybe I confused pre/post in my previous message. I always meant post-grabbing > and pre-actual-function-call processing :-) I guessed that was the case: just wanted to be 100 % clear. >> (2) + for \long, upper-case for defaults on optional arguments: >> >> \DeclareDocumentCommand \foo { o >\MakeHarmless +m } >> \DeclareDocumentCommand \foo { O{default} >\MakeHarmless +m } >> \DeclareDocumentCommand \foo { +o >\MakeHarmless +m } >> \DeclareDocumentCommand \foo { +O{default} >\MakeHarmless +m } [snip] > I'm in favour of option 2. It looks more "extensible", if extensions are ever > needed in the future. I think this is the consensus view: I'm going to look at doing this (really pretty close to what xparse has anyway). > OTOH, as you mentioned in another message, it would be very interesting to > detect trivial cases like only 'm' arguments and use the trivial (hence purely > expandable) parser in this case with DeclareDocumentCommand. I'm viewing "only m" as a rather special case, as there is clearly no need for extra processing. The only place this shows up, I think, is as you point out when TeX is looking for an \omit. -- Joseph Wright