summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-07 23:33:27 +0000
committerKarl Berry <karl@freefriends.org>2011-09-07 23:33:27 +0000
commitf1cddb2ae051713a3d0b9efa1251d8f85d8131fc (patch)
tree47b6a38de15329b2ffd3a196e7d85e7ad1e93032 /Master/texmf-dist/source/latex/l3kernel/l3io.dtx
parentea06cd2704b8ed1c5278b20798ab9e3811e0ca4e (diff)
l3kernel 2729 (5sep11)
git-svn-id: svn://tug.org/texlive/trunk@23865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3io.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3io.dtx35
1 files changed, 28 insertions, 7 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
index f89c10d2562..880b32b5080 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3io.dtx 2665 2011-08-25 22:15:27Z joseph $
+\GetIdInfo$Id: l3io.dtx 2724 2011-09-05 18:51:51Z bruno $
{L3 Experimental input-output operations}
%</driver|package>
%<*driver>
@@ -271,6 +271,11 @@
% and MiK\TeX{} systems.
% \end{variable}
%
+% \begin{variable}{\c_catcode_other_space_tl}
+% Token list containing one character with category code $12$,
+% (\enquote{other}), and character code $32$ (space).
+% \end{variable}
+%
% \section{Reading from files}
%
% \begin{function}{\ior_to:NN}
@@ -734,9 +739,7 @@
\cs_new:Npn \ior_show_aux:nn #1#2
{
\iow_newline: > \c_space_tl \c_space_tl
- #1 \iow_char:N
- \c_space_tl \c_space_tl => \c_space_tl \c_space_tl
- \exp_not:n {#2}
+ #1 \c_space_tl \c_space_tl => \c_space_tl \c_space_tl \exp_not:n {#2}
}
\cs_new_protected_nopar:Npn \iow_list_streams:
{
@@ -910,6 +913,19 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\c_catcode_other_space_tl}
+% Lowercase a character with category code $12$ to produce an
+% \enquote{other} space. We can do everything within the group,
+% because \cs{tl_const:Nn} defines its argument globally.
+% \begin{macrocode}
+\group_begin:
+ \char_set_catcode_other:N \*
+ \char_set_lccode:nn {`\*} {`\ }
+ \tl_to_lowercase:n { \tl_const:Nn \c_catcode_other_space_tl { * } }
+\group_end:
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\iow_wrap:xnnnN}
% \begin{macro}[aux]{\iow_wrap_loop:w}
% \begin{macro}[aux]{\iow_wrap_word:}
@@ -924,7 +940,11 @@
% will do the actual wrapping. After the loop, the resulting text is
% passed on to the function which has been given as a post-processor.
% The argument |#4| is available for additional set up steps for
-% the output.
+% the output. The definition of |\\| and \verb*|\ | use an
+% \enquote{other} space rather than a normal space, because the latter
+% might be absorbed by \TeX{} to end a number or other \texttt{f}-type
+% expansions. The \cs{tl_to_str:N} step converts the \enquote{other}
+% space back to a normal space.
% \begin{macrocode}
\cs_new_protected:Npn \iow_wrap:xnnnN #1#2#3#4#5
{
@@ -934,8 +954,9 @@
\tl_clear:N \l_iow_current_line_tl
\tl_clear:N \l_iow_wrap_tl
\bool_set_true:N \l_iow_line_start_bool
- \cs_set:Npx \\ { \c_space_tl \iow_newline: \c_space_tl }
- \cs_set_eq:NN \ \c_space_tl
+ \cs_set:Npx \\
+ { \c_catcode_other_space_tl \iow_newline: \c_catcode_other_space_tl }
+ \cs_set_eq:NN \ \c_catcode_other_space_tl
#4
%<*initex>
\tl_set:Nx \l_iow_wrap_tl {#1}