[latex3-commits] [git/LaTeX3-latex3-latex3] master: Only index TF, T, F functions together if they are expl functions (fixes #453) (569a39e)

Bruno Le Floch bruno at le-floch.fr
Mon Apr 23 05:38:28 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/569a39ecb797e9bdd7f9de826df3fe167110d62c

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

commit 569a39ecb797e9bdd7f9de826df3fe167110d62c
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Sun Apr 22 23:38:28 2018 -0400

    Only index TF, T, F functions together if they are expl functions (fixes #453)


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

569a39ecb797e9bdd7f9de826df3fe167110d62c
 l3kernel/l3doc.dtx |   32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 471014a..146bc33 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -923,6 +923,7 @@ and all files in that bundle must be distributed together.
 %     \tl_if_head_eq_charcode:oNF,
 %     \tl_if_head_eq_meaning:VNF,
 %     \tl_if_in:noTF,
+%     \tl_if_in:ooTF,
 %     \tl_if_in:NoTF,
 %     \tl_if_in:NoT,
 %     \tl_if_in:NoF,
@@ -1198,7 +1199,11 @@ and all files in that bundle must be distributed together.
 %
 % \begin{macro}[rEXP]{\@@_key_get_base:nN}
 %   Get the base form of a function and store it.  As part of getting
-%   the base form, change trailing |T| or |F| to |TF|.
+%   the base form, change trailing |T| or |F| to |TF|, skipping that
+%   change if the function contains no colon to avoid changing for
+%   instance some names ending in \texttt{PDF} or similar.  The various
+%   letters |z| serve as end-delimiters different from any outcome of
+%   \cs{tl_to_str:n}.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_key_get_base:nN #1#2
   {
@@ -1212,22 +1217,23 @@ and all files in that bundle must be distributed together.
   }
 \cs_new:Npx \@@_key_get_base_TF:nN #1#2
   {
-    \tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} \scan_stop: }
-    \tl_if_in:NnTF #2 { \tl_to_str:n { F } \scan_stop: }
+    \tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} }
+    \tl_if_in:NoF #2 { \tl_to_str:n {:} }
+      { \exp_not:N \prg_break: }
+    \tl_if_in:onT { #2 z } { \tl_to_str:n {TF} z }
+      { \exp_not:N \prg_break: }
+    \tl_if_in:onT { #2 z } { \tl_to_str:n {T} z }
       {
-        \tl_if_in:NnF #2 { \tl_to_str:n { TF } \scan_stop: }
-          {
-            \tl_replace_once:Nnn #2
-              { \tl_to_str:n { F } \scan_stop: }
-              { \tl_to_str:n { TF } \scan_stop: }
-          }
+        \tl_put_right:Nn #2 { \tl_to_str:n {F} }
+        \exp_not:N \prg_break:
       }
+    \tl_if_in:onT { #2 z } { \tl_to_str:n {F} z }
       {
-        \tl_replace_once:Nnn #2
-          { \tl_to_str:n { T } \scan_stop: }
-          { \tl_to_str:n { TF } \scan_stop: }
+        \tl_put_right:Nn #2 { z }
+        \tl_replace_once:Nnn #2 { \tl_to_str:n {F} z } { \tl_to_str:n {TF} }
+        \exp_not:N \prg_break:
       }
-    \tl_remove_once:Nn #2 { \scan_stop: }
+    \exp_not:N \prg_break_point:
   }
 \cs_new:Npn \@@_base_form_aux:nnN #1#2#3
   {





More information about the latex3-commits mailing list