[latex3-commits] [latex3/latex3] develop, main: Add V-type variants for all \<var>_set:Nn (f19fc037b)

github at latex-project.org github at latex-project.org
Sat Nov 2 20:56:11 CET 2024


Repository : https://github.com/latex3/latex3
On branches: develop,main
Link       : https://github.com/latex3/latex3/commit/f19fc037bbf0fbfd0ac4b124a401d01314c27bb7

>---------------------------------------------------------------

commit f19fc037bbf0fbfd0ac4b124a401d01314c27bb7
Author: Joseph Wright <joseph at texdev.net>
Date:   Sat Nov 2 19:56:11 2024 +0000

    Add V-type variants for all \<var>_set:Nn
    
    Addresses latex3/latex2e#1523


>---------------------------------------------------------------

f19fc037bbf0fbfd0ac4b124a401d01314c27bb7
 l3kernel/CHANGELOG.md    |  3 +++
 l3kernel/l3fp-assign.dtx |  6 ++++--
 l3kernel/l3fp.dtx        |  5 ++++-
 l3kernel/l3int.dtx       | 13 ++++++++-----
 l3kernel/l3skip.dtx      | 39 ++++++++++++++++++++++++---------------
 5 files changed, 43 insertions(+), 23 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 22aa59646..947efb5cb 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Added
+- `V`-type variant for all `\<var>_set:Nn` functions
+
 ### Fixed
 - Error detection in coffin code (see \#1580)
 
diff --git a/l3kernel/l3fp-assign.dtx b/l3kernel/l3fp-assign.dtx
index 76f38f2b4..3baa8a824 100644
--- a/l3kernel/l3fp-assign.dtx
+++ b/l3kernel/l3fp-assign.dtx
@@ -75,7 +75,9 @@
 % \begin{macro}
 %   {
 %     \fp_set:Nn, \fp_set:cn,
+%     \fp_set:NV, \fp_set:cV,
 %     \fp_gset:Nn, \fp_gset:cn,
+%     \fp_gset:NV, \fp_gset:cV,
 %     \fp_const:Nn, \fp_const:cn
 %   }
 %   Simply use \cs{@@_parse:n} within various \texttt{f}-expanding
@@ -87,8 +89,8 @@
   { \__kernel_tl_gset:Nx #1 { \exp_not:f { \@@_parse:n {#2} } } }
 \cs_new_protected:Npn \fp_const:Nn #1#2
   { \tl_const:Ne #1 { \exp_not:f { \@@_parse:n {#2} } } }
-\cs_generate_variant:Nn \fp_set:Nn {c}
-\cs_generate_variant:Nn \fp_gset:Nn {c}
+\cs_generate_variant:Nn \fp_set:Nn { NV , c , cV }
+\cs_generate_variant:Nn \fp_gset:Nn { NV , c , cV }
 \cs_generate_variant:Nn \fp_const:Nn {c}
 %    \end{macrocode}
 % \end{macro}
diff --git a/l3kernel/l3fp.dtx b/l3kernel/l3fp.dtx
index 91f3cb6d2..6a84fb07b 100644
--- a/l3kernel/l3fp.dtx
+++ b/l3kernel/l3fp.dtx
@@ -198,7 +198,10 @@
 % \section{Setting floating point variables}
 %
 % \begin{function}[updated = 2012-05-08, tested = m3fp002]
-%   {\fp_set:Nn, \fp_set:cn, \fp_gset:Nn, \fp_gset:cn}
+%   {
+%     \fp_set:Nn, \fp_set:cn, \fp_set:NV, \fp_set:cV,
+%     \fp_gset:Nn, \fp_gset:cn, \fp_gset:NV, \fp_gset:cV
+%   }
 %   \begin{syntax}
 %     \cs{fp_set:Nn} \meta{fp~var} \Arg{fp expr}
 %   \end{syntax}
diff --git a/l3kernel/l3int.dtx b/l3kernel/l3int.dtx
index 4c338a111..dd3895fc7 100644
--- a/l3kernel/l3int.dtx
+++ b/l3kernel/l3int.dtx
@@ -295,7 +295,10 @@
 % \end{function}
 %
 % \begin{function}[updated = 2011-10-22]
-%   {\int_set:Nn, \int_set:cn, \int_gset:Nn, \int_gset:cn}
+%   {
+%     \int_set:Nn, \int_set:cn, \int_set:NV, \int_set:cV,
+%     \int_gset:Nn, \int_gset:cn, \int_gset:MV, \int_gset:cV
+%   }
 %   \begin{syntax}
 %     \cs{int_set:Nn} \meta{integer} \Arg{int expr}
 %   \end{syntax}
@@ -1473,9 +1476,9 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\int_set:Nn, \int_set:cn}
+% \begin{macro}{\int_set:Nn, \int_set:cn, \int_set:NV, \int_set:cV}
 % \UnitTested
-% \begin{macro}{\int_gset:Nn, \int_gset:cn}
+% \begin{macro}{\int_gset:Nn, \int_gset:cn, \int_gset:NV, \int_gset:cV}
 % \UnitTested
 %   As integers are register-based \TeX{} issues an error
 %   if they are not defined.  While the |=| sign is optional, this
@@ -1486,8 +1489,8 @@
   { #1 = \@@_eval:w #2 \@@_eval_end: }
 \cs_new_protected:Npn \int_gset:Nn #1#2
   { \tex_global:D #1 = \@@_eval:w #2 \@@_eval_end: }
-\cs_generate_variant:Nn \int_set:Nn  { c }
-\cs_generate_variant:Nn \int_gset:Nn { c }
+\cs_generate_variant:Nn \int_set:Nn  { NV , c , cV }
+\cs_generate_variant:Nn \int_gset:Nn { NV , c , cV }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/l3kernel/l3skip.dtx b/l3kernel/l3skip.dtx
index adbcf4dbc..8094ead2d 100644
--- a/l3kernel/l3skip.dtx
+++ b/l3kernel/l3skip.dtx
@@ -124,7 +124,10 @@
 % \end{function}
 %
 % \begin{function}[updated = 2011-10-22]
-%   {\dim_set:Nn, \dim_set:cn, \dim_gset:Nn, \dim_gset:cn}
+%   {
+%     \dim_set:Nn, \dim_set:cn, \dim_set:NV, \dim_set:cV,
+%     \dim_gset:Nn, \dim_gset:cn, \dim_gset:NV, \dim_gset:cV
+%   }
 %   \begin{syntax}
 %     \cs{dim_set:Nn} \meta{dimension} \Arg{dim expr}
 %   \end{syntax}
@@ -757,7 +760,10 @@
 % \end{function}
 %
 % \begin{function}[updated = 2011-10-22]
-%   {\skip_set:Nn, \skip_set:cn, \skip_gset:Nn, \skip_gset:cn}
+%   {
+%     \skip_set:Nn, \skip_set:cn, \skip_set:NV, \skip_set:cV,
+%     \skip_gset:Nn, \skip_gset:cn, \skip_gset:NV, \skip_gset:cV
+%   }
 %   \begin{syntax}
 %     \cs{skip_set:Nn} \meta{skip} \Arg{skip expr}
 %   \end{syntax}
@@ -993,7 +999,10 @@
 % \end{function}
 %
 % \begin{function}[updated = 2011-10-22]
-%   {\muskip_set:Nn, \muskip_set:cn, \muskip_gset:Nn, \muskip_gset:cn}
+%   {
+%     \muskip_set:Nn, \muskip_set:cn, \muskip_set:Nn, \muskip_set:cn,
+%     \muskip_gset:Nn, \muskip_gset:cn, \muskip_gset:NV, \muskip_gset:cV
+%   }
 %   \begin{syntax}
 %     \cs{muskip_set:Nn} \meta{muskip} \Arg{muskip expr}
 %   \end{syntax}
@@ -1250,8 +1259,8 @@
 %
 % \subsection{Setting \texttt{dim} variables}
 %
-% \begin{macro}{\dim_set:Nn, \dim_set:cn}
-% \begin{macro}{\dim_gset:Nn, \dim_gset:cn}
+% \begin{macro}{\dim_set:Nn, \dim_set:cn, \dim_set:NV, \dim_set:cV}
+% \begin{macro}{\dim_gset:Nn, \dim_gset:cn, \dim_gset:NV, \dim_gset:cV}
 %   Setting dimensions is easy enough but when debugging we want both to
 %   check that the variable is correctly local/global and to wrap the
 %   expression in some code.  The \cs{scan_stop:} deals with the case
@@ -1262,8 +1271,8 @@
   { #1 = \@@_eval:w #2 \@@_eval_end: \scan_stop: }
 \cs_new_protected:Npn \dim_gset:Nn #1#2
   { \tex_global:D #1 = \@@_eval:w #2 \@@_eval_end: \scan_stop: }
-\cs_generate_variant:Nn \dim_set:Nn  { c }
-\cs_generate_variant:Nn \dim_gset:Nn { c }
+\cs_generate_variant:Nn \dim_set:Nn  { NV , c , cV }
+\cs_generate_variant:Nn \dim_gset:Nn { NV , c , cV }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -2213,16 +2222,16 @@
 %
 % \subsection{Setting \texttt{skip} variables}
 %
-% \begin{macro}{\skip_set:Nn, \skip_set:cn}
-% \begin{macro}{\skip_gset:Nn, \skip_gset:cn}
+% \begin{macro}{\skip_set:Nn, \skip_set:cn, \skip_set:NV, \skip_set:cV}
+% \begin{macro}{\skip_gset:Nn, \skip_gset:cn, \skip_gset:NV, \skip_gset:cV}
 %   Much the same as for dimensions.
 %    \begin{macrocode}
 \cs_new_protected:Npn \skip_set:Nn #1#2
   { #1 = \tex_glueexpr:D #2 \scan_stop: }
 \cs_new_protected:Npn \skip_gset:Nn #1#2
   { \tex_global:D #1 = \tex_glueexpr:D #2 \scan_stop: }
-\cs_generate_variant:Nn \skip_set:Nn  { c }
-\cs_generate_variant:Nn \skip_gset:Nn { c }
+\cs_generate_variant:Nn \skip_set:Nn  { NV , c , cV }
+\cs_generate_variant:Nn \skip_gset:Nn { NV , c , cV }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -2464,16 +2473,16 @@
 %
 % \subsection{Setting \texttt{muskip} variables}
 %
-% \begin{macro}{\muskip_set:Nn, \muskip_set:cn}
-% \begin{macro}{\muskip_gset:Nn, \muskip_gset:cn}
+% \begin{macro}{\muskip_set:Nn, \muskip_set:cn, \muskip_set:NV, \muskip_set:cV}
+% \begin{macro}{\muskip_gset:Nn, \muskip_gset:cn, \muskip_gset:NV, \muskip_gset:cV}
 %   This should be pretty familiar.
 %    \begin{macrocode}
 \cs_new_protected:Npn \muskip_set:Nn #1#2
   { #1 = \tex_muexpr:D #2 \scan_stop: }
 \cs_new_protected:Npn \muskip_gset:Nn #1#2
   { \tex_global:D #1 = \tex_muexpr:D #2 \scan_stop: }
-\cs_generate_variant:Nn \muskip_set:Nn  { c }
-\cs_generate_variant:Nn \muskip_gset:Nn { c }
+\cs_generate_variant:Nn \muskip_set:Nn  { NV , c , cV }
+\cs_generate_variant:Nn \muskip_gset:Nn { NV , c , cV }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}





More information about the latex3-commits mailing list.