[latex3-commits] [git/LaTeX3-latex3-latex3] master: Simplify an internal macro (55a0b1440)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Oct 5 09:46:36 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/55a0b1440ca533d2b2b5e0ff43d7c69cc6bc0971
>---------------------------------------------------------------
commit 55a0b1440ca533d2b2b5e0ff43d7c69cc6bc0971
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Oct 5 08:46:36 2020 +0100
Simplify an internal macro
At least in logic terms: performance here
will be slower but flow is much clearer.
>---------------------------------------------------------------
55a0b1440ca533d2b2b5e0ff43d7c69cc6bc0971
l3kernel/l3text.dtx | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index 4de92d0e8..3672f4617 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -953,16 +953,11 @@
% \begin{macrocode}
\cs_new:Npn \@@_expand_encoding:N #1
{
- \cs_if_eq:NNTF #1 \@current at cmd
+ \bool_lazy_or:nnTF
+ { \cs_if_eq_p:NN #1 \@current at cmd }
+ { \cs_if_eq_p:NN #1 \@changed at cmd }
{ \exp_after:wN \@@_expand_loop:w \@@_expand_encoding_escape:NN }
- {
- \cs_if_eq:NNTF #1 \@changed at cmd
- {
- \exp_after:wN \@@_expand_loop:w
- \@@_expand_encoding_escape:NN
- }
- { \@@_expand_replace:N #1 }
- }
+ { \@@_expand_replace:N #1 }
}
\cs_new:Npn \@@_expand_encoding_escape:NN #1#2 { \exp_not:n {#1} }
% \end{macrocode}
More information about the latex3-commits
mailing list.