Skip to content

Commit

Permalink
handle default options of inherited gloss files better
Browse files Browse the repository at this point in the history
  • Loading branch information
Udi-Fogiel committed May 17, 2024
1 parent c1fb0bd commit 1aa5c30
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tex/polyglossia.sty
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,7 @@
{
\file_if_exist:nTF{gloss-#2.ldf}
{
\prop_set_from_keyval:Nn \xpg__tmp_default_options_prop { #1 }
% Temporarily force catcode of ~ to 13 (active) since babelsh.def
% requires it. This is needed particularly with LaTeX3
% packages which force \ExplSyntaxOn (#425)
Expand All @@ -1148,19 +1149,11 @@
\xpg_input:n {gloss-#2.ldf}
% restore former ~ catcode
\__xpg_restore_tilde_catcode:
\tl_new:c { xpg_#2_defualt_options_tl }
\prop_put_from_keyval:Nn \xpg__tmp_default_options_prop { #1 }
\keys_precompile:nec { polyglossia / gloss / #2 }
{ \prop_to_keyval:N \xpg__tmp_default_options_prop }
{ xpg_#2_defualt_options_tl }
\use:c { xpg_#2_defualt_options_tl }
}
{
\__xpg_no_gloss:n {#2}
}
}
\prop_new:N \xpg__tmp_default_options_prop
\cs_generate_variant:Nn \keys_precompile:nnN { nec }
\cs_generate_variant:Nn \__xpg_load_lang_definition:nn { ee }
% load a master language from an alias file
Expand Down Expand Up @@ -2118,9 +2111,16 @@
% for default settings
\NewDocumentCommand \InitializeGlossOptions { m m }
{
\prop_set_from_keyval:Nn \xpg__tmp_default_options_prop { #2 }
\prop_put_from_keyval:Nn \xpg__tmp_default_options_prop { #2 }
\tl_new:c { xpg_#1_defualt_options_tl }
\keys_precompile:nec { polyglossia / gloss / #1 }
{ \prop_to_keyval:N \xpg__tmp_default_options_prop }
{ xpg_#1_defualt_options_tl }
\use:c { xpg_#1_defualt_options_tl }
\__xpg_set_language_options:nnn {#1} {#2} { \cs_set:Npe \languagevariant }
}
\prop_new:N \xpg__tmp_default_options_prop
\cs_generate_variant:Nn \keys_precompile:nnN { nec }
% Record synonymous keyvals such as variant=us and variant=american
% Syntax: \SetLanguageAliasValues{<lang>}{<key>}{<val>}{<alias vals, comma-separated>}
Expand Down

0 comments on commit 1aa5c30

Please sign in to comment.