[latex3-commits] [git/LaTeX3-latex3-latex3] main: Add gset versions of \prg_set_conditional:Npnn, etc. (closes #1079) (d0220ef84)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Nov 1 11:14:39 CET 2022
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/d0220ef848484d07fe7a0089001341d68dce0923
>---------------------------------------------------------------
commit d0220ef848484d07fe7a0089001341d68dce0923
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Nov 1 10:14:39 2022 +0000
Add gset versions of \prg_set_conditional:Npnn, etc. (closes #1079)
>---------------------------------------------------------------
d0220ef848484d07fe7a0089001341d68dce0923
l3kernel/CHANGELOG.md | 4 ++++
l3kernel/l3basics.dtx | 16 ++++++++++++++--
l3kernel/l3prg.dtx | 10 +++++-----
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index c96c96669..33f778289 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Added
+- `\prg_gset_conditional:N(p)nn` and
+ `\prg_gset_protected_conditional:N(p)nn`
+
### Fixed
- Loading of `expl3` with ConTeXt MkIV (issue
[\#1142](https://github.com/latex3/latex3/issues/1142))
diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index bf1b580d8..d6c4a2e6e 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1864,9 +1864,11 @@
% \begin{macro}
% {
% \prg_set_conditional:Npnn ,
+% \prg_gset_conditional:Npnn ,
% \prg_new_conditional:Npnn ,
% \prg_set_protected_conditional:Npnn ,
-% \prg_new_protected_conditional:Npnn ,
+% \prg_gset_protected_conditional:Npnn,
+% \prg_new_protected_conditional:Npnn
% }
% \begin{macro}{\@@_generate_conditional_parm:NNNpnn}
% The user functions for the types using parameter text from the
@@ -1882,10 +1884,14 @@
% \begin{macrocode}
\cs_set_protected:Npn \prg_set_conditional:Npnn
{ \@@_generate_conditional_parm:NNNpnn \cs_set:Npn e }
+\cs_set_protected:Npn \prg_gset_conditional:Npnn
+ { \@@_generate_conditional_parm:NNNpnn \cs_gset:Npn e }
\cs_set_protected:Npn \prg_new_conditional:Npnn
{ \@@_generate_conditional_parm:NNNpnn \cs_new:Npn e }
\cs_set_protected:Npn \prg_set_protected_conditional:Npnn
{ \@@_generate_conditional_parm:NNNpnn \cs_set_protected:Npn p }
+\cs_set_protected:Npn \prg_gset_protected_conditional:Npnn
+ { \@@_generate_conditional_parm:NNNpnn \cs_gset_protected:Npn p }
\cs_set_protected:Npn \prg_new_protected_conditional:Npnn
{ \@@_generate_conditional_parm:NNNpnn \cs_new_protected:Npn p }
\cs_set_protected:Npn \@@_generate_conditional_parm:NNNpnn #1#2#3#4#
@@ -1904,9 +1910,11 @@
% \begin{macro}
% {
% \prg_set_conditional:Nnn ,
+% \prg_gset_conditional:Nnn ,
% \prg_new_conditional:Nnn ,
% \prg_set_protected_conditional:Nnn ,
-% \prg_new_protected_conditional:Nnn ,
+% \prg_gset_protected_conditional:Nnn,
+% \prg_new_protected_conditional:Nnn
% }
% \begin{macro}
% {
@@ -1928,10 +1936,14 @@
% \begin{macrocode}
\cs_set_protected:Npn \prg_set_conditional:Nnn
{ \@@_generate_conditional_count:NNNnn \cs_set:Npn e }
+\cs_set_protected:Npn \prg_gset_conditional:Nnn
+ { \@@_generate_conditional_count:NNNnn \cs_set:Npn e }
\cs_set_protected:Npn \prg_new_conditional:Nnn
{ \@@_generate_conditional_count:NNNnn \cs_new:Npn e }
\cs_set_protected:Npn \prg_set_protected_conditional:Nnn
{ \@@_generate_conditional_count:NNNnn \cs_set_protected:Npn p }
+\cs_set_protected:Npn \prg_gset_protected_conditional:Nnn
+ { \@@_generate_conditional_count:NNNnn \cs_gset_protected:Npn p }
\cs_set_protected:Npn \prg_new_protected_conditional:Nnn
{ \@@_generate_conditional_count:NNNnn \cs_new_protected:Npn p }
\cs_set_protected:Npn \@@_generate_conditional_count:NNNnn #1#2#3
diff --git a/l3kernel/l3prg.dtx b/l3kernel/l3prg.dtx
index 625cd9449..e0e4afff4 100644
--- a/l3kernel/l3prg.dtx
+++ b/l3kernel/l3prg.dtx
@@ -76,10 +76,10 @@
% \section{Defining a set of conditional functions}
% \label{sec:l3prg:new-conditional-functions}
%
-% \begin{function}[updated = 2012-02-06]
+% \begin{function}[updated = 2022-11-01]
% {
-% \prg_new_conditional:Npnn, \prg_set_conditional:Npnn,
-% \prg_new_conditional:Nnn, \prg_set_conditional:Nnn
+% \prg_new_conditional:Npnn, \prg_set_conditional:Npnn, \prg_gset_conditional:Npnn,
+% \prg_new_conditional:Nnn, \prg_set_conditional:Nnn, \prg_gset_conditional:Nnn
% }
% \begin{syntax}
% \cs{prg_new_conditional:Npnn} \cs[no-index]{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\
@@ -98,8 +98,8 @@
%
% \begin{function}[updated = 2012-02-06]
% {
-% \prg_new_protected_conditional:Npnn, \prg_set_protected_conditional:Npnn,
-% \prg_new_protected_conditional:Nnn, \prg_set_protected_conditional:Nnn
+% \prg_new_protected_conditional:Npnn, \prg_set_protected_conditional:Npnn, \prg_gset_protected_conditional:Npnn,
+% \prg_new_protected_conditional:Nnn, \prg_set_protected_conditional:Nnn, \prg_gset_protected_conditional:Nnn
% }
% \begin{syntax}
% \cs{prg_new_protected_conditional:Npnn} \cs[no-index]{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\
More information about the latex3-commits
mailing list.