Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Tue, 11 Dec 2007 00:52:56 +0100 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id lBANqpP2019719 for ; Tue, 11 Dec 2007 00:52:51 +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 lBANmoXu030707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Dec 2007 00:48:51 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id lBAN1Ago027990; Tue, 11 Dec 2007 00:48:49 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.0) with spool id 220384 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 11 Dec 2007 00:48:49 +0100 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 lBANmmoi028945 for ; Tue, 11 Dec 2007 00:48:48 +0100 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id lBANkXem027392 for ; Tue, 11 Dec 2007 00:46:37 +0100 Received: by ug-out-1314.google.com with SMTP id 30so103557ugc.1 for ; Mon, 10 Dec 2007 15:48:36 -0800 (PST) Received: by 10.67.22.14 with SMTP id z14mr270470ugi.24.1197330081904; Mon, 10 Dec 2007 15:41:21 -0800 (PST) Received: from macintosh.local ( [89.150.77.105]) by mx.google.com with ESMTPS id h1sm2659973ugf.2007.12.10.15.41.19 (version=SSLv3 cipher=OTHER); Mon, 10 Dec 2007 15:41:20 -0800 (PST) Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 MIME-Version: 1.0 References: <87k5nxw76i.fsf@buckbeak.hogwarts> <87tzmwkdnr.fsf@buckbeak.hogwarts> <20071209212128.GA30932@irwin.vpn.uni-freiburg.de> <475D1892.70201@elvenkind.com> <85aboipl11.fsf@lola.goethe.zz> Content-Transfer-Encoding: 8bit User-Agent: Opera Mail/9.24 (MacPPC) Message-ID: Date: Tue, 11 Dec 2007 00:41:16 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: =?iso-8859-1?Q?Morten_H=F8gholm?= Subject: Re: [NTG-pdftex] \expanded To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <85aboipl11.fsf@lola.goethe.zz> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -102.599 () BAYES_00,USER_IN_WHITELIST X-Scanned-By: MIMEDefang 2.57 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 10 Dec 2007 23:52:56.0167 (UTC) FILETIME=[C92A3770:01C83B87] Status: R X-Status: X-Keywords: X-UID: 5116 On Mon, 10 Dec 2007 17:33:14 +0100, David Kastrup wrote: > Morten Høgholm writes: > >> I would assume the following should be equivalent except for the >> latter being expandable. >> >> \def\cmd#1{\edef\tempa{#1}\expandafter\cmd\expandafter{\tempa}} >> >> \def\cmd#1{\expandafter\cmd\expandafter{\expanded{#1}}} > > No. The former would complain about isolated # tokens in #1 (and > collapse double ones). Ah yes (and sorry for the silly example above - it's really remarkably bad). You comment reminded me of something I added to l3tlp.dtx under the entry: r594 | morten | 2007-06-10 23:32:58 +0200 (Sun, 10 Jun 2007) | 2 lines Tried to make functions treat hash marks as uniform as possible % A word of warning is appropriate here: Token list pointers are % implemented as macros and as such currently inherit some of the % peculiarities of how \TeX\ handles "#"s in the argument of % macros. In particular, the following actions are legal % \begin{verbatim} % \tlp_set:Nn \l_tmpa_tlp{##1} % \tlp_put_right:Nn \l_tmpa_tlp{##2} % \tlp_set:No \l_tmpb_tlp{\l_tmpa_tlp ##3} % \end{verbatim} % |x| type expansions where macros being expanded contain |#|s do not % work and will not work until there is an |\expanded| primitive in % the engine. If you want them to work you must double |#|s another % level. All the more reason for \expanded... 'night, -- Morten