Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Feb 2009 07:39:57 +0100 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n1C6fV1o016855 for ; Thu, 12 Feb 2009 07:41:32 +0100 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 n1C6UWov005137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Feb 2009 07:30:32 +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 n1BN28e3011009; Thu, 12 Feb 2009 07:30:22 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 167804 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 12 Feb 2009 07:30:21 +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 n1C6ULhL019067 for ; Thu, 12 Feb 2009 07:30:21 +0100 Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.246]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n1C6UGTn010271 for ; Thu, 12 Feb 2009 07:30:20 +0100 Received: by rv-out-0708.google.com with SMTP id k29so182357rvb.10 for ; Wed, 11 Feb 2009 22:30:16 -0800 (PST) Received: by 10.141.13.13 with SMTP id q13mr347344rvi.163.1234420215945; Wed, 11 Feb 2009 22:30:15 -0800 (PST) Received: from ?129.127.15.244? ([129.127.15.244]) by mx.google.com with ESMTPS id l31sm1820629rvb.5.2009.02.11.22.30.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 11 Feb 2009 22:30:15 -0800 (PST) Content-Type: multipart/signed; boundary=Apple-Mail-1-562457038; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v930.3) X-Mailer: Apple Mail (2.930.3) X-Spam-Whitelist: Message-ID: <956A99D8-D534-4E72-B784-47F867038030@gmail.com> Date: Thu, 12 Feb 2009 17:00:10 +1030 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: token_if_expandable To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE 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 06:39:57.0142 (UTC) FILETIME=[B86A0760:01C98CDC] Status: R X-Status: X-Keywords: X-UID: 5652 --Apple-Mail-1-562457038 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hello again, Having some more troubles, this time with \token_if_expandable. Here's the code: % \begin{macro}{\token_if_expandable_p:N} % \begin{macro}[TF]{\token_if_expandable:N} % Check if token is expandable. We use the fact that \TeX\ will % temporarily convert "\exp_not:N" \m{token} into "\scan_stop:" if % \m{token} is expandable. % \begin{macrocode} \def_new:Npn \token_if_expandable_p:N #1{ \exp_after:NN \if_token_eq:NN \exp_not:N #1 \scan_stop: \c_true \else: \c_false \fi: } \def_test_function_new:npn {token_if_expandable:N} #1{ \if:w\token_if_expandable_p:N#1} % \end{macrocode} % \end{macro} % \end{macro} Unfortunately, the only token I can find that trips this "true" is \relax or \scan_stop:, which isn't exactly what I thought the intended behaviour was supposed to be. \token_if_expandable:NTF \relax {T}{F} Ideally, I'd like to be able to write \def\foo{bar} and know whether or not \foo is expandable; until reading about this test I didn't think such a thing was even possible. Any comments? Thanks, Will --Apple-Mail-1-562457038 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-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