[elpa] elpa updated (8eca45c -> a474cb4)

2016-09-01 Thread Tassilo Horn
tsdh pushed a change to branch elpa.

  from  8eca45c   Merge branch 'master' into elpa
   new  bb9f427   Grab focus on Evince inverse search
   new  5745c81   Fix compatibility with GNU Emacs < 24
   new  ce347e6   Document how to disable filling for specific environments
   new  ba10cf0   New defcustom TeX-raise-frame-function
   new  29d4cb4   Document TeX-raise-frame-function
   new  7f91fb9   More about TeX-raise-frame-function
   new  2388815   Change test for PDF Tools availability
   new  98a83e9   Fix to doc/auctex.texi
   new  97c992d   Catch up with deletion of \commondummies in texinfo.tex
   new  c1a2b33   ; Add missing space in prompt
   new  8c57d38   Fix doc string for curve quoting style in Emacs 25
   new  dfe0937   Reset `LaTeX-auto-xcolor-definecolorset' before parsing
   new  40b3518   Add new spell checking dictionary tex-ispell.el
   new  131c537   Document interaction with Ispell
   new  4f15be6   ; Remove wrong entries for varioref.sty
   new  7828a43   ; Remove wrong entries for cleveref.sty
   new  fad3600   Add new style/pdflscape.el
   new  e45c6d9   Add new style/commath.el
   new  803894c   Add new style/empheq.el
   new  7d5c9ba   ; Add missing macro \DeclareRightDelimiter
   new  5232279   Remove obsolete TeX-function-p function
   new  f375c1f   Fold environments with * in name
   new  073b17a   Update style/mathtools.el to v1.18 of mathtools.sty
   new  e4b2e6a   Make TeX-previous-error go backward
   new  5beae62   Set the right coding systems for Japanese TeX process
   new  e259e40   Add a Japanese error message translation
   new  fcb6424   Revise document for Japanese TeX
   new  9e3230f   Use `TeX-ispell-skip-setcdr' on user defined list 
environments
   new  b2ebbb3   Use `TeX-ispell-skip-setcdr' on user defined listing 
environments
   new  22f9450   Use `TeX-ispell-skip-setcar' on user defined index macros
   new  25bdcb2   Add new style/framed.el
   new  d0e8c1c   Add new style/paracol.el
   new  12bfe80   Add new style/menukeys.el
   new  e2be637   Merge branch 'master' into elpa
   new  a474cb4   Release GNU AUCTeX 11.89.5


Summary of changes:
 Makefile.in |6 +-
 auctex.el   |2 +-
 auctex.info |  421 +++
 doc/auctex.texi |  196 -
 doc/changes.texi|   14 +-
 doc/macros.texi |   16 +-
 doc/todo.texi   |4 -
 latex.el|   12 +-
 preview-latex.info  |4 +-
 style/amsthm.el |8 +-
 style/commath.el|  102 +++
 style/empheq.el |  504 
 style/enumitem.el   |   11 +-
 style/environ.el|2 +-
 style/{lscape.el => framed.el}  |   31 +-
 style/listings.el   |4 +-
 style/mathtools.el  |  442 +++-
 style/menukeys.el   |  539 +++
 style/ntheorem.el   |8 +-
 style/paracol.el|  274 ++
 style/{fancynum.el => pdflscape.el} |   27 +-
 style/splitidx.el   |   10 +-
 style/theorem.el|8 +-
 style/xcolor.el |   15 +-
 tex-buf.el  |   11 +-
 tex-fold.el |2 +-
 tex-ispell.el   |  289 +++
 tex-jp.el   |  139 ++---
 tex-site.el |   38 +--
 tex.el  |  132 -
 30 files changed, 2918 insertions(+), 353 deletions(-)
 create mode 100644 style/commath.el
 create mode 100644 style/empheq.el
 copy style/{lscape.el => framed.el} (60%)
 create mode 100644 style/menukeys.el
 create mode 100644 style/paracol.el
 copy style/{fancynum.el => pdflscape.el} (63%)
 create mode 100644 tex-ispell.el



[elpa] elpa 7f91fb9 06/35: More about TeX-raise-frame-function

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 7f91fb9f98d6498a43409056752d6db429416c51
Author: Tassilo Horn 
Commit: Tassilo Horn 

More about TeX-raise-frame-function

* doc/auctex.texi (I/O Correlation): Improve TeX-raise-frame-function
docs.
* doc/changes.texi: Mention TeX-raise-frame-function.
* tex.el (TeX-raise-frame-function): Use raise-frame as default value.
---
 doc/auctex.texi  |5 +++--
 doc/changes.texi |5 +
 tex.el   |   17 +++--
 3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index f31d6d1..0860af5 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3355,8 +3355,9 @@ Atril, you can customize the following option.
 A function that will be called after performing an inverse search from
 Evince or Atril in order to raise the current Emacs frame.
 
-If your Emacs frame is already raised in that situation, just leave this
-variable set to @code{nil}.  Otherwise, here are some alternative
+If your Emacs frame is already raised in that situation, just
+leave this variable set to its default value
+@code{raise-frame}.  Otherwise, here are some alternative
 settings that work for some users.
 
 @lisp
diff --git a/doc/changes.texi b/doc/changes.texi
index d819cc0..ed61b5f 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -12,6 +12,11 @@
 
 @itemize @bullet
 @item
+@AUCTeX{} has a new customize option @code{TeX-raise-frame-function}
+that is currently only used by Evince and Atril inverse search to raise
+the Emacs frame.
+
+@item
 @AUCTeX{} now has limited support for the TikZ package.  For the moment,
 this includes some basic support for prompting the user of arguments to
 the @samp{\draw} macro.
diff --git a/tex.el b/tex.el
index 6ba3d60..9424d3f 100644
--- a/tex.el
+++ b/tex.el
@@ -1846,16 +1846,16 @@ file and LINE to (+ LINE offset-of-region).  Else, 
return nil."
(list (expand-file-name (buffer-file-name TeX-region-orig-buffer))
  (+ line offset) col)))
 
-(defcustom TeX-raise-frame-function nil
+(defcustom TeX-raise-frame-function #'raise-frame
   "A function which will be called to raise the Emacs frame.
 The function is called after `TeX-source-correlate-sync-source'
 has processed an inverse search DBUS request from Evince or
 Atril in order to raise the Emacs frame.
 
-`TeX-source-correlate-sync-source' already calls `raise-frame',
-however, depending on window manager and focus stealing policies,
-it might very well be that Emacs doesn't pop into the foreground.
-So you can do whatever it takes here.
+The default value is `raise-frame', however, depending on window
+manager and focus stealing policies, it might very well be that
+Emacs doesn't pop into the foreground.  So you can do whatever it
+takes here.
 
 For some users, `x-focus-frame' does the trick.  For some
 users (on GNOME 3.20),
@@ -1880,10 +1880,8 @@ emitted from the Evince document viewer.  IGNORED 
absorbs an
 unused id field accompanying the DBUS signal sent by Evince-3.0.0
 or newer.
 
-Note that this function tries to raise the Emacs frame using
-`raise-frame'.  However, that doesn't work reliably across window
-managers/operating systems.  If the Emacs frame isn't raised,
-customize `TeX-raise-frame-function'."
+If the Emacs frame isn't raised, customize
+`TeX-raise-frame-function'."
   ;; FILE may be given as relative path to the TeX-master root document or as
   ;; absolute file:// URL.  In the former case, the tex file has to be already
   ;; opened.
@@ -1918,7 +1916,6 @@ customize `TeX-raise-frame-function'."
  (> pos (point-max)))
  (widen))
