[latex3-commits] [git/LaTeX3-latex3-latex3] main: Some details on .inherit:n (see #1051) (e10ca3be9)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Feb 16 23:40:02 CET 2022
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/e10ca3be95c151db1d248d7cb20b27577de12923
>---------------------------------------------------------------
commit e10ca3be95c151db1d248d7cb20b27577de12923
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Feb 16 22:40:02 2022 +0000
Some details on .inherit:n (see #1051)
>---------------------------------------------------------------
e10ca3be95c151db1d248d7cb20b27577de12923
l3kernel/l3keys.dtx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/l3kernel/l3keys.dtx b/l3kernel/l3keys.dtx
index 087bbf411..cfe710266 100644
--- a/l3kernel/l3keys.dtx
+++ b/l3kernel/l3keys.dtx
@@ -321,7 +321,8 @@
% \meta{key} .inherit:n = \Arg{parents}
% \end{syntax}
% Specifies that the \meta{key} path should inherit the keys listed
-% as \meta{parents}. For example, after setting
+% as any of the \meta{parents} (a comma list), which can be a module
+% or a subgroup. For example, after setting
% \begin{verbatim}
% \keys_define:nn { foo } { test .code:n = \tl_show:n {#1} }
% \keys_define:nn { } { bar .inherit:n = foo }
@@ -334,6 +335,12 @@
% \begin{verbatim}
% \keys_set:nn { foo } { test = a }
% \end{verbatim}
+% Inheritance applies at point of use, not at definition, thus keys may
+% be added to the \meta{parent} after the use of \texttt{.inherit:n}
+% and will be active.
+% If more than one \meta{parent} is specified, the presence of the
+% \meta{key} will be tested for each in turn, with the first successful
+% hit taking priority.
% \end{function}
%
% \begin{function}[updated = 2013-07-09]
More information about the latex3-commits
mailing list.