[latex3-commits] [l3svn] 05/06: Basic key inheritance

noreply at latex-project.org noreply at latex-project.org
Tue Nov 22 11:08:06 CET 2016


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

joseph pushed a commit to branch master
in repository l3svn.

commit 6513b2f2c5e6c7844527678af53b8052d3a837d7
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Nov 22 08:47:12 2016 +0000

    Basic key inheritance
    
    Somewhat modelled on the options package, but at present not
    as sophisticated.
---
 l3kernel/l3keys.dtx                     |  106 ++++++++++++++++++++++++-------
 l3kernel/testfiles/m3expl001.luatex.tlg |    9 ++-
 l3kernel/testfiles/m3expl001.ptex.tlg   |    9 ++-
 l3kernel/testfiles/m3expl001.tlg        |    9 ++-
 l3kernel/testfiles/m3expl001.uptex.tlg  |    9 ++-
 l3kernel/testfiles/m3expl001.xetex.tlg  |    9 ++-
 l3kernel/testfiles/m3expl003.luatex.tlg |    9 ++-
 l3kernel/testfiles/m3expl003.ptex.tlg   |    9 ++-
 l3kernel/testfiles/m3expl003.tlg        |    9 ++-
 l3kernel/testfiles/m3expl003.uptex.tlg  |    9 ++-
 l3kernel/testfiles/m3expl003.xetex.tlg  |    9 ++-
 l3kernel/testfiles/m3keys003.lvt        |   16 +++++
 l3kernel/testfiles/m3keys003.tlg        |    8 +++
 13 files changed, 168 insertions(+), 52 deletions(-)

diff --git a/l3kernel/l3keys.dtx b/l3kernel/l3keys.dtx
index cef006b..f637019 100644
--- a/l3kernel/l3keys.dtx
+++ b/l3kernel/l3keys.dtx
@@ -320,6 +320,26 @@
 %   described in Section~\ref{sec:l3keys:selective}.
 % \end{function}
 %
+% \begin{function}[added = 2016-11-22]{.inherit:n}
+%   \begin{syntax}
+%     \meta{key} .inherit:n = \Arg{parents}
+%   \end{syntax}
+%   Specifies that the \meta{key} path should inherit the keys listed
+%   as \meta{parents}. For example, with setting
+%   \begin{verbatim}
+%     \keys_define:n { foo } { test .code:n = \tl_show:n {#1} }
+%     \keys_define:n { } { bar .inherit:n = foo }
+%   \end{verbatim}
+%   setting
+%   \begin{verbatim}
+%     \keys_set:n { bar } { test = a }
+%   \end{verbatim}
+%   will be equivalent to
+%   \begin{verbatim}
+%     \keys_set:n { foo } { test = a }
+%   \end{verbatim}
+% \end{function}
+%
 % \begin{function}[updated = 2013-07-09]
 %   {.initial:n, .initial:V, .initial:o, .initial:x}
 %   \begin{syntax}
@@ -1116,6 +1136,7 @@
 %     \c_@@_code_root_tl    ,
 %     \c_@@_default_root_tl ,
 %     \c_@@_groups_root_tl  ,
+%     \c_@@_inherit_root_tl  ,
 %     \c_@@_type_root_tl    ,
 %     \c_@@_validate_root_tl
 %   }
@@ -1124,6 +1145,7 @@
 \tl_const:Nn \c_@@_code_root_tl     { key~code~>~ }
 \tl_const:Nn \c_@@_default_root_tl  { key~default~>~ }
 \tl_const:Nn \c_@@_groups_root_tl   { key~groups~>~ }
+\tl_const:Nn \c_@@_inherit_root_tl  { key~inherit~>~ }
 \tl_const:Nn \c_@@_type_root_tl     { key~type~>~ }
 \tl_const:Nn \c_@@_validate_root_tl { key~validate~>~ }
 %    \end{macrocode}
@@ -1425,8 +1447,6 @@
 % \begin{macro}[int]{\@@_choice_make:, \@@_multichoice_make:}
 % \begin{macro}[aux]{\@@_choice_make:N}
 % \begin{macro}[aux]{\@@_choice_make_aux:N}
-% \begin{macro}[EXP, aux]{\@@_parent:n, \@@_parent:o}
-% \begin{macro}[EXP, aux]{\@@_parent:w}
 %   To make a choice from a key, two steps: set the code, and set the
 %   unknown key. As multichoices and choices are essentially the same bar one
 %   function, the code is given together.
@@ -1461,23 +1481,10 @@
           { \l_keys_path_tl } {##1}
       }
   }
