branch: elpa
commit 3654a620e1d90d48b57c9fc212abd1833e816995
Author: Uwe <o...@mat.ucm.es>
Commit: Mosè Giordano <m...@gnu.org>

    Improve style/bidi and add make file entry.
    
    * Makefile.in (STYLESRC): add bidi.el
    
    * style/bidi.el ("bidi"): New file.
    
    Signed-off-by: Mosè Giordano <m...@gnu.org>
---
 Makefile.in   |    3 ++-
 style/bidi.el |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 014f5be..84e2bd5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -156,7 +156,8 @@ STYLESRC = style/prosper.el \
           style/hologo.el    style/theorem.el   style/ntheorem.el \
           style/splitidx.el  style/tikz.el      style/xcolor.el \
           style/pdflscape.el style/commath.el   style/empheq.el \
-          style/framed.el    style/paracol.el   style/menukeys.el
+          style/framed.el    style/paracol.el   style/menukeys.el \
+          style/bidi.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/bidi.el b/style/bidi.el
new file mode 100755
index 0000000..69beb6a
--- /dev/null
+++ b/style/bidi.el
@@ -0,0 +1,59 @@
+;;; bidi.el --- AUCTeX style for the (XeLaTeX) bidi package
+
+;; Copyright (C) Free Software Foundation
+
+;; Author: Uwe Brauer <o...@mat.ucm.es>
+;; Created: 2016-03-06
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for the bidi package.
+
+;;; Code:
+
+(defvar LaTeX-bidi-package-options '("RTLdocument" "rldocument")
+  "Package options for the bidi package.")
+
+(TeX-add-style-hook
+ "bidi"
+ (lambda ()
+   (TeX-check-engine-add-engines 'xetex)
+   (LaTeX-add-environments
+    "LTR"
+    "RTL")
+   ;; Fontification
+   (TeX-add-symbols
+    '("setRL" 0)
+    '("unsetRL" 0)
+    '("setRTL" 0)
+    '("unsetRTL" 0)
+    '("setLR" 0)
+    '("unsetLR" 0)
+    '("setLTR" 0)
+    '("unsetLTR" 0)
+    '("LR" 1)
+    '("LRE" 1)
+    '("RLE" 1)
+    '("RL" 1)))
+ LaTeX-dialect)
+
+
+;;; bidi.el ends here

Reply via email to