summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3file.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx146
1 files changed, 46 insertions, 100 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 8f6235bca9c..c81711dcf85 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/07/15}
+% \date{Released 2017/07/19}
%
% \maketitle
%
@@ -532,7 +532,7 @@
%
% \subsection{Wrapping lines in output}
%
-% \begin{function}[added = 2012-06-28, updated = 2015-08-05]{\iow_wrap:nnnN}
+% \begin{function}[added = 2012-06-28, updated = 2017-07-17]{\iow_wrap:nnnN}
% \begin{syntax}
% \cs{iow_wrap:nnnN} \Arg{text} \Arg{run-on text} \Arg{set up} \meta{function}
% \end{syntax}
@@ -1205,10 +1205,10 @@
{ 1 }
{
\cs_if_exist:NTF \normalend
- { \tex_count:D 38 \scan_stop: }
+ { \tex_count:D 38 ~ }
{
- \tex_count:D 16 \scan_stop:
- \cs_if_exist:NT \loccount { - 1 }
+ \tex_count:D 16 ~ %
+ \cs_if_exist:NT \loccount { - 1 }
}
}
{
@@ -1548,10 +1548,10 @@
{ 1 }
{
\cs_if_exist:NTF \normalend
- { \tex_count:D 39 \scan_stop: }
+ { \tex_count:D 39 ~ }
{
- \tex_count:D 17 \scan_stop:
- \cs_if_exist:NT \loccount { - 1 }
+ \tex_count:D 17 ~
+ \cs_if_exist:NT \loccount { - 1 }
}
}
{
@@ -1918,7 +1918,6 @@
% \end{macro}
%
% \begin{macro}{\iow_wrap:nnnN}
-% \begin{macro}[aux]{\@@_wrap_set:Nx}
% The main wrapping function works as follows. First give |\\|,
% \verb*|\ | and other formatting commands the correct definition for
% messages and perform the given setup~|#3|. The definition of
@@ -1942,16 +1941,14 @@
#3
% \end{macrocode}
% Then fully-expand the input: in package mode, the expansion uses
-% \LaTeXe{}'s \cs{protected} mechanism. As soon as the expansion is
-% done, reset \cs{iow_indent:n} to its error definition: it only works
-% in the first argument of \cs{iow_wrap:nnnN}.
+% \LaTeXe{}'s \tn{protect} mechanism in the same way as \tn{typeout}.
+% In generic mode this setting is useless but harmless. As soon as
+% the expansion is done, reset \cs{iow_indent:n} to its error
+% definition: it only works in the first argument of
+% \cs{iow_wrap:nnnN}.
% \begin{macrocode}
-%<*initex>
+%<package> \cs_set_eq:NN \protect \token_to_str:N
\tl_set:Nx \l_@@_wrap_tl {#1}
-%</initex>
-%<*package>
- \@@_wrap_set:Nx \l_@@_wrap_tl {#1}
-%</package>
\cs_set_eq:NN \iow_indent:n \@@_indent_error:n
% \end{macrocode}
% Afterwards, set the newline marker (two assignments to fully expand,
@@ -1975,15 +1972,6 @@
#4 { \tl_to_str:N \l_@@_wrap_tl }
}
% \end{macrocode}
-% As using the generic loader means that \cs{protected@edef} is
-% not available, it's not placed directly in the wrap function but is set
-% up as an auxiliary. In the generic loader this can then be redefined.
-% \begin{macrocode}
-%<*package>
-\cs_new_eq:NN \@@_wrap_set:Nx \protected@edef
-%</package>
-% \end{macrocode}
-% \end{macro}
% \end{macro}
%
% \begin{macro}[aux]{\@@_wrap_do:, \@@_wrap_start:w}
@@ -2365,56 +2353,56 @@
%
% \begin{variable}[deprecated = 2018-12-31]{\g_file_current_name_tl}
% For removal after 2018-12-31.
+% Contrarily to most other deprecated commands this is expandable
+% so we need to put code by hand in two token lists. We use
+% \cs{tex_def:D} directly because \cs{g_file_current_name_tl} is made
+% outer by \cs{debug_deprecation_on:}.
% \begin{macrocode}
\tl_new:N \g_file_current_name_tl
\tl_gset:Nn \g_file_current_name_tl { \g_file_curr_name_str }
+\__debug:TF
+ {
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
+ {
+ \__deprecation_error:Nnn \g_file_current_name_tl
+ { \g_file_curr_name_str } { 2018-12-31 }
+ }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ { \tex_def:D \g_file_current_name_tl { \g_file_curr_name_str } }
+ }
+ { }
% \end{macrocode}
% \end{variable}
%
% \begin{macro}[deprecated = 2018-12-31]{\file_path_include:n}
% \begin{macro}[deprecated = 2018-12-31]{\file_path_remove:n}
-% \begin{macro}[deprecated = 2018-12-31, aux]{\__file_path_include:n}
% Wrapper functions to manage the search path.
% \begin{macrocode}
+\__debug_deprecation:nnNNpn { 2018-12-31 }
+ { \seq_put_right:Nn \l_file_search_path_seq }
\cs_new_protected:Npn \file_path_include:n #1
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_path_include:n }
- {
- \token_to_str:N \seq_put_right:Nn \c_space_tl
- \token_to_str:N \l_file_search_path_seq
- }
\__file_name_sanitize:nN {#1} \l__file_full_name_str
\seq_if_in:NVF \l_file_search_path_seq \l__file_full_name_str
{ \seq_put_right:NV \l_file_search_path_seq \l__file_full_name_str }
}
+\__debug_deprecation:nnNNpn { 2018-12-31 }
+ { \seq_remove_all:Nn \l_file_search_path_seq }
\cs_new_protected:Npn \file_path_remove:n #1
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_path_remove:n }
- {
- \token_to_str:N \seq_remove_all:Nn \c_space_tl
- \token_to_str:N \l_file_search_path_seq
- }
\__file_name_sanitize:nN {#1} \l__file_full_name_str
\seq_remove_all:NV \l_file_search_path_seq \l__file_full_name_str
}
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[deprecated = 2018-12-31]{\file_add_path:nN}
% For removal after 2018-12-31.
% \begin{macrocode}
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \file_get_full_name:nN }
\cs_new_protected:Npn \file_add_path:nN #1#2
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_add_path:nN }
- { \token_to_str:N \file_get_full_name:nN }
\file_get_full_name:nN {#1} #2
\str_if_empty:NT #2
{ \tl_set:Nn #2 { \q_no_value } }
@@ -2425,30 +2413,16 @@
% \begin{macro}[added = 2012-06-24, updated = 2012-07-31, deprecated=2017-12-31]{\ior_get_str:NN}
% For removal after 2017-12-31.
% \begin{macrocode}
-\cs_new_protected:Npn \ior_get_str:NN
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2017-12-31 }
- { \token_to_str:N \ior_get_str:NN }
- { \token_to_str:N \ior_str_get:NN }
- \cs_gset_eq:NN \ior_get_str:NN \ior_str_get:NN
- \ior_str_get:NN
- }
+\__debug_deprecation:nnNNpn { 2017-12-31 } { \ior_str_get:NN }
+\cs_new_protected:Npn \ior_get_str:NN { \ior_str_get:NN }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[deprecated = 2018-12-31]{\file_list:}
% Renamed to \cs{file_log_list:}. For removal after 2018-12-31.
% \begin{macrocode}
-\cs_new_protected:Npn \file_list:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_list: }
- { \token_to_str:N \file_log_list: }
- \cs_gset_eq:NN \file_list: \file_log_list:
- \file_log_list:
- }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \file_log_list: }
+\cs_new_protected:Npn \file_list: { \file_log_list: }
% \end{macrocode}
% \end{macro}
%
@@ -2456,42 +2430,14 @@
% {\ior_list_streams:, \ior_log_streams:, \iow_list_streams:, \iow_log_streams:}
% These got a more consistent naming.
% \begin{macrocode}
-\cs_new_protected:Npn \ior_list_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \ior_list_streams: }
- { \token_to_str:N \ior_show_list: }
- \cs_gset_eq:NN \ior_list_streams: \ior_show_list:
- \ior_show_list:
- }
-\cs_new_protected:Npn \ior_log_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \ior_log_streams: }
- { \token_to_str:N \ior_log_list: }
- \cs_gset_eq:NN \ior_log_streams: \ior_log_list:
- \ior_log_list:
- }
-\cs_new_protected:Npn \iow_list_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \iow_list_streams: }
- { \token_to_str:N \iow_show_list: }
- \cs_gset_eq:NN \iow_list_streams: \iow_show_list:
- \iow_show_list:
- }
-\cs_new_protected:Npn \iow_log_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \iow_log_streams: }
- { \token_to_str:N \iow_log_list: }
- \cs_gset_eq:NN \iow_log_streams: \iow_log_list:
- \iow_log_list:
- }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \ior_show_list: }
+\cs_new_protected:Npn \ior_list_streams: { \ior_show_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \ior_log_list: }
+\cs_new_protected:Npn \ior_log_streams: { \ior_log_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \iow_show_list: }
+\cs_new_protected:Npn \iow_list_streams: { \iow_show_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \iow_log_list: }
+\cs_new_protected:Npn \iow_log_streams: { \iow_log_list: }
% \end{macrocode}
% \end{macro}
%