[AUCTeX-devel] [PATCH 1/3] Add three missing LaTeX lengths.

2015-03-28 Thread Arash Esbati
Hi all,

this patch add three standard lengths missing in `latex.el'.

Best, Arash

>From b8c5dfa7748c32444aeac5418b54155207aa2c5d Mon Sep 17 00:00:00 2001
From: Arash Esbati 
Date: Sat, 28 Mar 2015 16:55:50 +0100
Subject: [PATCH 1/3] Add three missing LaTeX lengths.

* latex.el (LaTeX-common-initialization): Add standard LaTeX
lengths `arraycolsep', `arrayrulewidth' and `doublerulesep'.
---
 ChangeLog |  5 +
 latex.el  | 10 +-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 146564f..9cb2e6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-28  Arash Esbati  
+
+	* latex.el (LaTeX-common-initialization): Add standard LaTeX
+	lengths `arraycolsep', `arrayrulewidth' and `doublerulesep'.
+
 2015-03-23  Tassilo Horn  
 
 	* tex.el (TeX-run-style-hooks): Apply style hooks in reverse
diff --git a/latex.el b/latex.el
index c232c24..6ebcfb6 100644
--- a/latex.el
+++ b/latex.el
@@ -5973,11 +5973,11 @@ i.e. you do _not_ have to cater for this yourself by adding ' or $."
   (LaTeX-add-counters "page" "equation" "enumi" "enumii" "enumiii"
 		  "enumiv" "footnote" "mpfootnote")
 
-  (LaTeX-add-lengths "baselineskip" "baselinestretch" "columnsep"
-		 "columnwidth" "evensidemargin" "linewidth" "oddsidemargin"
-		 "paperwidth" "paperheight" "parindent" "parskip"
-		 "tabcolsep" "textheight" "textwidth" "topmargin"
-		 "unitlength")
+  (LaTeX-add-lengths "arraycolsep" "arrayrulewidth" "baselineskip" "baselinestretch"
+		 "columnsep" "columnwidth" "doublerulesep" "evensidemargin"
+		 "linewidth" "oddsidemargin" "paperwidth" "paperheight"
+		 "parindent" "parskip" "tabcolsep" "textheight" "textwidth"
+		 "topmargin" "unitlength")
 
   (TeX-add-symbols
'("addtocounter" TeX-arg-counter "Value")
-- 
2.3.4

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-devel] [PATCH 3/3] New style colortbl.el.

2015-03-28 Thread Arash Esbati
Hi all,

this patch adds support for `colortbl.sty'.  Any comments welcome.

Best, Arash

>From 5a5868f2440051ad9d22d00b756b9e1b1d89c3a6 Mon Sep 17 00:00:00 2001
From: Arash Esbati 
Date: Sat, 28 Mar 2015 17:10:54 +0100
Subject: [PATCH 3/3] New style colortbl.el.

* Makefile.in (STYLESRC): Add new style.

* style/colortbl.el: New file.
---
 ChangeLog |  4 +++
 Makefile.in   |  2 +-
 style/colortbl.el | 74 +++
 3 files changed, 79 insertions(+), 1 deletion(-)
 create mode 100644 style/colortbl.el

diff --git a/ChangeLog b/ChangeLog
index 3ba89e6..c629bc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-03-28  Arash Esbati  
 
+	* Makefile.in (STYLESRC): Add new style.
+
+	* style/colortbl.el: New file.
+
 	* style/ltxtable.el ("ltxtable"): Ask for a `Width' and not for a
 	`Length' in minibuffer.
 
diff --git a/Makefile.in b/Makefile.in
index 08c50a0..75ed8c2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -147,7 +147,7 @@ STYLESRC = style/prosper.el \
 	   style/tcolorbox.el style/color.el	 style/expl3.el \
 	   style/bidibeamer.el style/enumitem.el style/caption.el \
 	   style/geometry.el  style/ltablex.el   style/ltxtable.el \
