From 556be84e15626e95b60d671dcedfad9856dc4a82 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 26 Jan 2011 23:19:48 +0000
Subject: texapi (26jan11)

git-svn-id: svn://tug.org/texlive/trunk@21182 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/generic/texapi/texapi.tex | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

(limited to 'Master/texmf-dist/tex/generic/texapi/texapi.tex')

diff --git a/Master/texmf-dist/tex/generic/texapi/texapi.tex b/Master/texmf-dist/tex/generic/texapi/texapi.tex
index 4cb16ddeec9..28f33717fb3 100644
--- a/Master/texmf-dist/tex/generic/texapi/texapi.tex
+++ b/Master/texmf-dist/tex/generic/texapi/texapi.tex
@@ -4,7 +4,7 @@
 % Author: Paul Isambert.
 % E-mail: zappathustra AT free DOT fr
 % Comments and suggestions are welcome.
-% Date: July 2010.
+% Date: January 2011.
 %
 \ifx\texapialreadyloaded\somethingtotallyundefined
 \else
@@ -16,7 +16,7 @@
   \expandafter\endinput
 \fi
 %
-\def\texapiversion{1.02}
+\def\texapiversion{1.03}
 \expandafter\edef\csname pi@restorecatcodes\endcsname{%
   \catcode`\noexpand\@=\the\catcode`@\relax
   \catcode`\noexpand\_=\the\catcode`_\relax
@@ -596,6 +596,9 @@
   \long\defcs{getargs@pi@newfor_userdefined:\commandtoname#1}#6###5\pi@newfor_preloop{%
     #9{\usecs{pi@newfor_userdefined:\commandtoname#1}#7}%
     }%
+  \long\defcs{removeargs@pi@newfor_userdefined:\commandtoname#1}#6###5{%
+    ##1%
+    }%
   \passexpandednobraces{\long\defcs{retrievefor@pi@newfor_userdefined:\commandtoname#1}##1##2}%
                        {\pi@temp#8\pi@terminator}%
                        {\passexpanded{##1}{#9{}##2}}%
@@ -610,7 +613,11 @@
     {\gobbleoneand{#1}}
     {#1}%
   }
-\long\def\pausefor#1#2\pi@newfor_markloop#3{#1}
+\long\def\pausefor#1#2\pi@newfor_markloop#3{%
+  \ifstring{#3}{pi@dofor_control}
+    {#1}
+    {\usecs{removeargs@#3}{#1}}%
+  }
 \long\def\resumefor#1{%
   \ifstring{#1}{\dofor}
     {\pi@dofor_control}
@@ -862,7 +869,7 @@
 \long\def\passtrimleft#1#2{%
   \expandafter\swaprightbraced\expandafter{\romannumeral-`\.\noexpand#1}{#2}%
   }
-\def\trimleft#1{%
+\long\def\trimleft#1{%
   \passtrimleft{#1}\unbrace
   }
 \bgroup
@@ -877,13 +884,13 @@
   #3{#1}%
   }
 \egroup
-\def\trimright#1{%
+\long\def\trimright#1{%
   \passtrimright{#1}\unbrace
   }
 \long\def\passtrim#1{%
   \passtrimleft{#1}\passtrimright
   }
-\def\trim#1{%
+\long\def\trim#1{%
   \passtrim{#1}\unbrace
   }
 \long\pdef\deftrimleft#1#2{%
@@ -897,4 +904,4 @@
   }
 
 \pi@restorecatcodes
-\endinput
\ No newline at end of file
+\endinput
-- 
cgit v1.2.3

