LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Fri, 3 Feb 2012 15:39:18 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
On 03/02/2012 15:12, dongen wrote:
> I'm having some problem with expansion. The following is a
> contrived example of what's going wrong. I must be missing
> something obvious.
> 
>     \expandafter
>     \xdef\csname #1\endcsname ##1{%
>         \regex_match:nnTF{o}{o}{{0}{0}}{{1}{1}}
>     }
> 
> This defines some macro with the following definition:
> 
>     macro:#1->\regex_match:nnTF {o}{o}{{0}{0}}{{1}{1}}
> 
> I'd have thought the body of an xdef would be fully expanded
> (unless you put an explicit \noexpand in front of an expression).
> 
> Why doesn't the \regex_match expand? If there's any documentation
> I should read in order to understand this, please let me know where
> to find it.

All LaTeX3 functions are either fully expandable or engine-protected. In
this case, we are talking about protected functions: these are not
expandable. (In the documentation, expandable functions are marked with
a star.)
-- 
Joseph Wright

ATOM RSS1 RSS2