Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id o8IGSDMJ012051 for ; Sat, 18 Sep 2010 18:28:14 +0200 Received: (qmail 3351 invoked by alias); 18 Sep 2010 16:28:08 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 18 Sep 2010 16:28:08 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx053) with SMTP; 18 Sep 2010 18:28:08 +0200 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 o8IGPmYg017791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Sep 2010 18:25:48 +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 o8IDexEd020290; Sat, 18 Sep 2010 18:26:18 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 443220 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 18 Sep 2010 18:26:18 +0200 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 o8IGQIbs005618 for ; Sat, 18 Sep 2010 18:26:18 +0200 Received: from csep02.cliche.se (csep02.cliche.se [195.249.40.184]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id o8IGPb56017503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 18 Sep 2010 18:25:41 +0200 Received: from nova.local (unknown [213.21.117.168]) by csep02.cliche.se (Postfix) with ESMTP id B8B921865DB for ; Sat, 18 Sep 2010 18:26:05 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 References: <0BFA7483-6E3E-45D0-9094-3DEE5D880A1E@gmail.com> <1816801436.1740507.1284759290533.JavaMail.fmail@mwmweb010> <67153566-3F38-428D-B5CB-DCF66544891F@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id o8IGQIbs005619 Message-ID: <4C94E81E.8000204@residenset.net> Date: Sat, 18 Sep 2010 18:26:06 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: =?ISO-8859-1?Q?Lars_Hellstr=F6m?= Subject: Re: Consistently active characters To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <67153566-3F38-428D-B5CB-DCF66544891F@gmail.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p4U4jfdfC5HDevlx1X2sAZgAaLl3DbFfW0PXxL7WgvovMFXXSEPrACW/b9IW Qp+GhEViZlUW4mdBntgP1X8KwB5tjHCA/yxSZMu7BXBiPs3ujyaoi2xLHDqpg8dk65Dhpb3Lg0c1 iTjGg==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6412 Will Robertson skrev 2010-09-18 08.55: > On 18/09/2010, at 9:03 AM, Heiko Oberdiek wrote: > >> \providecommand*{\MakeActiveDef}[1]{% >> \catcode`#1\active >> \begingroup >> \lccode`\~`#1% >> \lowercase{\endgroup \def ~}% >> } > > > Ah, this is nice. Better than what I was thinking of as you no longer need a stray active character floating around. > > I've added these tentatively to expl3 in the "candidates" module under the names \char_active_set:Npn, \char_active_set_eq:NN, and so on. Note that in order to \lowercase something to an arbitrary character code, the something you start from must be ^^@; \lowercase doesn't change tokens whose \lccode is 0. This is of course not a problem, since you can always set the \catcode of ^^@ locally while defining the macro where an active ^^@ is needed: \begingroup \catcode0=13\relax \@firstofone{\endgroup \providecommand*{\MakeActiveDef}[1]{% \catcode#1=13% \begingroup \lccode0=#1% \lowercase{\endgroup \def ^^@}% } } Another change used above is to make the command argument the _character code_ of the active to define, rather than a token with that character. It is easy to use ` to make that number if needed, but in several cases you rather start out from the character code. Lars Hellström