summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/syst-new.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-new.tex')
-rw-r--r--Master/texmf-dist/tex/context/base/syst-new.tex29
1 files changed, 22 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-new.tex b/Master/texmf-dist/tex/context/base/syst-new.tex
index dca897ac0cc..5d98977ec9b 100644
--- a/Master/texmf-dist/tex/context/base/syst-new.tex
+++ b/Master/texmf-dist/tex/context/base/syst-new.tex
@@ -50,7 +50,7 @@
\dounspaced}
\def\unspaceargument#1\to#2%
- {\convertargument#1\to#2%
+ {\defconvertedargument#2{#1}%
\@EA\edef\@EA#2\@EA{\@EA\unspaced\@EA{#2}}}
\def\unspaceafter#1#2%
@@ -65,6 +65,21 @@
\def\unspaceafter#1#2%
{\edef\ascii{\dounspaced#2\end}\@EA#1\@EA{\ascii}}
+
+% sometimes handy:
+
+\def\doifhasspaceelse#1%
+ {\edef\!!stringa{#1}%
+ \expanded{\dodoifhasspaceelse#1\space}\empty\relax}
+
+\def\dodoifhasspaceelse#1 #2#3\relax % \space\empty\relax
+ {\ifx\!!stringa\space
+ \@EA\firstoftwoarguments
+ \else\ifx#2\empty
+ \@EAEAEA\secondoftwoarguments
+ \else
+ \@EAEAEA\firstoftwoarguments
+ \fi\fi}
% this will replace loadfile once and alike !!! todo
@@ -535,9 +550,9 @@
%D new stuff :
\def\partialexpanded#1%
- {\let\notexpanded\noexpand
+ {\let\@@notexpanded\noexpand
\long\xdef\@@expanded{\noexpand#1}%
- \let\notexpanded\empty
+ \let\@@notexpanded\empty
\@@expanded}
% for Simon ; watch how we make them fully expandable (i.e.
@@ -623,7 +638,7 @@
{\ifx\compressedlist\empty\else\compressedlist,\fi
{\the\!!counta}{\ifnum\!!countb>\!!counta\the\!!countb\fi}}}
-%D \def\test#1{{\tttf#1->\compresscommalistnrs[#1]\convertcommand\compressedlist\to\ascii\ascii}}
+%D \def\test#1{{\tttf#1->\compresscommalistnrs[#1]\defconvertedcommand\ascii\compressedlist\ascii}}
%D \startlines
%D \test{}
%D \test{1}
@@ -657,7 +672,7 @@
\fi
\fi}
-%D \def\test#1{{\tttf#1->\compresscommalist[#1]\convertcommand\compressedlist\to\ascii\ascii}}
+%D \def\test#1{{\tttf#1->\compresscommalist[#1]\defconvertedcommand\ascii\compressedlist\ascii}}
%D \startlines
%D \test{}
%D \test{1}
@@ -684,7 +699,7 @@
\def\reversecommacommand[#1]%
{\expanded{\reversecommalist[#1]}}
-%D \def\test#1{{\tttf#1->\reversecommalist[#1]\convertcommand\reversedlist\to\ascii\ascii}}
+%D \def\test#1{{\tttf#1->\reversecommalist[#1]\defconvertedcommand\ascii\reversedlist\ascii}}
%D \startlines
%D \test{}
%D \test{1}
@@ -708,7 +723,7 @@
\def\stripstring#1% #1 is \cs
{\bgroup
- \convertcommand#1\to\ascii
+ \defconvertedcommand\ascii{#1}%
\global\let\globalascii\empty
\donefalse
\expandafter\handletokens\ascii\with\dostripstring