[latex3-commits] [l3svn] 03/03: Clearer approach to defining active <

noreply at latex-project.org noreply at latex-project.org
Wed Sep 2 08:04:37 CEST 2015


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

commit 0a03ca31bd4075dd59a6d9bb688df3c64d19f249
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Sep 2 07:03:07 2015 +0100

    Clearer approach to defining active <
    
    As we know that "<" will be the active char required here, we can
    set up the code to have it active 'up front' rather than needing
    \char_set_active_eq:NN. For a case like this, where the char is
    hard-coded, that seems the best approach (and it makes the syntax
    clear in the code).
---
 l3kernel/l3doc.dtx |   30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 743dd33..6beb50d 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -1670,21 +1670,23 @@ Do not distribute a modified version of this file.
 %   Allow |<...>| to be used as markup for |\meta{...}|.  Clear various
 %   variables.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_function_init:
-  {
-    \coffin_clear:N \l_@@_descr_coffin
-    \box_gclear:N \g_@@_syntax_box
-    \coffin_clear:N \l_@@_syntax_coffin
-    \coffin_clear:N \l_@@_names_coffin
-    \bool_set_false:N \l_@@_macro_TF_bool
-    \bool_set_false:N \l_@@_macro_pTF_bool
-    \bool_set_false:N \l_@@_macro_EXP_bool
-    \bool_set_false:N \l_@@_macro_rEXP_bool
-    \bool_set_false:N \l_@@_no_label_bool
-    \cs_set_protected:Npn \@@_active_meta:w ##1 > { \meta {##1} }
-    \char_set_active_eq:NN < \@@_active_meta:w
-    \char_set_catcode_active:N \<
+\group_begin:
+  \char_set_catcode_active:N \<
+  \cs_new_protected:Npn \@@_function_init:
+    {
+      \coffin_clear:N \l_@@_descr_coffin
+      \box_gclear:N \g_@@_syntax_box
+      \coffin_clear:N \l_@@_syntax_coffin
+      \coffin_clear:N \l_@@_names_coffin
+      \bool_set_false:N \l_@@_macro_TF_bool
+      \bool_set_false:N \l_@@_macro_pTF_bool
+      \bool_set_false:N \l_@@_macro_EXP_bool
+      \bool_set_false:N \l_@@_macro_rEXP_bool
+      \bool_set_false:N \l_@@_no_label_bool
+      \char_set_catcode_active:N \<
+      \cs_set_protected_nopar:Npn < ##1 > { \meta {##1} }
   }
+\group_end:
 %    \end{macrocode}
 % \end{macro}
 %

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list