[latex3-commits] [git/LaTeX3-latex3-latex2e] ltpara: updates after review (79941275)
Frank Mittelbach
frank.mittelbach at latex-project.org
Thu Feb 18 11:56:19 CET 2021
Repository : https://github.com/latex3/latex2e
On branch : ltpara
Link : https://github.com/latex3/latex2e/commit/79941275d7014e5aa393f56cbad4c0ebe06a5249
>---------------------------------------------------------------
commit 79941275d7014e5aa393f56cbad4c0ebe06a5249
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Thu Feb 18 11:56:19 2021 +0100
updates after review
>---------------------------------------------------------------
79941275d7014e5aa393f56cbad4c0ebe06a5249
base/ltpara.dtx | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/base/ltpara.dtx b/base/ltpara.dtx
index f4c76b49..3d12f34a 100644
--- a/base/ltpara.dtx
+++ b/base/ltpara.dtx
@@ -14,8 +14,8 @@
%%% From File: lthooks.dtx
%
% \begin{macrocode}
-\def\ltparaversion{v1.0c}
-\def\ltparadate{2021/02/16}
+\def\ltparaversion{v1.0d}
+\def\ltparadate{2021/02/18}
% \end{macrocode}
%<*driver>
\documentclass{l3doc}
@@ -874,10 +874,14 @@
% { \bool_not_p:n { \mode_if_inner_p: } }
% { ...
% \end{macrocode}
-% This is inner loop so we code the above test with low-level \cs{if_mode...}s.
+% Since this is executed for each and every paragraph in a document
+% we try to stay a fast as possible, So we are aren't using the
+% above construct but two conditionals instead. Using low-level
+% \cs{if_mode...} conditions would be even faster but has the
+% danger to conflict with conditionals in the user hooks.
% \begin{macrocode}
- \if_mode_horizontal:
- \if_mode_inner: \else:
+ \mode_if_horizontal:TF {
+ \mode_if_inner:F {
% \end{macrocode}
% In that case the action of the primitive would be to remove the
% last glue (not kern) from the horizontal list constructed to form
@@ -908,7 +912,7 @@
% \begin{macrocode}
\hook_use:n{para/end}
\@kernel at after@para at end
- \if_mode_horizontal:
+ \mode_if_horizontal:TF {
% \end{macrocode}
% The final action (before getting to the point where
% \cs{tex_par:D} is called) is to add a kern item so that the
@@ -947,18 +951,17 @@
\tex_par:D
\hook_use:n{para/after}
\@kernel at after@para at after
+ }
% \end{macrocode}
% If we haven't been in horizontal mode then the earlier hook
% \hook{para/end} is at fault and we report that.
% \begin{macrocode}
- \else: \__kernel_msg_error:nnnn {para}{mode}{end}{horizontal}
- \fi:
+ { \__kernel_msg_error:nnnn {para}{mode}{end}{horizontal} }
% \end{macrocode}
-% As mentioned above we used low-level ifs for speed not
-% \cs{bool_lazy_and:nnT} so we have to close them here:
+% Finally close out the nested conditionals.
% \begin{macrocode}
-% ... }
- \fi: \fi:
+ }
+ }
% \end{macrocode}
%
% \begin{macrocode}
More information about the latex3-commits
mailing list.