[latex3-commits] [l3svn] r7377 - Remove \file_if_exist_input:nT and nTF
noreply at latex-project.org
noreply at latex-project.org
Sun Jul 16 16:40:14 CEST 2017
Author: bruno
Date: 2017-07-16 16:40:14 +0200 (Sun, 16 Jul 2017)
New Revision: 7377
Modified:
trunk/l3kernel/l3candidates.dtx
trunk/l3kernel/testfiles/m3expl001.luatex.tlg
trunk/l3kernel/testfiles/m3expl001.ptex.tlg
trunk/l3kernel/testfiles/m3expl001.tlg
trunk/l3kernel/testfiles/m3expl001.uptex.tlg
trunk/l3kernel/testfiles/m3expl001.xetex.tlg
trunk/l3kernel/testfiles/m3expl003.luatex.tlg
trunk/l3kernel/testfiles/m3expl003.ptex.tlg
trunk/l3kernel/testfiles/m3expl003.tlg
trunk/l3kernel/testfiles/m3expl003.uptex.tlg
trunk/l3kernel/testfiles/m3expl003.xetex.tlg
Log:
Remove \file_if_exist_input:nT and nTF
I kept the nF variant because it's not controversial where
to put the false branch.
Modified: trunk/l3kernel/l3candidates.dtx
===================================================================
--- trunk/l3kernel/l3candidates.dtx 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/l3candidates.dtx 2017-07-16 14:40:14 UTC (rev 7377)
@@ -273,16 +273,17 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}[TF, added = 2014-07-02]{\file_if_exist_input:n}
+% \begin{function}[added = 2014-07-02]{\file_if_exist_input:n, \file_if_exist_input:nF}
% \begin{syntax}
% \cs{file_if_exist_input:n} \Arg{file name}
-% \cs{file_if_exist_input:nTF} \Arg{file name} \Arg{true code} \Arg{false code}
+% \cs{file_if_exist_input:nF} \Arg{file name} \Arg{false code}
% \end{syntax}
% Searches for \meta{file name} using the current \TeX{} search
% path and the additional paths controlled by
-% \cs{file_path_include:n}. If found, inserts the \meta{true code} then
+% \cs{file_path_include:n}. If found then
% reads in the file as additional \LaTeX{} source as described for
-% \cs{file_input:n}. Note that \cs{file_if_exist_input:n} does not raise
+% \cs{file_input:n}, otherwise inserts the \meta{false code}.
+% Note that these functions do not raise
% an error if the file is not found, in contrast to \cs{file_input:n}.
% \end{function}
%
@@ -1711,9 +1712,10 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[TF]{\file_if_exist_input:n}
-% Input of a file with a test for existence cannot be done the usual
-% way as the tokens to insert are in an odd place.
+% \begin{macro}{\file_if_exist_input:n, \file_if_exist_input:nF}
+% Input of a file with a test for existence. We do not define the |T|
+% or |TF| variants because the most useful place to place the
+% \meta{true code} would be inconsistent with other conditionals.
% \begin{macrocode}
\cs_new_protected:Npn \file_if_exist_input:n #1
{
@@ -1721,15 +1723,6 @@
\str_if_empty:NF \l__file_full_name_str
{ \@@_input:V \l__file_full_name_str }
}
-\cs_new_protected:Npn \file_if_exist_input:nT #1#2
- {
- \file_get_full_name:nN {#1} \l__file_full_name_str
- \str_if_empty:NF \l__file_full_name_str
- {
- #2
- \@@_input:V \l__file_full_name_str
- }
- }
\cs_new_protected:Npn \file_if_exist_input:nF #1#2
{
\file_get_full_name:nN {#1} \l__file_full_name_str
@@ -1737,16 +1730,6 @@
{#2}
{ \@@_input:V \l__file_full_name_str }
}
-\cs_new_protected:Npn \file_if_exist_input:nTF #1#2#3
- {
- \file_get_full_name:nN {#1} \l__file_full_name_str
- \str_if_empty:NTF \l__file_full_name_str
- {#3}
- {
- #2
- \@@_input:V \l__file_full_name_str
- }
- }
% \end{macrocode}
% \end{macro}
%
Modified: trunk/l3kernel/testfiles/m3expl001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5410,9 +5410,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \__int_rand:ww on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5400,9 +5400,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \__int_rand:ww on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl001.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5400,9 +5400,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \__int_rand:ww on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5398,9 +5398,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \__int_rand:ww on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5388,9 +5388,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \msg_expandable_error:nnnnnn on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5410,9 +5410,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \__int_rand:ww on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5400,9 +5400,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \__int_rand:ww on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl003.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5400,9 +5400,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \__int_rand:ww on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5398,9 +5398,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \__int_rand:ww on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-07-16 03:49:23 UTC (rev 7376)
+++ trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-07-16 14:40:14 UTC (rev 7377)
@@ -5388,9 +5388,7 @@
Defining \__file_get_details:nnN on line ...
Defining message LaTeX/kernel/xetex-primitive-not-available on line ...
Defining \file_if_exist_input:n on line ...
-Defining \file_if_exist_input:nT on line ...
Defining \file_if_exist_input:nF on line ...
-Defining \file_if_exist_input:nTF on line ...
Defining \file_input_stop: on line ...
Defining \int_rand:nn on line ...
Defining \msg_expandable_error:nnnnnn on line ...
More information about the latex3-commits
mailing list