[latex3-commits] [latex3/latex2e] develop: Remove \IfInstanceExist(TF) (10a330e5)

github at latex-project.org github at latex-project.org
Tue Feb 13 23:07:15 CET 2024


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/10a330e5013d41f9d209a2f2ebaac91ffa18a62d

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

commit 10a330e5013d41f9d209a2f2ebaac91ffa18a62d
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Feb 11 23:01:40 2024 +0000

    Remove \IfInstanceExist(TF)
    
    At present unused in TL, not needed since we do not
    include collections.


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

10a330e5013d41f9d209a2f2ebaac91ffa18a62d
 base/lttemplates.dtx                          | 12 ------------
 base/testfiles-lttemplates/lttemplates003.lvt | 26 --------------------------
 base/testfiles-lttemplates/lttemplates003.tlg | 22 +++++++---------------
 3 files changed, 7 insertions(+), 53 deletions(-)

diff --git a/base/lttemplates.dtx b/base/lttemplates.dtx
index c4254774..844fb6fd 100644
--- a/base/lttemplates.dtx
+++ b/base/lttemplates.dtx
@@ -2653,18 +2653,6 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\IfInstanceExistT, \IfInstanceExistF, \IfInstanceExistTF}
-%   More direct translation.
-%    \begin{macrocode}
-\cs_new:Npn \IfInstanceExistTF #1#2
-  { \@@_if_instance_exist:nnTF {#1} {#2} }
-\cs_new:Npn \IfInstanceExistT #1#2
-  { \@@_if_instance_exist:nnT {#1} {#2} }
-\cs_new:Npn \IfInstanceExistF #1#2
-  { \@@_if_instance_exist:nnF {#1} {#2} }
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{\KeyValue}
 %   Simply dump the argument when executed: this should not happen.
 %    \begin{macrocode}
diff --git a/base/testfiles-lttemplates/lttemplates003.lvt b/base/testfiles-lttemplates/lttemplates003.lvt
index 9c3c2d21..d16b95ea 100644
--- a/base/testfiles-lttemplates/lttemplates003.lvt
+++ b/base/testfiles-lttemplates/lttemplates003.lvt
@@ -317,32 +317,6 @@
 }
 
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% 17
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\TEST{Testing~instances:~existance~check}{
-
-   \IfInstanceExistTF {test} {nono}                      % instance unknwon, ok
-        {\typeout{Yes}} {\typeout{No}}
-
-   \IfInstanceExistTF {missingobjecttype} {nono}         % objecttype unknown, ok
-        {\typeout{Yes}} {\typeout{No}}
-
-   \group_begin:
-
-     \DeclareInstance {test} {myinstance} {tname2} {}
-
-     \IfInstanceExistTF {test} {myinstance}              % test inside group, ok
-	  {\typeout{Yes}} {\typeout{No}}
-
-   \group_end:
-
-     \IfInstanceExistTF {test} {myinstance}              % test outside group
-	  {\typeout{Yes}} {\typeout{No}}                 % no longer defined, ok
-
-}
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % 18
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/base/testfiles-lttemplates/lttemplates003.tlg b/base/testfiles-lttemplates/lttemplates003.tlg
index b089b031..a7bed200 100644
--- a/base/testfiles-lttemplates/lttemplates003.tlg
+++ b/base/testfiles-lttemplates/lttemplates003.tlg
@@ -5,7 +5,7 @@ Author: Frank Mittelbach
 TEST 1: Testing object types
 ============================================================
 LaTeX template Info: Declaring template type 'ok' taking 3 argument(s) on line
-(template)           56.
+(template)           ....
 ! LaTeX template Error: Template type 'ok' already defined.
 For immediate help type H <return>.
  ...                                              
@@ -113,7 +113,7 @@ This should be given using \DeclareTemplateCode .
 TEST 5: Testing incomplete key types
 ============================================================
 ! LaTeX template Error: The key type 'choice' requires an argument on line
-(template)              130.
+(template)              ....
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -121,7 +121,7 @@ You should have put:
   <key-name> : choice { <argument> }
 but LaTeX did not find an <argument>.
 ! LaTeX template Error: The key type 'function' requires an argument on line
-(template)              130.
+(template)              ....
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -129,7 +129,7 @@ You should have put:
   <key-name> : function { <argument> }
 but LaTeX did not find an <argument>.
 ! LaTeX template Error: The key type 'instance' requires an argument on line
-(template)              130.
+(template)              ....
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -302,15 +302,7 @@ The template 'tname16' of type 'test' has variable mapping:
 l. ...}
 ============================================================
 ============================================================
-TEST 17: Testing instances: existance check
-============================================================
-No
-No
-Yes
-No
-============================================================
-============================================================
-TEST 18: Testing instances: declare instance
+TEST 17: Testing instances: declare instance
 ============================================================
 ! LaTeX template Error: The template 'never-defined' of type 'test' is unknown
 (template)              or has no implementation.
@@ -325,7 +317,7 @@ huh
 (Y-99)
 ============================================================
 ============================================================
-TEST 19: Edit template defaults
+TEST 18: Edit template defaults
 ============================================================
 Defining key template/test/tname17/key on line ...
 Defining key template/test/tname17/key/unknown on line ...
@@ -376,7 +368,7 @@ l. ...}
 The key 'wrong' was not declared in the interface for the current template.
 ============================================================
 ============================================================
-TEST 20: Edit instance values
+TEST 19: Edit instance values
 ============================================================
 The instance 'myinstance' of type 'test' has values:
 >  key  =>  A





More information about the latex3-commits mailing list.