From b7b8ca1722448ffcd363bcbac38ccede672c5644 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Wed, 15 Aug 2018 12:01:04 +0200
Subject: tidy up

---
 arabluatex.dtx | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

(limited to 'arabluatex.dtx')

diff --git a/arabluatex.dtx b/arabluatex.dtx
index d54290a..091ceb7 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -4059,7 +4059,7 @@ wa-ya.sIru ta.hta 'l-jild-i
 \DeclareOptionX{trans}{\def\al@mode{trans}}
 \define@boolkey{arabluatex.sty}[@pkg@]{export}[true]{%
   \AtBeginDocument{\luadirect{al_openstream()}%
-    \MkArbBreak{@al@ob, @al@cb}}
+    \MkArbBreak{@al@ob,@al@cb}}
   \AtEndDocument{\luadirect{al_closestream()}}
 }
 \ExecuteOptionsX{voc}
@@ -4094,8 +4094,8 @@ wa-ya.sIru ta.hta 'l-jild-i
 % and attempt to load the Amiri font which is included in \TeX{}live:
 %    \begin{macrocode}
 \AtBeginDocument{\ifdefined\arabicfont\relax\else
-\PackageWarning{arabluatex}{\string\arabicfont\ is not defined.^^JI
-  will try to load Amiri}%
+\PackageWarning{arabluatex}{\string\arabicfont\ is not defined.^^J
+  I will try to load Amiri}%
 \newfontfamily\arabicfont[Script=Arabic]{Amiri}\fi}%
 %    \end{macrocode}
 % \begin{macro}{\setRL}
@@ -4471,7 +4471,8 @@ wa-ya.sIru ta.hta 'l-jild-i
 % Then follows the environment itself:
 %    \begin{macrocode}
 \NewDocumentEnvironment{arabverse}{O{}}%
-{\bgroup\setkeys[al]{verse}[width,gutter,color,utf,delim,mode,metre]{#1}%
+{\bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim, mode,
+  metre]{#1}%
   \if@pkg@export\ifal@verse@export%
   \ArbOutFile{\begin{arabverse}}%
     \luadirect{tooutfile(\luastringN{[#1]})}%
@@ -4480,10 +4481,11 @@ wa-ya.sIru ta.hta 'l-jild-i
   \ifx\al@mode\al@mode@trans%
   \ifal@verse@utf\setRL\else\setLR\fi%
   \else\setRL\fi}%
-%{\hfill\setkeys[al]{verse}[width,gutter,utf,mode]{#1}\egroup\par}
-{\hfill\setkeys[al]{verse}[width,gutter,color,utf,delim,mode,export]{#1}%
+{\hfill\setkeys[al]{verse}[width, gutter, color, utf, delim, mode,
+  export]{#1}%
   \egroup\par%
-  \bgroup\setkeys[al]{verse}[width,gutter,color,utf,delim,mode,metre]{#1}%
+  \bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim, mode,
+  metre]{#1}%
   \if@pkg@export\ifal@verse@export%
   \ArbOutFile{\end{arabverse}}\else\fi\else\fi\egroup}
 %    \end{macrocode}
@@ -4695,7 +4697,7 @@ wa-ya.sIru ta.hta 'l-jild-i
 % right direction.
 %    \begin{macrocode}
 \NewDocumentCommand{\arbpardir}{}{%
-  \ifx\al@mode\al@mode@trans\setLR\else\setRL\fi}
+  \ifx\al@mode\al@mode@trans\setLR\else\booltrue{al@rlmode}\setRL\fi}
 %    \end{macrocode}
 % \end{macro}
 % 
-- 
cgit v1.2.3