-\cs_new:Npn \@@_parent:n #1
-  { \@@_parent:w #1 / / \q_stop { } }
-\cs_generate_variant:Nn \@@_parent:n { o }
-\cs_new:Npn \@@_parent:w #1 / #2 / #3 \q_stop #4
-  {
-    \tl_if_blank:nTF {#2}
-      { \use_none:n #4 }
-      {
-        \@@_parent:w #2 / #3 \q_stop { #4 / #1 }
-      }
-  }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \end{macro}
-% \end{macro}
-% \end{macro}
 %
 % \begin{macro}[int]{\@@_choices_make:nn, \@@_multichoices_make:nn}
 % \begin{macro}[aux]{\@@_choices_make:Nnn}
@@ -1566,6 +1573,18 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[int]{\@@_inherit:n}
+%  Inheritance means ignoring anything already said about the key:
+%  zap the lot and set up.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_inherit:n #1
+  {
+    \@@_undefine:
+    \cs_set_nopar:cpn { \c_@@_inherit_root_tl \l_keys_path_tl } {#1}
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[int]{\@@_initialise:n}
 %   A set up for initialisation: just run the code if it exists.
 %    \begin{macrocode}
@@ -1601,7 +1620,7 @@
 \cs_new_protected:Npn \@@_undefine:
   {
     \clist_map_inline:nn
-      { code , default , groups , type , validate }
+      { code , default , groups , inherit , type , validate }
       {
         \cs_set_eq:cN
           { \tl_use:c { c_@@_ ##1 _root_tl } \l_keys_path_tl }
@@ -1836,6 +1855,14 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{.inherit:n}
+%   Nothing complex: only one variant at the moment!
+%    \begin{macrocode}
+\cs_new_protected:cpn { \c_@@_props_root_tl .inherit:n } #1
+  { \@@_inherit:n {#1} }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{.initial:n, .initial:V, .initial:o, .initial:x}
 %   The standard hand-off approach.
 %    \begin{macrocode}
@@ -2239,16 +2266,34 @@
     \bool_if:NTF \l_@@_only_known_bool
       { \@@_store_unused: }
       {
-        \cs_if_exist:cTF { \c_@@_code_root_tl \l_@@_module_tl / unknown }
+        \cs_if_exist:cTF
+          { \c_@@_inherit_root_tl \@@_parent:o \l_keys_path_tl }
           {
-            \cs:w \c_@@_code_root_tl \l_@@_module_tl / unknown \exp_after:wN
-              \cs_end: \exp_after:wN { \l_keys_value_tl }
+            \clist_map_inline:cn
+              { \c_@@_inherit_root_tl \@@_parent:o \l_keys_path_tl }
+              {
+                \cs_if_exist:cT
+                  { \c_@@_code_root_tl ##1 / \l_keys_key_tl }
+                  {
+                    \cs:w \c_@@_code_root_tl ##1 / \l_keys_key_tl
+                      \exp_after:wN \cs_end: \exp_after:wN
+                      { \l_keys_value_tl }
+                    \clist_map_break:
+                  }
+              }
           }
           {
-            \__msg_kernel_error:nnxx { kernel } { key-unknown }
-              { \l_keys_path_tl } { \l_@@_module_tl }
+            \cs_if_exist:cTF { \c_@@_code_root_tl \l_@@_module_tl / unknown }
+              {
+                \cs:w \c_@@_code_root_tl \l_@@_module_tl / unknown
+                  \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl }
+              }
+              {
+                \__msg_kernel_error:nnxx { kernel } { key-unknown }
+                  { \l_keys_path_tl } { \l_@@_module_tl }
+              }
           }
-      }
+       }
   }
 \cs_new:Npn \@@_execute:nn #1#2
   {
@@ -2293,6 +2338,23 @@
 %
 % \subsection{Utilities}
 %
+% \begin{macro}[EXP, int]{\@@_parent:n, \@@_parent:o}
+% \begin{macro}[EXP, aux]{\@@_parent:w}
+%   Used to strip off the ending part of the key path after the last~|/|.
+%    \begin{macrocode}
+\cs_new:Npn \@@_parent:n #1
+  { \@@_parent:w #1 / / \q_stop { } }
+\cs_generate_variant:Nn \@@_parent:n { o }
+\cs_new:Npn \@@_parent:w #1 / #2 / #3 \q_stop #4
+  {
+    \tl_if_blank:nTF {#2}
+      { \use_none:n #4 }
+      {
+        \@@_parent:w #2 / #3 \q_stop { #4 / #1 }
+      }
+  }
+%    \end{macrocode}
+%
 % \begin{macro}[EXP, int]{\@@_remove_spaces:n}
 % \begin{macro}[EXP, aux]{\@@_remove_spaces:w}
 %   Removes all spaces from the input which is detokenized as a result.
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index c6db85a..132aa36 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -3131,6 +3131,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3169,9 +3170,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3182,6 +3180,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3223,6 +3222,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3299,6 +3299,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 0a6e06d..47d43db 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -3122,6 +3122,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3160,9 +3161,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3173,6 +3171,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3214,6 +3213,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3290,6 +3290,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 7ecd23e..9077ec5 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -3122,6 +3122,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3160,9 +3161,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3173,6 +3171,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3214,6 +3213,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3290,6 +3290,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 718bb4b..76608b0 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -3122,6 +3122,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3160,9 +3161,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3173,6 +3171,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3214,6 +3213,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3290,6 +3290,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 5d591d0..ea77792 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -3129,6 +3129,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3167,9 +3168,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3180,6 +3178,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3221,6 +3220,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3297,6 +3297,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 375f4fe..bff138d 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -3132,6 +3132,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3170,9 +3171,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3183,6 +3181,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3224,6 +3223,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3300,6 +3300,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index a79cd06..11881b2 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -3123,6 +3123,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3161,9 +3162,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3174,6 +3172,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3215,6 +3214,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3291,6 +3291,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 66be4f4..4886476 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -3123,6 +3123,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3161,9 +3162,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3174,6 +3172,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3215,6 +3214,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3291,6 +3291,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index a162805..4eb6ce9 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -3123,6 +3123,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3161,9 +3162,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3174,6 +3172,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3215,6 +3214,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3291,6 +3291,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 50c56e5..0033512 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -3130,6 +3130,7 @@ Defining message LaTeX/kernel/misplaced-equals-sign on line ...
 Defining \c__keys_code_root_tl on line ...
 Defining \c__keys_default_root_tl on line ...
 Defining \c__keys_groups_root_tl on line ...
+Defining \c__keys_inherit_root_tl on line ...
 Defining \c__keys_type_root_tl on line ...
 Defining \c__keys_validate_root_tl on line ...
 Defining \c__keys_props_root_tl on line ...
@@ -3168,9 +3169,6 @@ Defining \__keys_choice_make: on line ...
 Defining \__keys_multichoice_make: on line ...
 Defining \__keys_choice_make:N on line ...
 Defining \__keys_choice_make_aux:N on line ...
-Defining \__keys_parent:n on line ...
-Defining \__keys_parent:o on line ...
-Defining \__keys_parent:w on line ...
 Defining \__keys_choices_make:nn on line ...
 Defining \__keys_multichoices_make:nn on line ...
 Defining \__keys_choices_make:Nnn on line ...
@@ -3181,6 +3179,7 @@ Defining \exp_args:NVo on line ...
 Defining \__keys_cmd_set:Vo on line ...
 Defining \__keys_default_set:n on line ...
 Defining \__keys_groups_set:n on line ...
+Defining \__keys_inherit:n on line ...
 Defining \__keys_initialise:n on line ...
 Defining \__keys_meta_make:n on line ...
 Defining \__keys_meta_make:nn on line ...
@@ -3222,6 +3221,7 @@ Defining \key prop > .fp_set:c on line ...
 Defining \key prop > .fp_gset:N on line ...
 Defining \key prop > .fp_gset:c on line ...
 Defining \key prop > .groups:n on line ...
+Defining \key prop > .inherit:n on line ...
 Defining \key prop > .initial:n on line ...
 Defining \key prop > .initial:V on line ...
 Defining \key prop > .initial:o on line ...
@@ -3298,6 +3298,9 @@ Defining \__keys_execute:nn on line ...
 Defining \__keys_store_unused: on line ...
 Defining \__keys_choice_find:n on line ...
 Defining \__keys_multichoice_find:n on line ...
+Defining \__keys_parent:n on line ...
+Defining \__keys_parent:o on line ...
+Defining \__keys_parent:w on line ...
 Defining \__keys_remove_spaces:n on line ...
 Defining \__keys_remove_spaces:w on line ...
 Defining \keys_if_exist_p:nn on line ...
diff --git a/l3kernel/testfiles/m3keys003.lvt b/l3kernel/testfiles/m3keys003.lvt
index 67a33c1..4873fe4 100644
--- a/l3kernel/testfiles/m3keys003.lvt
+++ b/l3kernel/testfiles/m3keys003.lvt
@@ -152,4 +152,20 @@
       }
   }
 
+\TEST { .inherit:n }
+  {
+    \keys_define:nn { module }
+      {
+        key-one .code:n = \tl_show:n {#1}
+      }
+    \keys_define:nn { module-two }
+      {
+        path .inherit:n = module
+      }
+    \keys_set:nn { module-two / path }
+      {
+        key-one = a
+      }
+  }
+
 \END
diff --git a/l3kernel/testfiles/m3keys003.tlg b/l3kernel/testfiles/m3keys003.tlg
index 055fcc3..595b4a4 100644
--- a/l3kernel/testfiles/m3keys003.tlg
+++ b/l3kernel/testfiles/m3keys003.tlg
@@ -212,3 +212,11 @@ l. ...  }
 | of these.
 |...............................................
 ============================================================
+============================================================
+TEST 6: .inherit:n
+============================================================
+Defining key module/key-one on line ...
+> a.
+<recently read> }
+l. ...  }
+============================================================

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


More information about the latex3-commits mailing list