summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3keys.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3keys.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3keys.dtx56
1 files changed, 55 insertions, 1 deletions
diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx
index d172a1a041..eedd06ad24 100644
--- a/macros/latex/contrib/l3kernel/l3keys.dtx
+++ b/macros/latex/contrib/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-02-08}
+% \date{Released 2020-02-11}
%
% \maketitle
%
@@ -243,6 +243,20 @@
% \meta{value} given for the \meta{key}.
% \end{function}
%
+% \begin{function}[added = 2020-01-11]
+% {
+% .cs_set:Np, .cs_set:cp,
+% .cs_set_protected:Np, .cs_set_protected:cp,
+% .cs_gset:Np, .cs_gset:cp,
+% .cs_gset_protected:Np, .cs_gset_protected:cp,
+% }
+% \begin{syntax}
+% \meta{key} .cs_set:Np = \meta{control sequence} \meta{arg.~spec.}
+% \end{syntax}
+% Defines \meta{key} to set \meta{control sequence} to have \meta{arg.~spec.}
+% and replacement text \meta{value}.
+% \end{function}
+%
% \begin{function}[updated = 2013-07-09]
% {.default:n, .default:V, .default:o, .default:x}
% \begin{syntax}
@@ -1588,6 +1602,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_cs_set:NNpn, \@@_cs_set:Ncpn}
+% Creating control sequences is a bit more tricky than other cases as
+% we need to pick up the |p| argument. To make the internals look clearer,
+% the trailing |n| argument here is just for appearance.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cs_set:NNpn #1#2#3#
+ {
+ \cs_set_protected:cpx { \c_@@_code_root_str \l_keys_path_str } ##1
+ { #1 \exp_not:N #2 \exp_not:n {#3} {##1} }
+ \use_none:n
+ }
+\cs_generate_variant:Nn \@@_cs_set:NNpn { Nc }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_default_set:n}
% Setting a default value is easy. These are stored using \cs{cs_set:cpx} as this
% avoids any worries about whether a token list exists.
@@ -1898,6 +1927,31 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}
+% {.cs_set:Np, .cs_set:cp, .cs_set_protected:Np, .cs_set_protected:cp}
+% \begin{macro}
+% {.cs_gset:Np, .cs_gset:cp, .cs_gset_protected:Np, .cs_gset_protected:cp}
+% \begin{macrocode}
+\cs_new_protected:cpn { \c_@@_props_root_str .cs_set:Np } #1
+ { \@@_cs_set:NNpn \cs_set:Npn #1 { } }
+\cs_new_protected:cpn { \c_@@_props_root_str .cs_set:cp } #1
+ { \@@_cs_set:Ncpn \cs_set:Npn #1 { } }
+\cs_new_protected:cpn { \c_@@_props_root_str .cs_set_protected:Np } #1
+ { \@@_cs_set:NNpn \cs_set_protected:Npn #1 { } }
+\cs_new_protected:cpn { \c_@@_props_root_str .cs_set_protected:cp } #1
+ { \@@_cs_set:Ncpn \cs_set_protected:Npn #1 { } }
+\cs_new_protected:cpn { \c_@@_props_root_str .cs_gset:Np } #1
+ { \@@_cs_set:NNpn \cs_gset:Npn #1 { } }
+\cs_new_protected:cpn { \c_@@_props_root_str .cs_gset:cp } #1
+ { \@@_cs_set:Ncpn \cs_gset:Npn #1 { } }
+\cs_new_protected:cpn { \c_@@_props_root_str .cs_gset_protected:Np } #1
+ { \@@_cs_set:NNpn \cs_gset_protected:Npn #1 { } }
+\cs_new_protected:cpn { \c_@@_props_root_str .cs_gset_protected:cp } #1
+ { \@@_cs_set:Ncpn \cs_gset_protected:Npn #1 { } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{.default:n, .default:V, .default:o, .default:x}
% Expansion is left to the internal functions.
% \begin{macrocode}