Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Dec 2008 09:33:56 +0100 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id mBO8XnJg018615 for ; Wed, 24 Dec 2008 09:33:53 +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 mBO8SH5V031908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Dec 2008 09:28:18 +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 mBNN1xbJ003268; Wed, 24 Dec 2008 09:28:08 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 184882 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 24 Dec 2008 09:28:07 +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 mBO8S7NB016440 for ; Wed, 24 Dec 2008 09:28:07 +0100 Received: from lon1-post-2.mail.demon.net (lon1-post-2.mail.demon.net [195.173.77.149]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id mBO8S0Wc031694 for ; Wed, 24 Dec 2008 09:28:03 +0100 Received: from morningstar2.demon.co.uk ([80.176.134.7] helo=[192.168.0.2]) by lon1-post-2.mail.demon.net with esmtp (Exim 4.69) id 1LFP5z-0007Cm-cE for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 24 Dec 2008 08:27:59 +0000 User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 References: <495160FA.8000004@morningstar2.co.uk> <9EECA5EE-12A7-4C01-8311-7658BD3E8E04@gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID: <4951F294.3050002@morningstar2.co.uk> Date: Wed, 24 Dec 2008 08:28:04 +0000 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: \tlist_if_eq:nn To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <9EECA5EE-12A7-4C01-8311-7658BD3E8E04@gmail.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -2.599 () BAYES_00 X-Scanned-By: MIMEDefang 2.64 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 24 Dec 2008 08:33:56.0904 (UTC) FILETIME=[5C936280:01C965A2] Status: R X-Status: X-Keywords: X-UID: 5546 Will Robertson wrote: > On 24/12/2008, at 8:36 AM, Joseph Wright wrote: > >> I was reading through part of l3tlp, and I came across: >> >> \def_long_test_function:npn{tlist_if_eq:nn}#1#2{ >> \tlp_set:Nx \l_testa_tlp {\exp_not:n{#1}} >> \tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}} >> \if_meaning:NN\l_testa_tlp \l_testb_tlp >> } >> >> Why is this \tlp_set:Nx plus \exp_not:n, rather than just \tlp_set:Nn? > > I think that's to guard against # tokens. Since arbitrary token lists > could be being used in this function, you can't assume (as tlp's usually > do) that there won't be any #'s. > > Took me a second to think about this, though, before I realised we're > dealing with unrestricted token lists. (Maybe this is a key difference > between a tlp and a tlist that I overlooked in my previous discussion > for them.) I'll add some text to the documentation for this function. > > \documentclass[12pt]{article} > \begin{document} > > \def\testa#1{% > \edef\x{\unexpanded{#1}}% > } > \def\testb#1{% > \def\x{#1}% > } > \testa{a#b} > \show\x > \testb{a#b} > \show\x > > \end{document} I'd (broadly) thought of that, but had got the impression that the restrictions which apply to tlp data also apply to tlists. Re-reading l3tlp, I see that I am mistaken. I think in the discussion of tlp/tlist/toks, the relationships tlist ~ toks (in terms of # behaviour) and tlist ~ tlp (in terms of \edef behaviour) could be pointed out explicitly. -- Joseph Wright