[latex3-commits] [l3svn] r6665 - l3doc: Mark macros containing "__" as internal

noreply at latex-project.org noreply at latex-project.org
Mon Aug 15 20:26:39 CEST 2016


Author: bruno
Date: 2016-08-15 20:26:39 +0200 (Mon, 15 Aug 2016)
New Revision: 6665

Modified:
   trunk/l3kernel/l3doc.dtx
Log:
l3doc: Mark macros containing "__" as internal

This suppresses the link to an inexistent documentation.  This applies 
to variables as well, which are often not marked explicitly as internal 
in our codebase.  At present there is no way to prevent this.


Modified: trunk/l3kernel/l3doc.dtx
===================================================================
--- trunk/l3kernel/l3doc.dtx	2016-08-15 17:50:55 UTC (rev 6664)
+++ trunk/l3kernel/l3doc.dtx	2016-08-15 18:26:39 UTC (rev 6665)
@@ -2386,6 +2386,7 @@
     \keys_set:nn { l3doc/macro } {#1}
     \@@_names_get_seq:nN {#2} \l_@@_names_seq
     \@@_names_parse:
+    \@@_macro_adjust_internal:
     \@@_names_typeset:
     \@@_macro_dump:
   }
@@ -2420,6 +2421,29 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[aux]{\@@_macro_adjust_internal:}
+%   If the macros are neither marked as internal nor auxiliary, and all
+%   macros in \cs{l_@@_names_seq} contain |__| then mark them as being
+%   internal.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_macro_adjust_internal:
+  {
+    \bool_if:NF \l_@@_macro_internal_bool
+      {
+        \bool_if:NF \l_@@_macro_aux_bool
+          {
+            \bool_set_true:N \l_@@_macro_internal_bool
+            \seq_map_inline:Nn \l_@@_names_seq
+              {
+                \tl_if_in:noF {##1} { \tl_to_str:n { __ } }
+                  { \bool_set_false:N \l_@@_macro_internal_bool }
+              }
+          }
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[aux]{\@@_macro_dump:}
 %   This calls |\makelabel{}|
 %    \begin{macrocode}



More information about the latex3-commits mailing list