summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-string.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lisp-on-tex/lisp-string.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lisp-on-tex/lisp-string.sty17
1 files changed, 7 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-string.sty b/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-string.sty
index 87345706583..9c0c011a2c3 100644
--- a/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-string.sty
+++ b/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-string.sty
@@ -1,6 +1,6 @@
%% CONCAT : string -> string -> string
%% (\concat str1 str2) => str1 ++ str2
-\addassoc\@globalenv\concat{\@tlabel@func{\def\@temp@str{}\@str@concat}}
+\@lisp@env@add@global\concat{\@tlabel@func{\@lisp@func@check@args{+}{\def\@temp@str{}\@str@concat}}}
\def\@str@concat#1#2#3{%
\let\@@next@str\relax
\ifx#2\@tlabel@string
@@ -20,20 +20,20 @@
%% INT2STRING : int -> string
%% (\intTOstring i) -> 'i'
-\addassoc\@globalenv\intTOstring{\@tlabel@func{\@conv@intTOstr}}
+\@lisp@env@add@global\intTOstring{\@tlabel@func{\@lisp@func@check@args{1}{\@conv@intTOstr}}}
\def\@conv@intTOstr#1\@tlabel@int#2{\gdef#1{\@tlabel@string{#2}}}
%% IMMEDIATEWRITE : () -> ()
%% It outputs the output buffer immediately.
%% It cause error if the buffer is incomplete.
-\addassoc\@globalenv\immediatewrite{\@tlabel@func{\@immediate@write}}
+\@lisp@env@add@global\immediatewrite{\@tlabel@func{\@lisp@func@check@args{0}{\@immediate@write}}}
\def\@immediate@write#1{%
\gdef#1{\@tlabel@nil{}}%
\@temp@write@buffer\gdef\@temp@write@buffer{}}
%% GROUP : string -> string
%% (\group str) -> '{str}'
-\addassoc\@globalenv\group{\@tlabel@func{\@text@group}}
+\@lisp@env@add@global\group{\@tlabel@func{\@lisp@func@check@args{1}{\@text@group}}}
\def\@text@group#1#2#3{%
\ifx#2\@tlabel@string
\gdef#1{\@tlabel@string{{#3}}}%
@@ -44,7 +44,7 @@
%% UNGROUP : string -> string
%% (\group '{str}') -> 'str'
-\addassoc\@globalenv\ungroup{\@tlabel@func{\@text@ungroup}}
+\@lisp@env@add@global\ungroup{\@tlabel@func{\@lisp@func@check@args{1}{\@text@ungroup}}}
\def\@text@ungroup#1#2#3{%
\ifx#2\@tlabel@string
\@@text@ungroup#1#3\@@end
@@ -62,7 +62,7 @@
%% FGETS : () -> string
%% (\fgets) -> read tokens from standard-in
-\addassoc\@globalenv\fgets{\@tlabel@func{\@text@fgets}}
+\@lisp@env@add@global\fgets{\@tlabel@func{\@lisp@func@check@args{0}{\@text@fgets}}}
\def\@text@fgets#1{%
\endlinechar=-1
\read-1to#1%
@@ -70,10 +70,7 @@
%% EXPAND : string -> string
%% (\expand '<token>') -> '<token+>' where <token+> is expanded tokens of <token>
-\addassoc\@globalenv\expand{\@tlabel@func{\@lot@text@expand}}
+\@lisp@env@add@global\expand{\@tlabel@func{\@lisp@func@check@args{1}{\@lot@text@expand}}}
\def\@lot@text@expand#1\@tlabel@string#2{%
\edef\@temp@i{#2}%
\xdef#1{\noexpand\@tlabel@string{\@temp@i}}}
-
-
-