[latex3-commits] [git/LaTeX3-latex3-babel] master: Fix #110 (Missing ‘Unused global option(s)’ warning). (7f2487e)

Javier email at dante.de
Fri Dec 11 16:49:22 CET 2020


Repository : https://github.com/latex3/babel
On branch  : master
Link       : https://github.com/latex3/babel/commit/7f2487eef35e934c702ddf082290b7436c2318ff

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

commit 7f2487eef35e934c702ddf082290b7436c2318ff
Author: Javier <email at localhost>
Date:   Fri Dec 11 16:49:22 2020 +0100

    Fix #110 (Missing ‘Unused global option(s)’ warning).


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

7f2487eef35e934c702ddf082290b7436c2318ff
 README.md    |   7 ++--
 babel.dtx    | 109 ++++++++++++++++++++++++++++-------------------------------
 babel.ins    |   2 +-
 babel.pdf    | Bin 817101 -> 816943 bytes
 bbcompat.dtx |   2 +-
 5 files changed, 57 insertions(+), 63 deletions(-)

diff --git a/README.md b/README.md
index 782a745..1fa7777 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.51.2217
+## Babel 3.51.2218
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages.  Many
@@ -43,14 +43,15 @@ respective authors.
 
 ### Latest changes
 ```
-3.52   2020-12-??
-       - Improved \babelprehyphenation and \babelprehyphenation (with
+3.52   2020-12-[16?]
+       - Improved \babelprehyphenation and \babelprehyphenation (and
          some bugs fixed).
        - Fixes:
          - A couple of issues with \localeinfo and \getlocaleproperty
            (#102, #105).
          - Save size overflow with many \selectlanguage's (#109).
          - Albanian: fix a typo in contents name (#104)
+         - Missing ‘Unused global option(s)’ warning (#110)
 
 3.51   2020-10-27
        - Common interface to (re)define captions (with
diff --git a/babel.dtx b/babel.dtx
index 2ffae68..df59b3a 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2020/12/10 v3.51.2217 The Babel package]
+\ProvidesFile{babel.dtx}[2020/12/11 v3.51.2218 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -4823,8 +4823,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.51.2217>>
-%<<date=2020/12/10>>
+%<<version=3.51.2218>>
+%<<date=2020/12/11>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -6752,6 +6752,7 @@ help from Bernd Raichle, for which I am grateful.
 %
 %    \begin{macrocode}
 \let\bbl at tempc\relax
+\let\bbl at temp@lg\@empty
 \bbl at foreach\bbl at language@opts{%
   \ifcase\bbl at iniflag  % Default
     \bbl at ifunset{ds@#1}%
@@ -6762,7 +6763,7 @@ help from Bernd Raichle, for which I am grateful.
   \or    % provide+=*
     \bbl at ifunset{ds@#1}%
       {\IfFileExists{#1.ldf}{}%
-        {\IfFileExists{babel-#1.tex}{}{\DeclareOption{#1}{}}}}%
+        {\IfFileExists{babel-#1.tex}{}{\@namedef{ds@#1}{}}}}%
       {}%
     \bbl at ifunset{ds@#1}%
       {\def\bbl at tempc{#1}%
@@ -6797,7 +6798,7 @@ help from Bernd Raichle, for which I am grateful.
 \bbl at foreach\@classoptionslist{%
   \bbl at ifunset{ds@#1}%
     {\IfFileExists{#1.ldf}{}%
-      {\IfFileExists{babel-#1.tex}{}{\DeclareOption{#1}{}}}}%
+      {\IfFileExists{babel-#1.tex}{}{\@namedef{ds@#1}{}}}}%
     {}%
   \bbl at ifunset{ds@#1}%
     {\def\bbl at tempb{#1}%
@@ -13686,7 +13687,8 @@ end
 
   Babel.fetch_subtext = {}
 
-  Babel.fetch_subtext[1] = function(head)
+    &% TODO. Merge with [1]?? Maybe not - too many differences.
+  Babel.fetch_subtext[0] = function(head)
     local word_string = ''
     local word_nodes = {}
     local lang
@@ -13699,41 +13701,30 @@ end
 
       if item.id == 11 then
         inmath = (item.subtype == 0)
-        if inmath then
-          word_string = word_string .. Babel.us_char
-          word_nodes[#word_nodes+1] = item  &% Will be ignored
-        end
       end
       if inmath then
         goto next
       end
 
-      if item.id == 29
-          and (item.char ~= 124) &% ie, not |
-          and (item.char ~= 61)  &% ie, not =
-          and (item.lang == lang or lang == nil) then
-        lang = lang or item.lang
-        word_string = word_string .. unicode.utf8.char(item.char)
-        word_nodes[#word_nodes+1] = item
-
-      elseif item.id == 7 and item.subtype == 2 then
-        word_string = word_string .. '='
-        word_nodes[#word_nodes+1] = item
+      if item.id == 29 then
+        local locale = node.get_attribute(item, Babel.attr_locale)
+        &% print('++', locale)
+        if lang == locale or lang == nil then
+          if (item.char ~= 124) then &% ie, not | = space
+            lang = lang or locale
+            word_string = word_string .. unicode.utf8.char(item.char)
+            word_nodes[#word_nodes+1] = item
+          end
+        else
+          break
+        end
 
-      elseif item.id == 7 and item.subtype == 3 then
+      elseif item.id == 12 and item.subtype == 13 then
         word_string = word_string .. '|'
         word_nodes[#word_nodes+1] = item
 
-      &% (1) Go to next word if nothing was found, and (2) implictly
-      &% remove leading USs.
-      elseif word_string == '' then
-        &% pass
-
-      &% This is the responsible for splitting by words.
-      elseif (item.id == 12 and item.subtype == 13) then
-        break
-
-      else 
+      &% Ignore leading unrecognized nodes, too.
+      elseif word_string ~= '' then
         word_string = word_string .. Babel.us_char   
         word_nodes[#word_nodes+1] = item  &% Will be ignored
       end
@@ -13742,12 +13733,16 @@ end
       item = item.next
     end
 
+    &% Here and above we remove some trailing chars but not the
+    &% corresponding nodes. But they aren't accessed. 
+    if word_string:sub(-1) == '|' then
+      word_string = word_string:sub(1,-2)
+    end
     word_string = unicode.utf8.gsub(word_string, Babel.us_char .. '+$', '')
     return word_string, word_nodes, item, lang
   end
 
-  &% TODO. Merge with [1]?? Maybe not - too many differences.
-  Babel.fetch_subtext[0] = function(head)
+  Babel.fetch_subtext[1] = function(head)
     local word_string = ''
     local word_nodes = {}
     local lang
@@ -13760,34 +13755,37 @@ end
 
       if item.id == 11 then
         inmath = (item.subtype == 0)
-        if inmath then
-          word_string = word_string .. Babel.us_char
-          word_nodes[#word_nodes+1] = item  &% Will be ignored
-        end
       end
       if inmath then
         goto next
       end
 
-      if item.id == 29 then
-        local locale = node.get_attribute(item, Babel.attr_locale)
-        &% print('++', locale)
-        if lang == locale or lang == nil then
-          if (item.char ~= 124) then &% ie, not | = space
-            lang = lang or locale
-            word_string = word_string .. unicode.utf8.char(item.char)
-            word_nodes[#word_nodes+1] = item
-          end
-        else
-          break
-        end
+      if item.id == 29
+          and (item.char ~= 124) &% ie, not |
+          and (item.char ~= 61)  &% ie, not =
+          and (item.lang == lang or lang == nil) then
+        lang = lang or item.lang
+        word_string = word_string .. unicode.utf8.char(item.char)
+        word_nodes[#word_nodes+1] = item
 
-      elseif item.id == 12 and item.subtype == 13 then
+      elseif item.id == 7 and item.subtype == 2 then
+        word_string = word_string .. '='
+        word_nodes[#word_nodes+1] = item
+
+      elseif item.id == 7 and item.subtype == 3 then
         word_string = word_string .. '|'       
         word_nodes[#word_nodes+1] = item
 
-      &% Ignore leading unrecognized nodes, too.
-      elseif word_string ~= '' then
+      &% (1) Go to next word if nothing was found, and (2) implictly
+      &% remove leading USs.
+      elseif word_string == '' then
+        &% pass
+
+      &% This is the responsible for splitting by words.
+      elseif (item.id == 12 and item.subtype == 13) then
+        break
+
+      else 
         word_string = word_string .. Babel.us_char   
         word_nodes[#word_nodes+1] = item  &% Will be ignored
       end
@@ -13796,11 +13794,6 @@ end
       item = item.next
     end
 
-    &% Here and above we remove some trailing chars but not the
-    &% corresponding nodes. But they aren't accessed. 
-    if word_string:sub(-1) == '|' then
-      word_string = word_string:sub(1,-2)
-    end
     word_string = unicode.utf8.gsub(word_string, Babel.us_char .. '+$', '')
     return word_string, word_nodes, item, lang
   end
diff --git a/babel.ins b/babel.ins
index 6fcafa0..87c4384 100644
--- a/babel.ins
+++ b/babel.ins
@@ -26,7 +26,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
 %%
-\def\filedate{2020/12/10}
+\def\filedate{2020/12/11}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index 3d30aff..0863b3b 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 85fb543..8751c21 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/12/10 v3.51.2217]
+\ProvidesFile{bbcompat.dtx}[2020/12/11 v3.51.2218]
 %</dtx>
 %
 %% File 'bbcompat.dtx'





More information about the latex3-commits mailing list.