LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

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

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

Print Reply
Will Robertson <[log in to unmask]>
Tue, 15 Nov 2005 10:51:30 +1030
text/plain (36 lines)
On 15/11/2005, at 4am, Joachim Schrod wrote:

>>>>>> "WR" == Will Robertson <[log in to unmask]> writes:
> WR> The token stream won't change retrospectively, so in theory it
> WR> should be able to be examined.
> But it does change. That's the whole point of macros, to change the
> token stream.

It sounds like my understanding of macro expansion is wrong, but I am  
still not seeing the argument properly, I'm afraid. Since we're  
looking *backward*, won't whatever being expanded (ignore for now  
\expandafter...) already BE expanded?

Then, with
   \def\b#1#2{\par #2 #1}

Am I wrong in thinking that by the time \previouslet is activated,  
\a12 will have expanded into  (char "f")  (other "1") (cseq "par")  
(other "2") (space " ") (other "1")  ?

So we get ... (other "1") (cseq "\previouslet") (cseq "\test")
and end up with the equivalent of \let\test=1 .

Ohhh, but I think I get it now. This is no more useful than actually  
looking at nodes, since anything that survives to be \previouslet  
will be turned into a node anyway.

(Ignoring whatever you might happen to be able to do with \noexpand /  
\expandafter ...)