[latex3-commits] [latex3/latex3] main: Suppress cross-lines for :D functions (See #1345) (3d0ed204e)

github at latex-project.org github at latex-project.org
Mon Nov 27 18:05:37 CET 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/3d0ed204ef69e1517d210ecf5b071a10b1639c34

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

commit 3d0ed204ef69e1517d210ecf5b071a10b1639c34
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Nov 27 17:05:37 2023 +0000

    Suppress cross-lines for :D functions (See #1345)


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

3d0ed204ef69e1517d210ecf5b071a10b1639c34
 l3kernel/l3doc.dtx | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 8d5f00b02..f587f32f5 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -3350,6 +3350,8 @@ and all files in that bundle must be distributed together.
 %     \@@_macro_end_wrap_item:n,
 %     \@@_print_documented:
 %   }
+% \begin{macro}[EXP]{\@@_if_macro_primitive_p:n}
+% \begin{macro}[EXP]{\@@_if_macro_primitive_aux:w}
 %   Surround each item by \tn{texttt}, replacing |_|
 %   by \tn{_} as well.  Then list the
 %   macro names through \cs{seq_use:Nnnn}, unless there are too many.
@@ -3383,9 +3385,12 @@ and all files in that bundle must be distributed together.
     \seq_gset_filter:NNn \g_@@_nested_names_seq
       \g_@@_nested_names_seq
       {
-        ! \bool_lazy_or_p:nn
-          { \@@_if_macro_internal_p:n {##1} }
-          { \l_@@_macro_deprecated_bool }
+        ! \bool_lazy_any_p:n
+          {
+            { \@@_if_macro_internal_p:n {##1} }
+            { \@@_if_macro_primitive_p:n {##1} }
+            { \l_@@_macro_deprecated_bool }
+          }
       }
     \seq_if_empty:NF \g_@@_nested_names_seq
       {
@@ -3402,8 +3407,21 @@ and all files in that bundle must be distributed together.
       }
     \seq_gclear:N \g_@@_nested_names_seq
   }
+\prg_new_conditional:Npnn \@@_if_macro_primitive:n #1 { p }
+  {
+    \tl_if_empty:fTF
+      {
+        \exp_after:wN \@@_if_macro_primitive_aux:w
+        \tl_to_str:n { #1 :D }
+      }
+      { \prg_return_false: } { \prg_return_true: }
+  }
+\exp_last_unbraced:NNNNo
+  \cs_new:Npn \@@_if_macro_primitive_aux:w #1 { \tl_to_str:n { :D } } { }
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
+% \end{macro}
 %
 % \subsubsection{Misc}
 %





More information about the latex3-commits mailing list.