From dd175f53432a083e1b53e4b7b8095c741c231dd1 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 14 Oct 2011 23:30:57 +0000
Subject: polyglossia 1.2.0cc (14oct11)

git-svn-id: svn://tug.org/texlive/trunk@24291 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/xelatex/polyglossia/polyglossia.sty        | 24 +++++++++++++---------
 1 file changed, 14 insertions(+), 10 deletions(-)

(limited to 'Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty')

diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
index 030bcbc973b..c3d636b8a7b 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
@@ -1,5 +1,5 @@
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2011/10/01 v1.2.0b
+\ProvidesPackage{polyglossia}[2011/10/12 v1.2.0cc
   Babel replacement for XeLaTeX]
 \RequirePackage{etoolbox}
 \RequirePackage{makecmds}
@@ -218,9 +218,8 @@
     \fi}%
     {\xpg@warning{#1: Invalid value \val\space for key "direction"}}%
   \define@key[xpg@setup]{#1}{hyphenmins}[{2,3}]%
-    {\edef\@tmpfirst{\xpg@first##1}%
-     \edef\@tmpsecond{\xpg@second##1}%
-     \setlocalhyphenmins{#1}{\@tmpfirst}{\@tmpsecond}}%
+    {\begingroup\edef\x{\endgroup
+       \noexpand\setlocalhyphenmins{#1}{\xpg@first##1}{\xpg@second##1}}\x}
   \define@boolkey[xpg@setup]{#1}[#1@]{frenchspacing}[true]{%
     \ifbool{#1@frenchspacing}%
       {\csgappto{init@extras@#1}{\frenchspacing}}%
@@ -453,10 +452,14 @@
   %\csdef{#1@language}{\language=\csname l@#1\endcsname}%
 }
 
+\newcommand{\xpg@input}[1]{%
+  \chardef\xpg@atcatcode\catcode`\@
+  \input{#1}\catcode`\@=\xpg@atcatcode}
+
 \newcommand{\setdefaultlanguage}[2][]{%
    \IfFileExists{gloss-#2.ldf}%
    {\ifcsundef{#2@loaded}%
-     {\input{gloss-#2.ldf}%
+     {\xpg@input{gloss-#2.ldf}%
      \xpg@info{Default~ language~ is~ #2}%
      \def\languagename{#2}%
       % This is needed because \arabic is a built-in LaTeX command:
@@ -567,7 +570,7 @@
 \newcommand{\setotherlanguage}[2][]{%
    \IfFileExists{gloss-#2.ldf}%
    {\ifcsundef{#2@loaded}%
-     {\input{gloss-#2.ldf}%
+     {\xpg@input{gloss-#2.ldf}%
       \setkeys{#2}{#1}%
       \edef\@tmpa{arabic}%
       \edef\@tmpb{#2}%
@@ -633,14 +636,14 @@
 \expandafter\providecommand\csname otherlanguage*\endcsname{}
 \renewenvironment{otherlanguage*}[2][]{%
    \ifcsundef{#2@loaded}%
-     {\bgroup\xpg@nogloss{#2}}%
-     {\bgroup\select@@language{#2}%
+     {\xpg@nogloss{#2}}%
+     {\select@@language{#2}%
       \setkeys{#2}{#1}%
       \use@localhyphenmins{#2}%
       \ifbool{#2@frenchspacing}{\frenchspacing}{\nonfrenchspacing}%
-      \csuse{inlineextras@#2}%
+      \csuse{inlineextras@#2}\csuse{date#2}%
      }%
-}{\egroup}
+}{}
 
 %Hook that other package authors can use
 %(for instance biblatex):
@@ -754,5 +757,6 @@
 %  }%
 %  \expandafter\AtEndOfPackage\expandafter{\@temp}%
 %}
+\ExplSyntaxOff
 \ProcessOptions*
 \endinput
-- 
cgit v1.2.3

