Hi

I hope you can apply that patch

>From your own mail.
 
,----
| How to import a hg patch for git users
| The git-am manual indicates the option `--patch-format=hg' to force
| recognition of the patch format and this does the trick for me.
| Usually git is able to autodetect the format, but when it fails (as
| occurred to me) I can use this option. Long story short: you can
| provide patches with `hg export'.
`----

# HG changeset patch
# User Uwe Brauer <[email protected]>
# Date 1473258489 0
#      Wed Sep 07 14:28:09 2016 +0000
# Node ID 08c93334e4e1e7dde3b85f2673ce6fa36a396bfe
# Parent  8e65508fe8862cde3fbcb7346de00667427246d2
Add style/bidi.el and entry into Makefile

diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -156,7 +156,8 @@
 	   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/export.patch b/export.patch
new file mode 100644
--- /dev/null
+++ b/export.patch
@@ -0,0 +1,126 @@
+# HG changeset patch
+# User Uwe Brauer <[email protected]>
+# Date 1473256864 0
+#      Wed Sep 07 14:01:04 2016 +0000
+# Node ID ca915805e6e42debaa45770992421fd3b0578fd3
+# Parent  8e65508fe8862cde3fbcb7346de00667427246d2
+Add style/exam.el and entry into Makefile
+
+diff --git a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -156,7 +156,8 @@
+ 	   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/exam.el
+ 
+ STYLEELC = $(STYLESRC:.el=.elc)
+ 
+diff --git a/style/exam.el b/style/exam.el
+new file mode 100644
+--- /dev/null
++++ b/style/exam.el
+@@ -0,0 +1,100 @@
++;;; exam.el --- AUCTeX style for the (LaTeX) exam package
++
++;; Copyright (C) 2016 Free Software Foundation
++
++;; Author: Uwe Brauer <[email protected]>
++;; 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 exam package.
++
++;;; Code:
++
++(defvar LaTeX-exam-class-options '("answers" "rldocument")
++  "Package options for the exam package.")
++
++(TeX-add-style-hook "exam"
++ (lambda ()
++   (LaTeX-add-environments
++   '("questions" LaTeX-env-item)
++    "solution"
++    "solutionorbox"
++    "parts"
++    "subparts"
++    "subsubparts")
++   (TeX-add-symbols
++    '("droppoints" 0)
++    '("part" TeX-arg-examn-points 0)
++    '("subpart" TeX-arg-examn-points 0)
++    '("subsubpart" TeX-arg-examn-points 0)
++    '("droptotalpoints" 0)
++    '("RL" 1)
++    '("titledquestion" "Title" ["Points"]  TeX-arg-label)
++    '("question"  ["Points"] TeX-arg-label)))
++ LaTeX-dialect)
++
++
++(defun LaTeX-env-question (environment)
++  "Insert ENVIRONMENT and the first question."
++  (LaTeX-insert-environment environment)
++  (if (TeX-active-mark)
++      (progn
++	(LaTeX-find-matching-begin)
++	(end-of-line 1))
++    (end-of-line 0))
++  (delete-char 1)
++  (when (looking-at (concat "^[ \t]+$\\|"
++			    "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
++    (delete-region (point) (line-end-position)))
++  (delete-horizontal-space)
++  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
++  ;; from swapping point and mark and the \question ending up right after
++  ;; \begin{...}.
++  (TeX-deactivate-mark)
++  (LaTeX-insert-question)
++  ;; The inserted \question may have outdented the first line to the
++  ;; right.  Fill it, if appropriate.
++  (when (and (not (looking-at "$"))
++	     (not (assoc environment LaTeX-indent-environment-list))
++	     (> (- (line-end-position) (line-beginning-position))
++		(current-fill-column)))
++    (LaTeX-fill-paragraph nil)))
++
++
++(defun LaTeX-insert-question ()
++  "Insert a new question in an environment.
++You may use `LaTeX-question-list' to change the routines used to insert the question."
++  (interactive "*")
++  (let ((environment (LaTeX-current-environment)))
++    (when (and (TeX-active-mark)
++	       (> (point) (mark)))
++      (exchange-point-and-mark))
++    (unless (bolp) (LaTeX-newline))
++    (if (assoc environment LaTeX-item-list)
++	(funcall (cdr (assoc environment LaTeX-item-list)))
++      (TeX-insert-macro "question"))
++    (indent-according-to-mode)))
++
++
++
++
++;;; exam.el ends here
diff --git a/export2.patch b/export2.patch
new file mode 100644
--- /dev/null
+++ b/export2.patch
@@ -0,0 +1,125 @@
+# HG changeset patch
+# User Uwe Brauer <[email protected]>
+# Date 1473256864 0
+#      Wed Sep 07 14:01:04 2016 +0000
+# Node ID ca915805e6e42debaa45770992421fd3b0578fd3
+# Parent  8e65508fe8862cde3fbcb7346de00667427246d2
+Add style/exam.el and entry into Makefile
+
+diff -r 8e65508fe886 -r ca915805e6e4 Makefile.in
+--- a/Makefile.in	Sun Sep 04 18:22:29 2016 +0200
++++ b/Makefile.in	Wed Sep 07 14:01:04 2016 +0000
+@@ -156,7 +156,8 @@
+ 	   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/exam.el
+ 
+ STYLEELC = $(STYLESRC:.el=.elc)
+ 
+diff -r 8e65508fe886 -r ca915805e6e4 style/exam.el
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/style/exam.el	Wed Sep 07 14:01:04 2016 +0000
+@@ -0,0 +1,100 @@
++;;; exam.el --- AUCTeX style for the (LaTeX) exam package
++
++;; Copyright (C) 2016 Free Software Foundation
++
++;; Author: Uwe Brauer <[email protected]>
++;; 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 exam package.
++
++;;; Code:
++
++(defvar LaTeX-exam-class-options '("answers" "rldocument")
++  "Package options for the exam package.")
++
++(TeX-add-style-hook "exam"
++ (lambda ()
++   (LaTeX-add-environments
++   '("questions" LaTeX-env-item)
++    "solution"
++    "solutionorbox"
++    "parts"
++    "subparts"
++    "subsubparts")
++   (TeX-add-symbols
++    '("droppoints" 0)
++    '("part" TeX-arg-examn-points 0)
++    '("subpart" TeX-arg-examn-points 0)
++    '("subsubpart" TeX-arg-examn-points 0)
++    '("droptotalpoints" 0)
++    '("RL" 1)
++    '("titledquestion" "Title" ["Points"]  TeX-arg-label)
++    '("question"  ["Points"] TeX-arg-label)))
++ LaTeX-dialect)
++
++
++(defun LaTeX-env-question (environment)
++  "Insert ENVIRONMENT and the first question."
++  (LaTeX-insert-environment environment)
++  (if (TeX-active-mark)
++      (progn
++	(LaTeX-find-matching-begin)
++	(end-of-line 1))
++    (end-of-line 0))
++  (delete-char 1)
++  (when (looking-at (concat "^[ \t]+$\\|"
++			    "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
++    (delete-region (point) (line-end-position)))
++  (delete-horizontal-space)
++  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
++  ;; from swapping point and mark and the \question ending up right after
++  ;; \begin{...}.
++  (TeX-deactivate-mark)
++  (LaTeX-insert-question)
++  ;; The inserted \question may have outdented the first line to the
++  ;; right.  Fill it, if appropriate.
++  (when (and (not (looking-at "$"))
++	     (not (assoc environment LaTeX-indent-environment-list))
++	     (> (- (line-end-position) (line-beginning-position))
++		(current-fill-column)))
++    (LaTeX-fill-paragraph nil)))
++
++
++(defun LaTeX-insert-question ()
++  "Insert a new question in an environment.
++You may use `LaTeX-question-list' to change the routines used to insert the question."
++  (interactive "*")
++  (let ((environment (LaTeX-current-environment)))
++    (when (and (TeX-active-mark)
++	       (> (point) (mark)))
++      (exchange-point-and-mark))
++    (unless (bolp) (LaTeX-newline))
++    (if (assoc environment LaTeX-item-list)
++	(funcall (cdr (assoc environment LaTeX-item-list)))
++      (TeX-insert-macro "question"))
++    (indent-according-to-mode)))
++
++
++
++
++;;; exam.el ends here
diff --git a/style/bidi.el b/style/bidi.el
new file mode 100755
--- /dev/null
+++ b/style/bidi.el
@@ -0,0 +1,58 @@
+;;; bidi.el --- AUCTeX style for the (XeLaTeX) bidi package
+
+;; Copyright (C) Free Software Foundation
+
+;; Author: Uwe Brauer <[email protected]>
+;; 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" "rldocuement")
+  "Package options for the bidi package.")
+
+(TeX-add-style-hook
+ "bidi"
+ (lambda ()
+   (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
_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to