[latex3-commits] [git/LaTeX3-latex3-latex3] master: More work on l3coffins and \AtBeginDocument (2952a27b8)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Dec 4 16:04:03 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/2952a27b86ad4650f0a3663266cc2223cb795a78

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

commit 2952a27b86ad4650f0a3663266cc2223cb795a78
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Dec 4 15:04:03 2020 +0000

    More work on l3coffins and \AtBeginDocument
    
    Which is now removed entirely.


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

2952a27b86ad4650f0a3663266cc2223cb795a78
 l3kernel/l3coffins.dtx | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/l3kernel/l3coffins.dtx b/l3kernel/l3coffins.dtx
index 921f0c70a..a9bd231c7 100644
--- a/l3kernel/l3coffins.dtx
+++ b/l3kernel/l3coffins.dtx
@@ -2238,12 +2238,12 @@
 %   Stores the settings used to print coffin data: this keeps things
 %   flexible.
 %    \begin{macrocode}
-\tl_new:N  \l_@@_display_font_tl
+\tl_new:N \l_@@_display_font_tl
 \bool_lazy_and:nnT
   { \cs_if_exist_p:N \fmtname }
   { \str_if_eq_p:Vn \fmtname { LaTeX2e } }
   {
-    \__kernel_tl_set:Nn \l_@@_display_font_tl
+    \tl_set:Nn \l_@@_display_font_tl
       { \sffamily \tiny }
   }
 %    \end{macrocode}
@@ -2251,23 +2251,27 @@
 %
 % \begin{macro}{\@@_color:n}
 %   Calls \tn{color}, and otherwise does nothing if \tn{color} is not defined.
+%   As this is relatively rarely used, we have it self-define rather than delay
+%   using a hook.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_color:n #1 {#1}
 \bool_lazy_and:nnT
   { \cs_if_exist_p:N \fmtname }
   { \str_if_eq_p:Vn \fmtname { LaTeX2e } }
   {
-    \AtBeginDocument
+    \cs_gset_protected:Npn \@@_color:n
       {
-        \cs_gset_protected:Npx \@@_color:n #1
+        \cs_gset_protected:Npx \@@_color:n
           {
             \cs_if_exist:NTF \color_select:n
-              { \color_select:n {#1} }
+              {\color_select:n }
               {
-                \cs_if_exist:NT \color
-                  { \exp_not:N \color {#1} }
+                \cs_if_exist:NTF \color
+                  { \exp_not:N \color }
+                  { \exp_not:N \use_none:n }
               }
           }
+        \@@_color:n
       }
   }
 %    \end{macrocode}





More information about the latex3-commits mailing list.