[latex3-commits] [latex3/latex2e] develop: Correct "optimized" (89e4a46b)

github at latex-project.org github at latex-project.org
Fri Dec 1 13:13:27 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/89e4a46bf663623bad0141bba34a371a9b80d38a

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

commit 89e4a46bf663623bad0141bba34a371a9b80d38a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Nov 29 09:30:48 2023 +0000

    Correct "optimized"
    
    As pointed out in the PR, we use US spelling in general
    nowadays out of realism.


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

89e4a46bf663623bad0141bba34a371a9b80d38a
 base/ltcmd.dtx                       | 44 ++++++++++++++++++------------------
 base/testfiles-ltcmd/github-1009.tlg | 16 ++++++-------
 base/testfiles-ltcmd/ltcmd001.tlg    | 30 ++++++++++++------------
 3 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index 9c9dbc97..1a557aee 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -454,17 +454,17 @@
 % \begin{macro}{\@@_declare_cmd_code:Nnn}
 % \begin{macro}
 %   {
-%     \@@_declare_cmd_optimised:Nnn,
+%     \@@_declare_cmd_optimized:Nnn,
 %     \@@_declare_cmd_code_aux:Nnn,
 %     \@@_declare_cmd_code_expandable:Nnn
 %   }
-% \begin{macro}{\@@_start_optimised:}
+% \begin{macro}{\@@_start_optimized:}
 % \changes{v1.2b}{2023/11/29}
 %   {Optimise cmd creation for all-\texttt{m} arguments}
 %   At this stage we can check for a short-cut possibility: if the signature
 %   is just made up of just |(+)m| tokens, and if all arguments are either
 %   short or long, then we can produce an
-%   optimised document command. This only applies to document commands,
+%   optimized document command. This only applies to document commands,
 %   not creation of environments (which are more complex).
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_declare_cmd_code:Nnn #1#2
@@ -484,15 +484,15 @@
           { \@@_declare_cmd_code_expandable:Nnn }
           { \@@_declare_cmd_code_aux:Nnn }
       }
-      { \@@_declare_cmd_optimised:Nnn }
+      { \@@_declare_cmd_optimized:Nnn }
         #1 {#2}
    }
 %    \end{macrocode}
-%   The optimised version of commands just has to worry about whether to make
+%   The optimized version of commands just has to worry about whether to make
 %   them protected or long. The commands start with an expandable marker so
 %   that other parts of the kernel know these are set up by \pkg{ltcmd}.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd_optimised:Nnn #1#2#3
