[latex3-commits] [latex3/latex2e] gh1242: do not generate a csname unnecessarily (b94b70de0)

github at latex-project.org github at latex-project.org
Tue Nov 26 20:14:00 CET 2024


Repository : https://github.com/latex3/latex2e
On branch  : gh1242
Link       : https://github.com/latex3/latex2e/commit/b94b70de0e7c8c6a7226d8fc59eea8a922b0121a

>---------------------------------------------------------------

commit b94b70de0e7c8c6a7226d8fc59eea8a922b0121a
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Nov 26 20:14:00 2024 +0100

    do not generate a csname unnecessarily


>---------------------------------------------------------------

b94b70de0e7c8c6a7226d8fc59eea8a922b0121a
 base/ltoutenc.dtx | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/base/ltoutenc.dtx b/base/ltoutenc.dtx
index 639f214fa..335e9bce0 100644
--- a/base/ltoutenc.dtx
+++ b/base/ltoutenc.dtx
@@ -44,7 +44,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltoutenc.dtx}
-             [2024/11/06 v2.1b LaTeX Kernel (font encodings)]
+             [2024/11/26 v2.1c LaTeX Kernel (font encodings)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltoutenc.dtx}
@@ -1187,10 +1187,9 @@
 \def\UndeclareTextCommand#1#2{%
 %    \end{macrocode}
 %    If there is no declaration for the current encoding do nothing.
-%    (This makes a hash table entry but without e\TeX{} we can't do
-%    anything about that).
+% \changes{v2.1c}{2024/11/26}{Use \cs{ifcsname} to avoid generating a csname}
 %    \begin{macrocode}
-  \expandafter\ifx\csname#2\string#1\endcsname\relax
+  \ifcsname #2\string#1\endcsname
   \else
 %    \end{macrocode}
 %    Else: throw away that declaration.





More information about the latex3-commits mailing list.