summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-read.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lisp-on-tex/lisp-read.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lisp-on-tex/lisp-read.sty17
1 files changed, 5 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-read.sty b/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-read.sty
index 5a6f66cf00b..bcfb7fd4fa1 100644
--- a/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-read.sty
+++ b/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-read.sty
@@ -27,7 +27,7 @@
\def\@@next{\@lispread@symbol#1#2}% [Branch 2-2] Symbol
\fi
\else\if\noexpand#2'% [Branch 3] String
- \def\@@next{\@lispread@string#1}%
+ \def\@@next{\@lispread@string#1\@lispread@string@dummy}%
\else\if\noexpand#2/% [Branch 4] Boolean
\def\@@next{\@lispread@bool#1}%
\else\if\noexpand#2:% [Branch 5] Integer
@@ -46,8 +46,9 @@
\def\@lispread@symbol#1#2{%
\endgroup#1\@tlabel@symbol{#2}}
%% String
+\def\@lispread@string@dummy{} % to avoid consuming group
\def\@lispread@string#1#2'{%
- \endgroup#1\@tlabel@string{#2}}
+ \endgroup\expandafter#1\expandafter\@tlabel@string\expandafter{#2}}
%% Boolean
\def\@lispread@bool#1#2{%
\endgroup#1\@tlabel@bool{#2}}
@@ -106,24 +107,16 @@
\fi\@@next}
\def\@lispread@cell@cdr#1{%
\def\@lispread@cdr@reg##1##2{%
- \expandafter\@read@malloc\expandafter\@reg@tmp\@reg@lispread@car##1{##2}%
+ \expandafter\@lisp@perform@cons@local\expandafter\@reg@tmp\@reg@lispread@car##1{##2}%
\expandafter\endgroup\expandafter#1\@reg@tmp}%
\@lispread\@lispread@cdr@reg}
\def\@lispread@fin#1#2{%
\if\noexpand#2)%
\def\@@next{%
- \expandafter\expandafter\expandafter\@read@malloc
+ \expandafter\expandafter\expandafter\@lisp@perform@cons@local
\expandafter\expandafter\expandafter\@reg@tmp
\expandafter\@reg@lispread@car\@reg@lispread@cdr
\expandafter\endgroup\expandafter#1\@reg@tmp}%
\else
\def\@@next{\errmessage{LISP on teX [read]: missing )}}%
\fi\@@next}
-\def\@read@malloc#1#2#3#4#5{%
- \expandafter\gdef\csname car\the\@malloc\endcsname{#2{#3}}%
- \expandafter\gdef\csname cdr\the\@malloc\endcsname{#4{#5}}%
- \expandafter\@@read@malloc\expandafter#1\csname car\the\@malloc\endcsname\csname cdr\the\@malloc\endcsname}
-\def\@@read@malloc#1#2{\expandafter\@@@read@malloc\expandafter#1\expandafter#2}
-\def\@@@read@malloc#1#2#3{%
- \global\advance\@malloc1
- \def#1{\@tlabel@cons{#2#3}}} \ No newline at end of file