+\cs_new_protected:Npn \@@_declare_cmd_optimized:Nnn #1#2#3
   {
     \exp_args:NNc \cs_generate_from_arg_count:NNnn #1
       {
@@ -501,9 +501,9 @@
         \bool_if:NF \l_@@_some_long_bool { _nopar }
         :Npn
       }
-      \l_@@_current_arg_int { \@@_start_optimised: #3 }
+      \l_@@_current_arg_int { \@@_start_optimized: #3 }
   }
-\cs_new:Npn \@@_start_optimised: { }
+\cs_new:Npn \@@_start_optimized: { }
 %    \end{macrocode}
 %   Standard functions call \cs{@@_start:nNNnnn}, which receives the
 %   argument specification, an auxiliary used for
@@ -2104,7 +2104,7 @@
         \exp_not:N \@@_cmd_type_cases:NnnnnnF \exp_not:N #2
           { \@@_copy_command:nnNN }
           { \@@_copy_expandable:nnNN }
-          { \@@_copy_optimised:nnNN }
+          { \@@_copy_optimized:nnNN }
           { \@@_copy_environment:nnNN }
           { \@@_copy_environment_end:nnNN }
           { \@@_cant_copy:nwn { non-ltcmd } }
@@ -2246,10 +2246,10 @@
 %<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
 %
-% \begin{macro}{\@@_copy_optimised:nnNN}
+% \begin{macro}{\@@_copy_optimized:nnNN}
 %   Trivial copy.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_copy_optimised:nnNN #1#2#3#4
+\cs_new_protected:Npn \@@_copy_optimized:nnNN #1#2#3#4
   { \cs_set_eq:NN #3 #4 }
 %    \end{macrocode}
 % \end{macro}
@@ -2502,7 +2502,7 @@
         \exp_not:N \@@_cmd_type_cases:NnnnnnF \exp_not:N #1
           { \@@_show_command:N }
           { \@@_show_expandable:N }
-          { \@@_show_optimised:N }
+          { \@@_show_optimized:N }
           { \@@_show_environment:N }
           { \@@_show_environment_end:N }
           { \@@_cant_copy:nwn { non-ltcmd } }
@@ -2519,7 +2519,7 @@
 %     \@@_show_command:NnNNwN,
 %     \@@_show_expandable:N,
 %     \@@_show_expandable:NnNNNNnN,
-%     \@@_show_optimised:N,
+%     \@@_show_optimized:N,
 %     \@@_show_command_aux:NnNNn,
 %     \@@_show_environment:N,
 %     \@@_show:x,
@@ -2603,7 +2603,7 @@
 % Optimised functions needs things done a bit differently as we need to
 % reconstruct the argument spec.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_show_optimised:N #1
+\cs_new_protected:Npn \@@_show_optimized:N #1
   {
     \tl_show:e
       {
@@ -2616,21 +2616,21 @@
               { \tl_count:n { \cs_parameter_spec:N #1 } }
               { 2 }
           }
-          \@@_show_optimised_aux:N
+          \@@_show_optimized_aux:N
         ->
         \use:e
           {
-            \exp_not:N \@@_show_optimised_aux:w
+            \exp_not:N \@@_show_optimized_aux:w
               \cs_replacement_spec:N #1
           }
       }
   }
-\cs_new:Npn \@@_show_optimised_aux:N #1
+\cs_new:Npn \@@_show_optimized_aux:N #1
   { \c_space_tl \c_hash_str #1 : m \iow_newline: }
 \use:e
   {
-    \cs_new:Npn \exp_not:N \@@_show_optimised_aux:w
-      \token_to_str:N \@@_start_optimised: \c_space_tl
+    \cs_new:Npn \exp_not:N \@@_show_optimized_aux:w
+      \token_to_str:N \@@_start_optimized: \c_space_tl
   }
   { }
 %    \end{macrocode}
@@ -4488,7 +4488,7 @@
 %      \cs{NewCommandCopy} and \cs{ShowCommand} support}
 % \changes{v1.0l}{2022/03/18}{Fix \cs{@@_cmd_type_cases:NnnnnF}
 %"     prematurely expanding macros (gh/795)}
-% \changes{v1.2b}{2023/11/29}{Extend for optimised commands}
+% \changes{v1.2b}{2023/11/29}{Extend for optimized commands}
 % \begin{macro}{\@@_cmd_if_xparse_aux:N}
 %
 %    To determine whether the command is an \pkg{xparse} command check
@@ -4496,7 +4496,7 @@
 %    that its |replacement_spec| starts with either
 %    \cs{@@_start:nNNnnn} (non-expandable command) or
 %    \cs{@@_start_expandable:nNNNNn} (expandable command) or
-%    \cs{@@_start_optimised:} (optimised command) or
+%    \cs{@@_start_optimized:} (optimized command) or
 %    \cs{@@_start_env:nnnnn} (environment) or
 %    \cs[no-index]{environment~\#1~end~aux} (environment end).
 %
@@ -4513,7 +4513,7 @@
       {
         { \exp_not:N \@@_start:nNNnnn } {#2}
         { \exp_not:N \@@_start_expandable:nNNNNn } {#3}
-        { \exp_not:N \@@_start_optimised: } {#4}
+        { \exp_not:N \@@_start_optimized: } {#4}
         { \exp_not:N \@@_start_env:nnnnn } {#5}
         {
           \exp_after:wN \exp_not:N
diff --git a/base/testfiles-ltcmd/github-1009.tlg b/base/testfiles-ltcmd/github-1009.tlg
index 4983b91c..195cbc6d 100644
--- a/base/testfiles-ltcmd/github-1009.tlg
+++ b/base/testfiles-ltcmd/github-1009.tlg
@@ -14,19 +14,19 @@ l. ...}
 <recently read> }
 l. ...}
 > \foo=\protected macro:
-#1->\__cmd_start_optimised: .
+#1->\__cmd_start_optimized: .
 <argument> \foo 
 l. ...}
 > \baz=\protected macro:
-#1->\__cmd_start_optimised: .
+#1->\__cmd_start_optimized: .
 <argument> \baz 
 l. ...}
 > \foo=\protected\long macro:
-#1->\__cmd_start_optimised: .
+#1->\__cmd_start_optimized: .
 <argument> \foo 
 l. ...}
 > \baz=\protected\long macro:
-#1->\__cmd_start_optimised: .
+#1->\__cmd_start_optimized: .
 <argument> \baz 
 l. ...}
 > \foo=document command:
@@ -54,19 +54,19 @@ l. ...}
 <recently read> }
 l. ...}
 > \foo=macro:
-#1->\__cmd_start_optimised: .
+#1->\__cmd_start_optimized: .
 <argument> \foo 
 l. ...}
 > \baz=macro:
-#1->\__cmd_start_optimised: .
+#1->\__cmd_start_optimized: .
 <argument> \baz 
 l. ...}
 > \foo=\long macro:
-#1->\__cmd_start_optimised: .
+#1->\__cmd_start_optimized: .
 <argument> \foo 
 l. ...}
 > \baz=\long macro:
