Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Fri, 13 Feb 2009 00:38:36 +0100 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n1CNeD6u012644 for ; Fri, 13 Feb 2009 00:40:13 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n1CNWqcd008494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Feb 2009 00:32:53 +0100 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 n1CN5e2U006799; Fri, 13 Feb 2009 00:32:41 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 177607 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 13 Feb 2009 00:32:40 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n1CNWeJO009817 for ; Fri, 13 Feb 2009 00:32:40 +0100 Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.241]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n1CNWYSZ008340 for ; Fri, 13 Feb 2009 00:32:39 +0100 Received: by rv-out-0708.google.com with SMTP id k29so441497rvb.10 for ; Thu, 12 Feb 2009 15:32:34 -0800 (PST) Received: by 10.141.45.16 with SMTP id x16mr791812rvj.290.1234481554347; Thu, 12 Feb 2009 15:32:34 -0800 (PST) Received: from ?10.0.1.104? (114-30-101-184.ip.adam.com.au [114.30.101.184]) by mx.google.com with ESMTPS id f21sm1208693rvb.2.2009.02.12.15.32.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 12 Feb 2009 15:32:33 -0800 (PST) Content-Type: multipart/signed; boundary=Apple-Mail-2-623793501; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v930.3) References: <956A99D8-D534-4E72-B784-47F867038030@gmail.com> <6B8546AF-AA17-414A-93BF-35B38A59EEE2@gmail.com> <4993D9A9.3000704@morningstar2.co.uk> X-Mailer: Apple Mail (2.930.3) X-Spam-Whitelist: Message-ID: <6524E251-80CC-4A27-9896-3F97564B05C6@gmail.com> Date: Fri, 13 Feb 2009 10:02:27 +1030 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: token_if_expandable To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4993D9A9.3000704@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -4 () RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 12 Feb 2009 23:38:36.0732 (UTC) FILETIME=[068757C0:01C98D6B] Status: R X-Status: X-Keywords: X-UID: 5656 --Apple-Mail-2-623793501 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 12/02/2009, at 5:36 PM, Joseph Wright wrote: > A more complex example: > > \def\foo{\edef\bar{stuff}} > > is not fully expandable, but if you get the test working should give > \c_true. So I think this might not be a good idea. (I assume that > this > test is supposed to see if something is a macro. I do that in > siunitx, > but using \meaning and looking for "macro".) I think this function is supposed to mean "check if the token will (or has the capability to) expand into something else". So it's not exactly testing for being a macro or otherwise, more if it will "change" when used in an edef or similar. > Should~be~F:~\token_if_expandable:NTF \the {T} {F} \\ So here, while \the isn't a macro, it will expand when used correctly in an edef (e.g., \edef\foo{\the\baselineskip} ). I've explicitly caught undefined macros to return "F" because it just seemed more logical that way. Three questions, then: 1. Have I got the idea behind this function right? (Morten?) 2. Was it indeed originally broken, and does my code fix it? 3. Can we think of a less confusing name for it? Maybe \token_if_will_expand ? Unless it's only me that finds "\token_if_expandable" confusing. (4. What is it good for?) Cheers, Will --Apple-Mail-2-623793501 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGITCCAtow ggJDoAMCAQICECN4qE5kBXLk2f/jVDfSZPwwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA5MDEyOTA1NDkxNVoXDTEwMDEyOTA1NDkx NVowQjEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEfMB0GCSqGSIb3DQEJARYQd3Nw cjgxQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0BeSiAbKuqxeRN p2qn/m8ZL+xawr/WXyPgEF0FipWgRe9l3sMXcFHokcUu0xOc97R7xkUsGcQ8EyybGHuWey6x7X1Y xJZXnoAxqcaG+eREytoYGMIKs6BhEEogLVb2ERw3lQNVnOzanSFeGo8suMAN4zzCtqAjJiA1ph7h 1pksTgECYK5EiIZbFsB6zSDa8crNk404z1CfIA6YO8ezvjbDda+D0r8NU2tq9WS9F5IaG+bW71Ya JegEcSZ+WF6Z+fs2MUMCLLu8n50Er0nuy4dxOmkdMRNfbeaM39dsEwjAAgcQnvPNmlJ215nZWQRH 49YowtSBOYUYq0ZylWRE6x8CAwEAAaMtMCswGwYDVR0RBBQwEoEQd3NwcjgxQGdtYWlsLmNvbTAM BgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBQUAA4GBABaRP8+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