-	   style/mn2e.el
+	   style/mn2e.el  style/colortbl.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/colortbl.el b/style/colortbl.el
new file mode 100644
index 000..7332ced
--- /dev/null
+++ b/style/colortbl.el
@@ -0,0 +1,74 @@
+;;; colortbl.el --- AUCTeX style for `colortbl.sty' (v1.0a)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2015-03-22
+;; 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 `colortbl.sty' (v1.0a) from 2012/02/13.
+;; `colortbl.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "colortbl"
+ (lambda ()
+
+   (TeX-run-style-hooks "color" "array")
+
+   (TeX-add-symbols
+;; `TeX-arg-color' is provided by `color.el'.
+'("columncolor" TeX-arg-color
+  [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
+
+'("rowcolor"TeX-arg-color
+  [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
+
+'("cellcolor"   TeX-arg-color
+  [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
+
+'("arrayrulecolor" TeX-arg-color)
+
+'("doublerulesepcolor" TeX-arg-color))
+
+   (LaTeX-add-lengths "minrowclearance")
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+	  (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("columncolor"  "[{[[")
+("rowcolor" "[{[[")
+("cellcolor""[{[[")
+("arrayrulecolor" "[{")
+("doublerulesepcolor" "[{"))
+			  'function)))
+ LaTeX-dialect)
+
+;; colortbl.sty has one option `debugshow'.  I ignore that since it
+;; would only take more time during insertation in a buffer and I
+;; presume that not many users use it anyway.
+(defvar LaTeX-colortbl-package-options nil
+  "Package option for the colortbl package.")
+
+;;; colortbl.el ends here
-- 
2.3.4

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-devel] [PATCH 2/3] Ask for a `Width' in minibuffer and not a `Length'.

2015-03-28 Thread Arash Esbati
Hi all,

this patch is a minor improvement for `ltxtable.el'.

Best, Arash

>From 2ccf4883c38b0bbe9ea18e8d8db8042dbdb428b3 Mon Sep 17 00:00:00 2001
From: Arash Esbati 
Date: Sat, 28 Mar 2015 16:59:58 +0100
Subject: [PATCH 2/3] Ask for a `Width' in minibuffer and not a `Length'.

* style/ltxtable.el ("ltxtable"): Ask for a `Width' and not for a
`Length' in minibuffer.
---
 ChangeLog | 3 +++
 style/ltxtable.el | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 9cb2e6a..3ba89e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-03-28  Arash Esbati  
 
+	* style/ltxtable.el ("ltxtable"): Ask for a `Width' and not for a
+	`Length' in minibuffer.
+
 	* latex.el (LaTeX-common-initialization): Add standard LaTeX
 	lengths `arraycolsep', `arrayrulewidth' and `doublerulesep'.
 
diff --git a/style/ltxtable.el b/style/ltxtable.el
index ddc7c89..93dd218 100644
--- a/style/ltxtable.el
+++ b/style/ltxtable.el
@@ -37,7 +37,7 @@
(TeX-run-style-hooks "tabularx" "longtable")
(TeX-add-symbols
 '("LTXtable"
-  (TeX-arg-length)
+  (TeX-arg-length "Width" "1.0\\linewidth")
   (TeX-arg-eval
(lambda ()
 	 (let ((longtable (file-relative-name
-- 
2.3.4

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. c7c77a29202353e2a8528ff054b9e029cc05f5a6

2015-03-28 Thread Mosè Giordano
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
   via  c7c77a29202353e2a8528ff054b9e029cc05f5a6 (commit)
   via  e4a648149cd19f621ea6329088e808ddb7c18df1 (commit)
   via  b418fbb582094745075ea9ae6aa1a2398494a4f3 (commit)
   via  4fd5b487d16e134d3f23ce96655d56f0815dd04b (commit)
  from  b91b20395be673394305be872e9cbbe5a5cadd3c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit c7c77a29202353e2a8528ff054b9e029cc05f5a6
Author: Mosè Giordano 
Date:   Sat Mar 28 19:33:18 2015 +0100

Fix parsing of new auto types in style files.

* style/acro.el:

* style/acronym.el:

* style/caption.el:

* style/color.el:

* style/enumitem.el:

* style/geometry.el:

* style/minted.el:

* style/pst-plot.el:

* style/pstricks.el:

* style/siunitx.el: Update copyright years and add
`TeX-auto-parse' to `TeX-update-style-hook'.

diff --git a/ChangeLog b/ChangeLog
index c629bc9..71f2f99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2015-03-28  Mosè Giordano  
+
+   * style/acro.el:
+
+   * style/acronym.el:
+
+   * style/caption.el:
+
+   * style/color.el:
+
+   * style/enumitem.el:
+
+   * style/geometry.el:
+
+   * style/minted.el:
+
+   * style/pst-plot.el:
+
+   * style/pstricks.el:
+
+   * style/siunitx.el: Update copyright years and add
+   `TeX-auto-parse' to `TeX-update-style-hook'.
+
 2015-03-28  Arash Esbati  
 
* Makefile.in (STYLESRC): Add new style.
diff --git a/style/acro.el b/style/acro.el
index 6d74533..66781c9 100644
--- a/style/acro.el
+++ b/style/acro.el
@@ -1,6 +1,6 @@
 ;;; acro.el --- AUCTeX style for `acro.sty' version 1.2a.
 
-;; Copyright (C) 2013, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano 
@@ -102,9 +102,9 @@ set to `true'."
(LaTeX-provided-package-options-member "acro" "macros=true"))
 (add-to-list 'TeX-auto-symbol LaTeX-auto-acro-acronym)))
 
-;; FIXME: This does not seem to work unless one does a manual reparse.
-(add-hook 'TeX-auto-prepare-hook 'LaTeX-acro-prepare)
-(add-hook 'TeX-auto-cleanup-hook 'LaTeX-acro-cleanup)
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-acro-prepare t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-acro-cleanup t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (defvar LaTeX-acro-acronym-history nil
   "History of acronyms in acro.")
diff --git a/style/acronym.el b/style/acronym.el
index b97f80a..648f4cf 100644
--- a/style/acronym.el
+++ b/style/acronym.el
@@ -1,6 +1,6 @@
 ;;; acronym.el --- AUCTeX style for `acronym.sty' version 1.38.
 
-;; Copyright (C) 2013, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano 
@@ -51,9 +51,9 @@
  (add-to-list 'LaTeX-acronym-list (list acronym)))
LaTeX-auto-acronym))
 
-;; FIXME: This does not seem to work unless one does a manual reparse.
-(add-hook 'TeX-auto-prepare-hook 'LaTeX-acronym-prepare)
-(add-hook 'TeX-auto-cleanup-hook 'LaTeX-acronym-cleanup)
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-acronym-prepare t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-acronym-cleanup t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (defvar LaTeX-acronym-acronym-history nil
   "History of acronyms in acronym.")
diff --git a/style/caption.el b/style/caption.el
index c79f562..4803839 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -141,6 +141,8 @@ supported by `caption.sty'.")
   (setqLaTeX-auto-caption-DeclareCaption nil))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-caption-auto-prepare t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (defun LaTeX-caption-update-key-val-options ()
   "Update the buffer-local key-val options before offering them
diff --git a/style/color.el b/style/color.el
index de0f50c..2af29f6 100644
--- a/style/color.el
+++ b/style/color.el
@@ -92,6 +92,7 @@ package.")
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-color-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-color-auto-cleanup t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (defun TeX-arg-color-definecolor (optional &optional prompt)
   "Insert arguments of `\\definecolor' from `color.sty'."
diff --git a/style/enumitem.el b/style/enumitem.el
index e2fce50..8ea4545 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -187,6 +187,7 @@ package.")
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-enumite

Re: [AUCTeX-devel] [PATCH 3/3] New style colortbl.el.

2015-03-28 Thread Mosè Giordano
Hi Arash,

2015-03-28 17:22 GMT+01:00 Arash Esbati :
> Hi all,
>
> this patch adds support for `colortbl.sty'.  Any comments welcome.

Patches installed, thanks!

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Fix parsing of new auto types in style files

2015-03-28 Thread Mosè Giordano
Hi Tassilo,

2015-03-26 4:56 GMT+01:00 Tassilo Horn :
> Mosè Giordano  writes:
>
> Hi Mosè,
>
>> we need to do a manual reparse so that prepare and cleanup functions
>> are run.  How about adding
>>
>> (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
>>
>> in those files?  Can you see side effects other than a slight slow
>> down in file loading?  What do you think?
>
> I think that's the right thing to do.
>
>> Other suggestions to fix the problem?
>
> The style relevant style hooks could call `TeX-auto-parse' themselves
> but then in a document with auto-parser-using styles a, b and c, it
> would get called six times.  So your solution is clearly better.

Done, thank you!

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH 3/3] New style colortbl.el.

2015-03-28 Thread Arash Esbati
Mosè Giordano  gnu.org> writes:

Hi Mosè,

> Patches installed, thanks!

Thanks!  Please note that with your latest patch in caption.el and
geometry.el, the line 

(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)

is applied twice.  Is that on purpose?

Best, Arash
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 0c15d1af0de1f989065c3028332d4e33f29b95bb

2015-03-28 Thread Mosè Giordano
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
   via  0c15d1af0de1f989065c3028332d4e33f29b95bb (commit)
  from  c7c77a29202353e2a8528ff054b9e029cc05f5a6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 0c15d1af0de1f989065c3028332d4e33f29b95bb
Author: Mosè Giordano 
Date:   Sat Mar 28 20:50:20 2015 +0100

Remove duplicate lines.

diff --git a/style/caption.el b/style/caption.el
index 4803839..ddefb5b 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -142,7 +142,6 @@ supported by `caption.sty'.")
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-caption-auto-prepare t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
-(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (defun LaTeX-caption-update-key-val-options ()
   "Update the buffer-local key-val options before offering them
diff --git a/style/geometry.el b/style/geometry.el
index f68668c..973f63c 100644
--- a/style/geometry.el
+++ b/style/geometry.el
@@ -100,7 +100,6 @@ package.")
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-geometry-auto-prepare t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
-(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (TeX-add-style-hook
  "geometry"

---

Summary of changes:
 style/caption.el  |1 -
 style/geometry.el |1 -
 2 files changed, 0 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


Re: [AUCTeX-devel] [PATCH 3/3] New style colortbl.el.

2015-03-28 Thread Mosè Giordano
Hi Arash,

2015-03-28 20:47 GMT+01:00 Arash Esbati :
> Mosè Giordano  gnu.org> writes:
>
> Hi Mosè,
>
>> Patches installed, thanks!
>
> Thanks!  Please note that with your latest patch in caption.el and
> geometry.el, the line
>
> (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
>
> is applied twice.  Is that on purpose?

Oops, of course not, thank you!

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel