[latex3-commits] [git/LaTeX3-latex3-latex3] main: Remove \EvaluateNow (bdc72a558)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon May 30 10:41:39 CEST 2022


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/bdc72a558d9f699055458cfbc755f6b72c0e41f1

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

commit bdc72a558d9f699055458cfbc755f6b72c0e41f1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon May 30 09:41:39 2022 +0100

    Remove \EvaluateNow


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

bdc72a558d9f699055458cfbc755f6b72c0e41f1
 l3packages/CHANGELOG.md            |  3 ++
 l3packages/xtemplate/xtemplate.dtx | 67 +++-----------------------------------
 2 files changed, 7 insertions(+), 63 deletions(-)

diff --git a/l3packages/CHANGELOG.md b/l3packages/CHANGELOG.md
index 071b4b7d5..bae542aed 100644
--- a/l3packages/CHANGELOG.md
+++ b/l3packages/CHANGELOG.md
@@ -10,6 +10,9 @@ this project uses date-based 'snapshot' version identifiers.
 ### Changed
 - Allow for _ad hoc_ adjustment of template values
 
+### Removed
+- `\EvaluateNow` command
+
 ## [2022-01-12]
 
 ### Changed
diff --git a/l3packages/xtemplate/xtemplate.dtx b/l3packages/xtemplate/xtemplate.dtx
index bac365009..0156cf205 100644
--- a/l3packages/xtemplate/xtemplate.dtx
+++ b/l3packages/xtemplate/xtemplate.dtx
@@ -363,19 +363,6 @@
 %   from the \meta{code} used.
 % \end{function}
 %
-% \begin{function}{\EvaluateNow}
-%   \begin{syntax}
-%     \cs{EvaluateNow} \Arg{expression}
-%   \end{syntax}
-%   The standard method when creating an instance from a template is to
-%   evaluate the \meta{expression} when the instance is used. However, it may
-%   be desirable to calculate the value when declared, which can be
-%   forced using \cs{EvaluateNow}. Currently, this functionality is
-%   regarded as experimental: the team have not found an example where it
-%   is actually needed, and so it may be dropped \emph{if} no good
-%   examples are suggested!
-% \end{function}
-%
 % \section{Multiple choices}
 % \label{sec:choices-key}
 %
@@ -1013,8 +1000,7 @@
 % \end{macro}
 %
 % \begin{macro}[TF]{\@@_if_key_value:n, \@@_if_key_value:o}
-%   Tests for the first token in a string being \cs{KeyValue}, where
-%   \cs{EvaluateNow} is not important.
+%   Tests for the first token in a string being \cs{KeyValue}.
 %    \begin{macrocode}
 \prg_new_conditional:Npnn \@@_if_key_value:n #1 { T , F , TF }
   {
@@ -1028,18 +1014,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\@@_if_eval_now:nTF}
-%   Tests for the first token in a string being \cs{EvaluateNow}.
-%    \begin{macrocode}
-\prg_new_conditional:Npnn \@@_if_eval_now:n #1 { TF }
-  {
-    \str_if_eq:noTF { \EvaluateNow } { \tl_head:w #1 \q_nil \q_stop }
-      { \prg_return_true: }
-      { \prg_return_false: }
-  }
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}[TF]{\@@_if_instance_exist:nnn}
 %   Testing for an instance is collection dependent.
 %    \begin{macrocode}
@@ -1455,30 +1429,9 @@
 % value to be processed and potentially stored.
 %
 % \begin{macro}{\@@_store_value_boolean:n}
-%   Storing Boolean values requires a test for delayed evaluation, but
-%   is different to the various numerical variable types as there are
-%   only two possible values to store. So the code here tests the default
-%   switch and then records the meaning (either \texttt{true} or
-%   \texttt{false}).
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_store_value_boolean:n #1
-  {
-    \@@_if_eval_now:nTF {#1}
-      {
-        \bool_if:cTF { c_ #1 _bool }
-          {
-            \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl
-              { true }
-          }
-          {
-            \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl
-              { false }
-          }
-      }
-      {
-        \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#1}
-      }
-  }
+  { \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#1} }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1500,17 +1453,9 @@
 %   \@@_store_value_real:n, \@@_store_value_skip:n,
 %   \@@_store_value_tokenlist:n, \@@_store_value_commalist:n}
 %   Storing values in \cs{l_@@_values_prop} is in most cases the same.
-%   If evaluation is taking place now, one \texttt{x}-expands an
-%   evaluation function and the result is then stored. On the other
-%   hand, if evaluation is delayed the current data is simply stored
-%   \enquote{as is}.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_store_value_aux:Nn #1#2
-  {
-    \@@_if_eval_now:nTF {#2}
-      { \prop_put:NVx \l_@@_values_prop \l_@@_key_name_tl { #1 {#2} } }
-      { \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#2} }
-  }
+  { \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#2} }
 \cs_new_protected:Npn \@@_store_value_integer:n
   { \@@_store_value_aux:Nn \int_eval:n }
 \cs_new_protected:Npn \@@_store_value_length:n
@@ -2912,16 +2857,12 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\EvaluateNow}
 % \begin{macro}{\KeyValue}
-%   These are both do nothing functions. Both simply dump their arguments
-%   when executed: this should not happen with \cs{KeyValue}.
+%   Simply dump the argument when executed: this should not happen.
 %    \begin{macrocode}
-\cs_new_protected:Npn \EvaluateNow #1 {#1}
 \cs_new_protected:Npn \KeyValue #1 {#1}
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}
 %
 % \begin{macro}{\AssignTemplateKeys}
 %   A short call to use a token register by proxy.





More information about the latex3-commits mailing list.