Skip to content

Commit

Permalink
remove \xpg@boundayclass
Browse files Browse the repository at this point in the history
\e@alloc@intercharclass@top was introduced in 2015,
so it is safe to use it directly
  • Loading branch information
Udi-Fogiel committed Nov 7, 2024
1 parent e252904 commit 31cec84
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
10 changes: 5 additions & 5 deletions tex/gloss-french.ldf
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,18 @@
\XeTeXinterchartoks \z@ \french@questionexclamation = {\xpg@french@thinsp}%
\XeTeXinterchartoks \z@ \french@punctthin = {\xpg@french@thinsp}%
\XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}%
\XeTeXinterchartoks \xpg@boundaryclass \french@questionexclamation = {\xpg@unskip\xpg@french@thinsp}%
\XeTeXinterchartoks \xpg@boundaryclass \french@punctthin = {\xpg@unskip\xpg@french@thinsp}%
\XeTeXinterchartoks \xpg@boundaryclass \french@punctthick = {\xpg@unskip\nobreakspace}%
\XeTeXinterchartoks \e@alloc@intercharclass@top \french@questionexclamation = {\xpg@unskip\xpg@french@thinsp}%
\XeTeXinterchartoks \e@alloc@intercharclass@top \french@punctthin = {\xpg@unskip\xpg@french@thinsp}%
\XeTeXinterchartoks \e@alloc@intercharclass@top \french@punctthick = {\xpg@unskip\nobreakspace}%
\iffrench@autospaceguillemets
\let\xpg@french@guillspace\xpg@french@thinsp%
\XeTeXinterchartoks \french@punctguillstart \z@ = {\xpg@french@guillspace}% "«a" -> "«\,a"
\XeTeXinterchartoks \french@punctguillstart \french@punctguillstart = {\xpg@french@guillspace}% "«‹" -> "«\,‹"
% \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged?
% \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
\XeTeXinterchartoks \z@ \french@punctguillend = {\xpg@french@guillspace}% "a»" -> "a\,»"
\XeTeXinterchartoks \french@punctguillstart \xpg@boundaryclass = {\xpg@french@guillspace\ignorespaces}% "« " -> "«\,"
\XeTeXinterchartoks \xpg@boundaryclass \french@punctguillend = {\xpg@unskip\xpg@french@guillspace}% " »" -> "\,»"
\XeTeXinterchartoks \french@punctguillstart \e@alloc@intercharclass@top = {\xpg@french@guillspace\ignorespaces}% "« " -> "«\,"
\XeTeXinterchartoks \e@alloc@intercharclass@top \french@punctguillend = {\xpg@unskip\xpg@french@guillspace}% " »" -> "\,»"
\XeTeXinterchartoks \french@closebrackets \french@punctguillend = {\xpg@french@guillspace}% ")»" -> ")\,»"
\XeTeXinterchartoks \french@questionexclamation \french@punctguillend = {\xpg@french@guillspace}% "?»" -> "?\,»"
\XeTeXinterchartoks \french@punctthin \french@punctguillend = {\xpg@french@guillspace}% ";»" -> ";\,»"
Expand Down
8 changes: 4 additions & 4 deletions tex/gloss-latin.ldf
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
\polyglossia_latin_insert_punctuation_space:
}
% opening guillemet followed by a space
\XeTeXinterchartoks \g_polyglossia_latin_opening_guillemet_class \xpg@boundaryclass =
\XeTeXinterchartoks \g_polyglossia_latin_opening_guillemet_class \e@alloc@intercharclass@top =
{
\polyglossia_latin_replace_following_space:
}
Expand Down Expand Up @@ -248,17 +248,17 @@
\polyglossia_latin_insert_punctuation_space:
}
% space followed by a question or exclamation mark
\XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_question_exclamation_class =
\XeTeXinterchartoks \e@alloc@intercharclass@top \g_polyglossia_latin_question_exclamation_class =
{
\polyglossia_latin_replace_preceding_space:
}
% space followed by a colon or semicolon
\XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_colon_semicolon_class =
\XeTeXinterchartoks \e@alloc@intercharclass@top \g_polyglossia_latin_colon_semicolon_class =
{
\polyglossia_latin_replace_preceding_space:
}
% space followed by closing guillemet
\XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_closing_guillemet_class =
\XeTeXinterchartoks \e@alloc@intercharclass@top \g_polyglossia_latin_closing_guillemet_class =
{
\polyglossia_latin_replace_preceding_space:
}
Expand Down
5 changes: 0 additions & 5 deletions tex/polyglossia.sty
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@
\prg_set_eq_conditional:NNn \xpg_if_script:n \fontspec_if_script:n { TF, T, F }
}

% Which version of XeTeX do we use? What is the boundary class? 4095 or 255
\cs_if_exist:cTF { e@alloc@intercharclass@top }
{ \cs_gset_eq:NN \xpg@boundaryclass \e@alloc@intercharclass@top }
{ \chardef\xpg@boundaryclass=\@cclv }

% Useful for getting list of loaded languages and variants. Like babel's bbl@loaded
% all language loaded
\seq_new:N \g__xpg_langs_loaded_seq
Expand Down

0 comments on commit 31cec84

Please sign in to comment.