[latex3-commits] [git/latex3] master: Auto-detect internal functions in l3doc [ci skip] (4b803e5)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Nov 30 09:12:31 CET 2017
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/4b803e5bf35cc10a97729062c9f9391901a6fa5b
>---------------------------------------------------------------
commit 4b803e5bf35cc10a97729062c9f9391901a6fa5b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Nov 30 08:06:37 2017 +0000
Auto-detect internal functions in l3doc [ci skip]
I have essentially merged "[aux]" and "[int]", retaining the latter in
the documentated part for cases where internal status might need to be
forced (non-standard names, e.g. l3keys, though we should perhaps try to
cut down these cases). At present, the variables, etc., are left in
place.
>---------------------------------------------------------------
4b803e5bf35cc10a97729062c9f9391901a6fa5b
l3kernel/l3doc.dtx | 40 ++++++++++++++--------------------------
1 file changed, 14 insertions(+), 26 deletions(-)
diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 43cec98..c1f7811 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -414,13 +414,10 @@ and all files in that bundle must be distributed together.
% If you are documenting an auxiliary macro, it's generally not
% necessary to highlight it as much and you also don't need to check it
% for, say, having a test function and having a documentation chunk
-% earlier in a \env{function} environment. In this case, write
-% |\begin{macro}[aux]| to mark it as such; its margin
-% call-out is then printed in grey.
-%
-% Similarly, an internal package function still requires documentation
-% but usually is not documented for users to see; these can be
-% marked as such with |\begin{macro}[int]|.
+% earlier in a \env{function} environment. \pkg{l3doc} will pick up these
+% cases form the presence of |__| in the name, or you may force marking
+% as internal by using |\begin{macro}[aux]| to mark it as such. The margin
+% call-out is then printed in grey for such cases.
%
% For documenting \pkg{expl3}-type conditionals, you may also pass this
% environment a |TF| option (and omit it from the function name) to
@@ -2756,7 +2753,6 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npn \@@_macro_init:
{
\int_incr:N \l_@@_nested_macro_int
- \bool_set_false:N \l_@@_macro_aux_bool
\bool_set_false:N \l_@@_macro_internal_bool
\bool_set_false:N \l_@@_macro_TF_bool
\bool_set_false:N \l_@@_macro_pTF_bool
@@ -2796,23 +2792,17 @@ and all files in that bundle must be distributed together.
% \end{macro}
%
% \begin{macro}[aux]{\@@_macro_adjust_internal:}
-% If the macros are neither marked as internal nor auxiliary, and all
+% If all
% macros in \cs{l_@@_names_seq} contain |__| then mark them as being
-% internal.
+% internal. Probably a mix should be an error \dots
% \begin{macrocode}
\cs_new_protected:Npn \@@_macro_adjust_internal:
{
- \bool_if:NF \l_@@_macro_internal_bool
+ \bool_set_true:N \l_@@_macro_internal_bool
+ \seq_map_inline:Nn \l_@@_names_seq
{
- \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 }
- }
- }
+ \tl_if_in:noF {##1} { \tl_to_str:n { __ } }
+ { \l_@@_macro_internal_bool }
}
}
% \end{macrocode}
@@ -2915,7 +2905,7 @@ and all files in that bundle must be distributed together.
\DoNotIndex {#1}
\bool_if:NT #2
{
- \bool_if:NF \l_@@_macro_aux_bool
+ \bool_if:NF \l_@@_macro_internal_bool
{ \seq_gput_right:Nn \g_doc_macros_seq {#1} }
\hbox_set:Nw \l_@@_macro_index_box
\hbox_unpack_clear:N \l_@@_macro_index_box
@@ -2977,7 +2967,7 @@ and all files in that bundle must be distributed together.
}
\cs_new_protected:Npn \@@_macroname_prefix:n #1
{
- \bool_if:NTF \l_@@_macro_aux_bool
+ \bool_if:NTF \l_@@_macro_internal_bool
{ \@@_typeset_aux:n {#1} } {#1}
}
\cs_generate_variant:Nn \@@_macroname_prefix:n { o }
@@ -3107,7 +3097,7 @@ and all files in that bundle must be distributed together.
\bool_lazy_all:nT
{
{ \g_@@_checktest_bool }
- { ! \l_@@_macro_aux_bool }
+ { ! \l_@@_macro_internal_bool }
{ ! \l_@@_macro_var_bool }
{ ! \l_@@_macro_tested_bool }
}
@@ -3171,9 +3161,7 @@ and all files in that bundle must be distributed together.
}
\cs_new_protected:Npn \@@_print_documented:
{
- \bool_lazy_or:nnF
- { \l_@@_macro_aux_bool }
- { \l_@@_macro_internal_bool }
+ \bool_if:NF \l_@@_macro_internal_bool
{
\int_set:Nn \l_@@_tmpa_int
{ \seq_count:N \g_@@_nested_names_seq }
More information about the latex3-commits
mailing list