% xu-bahyph.tex
% Wrapper for XeTeX to read Basque hyphenation patterns
% Jonathan Kew, 2006-08-24
% Public domain

\begingroup

\expandafter\ifx\csname XeTeXrevision\endcsname\relax
\else

  % The standard bahyph.tex is plain ASCII, so directly readable;
  % but we want to add patterns for n-tilde (^^f1), as generated by
  % bahyph.sh if the "latin1" option is given.
  % However, if a "latin1" version of bahyph was already present,
  % these would be duplicate patterns.
  % We'll watch the \lccode of ^^f1 so as to detect this.
  \lccode`\^^f1=0
  \let\PATTERNS=\patterns
  \def\patterns{%
    \ifnum\lccode`\^^f1=0 % if bahyph.tex didn't change this,
      \lccode`\^^f1=`\^^f1 % then we can load the extra patterns here
      \PATTERNS{1^^f1a 1^^f1e 1^^f1o 1^^f1i 1^^f1u}%
    \fi
    \PATTERNS
  }

\fi

\input bahyph.tex

\endgroup
\endinput