(goto-char pos))
-  (raise-frame)
   (when TeX-raise-frame-function
(funcall TeX-raise-frame-function)
 



[elpa] elpa 2388815 07/35: Change test for PDF Tools availability

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 23888157e7152c2b18b5c5b516a8636ae2a97f9b
Author: Mosè Giordano 
Commit: Mosè Giordano 

Change test for PDF Tools availability

* tex.el (TeX-pdf-tools-sync-view): Change test for PDF Tools
  availability, in order to make it possible to postpone loading of the
  package, for example when using "use-package".  Fixes bug#23803.
---
 tex.el |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tex.el b/tex.el
index 9424d3f..6c302bb 100644
--- a/tex.el
+++ b/tex.el
@@ -1262,8 +1262,11 @@ DE is the name of the desktop environment, either 
\"gnome\" or
 If `TeX-source-correlate-mode' is disabled, only find and pop to
 the output PDF file.  Used by default for the PDF Tools viewer
 entry in `TeX-view-program-list-builtin'."
-  (unless (featurep 'pdf-tools)
-(error "PDF Tools are not installed"))
+  ;; Make sure `pdf-tools' is at least in the `load-path', but the user must
+  ;; take care of properly loading and installing the package.  We used to test
+  ;; "(featurep 'pdf-tools)", but that doesn't play well with deferred loading.
+  (unless (fboundp 'pdf-tools-install)
+(error "PDF Tools are not available"))
   (unless TeX-PDF-mode
 (error "PDF Tools only work with PDF output"))
   (add-hook 'pdf-sync-backward-redirect-functions



[elpa] elpa e45c6d9 18/35: Add new style/commath.el

2016-09-01 Thread Tassilo Horn
branch: elpa
commit e45c6d98f00b59db7286b3116f5fc441de8c
Author: Arash Esbati 
Commit: Arash Esbati 

Add new style/commath.el

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

* style/commath.el: New file.
---
 Makefile.in  |2 +-
 style/commath.el |  102 ++
 2 files changed, 103 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index ed19fa7..28be5c2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -155,7 +155,7 @@ STYLESRC = style/prosper.el \
   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
   style/hologo.elstyle/theorem.el   style/ntheorem.el \
   style/splitidx.el  style/tikz.el  style/xcolor.el \
-  style/pdflscape.el
+  style/pdflscape.el style/commath.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/commath.el b/style/commath.el
new file mode 100644
index 000..fd42550
--- /dev/null
+++ b/style/commath.el
@@ -0,0 +1,102 @@
+;;; commath.el --- AUCTeX style for `commath.sty' (v0.3)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-de...@gnu.org
+;; Created: 2016-07-31
+;; 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 `commath.sty' (v0.3) from 2006/07/18.
+;; `commath.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "commath"
+ (lambda ()
+
+   ;; Only load amsmath.el, ifthen.el is not necessary
+   (TeX-run-style-hooks "amsmath")
+
+   (TeX-add-symbols
+'("dif" 0)
+'("Dif" 0)
+'("od" [ "Order of differentiation" ] "Function" "Variable")
+'("tod" [ "Order of differentiation" ] "Function" "Variable")
+'("dod" [ "Order of differentiation" ] "Function" "Variable")
+'("pd" [ "Order of differentiation" ] "Function" "Variable")
+'("tpd" [ "Order of differentiation" ] "Function" "Variable")
+'("dpd" [ "Order of differentiation" ] "Function" "Variable")
+'("md" 6)
+'("tmd" 6)
+'("dmd" 6)
+'("del" [ "Size argument (0..4)" ] "Argument")
+'("cbr" [ "Size argument (0..4)" ] "Argument")
+'("set" [ "Size argument (0..4)" ] "Argument")
+'("sbr" [ "Size argument (0..4)" ] "Argument")
+'("intoo" [ "Size argument (0..4)" ] "Argument")
+'("intcc" [ "Size argument (0..4)" ] "Argument")
+'("intoc" [ "Size argument (0..4)" ] "Argument")
+'("intco" [ "Size argument (0..4)" ] "Argument")
+'("eval" [ "Size argument (0..4)" ] t)
+'("sVert" [ "Size argument (0..4)" ])
+'("envert" [ "Size argument (0..4)" ] "Argument")
+'("abs" [ "Size argument (0..4)" ] "Argument")
+'("enVert" [ "Size argument (0..4)" ] "Argument")
+'("norm" [ "Size argument (0..4)" ] "Argument")
+'("fullfunction" 5)
+
+;; Referencing macros
+'("thmref" TeX-arg-ref)
+'("exref" TeX-arg-ref)
+'("defnref" TeX-arg-ref)
+'("secref" TeX-arg-ref)
+'("lemref" TeX-arg-ref)
+'("propref" TeX-arg-ref)
+'("remref" TeX-arg-ref)
+'("figref" TeX-arg-ref)
+'("colref" TeX-arg-ref)
+'("appref" TeX-arg-ref)
+'("assref" TeX-arg-ref))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("thmref"  "{")
+   ("exref"   "{")
+   ("defnref" "{")
+   ("secref"  "{")
+   ("lemref"  "{")
+   ("propref" "{")
+   ("remref"  "{")
+   ("figref"  "{")
+   ("colref"  "{")
+   ("appref"  "{")
+   ("assref"  "{"))
+ 'reference)))
+ LaTeX-dialect)
+
+(defvar LaTeX-commath-package-options nil
+  "Package options for the commath package.")
+
+;;; commath.el ends here



[elpa] elpa 5232279 21/35: Remove obsolete TeX-function-p function

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 5232279373cf69147b04660026cde2d3b11b9f0c
Author: Mosè Giordano 
Commit: Mosè Giordano 

Remove obsolete TeX-function-p function

* tex.el (TeX-function-p): Remove this function.  It was introduced here
  in AUCTeX in 1994, but is present in Emacs since 1997 as well, under
  the name `functionp'.  Fixes bug#24245.
* tex-buf.el (TeX-command-expand): Replace `TeX-function-p' with
  `functionp'.
---
 tex-buf.el |2 +-
 tex.el |9 -
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index db3c959..431c011 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -571,7 +571,7 @@ without further expansion."
 ;; a function definition made by an external
 ;; package (e.g. icicles) is not picked up.
 (cond ((and (not (eq expansion 'file))
-(TeX-function-p expansion))
+(functionp expansion))
(apply expansion arguments))
   ((boundp expansion)
 (setq expansion-res
diff --git a/tex.el b/tex.el
index 7e41738..4f1fdd8 100644
--- a/tex.el
+++ b/tex.el
@@ -4679,15 +4679,6 @@ See `match-data' for details."
   (buffer-substring-no-properties (match-beginning n) (match-end n))
 ""))
 
-(defun TeX-function-p (arg)
-  "Return non-nil if ARG is callable as a function."
-  (or (and (fboundp 'byte-code-function-p)
-  (byte-code-function-p arg))
-  (and (listp arg)
-  (eq (car arg) 'lambda))
-  (and (symbolp arg)
-  (fboundp arg
-
 (defun TeX-booleanp (arg)
   "Return non-nil if ARG is t or nil."
   (memq arg '(t nil)))



[elpa] elpa fad3600 17/35: Add new style/pdflscape.el

2016-09-01 Thread Tassilo Horn
branch: elpa
commit fad36001b4ff5496965402363bbb4ddd4aaed3aa
Author: Arash Esbati 
Commit: Arash Esbati 

Add new style/pdflscape.el

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

* style/pdflscape.el: New file.
---
 Makefile.in|3 ++-
 style/pdflscape.el |   44 
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index b79eaf4..ed19fa7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -154,7 +154,8 @@ STYLESRC = style/prosper.el \
   style/fontenc.el   style/Alegreya.el  style/gloss-italian.el \
   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
   style/hologo.elstyle/theorem.el   style/ntheorem.el \
-  style/splitidx.el  style/tikz.el  style/xcolor.el
+  style/splitidx.el  style/tikz.el  style/xcolor.el \
+  style/pdflscape.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/pdflscape.el b/style/pdflscape.el
new file mode 100644
index 000..33bb2ac
--- /dev/null
+++ b/style/pdflscape.el
@@ -0,0 +1,44 @@
+;;; pdflscape.el --- AUCTeX style for `pdflscape.sty' (v0.11)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-de...@gnu.org
+;; Created: 2016-07-31
+;; 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 `pdflscape.sty' (v0.11) from 2016/05/14.
+;; `pdflscape.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "pdflscape"
+ (lambda ()
+   ;; Load lscape.el and we are done
+   (TeX-run-style-hooks "lscape"))
+ LaTeX-dialect)
+
+(defvar LaTeX-pdflscape-package-options nil
+  "Package options for the pdflscape package.")
+
+;;; pdflscape.el ends here



[elpa] elpa dfe0937 12/35: Reset `LaTeX-auto-xcolor-definecolorset' before parsing

2016-09-01 Thread Tassilo Horn
branch: elpa
commit dfe0937b31d43d7bffdfce6274b4074299d99503
Author: Arash Esbati 
Commit: Arash Esbati 

Reset `LaTeX-auto-xcolor-definecolorset' before parsing

* style/xcolor.el (LaTeX-xcolor-auto-prepare): Reset
`LaTeX-auto-xcolor-definecolorset' before parsing.
Improve comments.
---
 style/xcolor.el |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/style/xcolor.el b/style/xcolor.el
index 2466b12..8ac0bad 100644
--- a/style/xcolor.el
+++ b/style/xcolor.el
@@ -34,13 +34,13 @@
 ;; commands take more arguments.  In order to make the commands and
 ;; font-locking work correctly, we follow this strategy: If
 ;; `xcolor.sty' is loaded after `color.sty', everything works fine.
-;; For the way around, we guard the definitions in `color.sty' with:
+;; For the way around, we guard the definitions for `color.sty' with:
 ;;
-;; (unless (member "xcolor" (TeX-TeX-style-list))
-;;   ())
 ;;
-;; to make sure that we define stuff `color.sty' only if `xcolor.sty'
-;; is not already loaded.
+;; to make sure that we define stuff for `color.sty' only if AUCTeX
+;; style for `xcolor.sty' is not already loaded.
 
 ;;; Code:
 
@@ -255,7 +255,8 @@ xcolor package.")
 
 (defun LaTeX-xcolor-auto-prepare ()
   "Clear `LaTeX-auto-xcolor-definecolor' before parsing."
-  (setqLaTeX-auto-xcolor-definecolor nil))
+  (setq LaTeX-auto-xcolor-definecolor nil
+   LaTeX-auto-xcolor-definecolorset nil))
 
 (defun LaTeX-xcolor-auto-cleanup ()
   "Process the parsed elements from `LaTeX-auto-xcolor-definecolorset'."
@@ -504,7 +505,7 @@ xcolor.sty."
(LaTeX-xcolor-definecolor-list))
   (TeX-arg-define-macro "Command: \\"))
 
-;; \extractcolorspecs{}{{}
+;; \extractcolorspecs{}{}{}
 '("extractcolorspecs"
   (TeX-arg-eval completing-read
(TeX-argument-prompt optional nil "Color")



[elpa] elpa ce347e6 03/35: Document how to disable filling for specific environments

2016-09-01 Thread Tassilo Horn
branch: elpa
commit ce347e6f4763a530d0a86c9f233361486914bbf1
Author: Uwe Brauer 
Commit: Mosè Giordano 

Document how to disable filling for specific environments

* latex.el (LaTeX-indent-environment-list): Mention in docstring that
environments listed here are not filled.
(LaTeX-fill-region-as-paragraph): Add information to the docstring
concerning excluding enviroments from that function by using
`LaTeX-indent-environment-list'.  Suggested by Uwe Brauer.
---
 latex.el |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/latex.el b/latex.el
index 16d6760..babcd1a 100644
--- a/latex.el
+++ b/latex.el
@@ -2995,7 +2995,10 @@ consideration just as is in the non-commented source 
code."
 ("tabbing"))
 "Alist of environments with special indentation.
 The second element in each entry is the function to calculate the
-indentation level in columns."
+indentation level in columns.
+
+Environments present in this list are not filled by filling
+functions, see `LaTeX-fill-region-as-paragraph'."
 :group 'LaTeX-indentation
 :type '(repeat (list (string :tag "Environment")
 (option function
@@ -3457,7 +3460,11 @@ Break lines to fit `fill-column', but leave all lines 
ending with
  \(plus its optional argument) alone.  Lines with code
 comments and lines ending with `\par' are included in filling but
 act as boundaries.  Prefix arg means justify too.  From program,
-pass args FROM, TO and JUSTIFY-FLAG."
+pass args FROM, TO and JUSTIFY-FLAG.
+
+You can disable filling inside a specific environment by adding
+it to `LaTeX-indent-environment-list', only indentation is
+performed in that case."
   (interactive "*r\nP")
   (let ((end-marker (save-excursion (goto-char to) (point-marker
 (if (or (assoc (LaTeX-current-environment) LaTeX-indent-environment-list)



[elpa] elpa ba10cf0 04/35: New defcustom TeX-raise-frame-function

2016-09-01 Thread Tassilo Horn
branch: elpa
commit ba10cf083753bceb27923b6b80f5d2f7f78cd093
Author: Tassilo Horn 
Commit: Tassilo Horn 

New defcustom TeX-raise-frame-function

* tex.el (TeX-raise-frame-function): New defcustom.
(TeX-source-correlate-sync-source): Use it.
---
 tex.el |   41 -
 1 file changed, 36 insertions(+), 5 deletions(-)

diff --git a/tex.el b/tex.el
index 923ce32..6ba3d60 100644
--- a/tex.el
+++ b/tex.el
@@ -1846,12 +1846,44 @@ file and LINE to (+ LINE offset-of-region).  Else, 
return nil."
(list (expand-file-name (buffer-file-name TeX-region-orig-buffer))
  (+ line offset) col)))
 
+(defcustom TeX-raise-frame-function nil
+  "A function which will be called to raise the Emacs frame.
+The function is called after `TeX-source-correlate-sync-source'
+has processed an inverse search DBUS request from Evince or
+Atril in order to raise the Emacs frame.
+
+`TeX-source-correlate-sync-source' already calls `raise-frame',
+however, depending on window manager and focus stealing policies,
+it might very well be that Emacs doesn't pop into the foreground.
+So you can do whatever it takes here.
+
+For some users, `x-focus-frame' does the trick.  For some
+users (on GNOME 3.20),
+
+  (lambda ()
+(run-at-time 0.5 nil #'x-focus-frame))
+
+does the trick.  Some other users use the external wmctrl tool to
+raise the Emacs frame like so:
+
+  (lambda ()
+(call-process
+ \"wmctrl\" nil nil nil \"-i\" \"-R\"
+ (frame-parameter (selected-frame) 'outer-window-id)))"
+  :type 'function
+  :group 'TeX-view)
+
 (defun TeX-source-correlate-sync-source (file linecol &rest ignored)
   "Show TeX FILE with point at LINECOL.
 This function is called when emacs receives a SyncSource signal
 emitted from the Evince document viewer.  IGNORED absorbs an
 unused id field accompanying the DBUS signal sent by Evince-3.0.0
-or newer."
+or newer.
+
+Note that this function tries to raise the Emacs frame using
+`raise-frame'.  However, that doesn't work reliably across window
+managers/operating systems.  If the Emacs frame isn't raised,
+customize `TeX-raise-frame-function'."
   ;; FILE may be given as relative path to the TeX-master root document or as
   ;; absolute file:// URL.  In the former case, the tex file has to be already
   ;; opened.
@@ -1886,10 +1918,9 @@ or newer."
  (> pos (point-max)))
  (widen))
(goto-char pos))
-  ;; Grab focus after inverse search (only if `x-focus-frame' function is
-  ;; available).
-  (when (fboundp 'x-focus-frame)
-   (x-focus-frame (selected-frame))
+  (raise-frame)
+  (when TeX-raise-frame-function
+   (funcall TeX-raise-frame-function)
 
 (define-minor-mode TeX-source-correlate-mode
   "Minor mode for forward and inverse search.



[elpa] elpa 29d4cb4 05/35: Document TeX-raise-frame-function

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 29d4cb4e364e214c831d6845ebfc7619bc815227
Author: Tassilo Horn 
Commit: Tassilo Horn 

Document TeX-raise-frame-function

* doc/auctex.texi (I/O Correlation): Document TeX-raise-frame-function.
---
 doc/auctex.texi |   42 ++
 1 file changed, 42 insertions(+)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index 80014d9..f31d6d1 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3342,6 +3342,48 @@ from the viewer, typically by a mouse click.  Refer to 
the documentation
 of your viewer to find out how it has to be configured and what you have
 to do exactly.  In xdvi you normally have to use @kbd{C-down-mouse-1}.
 
+@vindex TeX-source-correlate-start-server
+Note that inverse search with the Evince PDF viewer or its MATE fork
+Atril might fail in raising the Emacs frame after updating point in your
+document's buffer.  There is simply no way to raise the Emacs frame
+reliably accross different operating systems and different window
+managers with their different focus stealing policies.  If the Emacs
+frame is not raised after performing an inverse search from Evince or
+Atril, you can customize the following option.
+
+@defopt TeX-raise-frame-function
+A function that will be called after performing an inverse search from
+Evince or Atril in order to raise the current Emacs frame.
+
+If your Emacs frame is already raised in that situation, just leave this
+variable set to @code{nil}.  Otherwise, here are some alternative
+settings that work for some users.
+
+@lisp
+;; Alternative 1: For some users, `x-focus-frame' works.  Note
+;; that this function requires Emacs 24+.
+(setq TeX-raise-frame-function #'x-focus-frame)
+
+;; Alternative 2: Under GNOME 3.20 (and probably others), it
+;; seems some focus stealing prevention policy prohibits that
+;; some window gets the focus immediately after the user has
+;; clicked in some other window.  Here waiting a bit before
+;; issuing the request seems to work.
+(setq TeX-raise-frame-function
+  (lambda ()
+   (run-at-time 0.5 nil #'x-focus-frame)))
+
+;; Alternative 3: Use the external wmctrl tool in order to
+;; force Emacs into the focus.
+(setq TeX-raise-frame-function
+  (lambda ()
+   (call-process
+"wmctrl" nil nil nil "-i" "-R"
+(frame-parameter (selected-frame) ’outer-window-id
+@end lisp
+@end defopt
+
+
 @node Debugging
 @section Catching the errors
 @cindex Debugging



[elpa] elpa 131c537 14/35: Document interaction with Ispell

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 131c537405303345402365933361df3b7ee71d79
Author: Arash Esbati 
Commit: Arash Esbati 

Document interaction with Ispell

* doc/auctex.texi (Selecting a Command): Document interaction with Ispell.
---
 doc/auctex.texi |  120 +++
 1 file changed, 120 insertions(+)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index 13afe05..d286ccf 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2876,6 +2876,126 @@ If nil, just check the current file.
 Used when checking if any files have changed.
 @end defopt
 
+@cindex ispell
+When performing spell checking on a document or a region (invoked
+through @AUCTeX{}'s @samp{Spell} command or @kbd{M-x ispell RET}), you
+want the spell checking program to skip certain macro arguments and
+environments, most notably the arguments of referencing macros and the
+contents of verbatim environments.  The skipped parts are controlled by
+variable @code{ispell-tex-skip-alists} provided by @file{ispell.el}.
+@AUCTeX{} has a library which can be added to this variable depending on
+the value of @code{TeX-ispell-extend-skip-list} which is set to @code{t}
+by default.
+
+@defopt TeX-ispell-extend-skip-list
+This boolean option controls whether @AUCTeX{} activates its extension
+for skipping certain macro arguments and environments when spell
+checking.
+
+When non-@code{nil}, @AUCTeX{} loads the file @file{tex-ispell.el} and
+adds its content to @code{ispell-tex-skip-alists}.  This library can and
+will never be complete, but the interface can be used to add selected
+and private macro names within your init file or on a file local basis.
+
+@code{ispell-tex-skip-alists} has the following structure:
+@lisp
+(defvar ispell-tex-skip-alists
+  '((;; First list
+ ("addcontentsline" ispell-tex-arg-end 2)
+ ("\\([aA]lph\\|arabic\\)"  ispell-tex-arg-end)
+ ("makebox" ispell-tex-arg-end 0)
+ ("documentclass" . "begin@{document@}"))
+(;; Second list
+ ("\\(figure\\|table\\)\\*?"  ispell-tex-arg-end 0)
+ ("list"  ispell-tex-arg-end 2)
+ ("verbatim\\*?" . "end@{verbatim\\*?@}")))
+  "*Lists of regions to be skipped in TeX mode.
+First list is used raw.
+Second list has key placed inside \\begin@{@}.")
+@end lisp
+Each item is an alist and the structure of it is described in
+@code{ispell-skip-region-alist}:
+@lisp
+(defvar ispell-skip-region-alist
+  '((...))
+  "Alist expressing beginning and end of regions not to spell check.
+The alist key must be a regular expression.
+Valid forms include:
+  (KEY) - just skip the key.
+  (KEY . REGEXP) - skip to the end of REGEXP.
+   REGEXP may be string or symbol.
+  (KEY REGEXP) - skip to end of REGEXP.  REGEXP must be a string.
+  (KEY FUNCTION ARGS) - FUNCTION called with ARGS
+returns end of region.")
+@end lisp
+
+Let's go through the first list of @code{ispell-tex-skip-alists} line by
+line:
+@lisp
+("addcontentsline" ispell-tex-arg-end 2)
+@end lisp
+@code{KEY} is the string @code{"addcontentsline"}, @code{FUNCTION}
+is @code{ispell-tex-arg-end} called with @code{ARGS}, here @code{2}.
+@code{ispell-tex-arg-end} is a function provided by @file{ispell.el}
+which skips as many subsequent optional arguments in square brackets as
+it sees and then skips @code{ARGS} number of mandatory arguments in
+braces.  Omitting @code{ARGS} means skip @code{1} mandatory argument.
+In practice, when you have something like this in your document:
+@example
+\addcontentsline@{toc@}@{chapter@}@{Some text@}
+@end example
+The first two arguments are left out and @samp{Some text} will be spell
+checked.  For the next line
+@lisp
+("\\([aA]lph\\|arabic\\)"  ispell-tex-arg-end)
+@end lisp
+the name of the counter as argument is skipped.  Next line is
+@lisp
+("makebox" ispell-tex-arg-end 0)
+@end lisp
+where only optional arguments are skipped, the first mandatory argument
+is checked, e.g.
+@example
+\makebox[0pt][l]@{Some text@}
+@end example
+Finally, the next line
+@lisp
+("documentclass" . "begin@{document@}"))
+@end lisp
+ensures that the entire preamble of a document is discarded.  Second
+list works the same; it is more convenient for environments since
+@code{KEY} is wrapped inside @code{\begin@{@}}.
+
+@AUCTeX{} provides two functions to add items to car and cdr of
+@code{ispell-tex-arg-end}, namely @code{TeX-ispell-skip-setcar} and
+@code{TeX-ispell-skip-setcdr}.  The argument of these functions is
+exactly as in @code{ispell-tex-skip-alists}.  Additions can be done via
+init file, e.g.:
+@lisp
+(eval-after-load "tex-ispell"
+  '(progn
+ (TeX-ispell-skip-setcar
+  '(("mymacro" ispell-tex-arg-end)))
+ (TeX-ispell-skip-setcdr
+  '(("myverbatim" . "end@{myverbatim@}")
+@end lisp
+Another possibility is to use file local additions at the end of your
+@TeX{} file, e.g.:
+@e

[elpa] elpa 25bdcb2 31/35: Add new style/framed.el

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 25bdcb2846c78f9f28510c7e6c1ae1a7d46df79b
Author: Arash Esbati 
Commit: Arash Esbati 

Add new style/framed.el

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

* style/framed.el: New file.
---
 Makefile.in |3 ++-
 style/framed.el |   52 
 2 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index a745410..d79de6e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -155,7 +155,8 @@ STYLESRC = style/prosper.el \
   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
   style/hologo.elstyle/theorem.el   style/ntheorem.el \
   style/splitidx.el  style/tikz.el  style/xcolor.el \
-  style/pdflscape.el style/commath.el   style/empheq.el
+  style/pdflscape.el style/commath.el   style/empheq.el \
+  style/framed.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/framed.el b/style/framed.el
new file mode 100644
index 000..44a69c5
--- /dev/null
+++ b/style/framed.el
@@ -0,0 +1,52 @@
+;;; framed.el --- AUCTeX style for `framed.sty' (v0.96)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-de...@gnu.org
+;; Created: 2016-06-26
+;; 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 `framed.sty' (v0.96) from 2011/10/22.
+;; `framed.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "framed"
+ (lambda ()
+   ;; env's defined by framed.sty
+   (LaTeX-add-environments
+'("framed")
+'("oframed")
+'("shaded")
+'("shaded*")
+'("snugshade")
+'("snugshade*")
+'("leftbar")
+'("titled-frame" "Title")))
+ LaTeX-dialect)
+
+(defvar LaTeX-framed-package-options nil
+  "Package options for the framed package.")
+
+;;; framed.el ends here



[elpa] elpa 98a83e9 08/35: Fix to doc/auctex.texi

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 98a83e9d5999f12039874347275c5a9df1b48b72
Author: Masayuki Ataka 
Commit: Mosè Giordano 

Fix to doc/auctex.texi

* doc/auctex.texi (Prettifying): Insert missing '{}'.

Signed-off-by: Mosè Giordano 

Copyright-paperwork-exempt: Yes
---
 doc/auctex.texi |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index 0860af5..13afe05 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2597,10 +2597,10 @@ the @TeX{} code @code{\alpha \times \beta} will be 
displayed as @code{α
 × β}.  When point is on one of the characters, it'll be unprettified
 automatically, meaning you see the verbatim text again.
 
-To enable prettification in @AUCTeX, simply add
+To enable prettification in @AUCTeX{}, simply add
 @code{prettify-symbols-mode} to @code{TeX-mode-hook}.  If you enabled
 prettification globally with @code{global-prettify-symbols-mode}, then
-it's automatically enabled in @AUCTeX, too.
+it's automatically enabled in @AUCTeX{}, too.
 
 You can also add custom symbol unicode-character pairs for
 prettification by adding to @code{tex--prettify-symbols-alist}.  Note



[elpa] elpa 9e3230f 28/35: Use `TeX-ispell-skip-setcdr' on user defined list environments

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 9e3230fbad2bc865f5e500973abb032abf7a74ea
Author: Arash Esbati 
Commit: Arash Esbati 

Use `TeX-ispell-skip-setcdr' on user defined list environments

* style/enumitem.el (LaTeX-enumitem-auto-cleanup): Use
`TeX-ispell-skip-setcdr' on user defined lists.
("enumitem"): Use `TeX-ispell-skip-setcdr' on user defined lists.
Use `TeX-argument-insert' instead of `insert'.
---
 style/enumitem.el |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/style/enumitem.el b/style/enumitem.el
index c81cd96..02e3a25 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -171,7 +171,9 @@ package.")
   ;; Tell AUCTeX about parsed description like environments.
   (when (or (string-equal type "description")
(string-equal type "description*"))
-   (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument)
+   (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument)))
+  ;; Add new env's to `ispell-tex-skip-alist': skip the optional argument
+  (TeX-ispell-skip-setcdr `((,env ispell-tex-arg-end 0)
   ;; Now add the parsed env's to the local list.
   (when (LaTeX-enumitem-newlist-list)
 (setq LaTeX-enumitem-newlist-list-local
@@ -344,9 +346,10 @@ in `enumitem'-completions."
 (add-to-list 'LaTeX-item-list `(,name . LaTeX-item-argument)))
   (LaTeX-add-environments `(,name LaTeX-enumitem-env-with-opts))
   (LaTeX-add-enumitem-newlists (list name type))
-  (insert (format "{%s}" name)
-  (format "{%s}" type))
-   (format "%s" depth)
+  (TeX-ispell-skip-setcdr `((,name ispell-tex-arg-end 0)))
+  (TeX-argument-insert name optional)
+  (TeX-argument-insert type optional)
+  (format "%s" depth)
 
 ;; \renewlist{}{}{}
 '("renewlist"



[elpa] elpa d0e8c1c 32/35: Add new style/paracol.el

2016-09-01 Thread Tassilo Horn
branch: elpa
commit d0e8c1c20059fea85f2b2ee38cc222edda524898
Author: Arash Esbati 
Commit: Arash Esbati 

Add new style/paracol.el

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

* style/paracol.el: New file.
---
 Makefile.in  |2 +-
 style/paracol.el |  274 ++
 2 files changed, 275 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index d79de6e..1a8e5d2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -156,7 +156,7 @@ STYLESRC = style/prosper.el \
   style/hologo.elstyle/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/framed.elstyle/paracol.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/paracol.el b/style/paracol.el
new file mode 100644
index 000..7dfddc7
--- /dev/null
+++ b/style/paracol.el
@@ -0,0 +1,274 @@
+;;; paracol.el --- AUCTeX style for `paracol.sty' (v1.32)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-de...@gnu.org
+;; Created: 2016-05-26
+;; 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 `paracol.sty' (v1.32) from 2015/10/10.
+;; `paracol.sty' is part of TeXLive.
+
+;; `paracol.sty' provides an environment (paracol) and a command
+;; (\switchcolumn) which take a star as the second (!) optional
+;; argument.  In order to make the input process easier for the users,
+;; this style provides the environment `paracol*' and the command
+;; `switchcolumn*' in the list of completion after entering C-c C-e or
+;; C-c C-m (or C-c RET).
+
+;; Further, `\switchcolumn' takes a third optional argument containing
+;; text which will be inserted spanned over the columns.  This style
+;; does not ask for this argument.  If you need it, just enter it by
+;; hand after the completion.  This is a deliberate decision since I
+;; think that over the time, the annoyance factor of hitting `RET'
+;; will be larger than the number of times where this argument is
+;; actually used.
+
+;;; Code:
+
+(defun TeX-arg-paracol-switchcolumn* (optional)
+  "Query and insert the column argument of \\switchcolum macro.
+If OPTIONAL is non-nil, insert the result in square brackets."
+  (let ((col (TeX-read-string
+ (TeX-argument-prompt optional nil "Column"
+(save-excursion
+  (backward-char 1)
+  (TeX-argument-insert col optional
+
+(TeX-add-style-hook
+ "paracol"
+ (lambda ()
+
+   (LaTeX-add-environments
+;; 7.1 Environment paracol
+;; \begin{paracol}[numleft]{num}[text] body \end{paracol}
+;; \begin{paracol}[numleft]*{num}[text] body \end{paracol}
+'("paracol" [ "Number left" ] "Number of columns" [ "Text across columns" 
] )
+'("paracol*"
+  (lambda (_env)
+   (let ((numleft (TeX-read-string
+   (TeX-argument-prompt  t  nil "Number left")))
+ (numcol  (TeX-read-string
+   (TeX-argument-prompt nil nil "Number of columns")))
+ (txt (TeX-read-string
+   (TeX-argument-prompt  t  nil "Text across columns"
+ (LaTeX-insert-environment
+  ;; Simply feed the function with "paracol", other option is
+  ;; something like:
+  ;; (replace-regexp-in-string (regexp-quote "*") "" env)
+  "paracol"
+  (concat
+   (when (and numleft (not (string= numleft "")))
+ (format "[%s]" numleft))
+   "*"
+   (format "{%s}" numcol)
+   (when (and txt (not (string= txt "")))
+ (format "[%s]" txt)))
+
+;; 7.2 Column-Switching Command and Environments
+;; \begin{column} body \end{column}
+;; \begin{column*}[text] body \end{column*}
+'("column")
+'("column*" [ "Text across columns" ] )
+
+;; \begin{nthcolumn}{col} body \end{nthcolumn}
+;; \begin{nthcolumn*}{col}[text] body \end{nthcolumn*}
+'("nthcolumn" "Column")
+'("nthcolumn*" "Column" [ "Text across columns" ] )
+
+;; \begin{leftcolumn} body \end{leftcolumn}
+;; \begin{leftcolumn*}[text] body \end{leftcolumn*}

[elpa] elpa 073b17a 23/35: Update style/mathtools.el to v1.18 of mathtools.sty

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 073b17a2dc30b771ab16df7297d68914fd1e12e3
Author: Arash Esbati 
Commit: Arash Esbati 

Update style/mathtools.el to v1.18 of mathtools.sty

* style/mathtools.el (LaTeX-mathtools-package-options): Add
"nonrobust" option.
(LaTeX-mathtools-key-val-options): Add missing key=vals.  Insert a
period in doc string.
(LaTeX-mathtools-arg-mathstyle-completion)
(LaTeX-mathtools-arg-mathsize-completion)
(LaTeX-mathtools-arg-declarepaireddelimiter)
(LaTeX-mathtools-env-cases)
(LaTeX-mathtools-item-cases): New functions.
(LaTeX-mathtools-env-multlined): Add an empty pair of square
brackets if only the second optional argument is given.
("mathtools"): Update commands and environments in style hook.
(LaTeX-mathtools-env-matrix-starred)
(LaTeX-mathtools-env-spreadlines): Delete functions.  Use
["string"] when adding environments in `LaTeX-add-environments'.
---
 style/mathtools.el |  442 +++-
 1 file changed, 365 insertions(+), 77 deletions(-)

diff --git a/style/mathtools.el b/style/mathtools.el
index 68fed88..c6c4b17 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -1,6 +1,6 @@
 ;;; mathtools.el --- Style hook for the LaTeX package `mathtools'.
 
-;; Copyright (C) 2011-2012, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2012, 2014, 2016 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen 
 ;; Created: 2011-02-13
@@ -36,30 +36,213 @@
 
 ;;; Code:
 
+;; Needed for auto-parsing.
+(require 'tex)
+
 ;; amsmath options which can be passed directly to mathtools are
 ;; appended in the style hook below
 (defvar LaTeX-mathtools-package-options
-  '("fixamsmath" "donotfixamsmathbugs" "allowspaces" "disallowspaces")
+  '("fixamsmath" "donotfixamsmathbugs" "allowspaces" "disallowspaces"
+;; Update 2013: We now make \(\) and \[\] robust (can be disabled
+;; via nonrobust package option)
+"nonrobust")
   "Package options for the mathtools package.")
 
 (defvar LaTeX-mathtools-key-val-options
   '(("showonlyrefs")
 ("mathic" ("true" "false"))
 ("showmanualtags" ("true" "false"))
+;; 3.4.1 Matrices
+("smallmatrix-align" ("c" "l" "r"))
+("smallmatrix-inner-space")
+;; 3.4.2 The multlined environment
 ("firstline-afterskip")
 ("lastline-preskip")
 ("multlined-pos" ("c" "b" "t"))
 ("multlined-width")
+;; 3.4.7 Centered \vdots
+("shortvdotsadjustabove")
+("shortvdotsadjustbelow")
+;; 3.5 Intertext and short intertext
+("original-intertext" ("true" "false"))
+("original-shortintertext" ("true" "false"))
+("above-intertext-sep")
+("below-intertext-sep")
+("above-shortintertext-sep")
+("below-shortintertext-sep")
+;; 3.7.2 Vertically centered colon
 ("centercolon" ("true" "false"))
+;; 4.2 Left sub/superscripts
 ("prescript-sub-format")
 ("prescript-sup-format")
 ("prescript-arg-format"))
-  "Options for the \\mathtoolsset command")
+  "Options for the \\mathtoolsset command.")
+
+;; Setup for \newtagform
+(TeX-auto-add-type "mathtools-newtagform" "LaTeX")
+
+(defvar LaTeX-mathtools-newtagform-regexp
+  '("newtagform{\\([^}]+\\)}"
+1 LaTeX-auto-mathtools-newtagform)
+  "Matches the first argument of \\newtagform from mathtools package.")
+
+;; Setup for \DeclarePairedDelimiter(X)?:
+(TeX-auto-add-type "mathtools-DeclarePairedDelimiter" "LaTeX")
+
+(defvar LaTeX-mathtools-DeclarePairedDelimiter-regexp
+  `(,(concat "DeclarePairedDelimiter\\(?:X\\|XPP\\)?"
+"{?"
+"\\([a-zA-Z]+\\)"
+"}?"
+"\\(?:\\[\\([0-9]+\\)\\]\\)?")
+(1 2) LaTeX-auto-mathtools-DeclarePairedDelimiter)
+  "Match the arguments of \\DeclarePairedDelimiterX? from mathtools package.")
+
+;; Setup for \newgathered
+(TeX-auto-add-type "mathtools-newgathered" "LaTeX")
+
+(defvar LaTeX-mathtools-newgathered-regexp
+  '("newgathered{\\([^}]+\\)}"
+1 LaTeX-auto-mathtools-newgathered)
+  "Matches the first argument of \\newgathered from mathtools package.")
+
+(defun LaTeX-mathtools-auto-prepare ()
+  "Clear various variables for mathtools package before parsing."
+  (setq LaTeX-auto-mathtools-newtagform nil
+   LaTeX-auto-mathtools-DeclarePairedDelimiter nil
+   LaTeX-auto-mathtools-newgatherednil))
+
+(defun LaTeX-mathtools-auto-cleanup ()
+  "Process the parsed elements for mathtools package."
+  (when (LaTeX-mathtools-DeclarePairedDelimiter-list)
+(dolist (delim (LaTeX-mathtools-DeclarePairedDelimiter-list))
+  (let ((cmd (car delim))
+   (arg (cadr delim)))
+   (TeX-add-symbols `(,cmd [ LaTeX-mathtools-arg-mathsize-completion ]
+   ,(if (string= arg "")
+1
+  (string-to-number arg)))
+`(,(concat cmd "*")
+  ,(if (string= arg "")
+  

[elpa] externals/auctex updated (8eca45c -> a474cb4)

2016-09-01 Thread Tassilo Horn
tsdh pushed a change to branch externals/auctex.

  from  8eca45c   Merge branch 'master' into elpa
  adds  bb9f427   Grab focus on Evince inverse search
  adds  5745c81   Fix compatibility with GNU Emacs < 24
  adds  ce347e6   Document how to disable filling for specific environments
  adds  ba10cf0   New defcustom TeX-raise-frame-function
  adds  29d4cb4   Document TeX-raise-frame-function
  adds  7f91fb9   More about TeX-raise-frame-function
  adds  2388815   Change test for PDF Tools availability
  adds  98a83e9   Fix to doc/auctex.texi
  adds  97c992d   Catch up with deletion of \commondummies in texinfo.tex
  adds  c1a2b33   ; Add missing space in prompt
  adds  8c57d38   Fix doc string for curve quoting style in Emacs 25
  adds  dfe0937   Reset `LaTeX-auto-xcolor-definecolorset' before parsing
  adds  40b3518   Add new spell checking dictionary tex-ispell.el
  adds  131c537   Document interaction with Ispell
  adds  4f15be6   ; Remove wrong entries for varioref.sty
  adds  7828a43   ; Remove wrong entries for cleveref.sty
  adds  fad3600   Add new style/pdflscape.el
  adds  e45c6d9   Add new style/commath.el
  adds  803894c   Add new style/empheq.el
  adds  7d5c9ba   ; Add missing macro \DeclareRightDelimiter
  adds  5232279   Remove obsolete TeX-function-p function
  adds  f375c1f   Fold environments with * in name
  adds  073b17a   Update style/mathtools.el to v1.18 of mathtools.sty
  adds  e4b2e6a   Make TeX-previous-error go backward
  adds  5beae62   Set the right coding systems for Japanese TeX process
  adds  e259e40   Add a Japanese error message translation
  adds  fcb6424   Revise document for Japanese TeX
  adds  9e3230f   Use `TeX-ispell-skip-setcdr' on user defined list 
environments
  adds  b2ebbb3   Use `TeX-ispell-skip-setcdr' on user defined listing 
environments
  adds  22f9450   Use `TeX-ispell-skip-setcar' on user defined index macros
  adds  25bdcb2   Add new style/framed.el
  adds  d0e8c1c   Add new style/paracol.el
  adds  12bfe80   Add new style/menukeys.el
  adds  e2be637   Merge branch 'master' into elpa
  adds  a474cb4   Release GNU AUCTeX 11.89.5

No new revisions were added by this update.

Summary of changes:
 Makefile.in |6 +-
 auctex.el   |2 +-
 auctex.info |  421 +++
 doc/auctex.texi |  196 -
 doc/changes.texi|   14 +-
 doc/macros.texi |   16 +-
 doc/todo.texi   |4 -
 latex.el|   12 +-
 preview-latex.info  |4 +-
 style/amsthm.el |8 +-
 style/commath.el|  102 +++
 style/empheq.el |  504 
 style/enumitem.el   |   11 +-
 style/environ.el|2 +-
 style/{lscape.el => framed.el}  |   31 +-
 style/listings.el   |4 +-
 style/mathtools.el  |  442 +++-
 style/menukeys.el   |  539 +++
 style/ntheorem.el   |8 +-
 style/paracol.el|  274 ++
 style/{fancynum.el => pdflscape.el} |   27 +-
 style/splitidx.el   |   10 +-
 style/theorem.el|8 +-
 style/xcolor.el |   15 +-
 tex-buf.el  |   11 +-
 tex-fold.el |2 +-
 tex-ispell.el   |  289 +++
 tex-jp.el   |  139 ++---
 tex-site.el |   38 +--
 tex.el  |  132 -
 30 files changed, 2918 insertions(+), 353 deletions(-)
 create mode 100644 style/commath.el
 create mode 100644 style/empheq.el
 copy style/{lscape.el => framed.el} (60%)
 create mode 100644 style/menukeys.el
 create mode 100644 style/paracol.el
 copy style/{fancynum.el => pdflscape.el} (63%)
 create mode 100644 tex-ispell.el



[elpa] elpa a474cb4 35/35: Release GNU AUCTeX 11.89.5

2016-09-01 Thread Tassilo Horn
branch: elpa
commit a474cb4b1d4c1edc1fba514494ff8ff8c155f6f9
Author: Tassilo Horn 
Commit: Tassilo Horn 

Release GNU AUCTeX 11.89.5

* Version 11.89.5 released.
---
 auctex.el  |2 +-
 auctex.info|  421 +---
 preview-latex.info |4 +-
 tex-site.el|   38 ++---
 4 files changed, 323 insertions(+), 142 deletions(-)

diff --git a/auctex.el b/auctex.el
index ac3a61d..8829174 100644
--- a/auctex.el
+++ b/auctex.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
 
-;; Version: 11.89.4
+;; Version: 11.89.5
 ;; URL: http://www.gnu.org/software/auctex/
 ;; Maintainer: auctex-de...@gnu.org
 ;; Notifications-To: auctex-di...@gnu.org
diff --git a/auctex.info b/auctex.info
index ad9ff2d..061c3f1 100644
--- a/auctex.info
+++ b/auctex.info
@@ -1,6 +1,6 @@
 This is auctex.info, produced by makeinfo version 6.1 from auctex.texi.
 
-This manual is for AUCTeX (version 11.89.4 from 2016-05-22), a
+This manual is for AUCTeX (version 11.89.5 from 2016-09-01), a
 sophisticated TeX environment for Emacs.
 
Copyright (C) 1992-1995, 2001, 2002, 2004-2016 Free Software
@@ -116,6 +116,7 @@ Controlling Screen Display
 * Folding:: Folding Macros and Environments
 * Outline:: Outlining the Document
 * Narrowing::   Restricting display and editing to a portion 
of the buffer
+* Prettifying:: Displaying Greek and math macros as Unicode 
characters
 
 Font Locking
 
@@ -2678,12 +2679,16 @@ narrowing the buffer to the desired region.  AUCTeX 
provides also
 functions to narrow the buffer to the current group and to LaTeX
 environments.
 
+   Lastly, AUCTeX with Emacs 25 or later can display certain math macros
+using Unicode characters.  That's called prettification.
+
 * Menu:
 
 * Font Locking::Font Locking
 * Folding:: Folding Macros and Environments
 * Outline:: Outlining the Document
 * Narrowing::   Restricting display and editing to a portion 
of the buffer
+* Prettifying:: Displaying Greek and math macros as Unicode 
characters
 
 
 File: auctex.info,  Node: Font Locking,  Next: Folding,  Up: Display
@@ -3331,7 +3336,7 @@ better outline support.  It is available from your 
favorite emacs lisp
 archive.
 
 
-File: auctex.info,  Node: Narrowing,  Prev: Outline,  Up: Display
+File: auctex.info,  Node: Narrowing,  Next: Prettifying,  Prev: Outline,  Up: 
Display
 
 3.4 Narrowing
 =
@@ -3357,6 +3362,32 @@ the option of enabling them; if you enable the commands, 
confirmation
 will no longer be required for them.
 
 
+File: auctex.info,  Node: Prettifying,  Prev: Narrowing,  Up: Display
+
+3.5 Prettifying
+===
+
+Emacs 25 is able to prettify symbols in programming language buffers,
+*note (emacs)Misc for Programs::.  The canonical example is to display
+'(lambda () ...)' as '(λ () ...)' in Lisp buffers.
+
+   AUCTeX can use this feature in order to display certain math macros
+and greek letters using their Unicode representation, too.  For example,
+the TeX code '\alpha \times \beta' will be displayed as 'α × β'.
+When point is on one of the characters, it'll be unprettified
+automatically, meaning you see the verbatim text again.
+
+   To enable prettification in AUCTeX, simply add
+'prettify-symbols-mode' to 'TeX-mode-hook'.  If you enabled
+prettification globally with 'global-prettify-symbols-mode', then it's
+automatically enabled in AUCTeX, too.
+
+   You can also add custom symbol unicode-character pairs for
+prettification by adding to 'tex--prettify-symbols-alist'.  Note that
+this variable is part of Emacs' stock 'tex-mode.el' and used by that and
+AUCTeX.
+
+
 File: auctex.info,  Node: Processing,  Next: Customization,  Prev: Display,  
Up: Top
 
 4 Starting Processors, Viewers and Other Programs
@@ -3573,6 +3604,102 @@ directories.  You can change this by setting the 
variable
  If nil, just check the current file.  Used when checking if any
  files have changed.
 
+   When performing spell checking on a document or a region (invoked
+through AUCTeX's 'Spell' command or 'M-x ispell RET'), you want the
+spell checking program to skip certain macro arguments and environments,
+most notably the arguments of referencing macros and the contents of
+verbatim environments.  The skipped parts are controlled by variable
+'ispell-tex-skip-alists' provided by 'ispell.el'.  AUCTeX has a library
+which can be added to this variable depending on the value of
+'TeX-ispell-extend-skip-list' which is set to 't' by default.
+
+ -- User Option: TeX-ispell-extend-skip-list
+ This boolean option controls whether AUCTeX activates its extension
+ for skipping certain macro arguments and environments when spell
+ checking.
+
+ When non-'nil', AUCTeX loads the file 'tex-ispell.el' and adds its
+ content to 'ispell-tex-

[elpa] elpa 7d5c9ba 20/35: ; Add missing macro \DeclareRightDelimiter

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 7d5c9bae1ea6669ec94e12bb12ebbf212f6d1b5a
Author: Arash Esbati 
Commit: Arash Esbati 

; Add missing macro \DeclareRightDelimiter

* style/empheq.el ("empheq"): Add missing macro \DeclareRightDelimiter.
("empheq"): Run `LaTeX-empheq-update-key-val-options' when
using \DeclareLeftDelimiter.
("empheq"): Add missing braces for \end part.
---
 style/empheq.el |   18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/style/empheq.el b/style/empheq.el
index 5ccc502..cbafdb1 100644
--- a/style/empheq.el
+++ b/style/empheq.el
@@ -429,9 +429,9 @@ number of ampersands if possible."
  (TeX-ispell-skip-setcdr
   `(,(cons (concat "\\(AmS\\(?:align\\(?:\\*\\|at\\*?\\)?\\|"
   
"equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)")
-  (concat "end"
+  (concat "end{"
   "\\(AmS\\(?:align\\(?:\\*\\|at\\*?\\)?\\|"
-  
"equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)")
+  
"equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)}")
 
;; 3.2 Support for ntheorem
(LaTeX-add-lengths "mintagvsep")
@@ -445,7 +445,19 @@ number of ampersands if possible."
 (let ((delim (TeX-read-string (concat "Delimiter: " TeX-esc
   (TeX-add-symbols (concat "empheq" delim)
(concat "empheqbig" delim))
-  (LaTeX-add-empheq-declaredelimiters delim)
+  (LaTeX-add-empheq-declaredelimiters `(,delim "Left"))
+  (LaTeX-empheq-update-key-val-options)
+  (concat TeX-esc delim)
+
+'("DeclareRightDelimiter"
+  [ "Space adjustment" ]
+  (TeX-arg-eval
+   (lambda ()
+(let ((delim (TeX-read-string (concat "Delimiter: " TeX-esc
+  (TeX-add-symbols (concat "empheq" delim)
+   (concat "empheqbig" delim))
+  (LaTeX-add-empheq-declaredelimiters `(,delim "Right"))
+  (LaTeX-empheq-update-key-val-options)
   (concat TeX-esc delim))
 
;; 4.2 Fine-tuning of delimiters



[elpa] elpa b2ebbb3 29/35: Use `TeX-ispell-skip-setcdr' on user defined listing environments

2016-09-01 Thread Tassilo Horn
branch: elpa
commit b2ebbb3634b8993cc192e136495f0d4c1522d025
Author: Arash Esbati 
Commit: Arash Esbati 

Use `TeX-ispell-skip-setcdr' on user defined listing environments

* style/listings.el (LaTeX-listings-auto-cleanup): Use
`TeX-ispell-skip-setcdr' on user defined lists.
---
 style/listings.el |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/style/listings.el b/style/listings.el
index 2d50b2c..e3a48a9 100644
--- a/style/listings.el
+++ b/style/listings.el
@@ -291,7 +291,9 @@ with user-defined values via the \"lstdefinestyle\" macro."
(t ; No args
 (add-to-list 'LaTeX-auto-environment (list env
   (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) 
t)
-  (add-to-list 'LaTeX-verbatim-environments-local env)))
+  (add-to-list 'LaTeX-verbatim-environments-local env)
+  ;; Add new env's to `ispell-tex-skip-alist': skip the entire env
+  (TeX-ispell-skip-setcdr `(,(cons env (concat "end{" env "}"))
   (when (LaTeX-listings-lstdefinestyle-list)
 (LaTeX-listings-update-style-key)))
 



[elpa] elpa c1a2b33 10/35: ; Add missing space in prompt

2016-09-01 Thread Tassilo Horn
branch: elpa
commit c1a2b332b1f47598d2e158b8fcfe8a2824411bd7
Author: Arash Esbati 
Commit: Arash Esbati 

; Add missing space in prompt

* style/environ.el (TeX-arg-environ-final-code): Add missing space
in prompt.
---
 style/environ.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/style/environ.el b/style/environ.el
index c6b34cc..4f275e9 100644
--- a/style/environ.el
+++ b/style/environ.el
@@ -89,7 +89,7 @@ from `environ.sty'.")
 (defun TeX-arg-environ-final-code (_optional)
   "Query for the presence of optional `final code' as argument to
 `\\NewEnviron' and insert the appropriate brackets."
-  (let ((fincode (y-or-n-p "With optional final code?")))
+  (let ((fincode (y-or-n-p "With optional final code? ")))
 (when fincode
(insert "[]"
 



[elpa] elpa f375c1f 22/35: Fold environments with * in name

2016-09-01 Thread Tassilo Horn
branch: elpa
commit f375c1fa0aa28e68d518dbdfec33f70c146397a1
Author: Mosè Giordano 
Commit: Mosè Giordano 

Fold environments with * in name

* tex-fold.el (TeX-fold-item): Add asterisk to the regexp matching LaTeX
  environment names.  Fixes bug#24263.
---
 tex-fold.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tex-fold.el b/tex-fold.el
index af1191f..cf4284e 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -468,7 +468,7 @@ Return non-nil if an item was found and folded, nil 
otherwise."
   ((eq type 'env)
(concat (regexp-quote TeX-esc)
"begin[ \t]*{"
-   "\\([A-Za-z]+\\)}"))
+   "\\([A-Za-z*]+\\)}"))
   (t
(concat (regexp-quote TeX-esc)
"\\([A-Za-z@*]+\\)"



[elpa] elpa 22f9450 30/35: Use `TeX-ispell-skip-setcar' on user defined index macros

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 22f94507cdf768b49bc480a3bdd212e8d2ac7824
Author: Arash Esbati 
Commit: Arash Esbati 

Use `TeX-ispell-skip-setcar' on user defined index macros

* style/splitidx.el (LaTeX-splitidx-newindex-regex): Replace wrong
`^}' with `^]'.
(LaTeX-splitidx-auto-cleanup, "splitidx"): Use
`TeX-ispell-skip-setcar' on user defined index macros.
---
 style/splitidx.el |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/style/splitidx.el b/style/splitidx.el
index 0c3ddf0..a2d9be7 100644
--- a/style/splitidx.el
+++ b/style/splitidx.el
@@ -96,7 +96,7 @@
 
 (defvar LaTeX-splitidx-newindex-regex
   `(,(concat "new\\(?:protected\\)?index"
-"\\(?:\\[[^}]*\\]\\)?"
+"\\(?:\\[[^]]*\\]\\)?"
 "{\\([^}]+\\)}")
 1 LaTeX-auto-splitidx-newindex)
   "Matches the argument of `\\newindex' from `splitidx.sty'.")
@@ -108,9 +108,11 @@
 (defun LaTeX-splitidx-auto-cleanup ()
   "Process parsed results for \"splitidx.sty\"."
   (when (LaTeX-provided-package-options-member "splitidx" "idxcommands")
-(dolist (elt (mapcar 'car (LaTeX-splitidx-newindex-list)))
+(dolist (elt (mapcar #'car (LaTeX-splitidx-newindex-list)))
   ;; Make every element available as a command
   (TeX-add-symbols `(,elt TeX-arg-index))
+  ;; Add new macros's to `ispell-tex-skip-alist': skip one argument
+  (TeX-ispell-skip-setcar `((,elt ispell-tex-arg-end)))
   ;; font-locking
   (when (and (featurep 'font-latex)
 (eq TeX-install-font-lock 'font-latex-setup))
@@ -265,9 +267,11 @@
;; instead of \sindex[foo]{}
(when (and (LaTeX-provided-package-options-member "splitidx" "idxcommands")
  (LaTeX-splitidx-newindex-list))
- (dolist (elt (mapcar 'car (LaTeX-splitidx-newindex-list)))
+ (dolist (elt (mapcar #'car (LaTeX-splitidx-newindex-list)))
;; Make every `foo' available as a command
(TeX-add-symbols `(,elt TeX-arg-index))
+   ;; Add new macros's to `ispell-tex-skip-alist': skip one argument
+   (TeX-ispell-skip-setcar `((,elt ispell-tex-arg-end)))
;; Cater for font-locking
(when (and (featurep 'font-latex)
  (eq TeX-install-font-lock 'font-latex-setup))



[elpa] elpa 5beae62 25/35: Set the right coding systems for Japanese TeX process

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 5beae6281041f9c6c1c9a88370615ad9ccf2d410
Author: Ikumi Keita 
Commit: Masayuki Ataka 

Set the right coding systems for Japanese TeX process

Set the right coding systems for Japanese TeX process

* tex-jp.el:
(LaTeX-command-style): Remove kanji option from uplatex and jlatex,
which was there by mistake.
(TeX-japanese-process-input-coding-system,
TeX-japanese-process-output-coding-system,
japanese-TeX-set-process-coding-system): The coding systems for
interacting with Japanese TeX vary with the OS and other
circumstances.  So choose the suitable coding system at run time
rather than using the fixed values.
(japanese-TeX-use-kanji-opt-flag): Declare before the first use.
In addition, change default value and tailor doc string as per the
above change.
(japanese-TeX-coding-ejsu): Add coding system compatible for emacs
21 and xemacs.

Signed-off-by: Masayuki Ataka 
---
 tex-jp.el |  132 ++---
 1 file changed, 101 insertions(+), 31 deletions(-)

diff --git a/tex-jp.el b/tex-jp.el
index a905348..cee4b2f 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -48,6 +48,14 @@
 (const :tag "jTeX" jtex)
 (const :tag "upTeX" uptex)))
 
+(defcustom japanese-TeX-use-kanji-opt-flag (not (eq system-type 'windows-nt))
+  "Add kanji option to Japanese pTeX family if non-nil.
+If `TeX-japanese-process-input-coding-system' or
+`TeX-japanese-process-output-coding-system' are non-nil, the process coding
+systems are determined by their values regardless of the kanji option."
+  :group 'AUCTeX-jp
+  :type 'boolean)
+
 (setq TeX-engine-alist-builtin
   (append TeX-engine-alist-builtin
  '((ptex "pTeX" "ptex %(kanjiopt)" "platex %(kanjiopt)" "eptex")
@@ -246,11 +254,11 @@ For detail, see `TeX-command-list', to which this list is 
appended."
 ;; $B=gD4$K9T$1$PITMW$K$J$k!#(B
 (setq LaTeX-command-style
   (append '(("\\`u[jt]\\(article\\|report\\|book\\)\\'\\|\\`uplatex\\'"
-"%(PDF)uplatex %(kanjiopt)%S%(PDFout)")
+"%(PDF)uplatex %S%(PDFout)")
("\\`[jt]s?\\(article\\|report\\|book\\)\\'"
 "%(PDF)platex %(kanjiopt)%S%(PDFout)")
("\\`j-\\(article\\|report\\|book\\)\\'"
-"%(PDF)jlatex %(kanjiopt)%S%(PDFout)"))
+"%(PDF)jlatex %S%(PDFout)"))
  LaTeX-command-style))
 
 (defcustom japanese-TeX-error-messages t
@@ -258,28 +266,19 @@ For detail, see `TeX-command-list', to which this list is 
appended."
   :group 'AUCTeX-jp
   :type 'boolean)
 
-;; FIX-ME (2007-02-09) The default coding system in recent Unix (like Fedora 
and
-;; Ubuntu) is utf-8.  But Japanese TeX system does not support utf-8 yet
-;; (platex-utf is under development, may be alpha phase).  So,
-;; process-coding-system for Japanese TeX is not defined from
-;; default-coding-system.  When platex-utf is out, we should look this setting,
-;; again.
-
-(defcustom TeX-japanese-process-input-coding-system
-  (cond ((memq system-type '(windows-nt ms-dos cygwin)) 'shift_jis-dos)
-   ((memq system-type '(mac darwin)) 'shift_jis-mac)
-   (t 'euc-jp-unix))
-  "TeX-process' coding system with standard input."
+(defcustom TeX-japanese-process-input-coding-system nil
+  "If non-nil, used for encoding input to Japanese TeX process.
+When nil, AUCTeX tries to choose suitable coding system.
+See also a user custom option `TeX-japanese-process-output-coding-system'."
   :group 'AUCTeX-jp
-  :type 'coding-system)
+  :type '(choice (const :tag "Default" nil) coding-system))
 
-(defcustom TeX-japanese-process-output-coding-system
-  (cond ((memq system-type '(windows-nt ms-dos cygwin)) 'shift_jis-dos)
-   ((memq system-type '(mac darwin)) 'shift_jis-mac)
-   (t 'euc-jp-unix))
-  "TeX-process' coding system with standard output."
+(defcustom TeX-japanese-process-output-coding-system nil
+  "If non-nil, used for decoding output from Japanese TeX process.
+When nil, AUCTeX tries to choose suitable coding system.
+See also a user custom option `TeX-japanese-process-input-coding-system'."
   :group 'AUCTeX-jp
-  :type 'coding-system)
+  :type '(choice (const :tag "Default" nil) coding-system))
 
 ;; $B=gD4$K9T$1$PITMW$K$J$k!#(B
 (defcustom japanese-TeX-command-default "pTeX"
@@ -327,19 +326,81 @@ For detail, see `TeX-command-list', to which this list is 
appended."
 
 (defun japanese-TeX-set-process-coding-system (process)
   "Set proper coding system for japanese TeX PROCESS."
-  (if (with-current-buffer TeX-command-buffer japanese-TeX-mode)
-  (set-process-coding-system process
-TeX-japanese-process-output-coding-system
-TeX-japanese-process-input-coding-system)))
+  (with-current-buffer TeX-command-buffer
+(when japanese-TeX-mode
+  ;; TeX-engine $B$,(B ptex, jtex, uptex 
$B$N$$$:$l$+$G$"

[elpa] elpa bb9f427 01/35: Grab focus on Evince inverse search

2016-09-01 Thread Tassilo Horn
branch: elpa
commit bb9f42732d4037962e44274a098283dab61e0b43
Author: Tassilo Horn 
Commit: Tassilo Horn 

Grab focus on Evince inverse search

* tex.el (TeX-source-correlate-sync-source): Call `x-focus-frame'.
---
 tex.el |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tex.el b/tex.el
index 8ea0b45..58c8a04 100644
--- a/tex.el
+++ b/tex.el
@@ -1885,7 +1885,8 @@ or newer."
(when (or (< pos (point-min))
  (> pos (point-max)))
  (widen))
-   (goto-char pos)
+   (goto-char pos))
+  (x-focus-frame (selected-frame)
 
 (define-minor-mode TeX-source-correlate-mode
   "Minor mode for forward and inverse search.



[elpa] elpa e259e40 26/35: Add a Japanese error message translation

2016-09-01 Thread Tassilo Horn
branch: elpa
commit e259e40bae5954df0488e680b3f505a5871b46ff
Author: Ikumi Keita 
Commit: Masayuki Ataka 

Add a Japanese error message translation

* tex-jp.el (TeX-error-description-list): Add a Japanese error
message translation.

Signed-off-by: Masayuki Ataka 
---
 tex-jp.el |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tex-jp.el b/tex-jp.el
index cee4b2f..cfc37bf 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -567,7 +567,12 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
 
 (if japanese-TeX-error-messages
 (setq TeX-error-description-list
-  '(("Bad line or vector argument.*" .
+  '(("\\(?:Package Preview Error\\|Preview\\):.*" .
+"`preview'$B$X(B`auctex'$B%*%W%7%g%s$rD>@\M?$($k$N$OHr$1$F$/$@$5$$!%(B
+$B%W%l%S%e!<$Nl9g!$M>$j$K$3$_$$$C$?$3$H$r(B
+$B$7$9$.$+!$$G$J$1$l$P(BAUCTeX$B$,$R$I$$<:GT$r$7$F$$$^$9!%(B")
+
+("Bad line or vector argument.*" .
 
"$B@~$N79$-$r;XDj$9$k!$(B\\line$B$^$?$O(B\\vector$B$N:G=i$N0z?t$,IT@5$G$9!%(B")
 
 ("Bad math environment delimiter.*" .



[elpa] elpa 7828a43 16/35: ; Remove wrong entries for cleveref.sty

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 7828a43b7d1afca36d098398ac5b0df79bd35d39
Author: Arash Esbati 
Commit: Arash Esbati 

; Remove wrong entries for cleveref.sty

* tex-ispell.el (defvar): Remove wrong entries for cleveref.sty.
---
 tex-ispell.el |6 --
 1 file changed, 6 deletions(-)

diff --git a/tex-ispell.el b/tex-ispell.el
index 0f352e7..c519583 100644
--- a/tex-ispell.el
+++ b/tex-ispell.el
@@ -134,12 +134,6 @@
   ("nameCref" . 1)
   ("lcnamecref" . 1)
   ("labelcref" . 1)
-  ("crefrange" . 1)
-  ("Crefrange" . 1)
-  ("cpagerefrange" . 1)
-  ("Cpagerefrange" . 1)
-  ("crefrange*" . 1)
-  ("Crefrange*" . 1)
   ("crefrange" . 2)
   ("Crefrange" . 2)
   ("cpagerefrange" . 2)



[elpa] elpa 12bfe80 33/35: Add new style/menukeys.el

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 12bfe806986cd4b2ca384b5de2b7dd95bc52c515
Author: Arash Esbati 
Commit: Arash Esbati 

Add new style/menukeys.el

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

* style/menukeys.el: New file.
---
 Makefile.in   |2 +-
 style/menukeys.el |  539 +
 2 files changed, 540 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 1a8e5d2..014f5be 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -156,7 +156,7 @@ STYLESRC = style/prosper.el \
   style/hologo.elstyle/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.elstyle/paracol.el
+  style/framed.elstyle/paracol.el   style/menukeys.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/menukeys.el b/style/menukeys.el
new file mode 100644
index 000..bc30a84
--- /dev/null
+++ b/style/menukeys.el
@@ -0,0 +1,539 @@
+;;; menukeys.el --- AUCTeX style for `menukeys.sty' (v1.4)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-de...@gnu.org
+;; Created: 2016-02-07
+;; 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 `menukeys.sty' (v1.4) from 2016/04/18.
+;; `menukeys.sty' is part of TeXLive.
+
+;;; Code:
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+(defvar LaTeX-menukeys-input-separators-list
+  '("/" "=" "*" "+" "," ";" ":" "-" ">" "<" "bslash")
+  "List of input separators for macros of menukeys package.")
+
+(defvar LaTeX-menukeys-predefined-styles-list
+  '("menus" "roundedmenus" "angularmenus" "roundedkeys"
+"shadowedroundedkeys"  "angularkeys"  "shadowedangularkeys"
+"typewriterkeys"   "paths""pathswithfolder"
+"pathswithblackfolder" "hyphenatepaths"
+"hyphenatepathswithfolder"
+"hyphenatepathswithblackfolder")
+  "List of predefined styles for macros from menukeys package.")
+
+;; Setup for \newmenustyle(simple):
+(TeX-auto-add-type "menukeys-newmenustyle" "LaTeX")
+
+(defvar LaTeX-menukeys-newmenustyle-regexp
+  '("\\(?:new\\|copy\\)menustyle\\(?:simple\\)?*?{\\([^}]+\\)}"
+1 LaTeX-auto-menukeys-newmenustyle)
+  "Matches the argument of \\newmenustyle and
+\\newmenustylesimple from menukeys package.")
+
+;; Setup for \newmenucolortheme:
+(TeX-auto-add-type "menukeys-newmenucolortheme" "LaTeX")
+
+(defvar LaTeX-menukeys-newmenucolortheme-regexp
+  '("\\(?:new\\|copy\\)menucolortheme{\\([^}]+\\)}"
+1 LaTeX-auto-menukeys-newmenucolortheme)
+  "Matches the argument of \\newmenucolortheme from menukeys package.")
+
+;; Setup for \newmenumacro:
+(TeX-auto-add-type "menukeys-newmenumacro" "LaTeX")
+
+(defvar LaTeX-menukeys-newmenumacro-regexp
+  `(,(concat
+  "\\(new\\|renew\\|provide\\)menumacro"
+  "{?"
+  (regexp-quote TeX-esc)
+  "\\([a-zA-Z]+\\)"
+  "}?"
+  "\\(?:\\[\\([^]]*\\)\\]\\)?")
+(2 3 1) LaTeX-auto-menukeys-newmenumacro)
+  "Matches the arguments of \\newmenumacro from menukeys package.")
+
+(defun LaTeX-menukeys-auto-prepare ()
+  "Clear various `LaTeX-auto-menukeys-*' variables before parsing."
+  (setq LaTeX-auto-menukeys-newmenustyle nil
+   LaTeX-auto-menukeys-newmenucolortheme nil
+   LaTeX-auto-menukeys-newmenumacro nil))
+
+(defun LaTeX-menukeys-auto-cleanup ()
+  "Process the parsed elements for menukeys package.
+This function adds parsed elements from the variable
+`LaTeX-menukeys-newmenumacro-list' to AUCTeX via the function
+`TeX-add-symbols'.  The variable
+`LaTeX-menukeys-newmenumacro-list' and not the function with the
+same name is used since this function looks for the order of
+commands which are set by \\renewmenumacro in order to pick the
+current separator.  These renew-commands are also removed first
+from the variable `TeX-symbol-list' before being re-added."
+  (dolist (x (apply #'append LaTeX-menukeys-newmenumacro-list))
+(let ((macro (nth 0 x))
+ (sep   (nth 1 x))
+ (renew (when (string= (nth 2 x) "renew")
+  (nth 2 x
+  ;; When we are renewmenumacro'ing, delete the entry first from the
+  ;; variab

[elpa] elpa fcb6424 27/35: Revise document for Japanese TeX

2016-09-01 Thread Tassilo Horn
branch: elpa
commit fcb6424dfcc05174ba270b4c491a76553301ed8d
Author: Ikumi Keita 
Commit: Masayuki Ataka 

Revise document for Japanese TeX

Revise document for Japanese TeX
* doc/auctex.texi (Language Support): Fix old statements.  Mention
about (semi-)obsolete variables japanese-(La)TeX-command-default,
japanese-TeX-command-list and recommend to use
japanese-TeX-engine-default instead.

Signed-off-by: Masayuki Ataka 
---
 doc/auctex.texi |   29 -
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index d286ccf..673b6ad 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -4203,8 +4203,8 @@ j@TeX{} for Japanese, H@LaTeX{} and k@TeX{} for Korean.  
The
 
 Note that Unicode is not fully supported in Emacs 21 and XEmacs 21.
 @acronym{CJK} characters are not usable.  Please use the
-@acronym{MULE}-@acronym{UCS} EmacsLisp package or Emacs 22 (not released
-yet) if you need @acronym{CJK}.
+@acronym{MULE}-@acronym{UCS} EmacsLisp package or Emacs 22 and later if
+you need @acronym{CJK}.
 
 @c FIXME: We need more information for CTeX, ChinaTeX, KTeX, and HLaTeX.
 
@@ -4436,8 +4436,7 @@ If nil do it the other way round.
 @cindex p@LaTeX{}
 @cindex @file{tex-jp.el}
 @vindex TeX-default-mode
-@vindex japanese-TeX-command-default
-@vindex japanese-LaTeX-command-default
+@vindex japanese-TeX-engine-default
 @vindex japanese-LaTeX-default-style
 
 To write Japanese text with @AUCTeX{}, you need to have versions of
@@ -4467,16 +4466,10 @@ set the variable like this:
 @end lisp
 @end defopt
 
-@defopt japanese-TeX-command-default
-The default command for @code{TeX-command} in Japanese @TeX{} mode.
+@defopt japanese-TeX-engine-default
+The default TeX engine in Japanese @TeX{} mode.
 
-The default value is @samp{"pTeX"}.
-@end defopt
-
-@defopt japanese-LaTeX-command-default
-The default command for @code{TeX-command} in Japanese @LaTeX{} mode.
-
-The default value is @samp{"LaTeX"}.
+The default value is @samp{ptex}.
 @end defopt
 
 @defopt japanese-LaTeX-default-style
@@ -4485,6 +4478,16 @@ The default style/class when creating a new Japanese 
@LaTeX{} document.
 The default value is @samp{"jarticle"}.
 @end defopt
 
+The former customize options @code{japanese-TeX-command-default} and
+@code{japanese-LaTeX-command-default} are obsolete.  Use
+@code{japanese-TeX-engine-default} instead.  If you need to customize
+the executable file name such as @samp{"latex"}, the options for them,
+or both, customize @code{TeX-engine-alist}.
+
+Also, the option @code{japanese-TeX-command-list} is considered as
+semi-obsolete.  It still functions as before, but in theory, it is not
+required anymore in normal use.
+
 See @file{tex-jp.el} for more information.
 
 @node Automatic



[elpa] elpa 803894c 19/35: Add new style/empheq.el

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 803894cf9462242b1306a2bb2b1ee6e538f0a9a7
Author: Arash Esbati 
Commit: Arash Esbati 

Add new style/empheq.el

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

* style/empheq.el: New file.
---
 Makefile.in |2 +-
 style/empheq.el |  492 +++
 2 files changed, 493 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 28be5c2..a745410 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -155,7 +155,7 @@ STYLESRC = style/prosper.el \
   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
   style/hologo.elstyle/theorem.el   style/ntheorem.el \
   style/splitidx.el  style/tikz.el  style/xcolor.el \
-  style/pdflscape.el style/commath.el
+  style/pdflscape.el style/commath.el   style/empheq.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/empheq.el b/style/empheq.el
new file mode 100644
index 000..5ccc502
--- /dev/null
+++ b/style/empheq.el
@@ -0,0 +1,492 @@
+;;; empheq.el --- AUCTeX style for `empheq.sty' (v2.14)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-de...@gnu.org
+;; Created: 2016-08-07
+;; 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 `empheq.sty' (v2.14) from 2014/08/04.
+;; `empheq.sty' is part of TeXLive.
+
+;;; Code:
+
+;; Needed for compiling `pushnew':
+(eval-when-compile (require 'cl))
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+(defvar LaTeX-empheq-key-val-options
+  `(("box")
+("innerbox")
+("left" ,(mapcar
+ (lambda (x)
+   (concat TeX-esc x))
+ '("empheqlbrace"
+   "empheqlbrack"
+   "empheqlangle"
+   "empheqlparen"
+   "empheqlvert"
+   "empheqlVert"
+   "empheqlfloor"
+   "empheqlceil"
+   "empheqbiglbrace"
+   "empheqbiglbrack"
+   "empheqbiglangle"
+   "empheqbiglparen"
+   "empheqbiglvert"
+   "empheqbiglVert"
+   "empheqbiglfloor"
+   "empheqbiglceil")))
+("right" ,(mapcar
+  (lambda (x)
+(concat TeX-esc x))
+  '("empheqrbrace"
+"empheqrbrack"
+"empheqrangle"
+"empheqrparen"
+"empheqrvert"
+"empheqrVert"
+"empheqrfloor"
+"empheqrceil"
+"empheqbigrbrace"
+"empheqbigrbrack"
+"empheqbigrangle"
+"empheqbigrparen"
+"empheqbigrvert"
+"empheqbigrVert"
+"empheqbigrfloor"
+"empheqbigrceil")))
+("outerbox")
+("marginbox"))
+  "Key=value options for environments from empheq.sty.")
+
+(defvar LaTeX-empheq-key-val-options-local nil
+  "Buffer-local key=value options for environments from empheq.sty.")
+(make-local-variable 'LaTeX-empheq-key-val-options-local)
+
+(defvar LaTeX-empheq-supported-amsmath-envs
+  '("equation"  "equation*"
+"align" "align*"
+"gather""gather*"
+"flalign"   "flalign*"
+"alignat"   "alignat*"
+"multline"  "multline*")
+  "List of amsmath environments supported by empheq package.")
+
+(defvar LaTeX-empheq-package-options
+  '("overload" "overload2" "ntheorem" "newmultline" "oldmultline")
+  "Package options for the empheq package.")
+
+;; Setup for \Declare(Left|Right)Delimiter:
+
+(TeX-auto-add-type "empheq-declaredelimiter" "LaTeX")
+
+(defvar LaTeX-empheq-declaredelimiter-regexp
+  `(,(concat "Declare\\(Left\\|Right\\)Delimiter"
+"[ \t\n\r%]*"
+"\\(?:\\[[^]]*\\]\\)?"
+"[ \t\n\r%]*"
+"{"
+(regexp-quote TeX-esc)
+"\\([^}]+\\)}")
+(2 1) LaTeX-auto-empheq-declaredelimiter)
+  "Matches the argument of \\Declare(Left|Right)Delimiter from empheq 
package.")
+
+(defun LaTeX-empheq-auto-prepare ()
+  "Clear `LaTeX-auto-empheq-declaredelimiter' before parsing."
+  (setq LaTeX-auto-empheq-declaredelimiter nil))
+
+(defun LaTeX-empheq-auto-cleanup ()
+  "Process parsed 

[elpa] elpa 97c992d 09/35: Catch up with deletion of \commondummies in texinfo.tex

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 97c992d05a869a2c692f737599576bc45eed0c58
Author: Arash Esbati 
Commit: Arash Esbati 

Catch up with deletion of \commondummies in texinfo.tex

* doc/macros.texi: Catch up with deletion of \commondummies in
texinfo.tex which is replaced with \definedummies.  Check which
command is defined and add AUCTeX definitions respectively.
---
 doc/macros.texi |   16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/doc/macros.texi b/doc/macros.texi
index fdf37a0..4162d05 100644
--- a/doc/macros.texi
+++ b/doc/macros.texi
@@ -64,10 +64,18 @@ font-latex
   \def\TeX#1{TeX#1}%
   \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
 \xdef\indexnofonts{\the\toks0}
-\toks0\expandafter{\commondummies
-  \def\TeX#1{TeX#1}%
-  \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
-\xdef\commondummies{\the\toks0}
+\ifx\commondummies\undefined \else
+  \toks0\expandafter{\commondummies
+\def\TeX#1{TeX#1}%
+\def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
+  \xdef\commondummies{\the\toks0}
+\fi
+\ifx\definedummies\undefined \else
+  \toks0\expandafter{\definedummies
+\def\TeX#1{TeX#1}%
+\def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
+  \xdef\definedummies{\the\toks0}
+\fi
 \ifx\acronym\undefined \gdef\acronym#1{{\smallcaps \lowercase{#1}}} \fi
 \ifx\env\undefined \global\let\env=\code \fi
 \ifx\option\undefined \global\let\option=\samp \fi



[elpa] elpa 8c57d38 11/35: Fix doc string for curve quoting style in Emacs 25

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 8c57d38e1149f7adbc69ad7996588ce70d2f0f2b
Author: Arash Esbati 
Commit: Arash Esbati 

Fix doc string for curve quoting style in Emacs 25

* style/theorem.el (LaTeX-theorem-env-label):
* style/ntheorem.el (LaTeX-ntheorem-env-label):
* style/amsthm.el (LaTeX-amsthm-env-label): Fix doc string for new
text quoting style in Emacs 25.
---
 style/amsthm.el   |8 
 style/ntheorem.el |8 
 style/theorem.el  |8 
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/style/amsthm.el b/style/amsthm.el
index 5deb9e3..fee2843 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -73,14 +73,14 @@ argument.  Use PROMPT as the prompt string."
 for label.  AUCTeX users should add ENVIRONMENT to
 `LaTeX-label-alist' via customize or in init-file with:
 
-  (add-to-list 'LaTeX-label-alist '(\"lemma\" . \"lem:\"))
+  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
 
 RefTeX users should customize or add ENVIRONMENT to
 `LaTeX-label-alist' and `reftex-label-alist', e.g.
 
-  (add-to-list 'LaTeX-label-alist '(\"lemma\" . \"lem:\"))
-  (add-to-list 'reftex-label-alist
-  '(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
+  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
+  (add-to-list \\='reftex-label-alist
+  \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
 nil (\"Lemma\" \"lemma\") nil))"
   (let ((opthead (TeX-read-string
  (TeX-argument-prompt t nil "Heading"
diff --git a/style/ntheorem.el b/style/ntheorem.el
index 2cfd4f5..b7c22ea 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -82,14 +82,14 @@ argument.  Use PROMPT as the prompt string."
 for label.  AUCTeX users should add ENVIRONMENT to
 `LaTeX-label-alist' via customize or in init-file with:
 
-  (add-to-list 'LaTeX-label-alist '(\"lemma\" . \"lem:\"))
+  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
 
 RefTeX users should customize or add ENVIRONMENT to
 `LaTeX-label-alist' and `reftex-label-alist', e.g.
 
-  (add-to-list 'LaTeX-label-alist '(\"lemma\" . \"lem:\"))
-  (add-to-list 'reftex-label-alist
-  '(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
+  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
+  (add-to-list \\='reftex-label-alist
+  \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
 nil (\"Lemma\" \"lemma\") nil))"
   (let ((opthead (TeX-read-string
  (TeX-argument-prompt t nil "Heading"
diff --git a/style/theorem.el b/style/theorem.el
index 8b4101e..49e55e6 100644
--- a/style/theorem.el
+++ b/style/theorem.el
@@ -75,14 +75,14 @@ argument.  Use PROMPT as the prompt string."
 for label.  AUCTeX users should add ENVIRONMENT to
 `LaTeX-label-alist' via customize or in init-file with:
 
-  (add-to-list 'LaTeX-label-alist '(\"lemma\" . \"lem:\"))
+  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
 
 RefTeX users should customize or add ENVIRONMENT to
 `LaTeX-label-alist' and `reftex-label-alist', e.g.
 
-  (add-to-list 'LaTeX-label-alist '(\"lemma\" . \"lem:\"))
-  (add-to-list 'reftex-label-alist
-  '(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
+  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
+  (add-to-list \\='reftex-label-alist
+  \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
 nil (\"Lemma\" \"lemma\") nil))"
   (let ((opthead (TeX-read-string
  (TeX-argument-prompt t nil "Heading"



[elpa] elpa e4b2e6a 24/35: Make TeX-previous-error go backward

2016-09-01 Thread Tassilo Horn
branch: elpa
commit e4b2e6a76965156257a19bd65f9bc76dfb743b6e
Author: Mosè Giordano 
Commit: Mosè Giordano 

Make TeX-previous-error go backward

* tex-buf.el (TeX-parse-TeX): Decrease `TeX-error-last-visited' when
  `arg' is negative.  This fixes the behavior of `TeX-previous-error'.
---
 tex-buf.el |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 431c011..575c1ed 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2319,7 +2319,10 @@ already in an Emacs buffer) and the cursor is placed at 
the error."
;; `TeX-suppress-ignored-warnings' is non-nil and there are ignore
;; warnings.
(while (null (zerop arg))
- (setq TeX-error-last-visited (1+ TeX-error-last-visited)
+ (setq TeX-error-last-visited
+   ;; Increase or decrese `TeX-error-last-visited' depending on
+   ;; the sign of `arg'.
+   (+ (signum arg) TeX-error-last-visited)
item (if (natnump TeX-error-last-visited)
 (nth TeX-error-last-visited TeX-error-list)
   ;; XEmacs doesn't support `nth' with a negative 
index.
@@ -2327,9 +2330,7 @@ already in an Emacs buffer) and the cursor is placed at 
the error."
  ;; Increase or decrease `arg' only if the warning isn't to be
  ;; skipped.
  (unless (TeX-error-list-skip-warning-p (nth 0 item) (nth 10 item))
-   (setq arg (if (> arg 0)
- (1- arg)
-   (1+ arg)
+   (setq arg (- arg (signum arg)
(if (< TeX-error-last-visited -1)
(setq TeX-error-last-visited -1))
(cond ((or (null item)



[elpa] elpa 5745c81 02/35: Fix compatibility with GNU Emacs < 24

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 5745c81b322984932bffa4265f757769af9fad97
Author: Mosè Giordano 
Commit: Mosè Giordano 

Fix compatibility with GNU Emacs < 24

* tex.el (TeX-source-correlate-sync-source): Call `x-focus-frame' only
  when it is available.
---
 tex.el |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tex.el b/tex.el
index 58c8a04..923ce32 100644
--- a/tex.el
+++ b/tex.el
@@ -1886,7 +1886,10 @@ or newer."
  (> pos (point-max)))
  (widen))
(goto-char pos))
-  (x-focus-frame (selected-frame)
+  ;; Grab focus after inverse search (only if `x-focus-frame' function is
+  ;; available).
+  (when (fboundp 'x-focus-frame)
+   (x-focus-frame (selected-frame))
 
 (define-minor-mode TeX-source-correlate-mode
   "Minor mode for forward and inverse search.



[elpa] elpa e2be637 34/35: Merge branch 'master' into elpa

2016-09-01 Thread Tassilo Horn
branch: elpa
commit e2be63700c058312f3c96ff92715bc53b46026f2
Merge: 8eca45c 12bfe80
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into elpa
---
 Makefile.in|6 +-
 doc/auctex.texi|  196 +--
 doc/changes.texi   |   14 +-
 doc/macros.texi|   16 +-
 doc/todo.texi  |4 -
 latex.el   |   12 +-
 style/amsthm.el|8 +-
 style/commath.el   |  102 ++
 style/empheq.el|  504 
 style/enumitem.el  |   11 +-
 style/environ.el   |2 +-
 style/framed.el|   52 +
 style/listings.el  |4 +-
 style/mathtools.el |  442 ++
 style/menukeys.el  |  539 
 style/ntheorem.el  |8 +-
 style/paracol.el   |  274 ++
 style/pdflscape.el |   44 +
 style/splitidx.el  |   10 +-
 style/theorem.el   |8 +-
 style/xcolor.el|   15 +-
 tex-buf.el |   11 +-
 tex-fold.el|2 +-
 tex-ispell.el  |  289 
 tex-jp.el  |  139 ++
 tex.el |  132 +++--
 26 files changed, 2660 insertions(+), 184 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 23bf4a5..014f5be 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -84,7 +84,7 @@ MULEELC = @MULEELC@
 AUCSRC = tex.el tex-buf.el tex-style.el plain-tex.el latex.el tex-info.el \
texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el \
context.el context-en.el context-nl.el tex-fold.el \
-   toolbar-x.el tex-bar.el bib-cite.el
+   toolbar-x.el tex-bar.el bib-cite.el tex-ispell.el
 AUCELC = $(AUCSRC:.el=.elc)
 
 STYLESRC = style/prosper.el \
@@ -154,7 +154,9 @@ STYLESRC = style/prosper.el \
   style/fontenc.el   style/Alegreya.el  style/gloss-italian.el \
   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
   style/hologo.elstyle/theorem.el   style/ntheorem.el \
-  style/splitidx.el  style/tikz.el  style/xcolor.el
+  style/splitidx.el  style/tikz.el  style/xcolor.el \
+  style/pdflscape.el style/commath.el   style/empheq.el \
+  style/framed.elstyle/paracol.el   style/menukeys.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 80014d9..673b6ad 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2597,10 +2597,10 @@ the @TeX{} code @code{\alpha \times \beta} will be 
displayed as @code{α
 × β}.  When point is on one of the characters, it'll be unprettified
 automatically, meaning you see the verbatim text again.
 
-To enable prettification in @AUCTeX, simply add
+To enable prettification in @AUCTeX{}, simply add
 @code{prettify-symbols-mode} to @code{TeX-mode-hook}.  If you enabled
 prettification globally with @code{global-prettify-symbols-mode}, then
-it's automatically enabled in @AUCTeX, too.
+it's automatically enabled in @AUCTeX{}, too.
 
 You can also add custom symbol unicode-character pairs for
 prettification by adding to @code{tex--prettify-symbols-alist}.  Note
@@ -2876,6 +2876,126 @@ If nil, just check the current file.
 Used when checking if any files have changed.
 @end defopt
 
+@cindex ispell
+When performing spell checking on a document or a region (invoked
+through @AUCTeX{}'s @samp{Spell} command or @kbd{M-x ispell RET}), you
+want the spell checking program to skip certain macro arguments and
+environments, most notably the arguments of referencing macros and the
+contents of verbatim environments.  The skipped parts are controlled by
+variable @code{ispell-tex-skip-alists} provided by @file{ispell.el}.
+@AUCTeX{} has a library which can be added to this variable depending on
+the value of @code{TeX-ispell-extend-skip-list} which is set to @code{t}
+by default.
+
+@defopt TeX-ispell-extend-skip-list
+This boolean option controls whether @AUCTeX{} activates its extension
+for skipping certain macro arguments and environments when spell
+checking.
+
+When non-@code{nil}, @AUCTeX{} loads the file @file{tex-ispell.el} and
+adds its content to @code{ispell-tex-skip-alists}.  This library can and
+will never be complete, but the interface can be used to add selected
+and private macro names within your init file or on a file local basis.
+
+@code{ispell-tex-skip-alists} has the following structure:
+@lisp
+(defvar ispell-tex-skip-alists
+  '((;; First list
+ ("addcontentsline" ispell-tex-arg-end 2)
+ ("\\([aA]lph\\|arabic\\)"  ispell-tex-arg-end)
+ ("makebox" ispell-tex-arg-end 0)
+ ("documentclass" . "begin@{document@}"))
+(;; Second list
+ ("\\(figure\\|table\\)\\*?"  ispell-tex-arg-end 0)
+ ("list"  ispell-tex-arg-end 2)
+ ("verbatim\\*?" . "end@{verbatim\\*?@}")))
+  "*Lists of regions to be skipped in TeX mode.
+First list is used raw.
+Second list has key placed insid

[elpa] elpa 4f15be6 15/35: ; Remove wrong entries for varioref.sty

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 4f15be659b747f443afffd023ae8cf8c34a2b0d6
Author: Arash Esbati 
Commit: Arash Esbati 

; Remove wrong entries for varioref.sty

* tex-ispell.el (defvar): Remove wrong entries for varioref.sty.
---
 tex-ispell.el |4 
 1 file changed, 4 deletions(-)

diff --git a/tex-ispell.el b/tex-ispell.el
index f10d371..0f352e7 100644
--- a/tex-ispell.el
+++ b/tex-ispell.el
@@ -184,10 +184,6 @@
   ("vpageref" . 1)
   ("vpageref*" . 1)
   ("fullref" . 1)
-  ("vrefrange" . 1)
-  ("vrefrange*" . 1)
-  ("vpagerefrange" . 1)
-  ("vpagerefrange*" . 1)
   ("vrefrange" . 2)
   ("vrefrange*" . 2)
   ("vpagerefrange" . 2)



[elpa] elpa 40b3518 13/35: Add new spell checking dictionary tex-ispell.el

2016-09-01 Thread Tassilo Horn
branch: elpa
commit 40b351888936f8f80deabaddf34b32c6d130f8f8
Author: Arash Esbati 
Commit: Arash Esbati 

Add new spell checking dictionary tex-ispell.el

* doc/todo.texi (Wishlist): Remove spell checking of macros from
wish list.

* doc/changes.texi: Mention new file tex-ispell.el in news since
11.89.
Fix typo.

* Makefile.in (AUCSRC): Add tex-ispell.el.

* latex.el (tex-ispell): Require tex-ispell.el.

* tex.el (TeX-ispell-extend-skip-list): New customizable variable.
(TeX-ispell-skip-setcar, TeX-ispell-skip-setcdr): New functions.
(TeX-ispell-tex-arg-end): New function.

* tex-ispell.el: Add new file.
---
 Makefile.in  |2 +-
 doc/changes.texi |9 +-
 doc/todo.texi|4 -
 latex.el |1 +
 tex-ispell.el|  299 ++
 tex.el   |   80 +++
 6 files changed, 389 insertions(+), 6 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 23bf4a5..b79eaf4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -84,7 +84,7 @@ MULEELC = @MULEELC@
 AUCSRC = tex.el tex-buf.el tex-style.el plain-tex.el latex.el tex-info.el \
texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el \
context.el context-en.el context-nl.el tex-fold.el \
-   toolbar-x.el tex-bar.el bib-cite.el
+   toolbar-x.el tex-bar.el bib-cite.el tex-ispell.el
 AUCELC = $(AUCSRC:.el=.elc)
 
 STYLESRC = style/prosper.el \
diff --git a/doc/changes.texi b/doc/changes.texi
index ed61b5f..a14ff2e 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -12,6 +12,13 @@
 
 @itemize @bullet
 @item
+@AUCTeX{} has a new Ispell dictionary @file{tex-ispell.el} for macros
+and environments which will be skipped during spell checking.  The
+activiation of this feature is controlled by a new customize option
+@code{TeX-ispell-extend-skip-list}, which is set to @code{t} and
+activated by default.
+
+@item
 @AUCTeX{} has a new customize option @code{TeX-raise-frame-function}
 that is currently only used by Evince and Atril inverse search to raise
 the Emacs frame.
@@ -46,7 +53,7 @@ A new option, @code{TeX-PDF-from-DVI}, controls if and how to 
produce a
 obsolete and may be removed in future releases.
 
 @item
-Support for a number of external viewers has been addedd:
+Support for a number of external viewers has been added:
 @itemize
 @item
 Atril viewer.  Forward and inverse search requires version 1.9.1 or
diff --git a/doc/todo.texi b/doc/todo.texi
index 8025351..c21d816 100644
--- a/doc/todo.texi
+++ b/doc/todo.texi
@@ -76,10 +76,6 @@ used to insert an appropriate @samp{\usepackage} statement 
if the user
 tries to insert a macro for which the respective package has not been
 requested yet.
 
-@item Spell checking of macros
-
-A special ispell dictionary for macros could be nice to have.
-
 @item Improvements to error reporting
 
 Fringe indicators for errors in the main text would be nice.
diff --git a/latex.el b/latex.el
index babcd1a..c21699d 100644
--- a/latex.el
+++ b/latex.el
@@ -30,6 +30,7 @@
 
 (require 'tex)
 (require 'tex-style)
+(require 'tex-ispell)
 (eval-when-compile (require 'cl))   ;FIXME: Use cl-lib.
 
 ;;; Syntax
diff --git a/tex-ispell.el b/tex-ispell.el
new file mode 100644
index 000..f10d371
--- /dev/null
+++ b/tex-ispell.el
@@ -0,0 +1,299 @@
+;;; tex-ispell.el --- AUCTeX skip additions for Ispell
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-de...@gnu.org
+;; Keywords: tex, wp, convenience
+
+;; This file 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.
+
+;; This file 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 GNU Emacs; 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 provides additions to skip list of Ispell (in this
+;; context, Ispell is synonym for Ispell, Aspell and Hunspell spelling
+;; checker programs).  Macro arguments and environments skipped by
+;; Ispell are stored in the car and/or cdr of
+;; `ispell-tex-skip-alists'.  This file uses two functions
+;; `TeX-ispell-skip-setcar' and `TeX-ispell-skip-setcdr' defined in
+;; `tex.el' to add new items to this variable.
+
+;; Ispell has a lot of LaTeX macros and environments already built-in.
+;; E.g., check this link for Hunspell program:
+
+;; https://github.com/hunspell/hunspell/blob/master/src/parsers/latexparser.cxx
+
+;; Ispell does not check spelling in