[latex3-commits] [l3svn] r7412 - Reduce number of exp_after

noreply at latex-project.org noreply at latex-project.org
Wed Aug 2 13:31:41 CEST 2017


Author: bruno
Date: 2017-08-02 13:31:41 +0200 (Wed, 02 Aug 2017)
New Revision: 7412

Modified:
   trunk/l3kernel/l3drivers.dtx
Log:
Reduce number of exp_after


Modified: trunk/l3kernel/l3drivers.dtx
===================================================================
--- trunk/l3kernel/l3drivers.dtx	2017-08-02 07:26:28 UTC (rev 7411)
+++ trunk/l3kernel/l3drivers.dtx	2017-08-02 11:31:41 UTC (rev 7412)
@@ -555,7 +555,7 @@
 %    \end{macrocode}
 %
 % \begin{macro}[aux]{\@@_color_pickup:}
-% \begin{macro}[aux]{\@@_color_pickup_aux:}
+% \begin{macro}[aux]{\@@_color_pickup_aux:w}
 %   The current color in driver-dependent format: pick up the package-mode
 %   data if available. We end up converting back and forward in this route as
 %   we store our color data in \texttt{dvips} format.
@@ -567,25 +567,23 @@
       {
         \cs_new_protected:Npn \@@_color_pickup:
           {
-            \tl_set:Nx \l__color_current_tl { \current at color }
-            \tl_set:Nx \l__color_current_tl
-              {
-                \exp_after:wN \exp_after:wN \exp_after:wN
-                  \@@_color_pickup_aux:w \exp_after:wN
-                  \l__color_current_tl \c_space_tl 0 ~ 0 ~ 0 \q_stop
-              }
+            \exp_last_unbraced:Nx \@@_color_pickup_aux:w
+              { \current at color } ~ 0 ~ 0 ~ 0 \q_stop
           }
         \cs_new:Npn \@@_color_pickup_aux:w #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \q_stop
           {
-            \str_if_eq:nnTF {#2} { g }
-              { gray ~ #1 }
+            \tl_set:Nx \l__color_current_tl
               {
-                \str_if_eq:nnTF {#4} { rg }
-                  { rgb ~ #1 ~ #2 ~ #3 }
+                \str_if_eq:nnTF {#2} { g }
+                  { gray ~ #1 }
                   {
-                    \str_if_eq:nnTF {#5} { k }
-                      { cmyk ~ #1 ~ #2 ~ #3 ~ #4 }
-                      { gray ~ #1 }
+                    \str_if_eq:nnTF {#4} { rg }
+                      { rgb ~ #1 ~ #2 ~ #3 }
+                      {
+                        \str_if_eq:nnTF {#5} { k }
+                          { cmyk ~ #1 ~ #2 ~ #3 ~ #4 }
+                          { gray ~ #1 }
+                      }
                   }
               }
           }



More information about the latex3-commits mailing list