-#1->\__cmd_start_optimised: .
+#1->\__cmd_start_optimized: .
 <argument> \baz 
 l. ...}
 ============================================================
diff --git a/base/testfiles-ltcmd/ltcmd001.tlg b/base/testfiles-ltcmd/ltcmd001.tlg
index 25399448..5e2b34f7 100644
--- a/base/testfiles-ltcmd/ltcmd001.tlg
+++ b/base/testfiles-ltcmd/ltcmd001.tlg
@@ -17,7 +17,7 @@ For immediate help type H <return>.
 l. ...}
 You have used \RenewDocumentCommand with a command that was never defined.
 LaTeX will ignore this entire definition.
-> \foo=\protected macro:->\__cmd_start_optimised: First definition.
+> \foo=\protected macro:->\__cmd_start_optimized: First definition.
 <recently read> }
 l. ...}
 > \foo code=undefined.
@@ -27,59 +27,59 @@ l. ...}
 ============================================================
 TEST 2: Commands with simple mandatory arguments
 ============================================================
-> \foo=\protected macro:#1->\__cmd_start_optimised: (#1).
+> \foo=\protected macro:#1->\__cmd_start_optimized: (#1).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\protected macro:#1#2->\__cmd_start_optimised: (#1)(#2).
+> \foo=\protected macro:#1#2->\__cmd_start_optimized: (#1)(#2).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\protected macro:#1#2#3->\__cmd_start_optimised: (#1)(#2)(#3).
+> \foo=\protected macro:#1#2#3->\__cmd_start_optimized: (#1)(#2)(#3).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\protected macro:#1#2#3#4->\__cmd_start_optimised: (#1)(#2)(#3)(#4).
+> \foo=\protected macro:#1#2#3#4->\__cmd_start_optimized: (#1)(#2)(#3)(#4).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\protected macro:#1#2#3#4#5->\__cmd_start_optimised:
+> \foo=\protected macro:#1#2#3#4#5->\__cmd_start_optimized:
 (#1)(#2)(#3)(#4)(#5).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\protected macro:#1#2#3#4#5#6->\__cmd_start_optimised:
+> \foo=\protected macro:#1#2#3#4#5#6->\__cmd_start_optimized:
 (#1)(#2)(#3)(#4)(#5)(#6).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\protected macro:#1#2#3#4#5#6#7->\__cmd_start_optimised:
+> \foo=\protected macro:#1#2#3#4#5#6#7->\__cmd_start_optimized:
 (#1)(#2)(#3)(#4)(#5)(#6)(#7).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\protected macro:#1#2#3#4#5#6#7#8->\__cmd_start_optimised:
+> \foo=\protected macro:#1#2#3#4#5#6#7#8->\__cmd_start_optimized:
 (#1)(#2)(#3)(#4)(#5)(#6)(#7)(#8).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\protected macro:#1#2#3#4#5#6#7#8#9->\__cmd_start_optimised:
+> \foo=\protected macro:#1#2#3#4#5#6#7#8#9->\__cmd_start_optimized:
 (#1)(#2)(#3)(#4)(#5)(#6)(#7)(#8)(#9).
 <recently read> }
 l. ...}
@@ -107,7 +107,7 @@ l. ...}
 ============================================================
 TEST 4: Commands with one long mandatory argument
 ============================================================
-> \foo=\protected\long macro:#1->\__cmd_start_optimised: (#1).
+> \foo=\protected\long macro:#1->\__cmd_start_optimized: (#1).
 <recently read> }
 l. ...}
 > \foo code=undefined.
@@ -324,19 +324,19 @@ l. ...}
 ============================================================
 TEST 8: Some valid expandable functions
 ============================================================
-> \foo=macro:#1->\__cmd_start_optimised: (#1).
+> \foo=macro:#1->\__cmd_start_optimized: (#1).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=\long macro:#1->\__cmd_start_optimised: (#1).
+> \foo=\long macro:#1->\__cmd_start_optimized: (#1).
 <recently read> }
 l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-> \foo=macro:#1#2#3->\__cmd_start_optimised: (#1)(#2)(#3).
+> \foo=macro:#1#2#3->\__cmd_start_optimized: (#1)(#2)(#3).
 <recently read> }
 l. ...}
 > \foo code=undefined.
@@ -697,7 +697,7 @@ l. ...}
 You have used \RenewExpandableDocumentCommand with a command that was never
 defined.
 LaTeX will ignore this entire definition.
-> \foo=macro:->\__cmd_start_optimised: First definition.
+> \foo=macro:->\__cmd_start_optimized: First definition.
 <recently read> }
 l. ...}
 > \foo code=undefined.





More information about the latex3-commits mailing list.