diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx index 07f1a366e5..30442838ea 100644 --- a/l3kernel/l3candidates.dtx +++ b/l3kernel/l3candidates.dtx @@ -503,6 +503,13 @@ % releases of \XeTeX{}. % \end{function} % +% \begin{function}[added = 2022-07-21, EXP, pTF]{\sys_if_format_context:}, +% \begin{syntax} +% \cs{sys_if_format_context:TF} \Arg{true code} \Arg{false code} +% \end{syntax} +% Conditionals which give the current \TeX{} format. +% \end{function} +% % \section{Additions to \pkg{l3tl}} % % \begin{function}[EXP, added = 2017-07-15] @@ -1391,6 +1398,13 @@ % \end{macrocode} % \end{variable} % +% \begin{macro}[pTF, EXP]{\sys_if_format_context:} +% \begin{macrocode} +\@@_const:nn { sys_if_format_context } + { \cs_if_exist_p:N \contextversion } +% \end{macrocode} +% \end{macro} +% % \subsection{Additions to \pkg{l3file}} % % \begin{macrocode} diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx index a55a32ed37..d2336dbd50 100644 --- a/l3kernel/l3file.dtx +++ b/l3kernel/l3file.dtx @@ -981,7 +981,7 @@ \int_step_inline:nnn { 0 } { - \cs_if_exist:NTF \normalend + \sys_if_format_context:TF { \tex_count:D 38 ~ } { \tex_count:D 16 ~ % @@ -1061,7 +1061,7 @@ % \begin{macrocode} \exp_args:NNf \cs_new_protected:Npn \@@_new:N { \exp_args:NNc \exp_after:wN \exp_stop_f: { newread } } -\cs_if_exist:NT \normalend +\sys_if_format_context:T { \cs_new_eq:NN \@@_new_aux:N \@@_new:N \cs_set_protected:Npn \@@_new:N #1 @@ -1441,7 +1441,7 @@ \int_step_inline:nnn { 0 } { - \cs_if_exist:NTF \normalend + \sys_if_format_context:TF { \tex_count:D 39 ~ } { \tex_count:D 17 ~ @@ -1505,7 +1505,7 @@ % \begin{macrocode} \exp_args:NNf \cs_new_protected:Npn \@@_new:N { \exp_args:NNc \exp_after:wN \exp_stop_f: { newwrite } } -\cs_if_exist:NT \normalend +\sys_if_format_context:T { \cs_new_eq:NN \@@_new_aux:N \@@_new:N \cs_set_protected:Npn \@@_new:N #1