[latex3-commits] [git/LaTeX3-latex3-latex3] l3bitset-2: remove unneeded key-commands (73346923e)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Dec 29 16:12:38 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : l3bitset-2
Link       : https://github.com/latex3/latex3/commit/73346923e21cdcf38112a2151c189cc079e5957e

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

commit 73346923e21cdcf38112a2151c189cc079e5957e
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Dec 29 16:12:38 2020 +0100

    remove unneeded key-commands


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

73346923e21cdcf38112a2151c189cc079e5957e
 l3experimental/l3bitset/l3bitset.dtx | 175 -----------------------------------
 1 file changed, 175 deletions(-)

diff --git a/l3experimental/l3bitset/l3bitset.dtx b/l3experimental/l3bitset/l3bitset.dtx
index fb24ef4b2..50f6e2dd4 100644
--- a/l3experimental/l3bitset/l3bitset.dtx
+++ b/l3experimental/l3bitset/l3bitset.dtx
@@ -242,75 +242,6 @@
 % \end{function}
 %
 
-% \section{Syntactic sugar: Setting bits by keys}
-%
-% \begin{function}[added = 2020-12-19]
-%   {\bitset_addto_named_index:Nn}
-%   \begin{syntax}
-%     \cs{bitset_addto_named_index:Nn} \meta{bitset var}
-%      \{
-%         \meta{name1} |=| \meta{index1} |,|
-%         \meta{name2} |=| \meta{index2} |,| \ldots{}
-%      \}
-%   \end{syntax}
-% This adds the name--index pairs given in the second
-% argument to an internal, global property list. If the
-% property list didn't exist yet, it is created.
-% It is then possible to use the names (the keys of the property
-% to set and unset bits. It is not necessary to give every index
-% a name, and an index can have more than one name.
-% \end{function}
-%
-%  For example after this settings
-%
-%  \begin{verbatim}
-%  \bitset_new:N \l_pdfannot_F_bitset
-%  \bitset_addto_named_index:Nn \l_pdfannot_F_bitset
-%    {
-%      Invisible      = 1,
-%      Hidden         = 2,
-%      Print          = 3,
-%      NoZoom         = 4,
-%      NoRotate       = 5,
-%      NoView         = 6,
-%      ReadOnly       = 7,
-%      Locked         = 8,
-%      ToggleNoView   = 9,
-%      LockedContents = 10
-%    }
-%  \end{verbatim}
-%  it is possible to set bit 3 by using
-%  |\bitset_set_true_key:Nn \l_pdfannot_F_bitset {Print}|
-%  If a key is unknown a warning is issued.
-% \begin{function}[added = 2020-12-13]
-%   {\bitset_set_true_key:Nn, \bitset_set_true_key:cn,
-%    \bitset_gset_true_key:Nn,\bitset_gset_true_key:cn }
-%   \begin{syntax}
-%     \cs{bitset_set_true_key:Nn}   \meta{bitset var}  \Arg{key}\\
-%     \cs{bitset_gset_true_key:Nn}  \meta{bitset var}  \Arg{key}
-%   \end{syntax}
-% This sets the bit of the position described by key to \texttt{1}.
-%
-% If needed the length of the bitset is enlarged.
-% \end{function}
-% \begin{function}[added = 2020-12-13]
-%   {\bitset_set_false_key:Nn, \bitset_set_false_key:cn,
-%    \bitset_gset_false_key:Nn, \bitset_set_false_key:cn,}
-%   \begin{syntax}
-%     \cs{bitset_set_false_key:Nn}   \meta{bitset var}  \Arg{key}\\
-%     \cs{bitset_gset_false_key:Nn}  \meta{bitset var}  \Arg{key}
-%   \end{syntax}
-% This sets the bit of the position described by key to 0.
-% If the leading (left most) bit is unset, zeros are not
-% trimmed but stay in the bit vector.
-% \end{function}
-% \begin{function}[EXP,added = 2020-12-14]
-%   {\bitset_key:Nn}
-%   \begin{syntax}
-%     \cs{bitset_key:Nn}     \meta{bitset var}  \Arg{key}
-%   \end{syntax}
-% This outputs \texttt{1} if the bit is set, \texttt{0} otherwise.
-% \end{function}
 % \end{documentation}
 %
 % \begin{implementation}
@@ -715,112 +646,6 @@
 %    \end{macrocode}
 % \end{macro}
 
-% \begin{macro}
-%   {
-%     \bitset_set_true_key:Nn, \bitset_set_true_key:cn,
-%     \bitset_gset_true_key:Nn, \bitset_gset_true_key:cn
-%   }
-%    \begin{macrocode}
-\cs_new_protected:Npn \bitset_set_true_key:Nn #1 #2
-  {
-    \prop_if_in:cnTF { g_@@_\cs_to_str:N #1 _key_prop } {#2}
-      {
-        \bitset_set_true:Nn #1
-          {
-            \prop_item:cn{ g_@@_\cs_to_str:N #1 _key_prop }{#2}
-          }
-      }
-      {
-        \__kernel_msg_warning:nnxx { bitset } { bitset-unknown-key }
-          { \token_to_str:N #1 }
-          { \tl_to_str:n { #2} }
-      }
-  }
-
-\cs_new_protected:Npn \bitset_gset_true_key:Nn #1 #2
-  {
-    \prop_if_in:cnTF { g_@@_\cs_to_str:N #1 _key_prop } {#2}
-      {
-        \bitset_gset_true:Nn #1
-          {
-            \prop_item:cn{ g_@@_\cs_to_str:N #1 _key_prop }{#2}
-          }
-      }
-      {
-         \__kernel_msg_warning:nnxx { bitset } { bitset-unknown-key }
-           { \token_to_str:N #1 }
-           { \tl_to_str:n { #2} }
-
-      }
-  }
-\cs_generate_variant:Nn \bitset_set_true_key:Nn {cn}
-\cs_generate_variant:Nn \bitset_gset_true_key:Nn {cn}
-
-%    \end{macrocode}
-% \end{macro}%
-% \begin{macro}
-%   {
-%     \bitset_set_false_key:Nn,  \bitset_set_false_key:cn,
-%     \bitset_gset_false_key:Nn, \bitset_gset_false_key:cn,
-%   }
-%    \begin{macrocode}
-\cs_new_protected:Npn \bitset_set_false_key:Nn #1 #2
-  {
-    \prop_if_in:cnTF { g_@@_\cs_to_str:N #1 _key_prop } {#2}
-      {
-        \bitset_set_false:Nn #1
-          {
-            \prop_item:cn{ g_@@_\cs_to_str:N #1 _key_prop }{#2}
-          }
-      }
-      {
-        \__kernel_msg_warning:nnxx { bitset } { bitset-unknown-key }
-          { \token_to_str:N #1 }
-          { \tl_to_str:n { #2} }
-      }
-  }
-
-\cs_new_protected:Npn \bitset_gset_false_key:Nn #1 #2
-  {
-    \prop_if_in:cnTF { g_@@_\cs_to_str:N #1 _key_prop } {#2}
-      {
-        \bitset_gset_false:Nn #1
-          {
-            \prop_item:cn{ g_@@_\cs_to_str:N #1 _key_prop }{#2}
-          }
-      }
-      {
-        \__kernel_msg_warning:nnxx { bitset } { bitset-unknown-key }
-          { \token_to_str:N #1 }
-          { \tl_to_str:n { #2} }
-      }
-  }
-\cs_generate_variant:Nn \bitset_set_false_key:Nn {cn}
-\cs_generate_variant:Nn \bitset_gset_false_key:Nn {cn}
-%    \end{macrocode}
-%  \end{macro}
-% \begin{macro}
-%   {
-%     \bitset_key:Nn, \bitset_key:cn
-%   }
-%    \begin{macrocode}
-\cs_new:Npn \bitset_key:Nn #1 #2
-  {
-    \prop_if_in:cnTF { g_@@_\cs_to_str:N #1 _key_prop } {#2}
-      {
-        \int_eval:n
-          {
-            \str_item:Nn #1
-              { 0 - ( \prop_item:cn { g_@@_\cs_to_str:N #1 _key_prop }{#2} ) }
-            +0
-          }
-     }
-     {
-       0
-     }
-  }
-\cs_generate_variant:Nn \bitset_key:Nn  {cn}
-%    \end{macrocode}
 % \subsection{Messages}
 %    \begin{macrocode}
  \__kernel_msg_new:nnn { bitset } { show-bitset }





More information about the latex3-commits mailing list.