emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 3dca7c4 57/57: Merge branch 'master' into extern


From: Tassilo Horn
Subject: [elpa] externals/auctex 3dca7c4 57/57: Merge branch 'master' into externals/auctex
Date: Wed, 11 Jan 2017 18:01:43 +0000 (UTC)

branch: externals/auctex
commit 3dca7c40815e75d822a7b508bf1206a679efe938
Merge: a580432 4ebbf90
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Merge branch 'master' into externals/auctex
---
 ChangeLog-preview                            |   16 +-
 ChangeLog.1                                  | 2529 +++++++++++++++++++++++++-
 Makefile.in                                  |   45 +-
 RELEASE                                      |  201 +-
 configure.ac                                 |    2 +-
 doc/auctex.texi                              |  102 +-
 doc/changes.texi                             |   83 +-
 doc/install.texi                             |   18 +-
 doc/quickstart.texi                          |   17 +-
 doc/tex-ref.tex                              |    8 +-
 font-latex.el                                |  113 +-
 latex.el                                     |   18 +-
 latex/preview.dtx                            |    2 +-
 style/Alegreya.el                            |    2 +-
 style/AlegreyaSans.el                        |    2 +-
 style/AnonymousPro.el                        |    2 +-
 style/FiraMono.el                            |    2 +-
 style/FiraSans.el                            |    2 +-
 style/MyriadPro.el                           |    2 +-
 style/XCharter.el                            |    2 +-
 style/attachfile.el                          |    2 +-
 style/baskervaldx.el                         |    2 +-
 style/biblatex.el                            |   56 +-
 style/bicaption.el                           |   11 +-
 style/caption.el                             |   55 +-
 style/cleveref.el                            |   62 +-
 style/color.el                               |    2 +-
 style/colortbl.el                            |    2 +-
 style/commath.el                             |    2 +-
 style/currvita.el                            |    2 +-
 style/dcolumn.el                             |    2 +-
 style/empheq.el                              |    2 +-
 style/enumitem.el                            |    2 +-
 style/environ.el                             |    2 +-
 style/erewhon.el                             |    2 +-
 style/eso-pic.el                             |    2 +-
 style/exam.el                                |  378 ++++
 style/fbb.el                                 |    2 +-
 style/fontaxes.el                            |    2 +-
 style/fontenc.el                             |    2 +-
 style/framed.el                              |    2 +-
 style/geometry.el                            |    2 +-
 style/harvard.el                             |    3 +-
 style/hologo.el                              |    2 +-
 style/jurabib.el                             |    5 +-
 style/ltablex.el                             |    2 +-
 style/ltxtable.el                            |    2 +-
 style/mdframed.el                            |  421 +++++
 style/mdsymbol.el                            |    2 +-
 style/menukeys.el                            |    2 +-
 style/minted.el                              |  197 +-
 style/natbib.el                              |    5 +-
 style/newfloat.el                            |    6 +-
 style/newpxmath.el                           |    2 +-
 style/newpxtext.el                           |    2 +-
 style/newtxmath.el                           |    2 +-
 style/newtxsf.el                             |    2 +-
 style/newtxtext.el                           |    2 +-
 style/newtxttt.el                            |    2 +-
 style/ntheorem.el                            |    2 +-
 style/paracol.el                             |    5 +-
 style/pdflscape.el                           |    2 +-
 style/pdfpages.el                            |    2 +-
 style/relsize.el                             |    2 +-
 style/splitidx.el                            |    2 +-
 style/subcaption.el                          |    2 +-
 style/subfiles.el                            |   43 +-
 style/tcolorbox.el                           |  636 ++++++-
 style/tcolorboxlib-raster.el                 |  192 ++
 style/textcomp.el                            |    2 +-
 style/textpos.el                             |    2 +-
 style/theorem.el                             |    2 +-
 style/titleps.el                             |  233 +++
 style/titlesec.el                            |  255 +++
 style/titletoc.el                            |  193 ++
 style/transparent.el                         |    2 +-
 style/varioref.el                            |   13 +
 style/vwcol.el                               |    2 +-
 style/wrapfig.el                             |    2 +-
 style/xcolor.el                              |    2 +-
 style/zlmtt.el                               |    2 +-
 tests/latex/latex-test.el                    |    4 +-
 tests/latex/tabular-count-ampersands-in.tex  |   50 +-
 tests/latex/tabular-count-ampersands-out.tex |   59 +-
 tex-buf.el                                   |   16 +-
 tex-ispell.el                                |   34 +-
 tex-style.el                                 |   21 +
 tex.el                                       |  131 +-
 88 files changed, 5951 insertions(+), 385 deletions(-)

diff --git a/ChangeLog-preview b/ChangeLog-preview
index 1c3cd32..908ed2e 100644
--- a/ChangeLog-preview
+++ b/ChangeLog-preview
@@ -1,4 +1,8 @@
-2015-11-13  Mos� Giordano  <address@hidden>
+2017-01-10  Mosè Giordano  <address@hidden>
+
+       * Version 11.90 released.
+
+2015-11-13  Mosè Giordano  <address@hidden>
 
        * Version 11.89 released.
 
@@ -28,11 +32,11 @@
        funcall instead of run-hooks.  Use goto-char + forward-line
        instead of goto-line.
 
-2014-10-29  Mos� Giordano  <address@hidden>
+2014-10-29  Mosè Giordano  <address@hidden>
 
        * Version 11.88 released.
 
-2014-10-29  Mos� Giordano  <address@hidden>
+2014-10-29  Mosè Giordano  <address@hidden>
 
        * latex/preview.dtx: Manually change the release version.
 
@@ -1654,13 +1658,13 @@
        * latex/preview.dtx: Make the end of snarfed environments behave
        normally if the environment is not being snarfed.
 
-2004-10-14  Jan-�ke Larsson  <address@hidden>
+2004-10-14  Jan-Åke Larsson  <address@hidden>
 
        * doc/wininstall.texi: Adjust text to conform with the AUCTeX aclocal.
 
        * configure.in: Add VALID_BUILD_DIR
 
-2004-10-13  Jan-�ke Larsson  <address@hidden>
+2004-10-13  Jan-Åke Larsson  <address@hidden>
 
        * configure.in: Adjust for the aclocal.m4 sync with AUCTeX
 
@@ -1877,5 +1881,5 @@
        * preview-latex.spec: prepare for 0.8, bump XEmacs to 21.4.9.
 
 ;; Local Variables:
-;; coding: iso-8859-1
+;; coding: utf-8
 ;; End:
diff --git a/ChangeLog.1 b/ChangeLog.1
index 9594575..18afc81 100644
--- a/ChangeLog.1
+++ b/ChangeLog.1
@@ -1,3 +1,2530 @@
+2017-01-10  Mosè Giordano  <address@hidden>
+
+       * Version 11.90 released.
+
+2017-01-10  Mosè Giordano  <address@hidden>
+
+       Refresh RELEASE file
+
+       * RELEASE: Update "Availability" and "Future development and additional
+       information" sections.
+
+2017-01-10  Mosè Giordano  <address@hidden>
+
+       * Makefile.in (release-commit): Use UTF-8 coding for ChangeLog entry.
+
+       * ChangeLog-preview: Change encoding to UTF-8.
+
+       * Makefile.in (release-commit): Fix name of preview ChangeLog.
+
+2017-01-10  Arash Esbati  <address@hidden>
+
+       Use RefTeX for multiple references in cleveref
+
+       * style/cleveref.el (TeX-arg-cleveref-multiple-labels): Check if
+       RefTeX is enabled and use it for multiple referencing macros.
+       ("cleveref"): Use `TeX-arg-ref' instead of `TeX-arg-label'.
+       ("cleveref"): Remove call of (font-latex-set-syntactic-keywords).
+
+2017-01-10  Arash Esbati  <address@hidden>
+
+       Skip macros and environments from tcolorbox and raster library
+
+       * tex-ispell.el (TeX-ispell-sort-skip-cmds-list): Extract macros
+       with optional argument from `TeX-ispell-skip-cmds-list'.
+       (TeX-ispell-skip-cmds-opt-arg-regexp): New variable containing
+       macros where only the optional argument is skipped while spell
+       checking.
+       Add macros and environments from tcolorbox.el and
+       tcolorboxlib-raster.el.
+
+2017-01-10  Arash Esbati  <address@hidden>
+
+       Advertise AUCTeX installation from ELPA
+
+       * doc/quickstart.texi (Quick Start): Emphasize the necessity to
+       drop (load "auctex.el" nil t t) when installed from ELPA.
+
+       * doc/install.texi (Installation): Advertise installation from
+       ELPA.
+
+2017-01-09  Mosè Giordano  <address@hidden>
+
+       Prepare for upcoming release
+
+       * RELEASE: Update AUCTeX version, the new features section, and
+       the list of contributors.
+
+       * configure.ac: Update AUCTeX version.
+
+       * doc/changes.texi: Reorder changes for 11.90 version section.
+
+       * doc/tex-ref.tex: Update AUCTeX version and copyright years
+       across the file.
+
+       * latex/preview.dtx: Manually update release version.
+
+2017-01-07  Mosè Giordano  <address@hidden>
+
+       Adapt Makefile to new ChangeLog file name
+
+       * Makefile.in (release-commit): Use `CHANGELOG_N' in place of
+       `ChangeLog'.
+
+2017-01-06  Tassilo Horn  <address@hidden>
+
+       Don't use cl function copy-list
+
+       * font-latex.el (font-latex--get-script-props): Use copy-sequence 
instead of
+       copy-list, the latter being a cl function.
+
+2017-01-05  Tassilo Horn  <address@hidden>
+
+       Fix bug where font-latex-sub/superscript-face was not applied to ^_
+
+       * font-latex.el (font-latex-make-user-keywords): prepend
+       font-latex-script-char-face, don't replace existing specs.
+
+2017-01-05  Tassilo Horn  <address@hidden>
+
+       Fontify script characters with a new face
+
+       * doc/auctex.texi (Fontification of math): Document it.
+       * doc/changes.texi: Mention that.
+       * font-latex.el (font-latex-make-user-keywords): Adapt.
+       (font-latex-script-char-face): New face.
+       (font-latex-match-script-chars): Improve it so that double ^_ aren't
+       matched because such errors were hard to see with
+       font-latex-fontify-script set to invisible.
+       (font-latex-script-char): New function.
+
+2017-01-05  Arash Esbati  <address@hidden>
+
+       Support biblatex cite format in all Emacsen
+
+       * style/biblatex.el ("biblatex"): Check if biblatex is available
+       in `reftex-cite-format-builtin' and use it.  If not, add entries
+       for older Emacsen manually.
+
+2017-01-05  Arash Esbati  <address@hidden>
+
+       Check new custom option before activating RefTeX cite format
+
+       * doc/changes.texi: Document new variable.
+
+       * style/biblatex.el ("biblatex"):
+       * style/harvard.el ("harvard"):
+       * style/jurabib.el ("jurabib"):
+       * style/natbib.el ("natbib"): Set cite format provided by RefTeX
+       when `LaTeX-reftex-cite-format-auto-activate' is non-nil.
+
+       * tex-style.el (LaTeX-reftex-cite-format-auto-activate): New
+       customizable variable.
+
+2017-01-04  Tassilo Horn  <address@hidden>
+
+       Fix script unfontification bug
+
+       * font-latex.el (font-latex-unfontify-region): Remove script-level
+       property and raise display property even though it's value is different
+       from what's specified in font-latex-script-display.
+
+2017-01-04  Tassilo Horn  <address@hidden>
+
+       Improve completion docs
+
+       * doc/auctex.texi (Completion): Improved docs.
+       * doc/changes.texi: Mention math completion, add link to Completion node
+       in the manual.
+       * tex.el (TeX-complete-list): Improve docstring.
+
+2017-01-04  Tassilo Horn  <address@hidden>
+
+       Refactor normal completion and completion at point a bit
+
+       * tex.el (TeX--complete-find-entry): New function.
+       (TeX-complete-symbol,TeX--completion-at-point): Use it.
+
+2017-01-04  Tassilo Horn  <address@hidden>
+
+       Completion for math macros
+
+       * latex.el (LaTeX--after-math-macro-prefix-p): New function.
+       (LaTeX-common-initialization): Use it for new TeX-complete-list entry.
+       * tex.el (TeX-complete-list): Also allow match-data setting predicates 
in
+       entries.
+       (TeX-complete-symbol,TeX--completion-at-point): Adapt to new 
possibility.
+
+2017-01-03  Tassilo Horn  <address@hidden>
+
+       Add completion-at-point support
+
+       * doc/auctex.texi (Completion): Document completion-at-point support.
+       * doc/changes.texi: Mention completion-at-point support.
+       * tex.el (TeX--completion-at-point): New function.
+       (VirTeX-common-initialization): Add TeX--completion-at-point to
+       completion-at-point-functions in TeX buffers if that's bound.
+
+2017-01-03  Mosè Giordano  <address@hidden>
+
+       Use RefTeX for multiple citations in biblatex
+
+       * style/biblatex.el (LaTeX-arg-biblatex-cites): Use RefTeX when
+         available.  Suggested by Arash Esbati.
+
+2017-01-03  Tassilo Horn  <address@hidden>
+
+       Simple docfix
+
+       * font-latex.el (font-latex-fontify-script-max-level): Correct escaping 
of
+       \(...\) in the docstring.
+
+2017-01-03  Tassilo Horn  <address@hidden>
+
+       Improve multi-level script fontification
+
+       * doc/auctex.texi (Fontification of math): Update docs.
+       * doc/changes.texi: Add an item for the new script fontification
+       features.
+       * font-latex.el (font-latex-fontify-script): Update docstring.
+       (font-latex-fontify-script-max-level): New custom variable.
+       (font-latex--get-script-props): Apply script face only for levels up to
+       font-latex-fontify-script-max-level.
+       (font-latex-script): Adapt call to font-latex--get-script-props.
+
+2017-01-03  Arash Esbati  <address@hidden>
+
+       Add a newline only if \label is inserted
+
+       * style/caption.el (LaTeX-arg-caption-captionof):
+       * style/bicaption.el (LaTeX-arg-bicaption-bicaption): Save the
+       position before asking for a label.  Add a newline only if a label
+       is inserted.
+
+2017-01-03  Tassilo Horn  <address@hidden>
+
+       Bring back multi-level script font-locking
+
+       * doc/auctex.texi (Fontification of math): Add documentation.
+       * font-latex.el (font-latex-script-display): Increase default raise 
level to
+       0.5.
+       (font-latex-superscript-face,font-latex-subscript-face): Let scripts be 
a bit
+       larger (:height 0.85 instead of 0.8).
+       (font-latex--get-script-props): New function for 
incrementing/decrementing
+       raise display property values.
+       (font-latex-script): Use it.
+
+2017-01-03  Tassilo Horn  <address@hidden>
+
+       Revert "Remove multi-level/invisible feature of 
font-latex-fontify-script"
+
+       This reverts commit ccec8501960a448dd8faccaae54dfd9839a37c30.
+
+2017-01-02  Tassilo Horn  <address@hidden>
+
+       Remove multi-level/invisible feature of font-latex-fontify-script
+
+       * font-latex.el 
(font-latex-make-user-keywords,font-latex-script-display)
+       (font-latex-script): Remove multi-level/invisible feature of
+       font-latex-fontify-script.
+       (font-latex-doctex-preprocessor-face): Remove function.
+       * doc/auctex.texi (Fontification of math): Remove documentation for
+       font-latex-fontify-script's multi-level and invisible values.
+
+2016-12-31  Arash Esbati  <address@hidden>
+
+       Set `reftex-set-cite-format' to biblatex or natbib
+
+       * style/biblatex.el ("biblatex"): Set `reftex-set-cite-format' to
+       biblatex or natbib depending on package option.
+
+2016-12-30  Uwe Brauer  <address@hidden>
+
+       Add new style/exam.sty
+
+       * Makefile.in (STYLESRC): add exam.el
+       * style/exam.el: Add style file
+       * tex-style.el: Move defcustom from exam.el to tex-style.el
+
+2016-12-30  Arash Esbati  <address@hidden>
+
+       Fix the names also in expert macros
+
+       * style/cleveref.el ("cleveref"): Fix the names also in expert macros.
+
+2016-12-30  Arash Esbati  <address@hidden>
+
+       Fix name of macros \lcnamecref and \lcnamecrefs
+
+       * style/cleveref.el ("cleveref"): Fix name of macros \lcnamecref
+       and \lcnamecrefs.
+
+2016-12-30  Arash Esbati  <address@hidden>
+
+       Add fontification for varioref's referencing macros
+
+       * font-latex.el (font-latex-built-in-keyword-classes): Add starred
+       version to \vref macro.
+
+       * style/varioref.el ("varioref"): Add fontification support for
+       referencing macros.
+
+2016-12-30  Arash Esbati  <address@hidden>
+
+       Add starred version of \citeauthor and \Citeauthor
+
+       * font-latex.el (font-latex-built-in-keyword-classes):
+       * style/biblatex.el ("biblatex"): Add starred version of
+       \citeauthor and \Citeauthor macros.
+
+2016-12-30  Arash Esbati  <address@hidden>
+
+       Fix fontification for natbib compat macros
+
+       * style/biblatex.el ("biblatex"): Fix fontification for natbib
+       compat macros which take 2 optional arguments.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Add \switchcolumn to paragraph commands
+
+       * style/paracol.el ("paracol"): Add \switchcolumn to paragraph
+       commands.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Add new style/titletoc.el
+
+       * style/titletoc.el: New file.
+
+       * Makefile.in (STYLESRC): Add new style.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Add new style/titlesec.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/titlesec.el: New file.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Add new style/titleps.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/titleps.el: New file.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Add new style/mdframed.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/mdframed.el: New file.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Add new tcolorbox library style/tcolorboxlib-raster.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/tcolorboxlib-raster.el: New file.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Update style/tcolorbox.el to package v3.96
+
+       * style/tcolorbox.el: Update style to package v3.96.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Query for optional float position
+
+       * style/newfloat.el (LaTeX-newfloat-auto-cleanup): Query for
+       optional float position.
+
+2016-12-29  Arash Esbati  <address@hidden>
+
+       Improve inserting arguments of \captionof macro
+
+       * style/caption.el (LaTeX-arg-caption-captionof): New function
+       improving query and insert of caption and label acc. to float
+       type.
+       ("caption"): Use it.
+
+2016-12-29  Mosè Giordano  <address@hidden>
+
+       Fix documentation of TeX-arg-file
+
+       * doc/auctex.texi (Adding Macros): `TeX-arg-file' does not strip
+         extension.  Reported by Tyler Smith.  Fixes bug#24444.
+
+2016-12-26  Uwe Brauer  <address@hidden>
+
+       Make AUCTeX and RefTeX aware of file loading macro \subfile
+
+       * style/subfiles.el ("subfiles"): Make subfile macro be recognized
+       as a paragraph command.  For AUCTeX, add argument of subfile to
+       `TeX-auto-file'.  For RefTeX, append subfile to
+       `reftex-include-file-commands' and run `reftex-compile-variables'
+       only once.  Code rearrangement.
+
+2016-12-24  Mosè Giordano  <address@hidden>
+
+       Print only first line of the message in error overview
+
+       * tex-buf.el (TeX-error-overview-make-entries): Use `push' in place of
+         `add-to-list'.  Print only the first line of the message.
+
+2016-12-23  Arash Esbati  <address@hidden>
+
+       Mention improvements to `LaTeX-array-count-columns' in news
+
+       * doc/changes.texi: Mention improvements to
+       `LaTeX-array-count-columns' in news since 11.89.
+
+2016-12-23  Arash Esbati  <address@hidden>
+
+       Extend test for new column counting code with style files loaded
+
+       * tests/latex/tabular-count-ampersands-out.tex:
+       * tests/latex/tabular-count-ampersands-in.tex: Add tests for
+       tabularx, tabulary, longtable, dcolumn, siunitx constructs.
+
+       * tests/latex/latex-test.el
+       (LaTeX-count-ampersands-inserted-in-tabular): Set `TeX-parse-self'
+       to t in order to load style files in the test.  Thanks to Mosè
+       Giordano for enabling this feature.
+
+2016-12-22  Arash Esbati  <address@hidden>
+
+       Update style/minted.el to package version 2.4.1.
+
+       * style/minted.el (LaTeX-minted-key-val-options): Add new key=vals
+       from package version 2.4.1.
+       (LaTeX-minted-key-val-options-local): New variable.
+       (LaTeX-minted-language-list): Set the variable
+       `LaTeX-minted-language-list' after the first call of function.
+       (LaTeX-minted-style-list): New variable.
+       (LaTeX-minted-style-list): New function analogous to
+       `LaTeX-minted-language-list' returning styles provided by
+       pymentize program.
+       (LaTeX-arg-minted-style): New function to insert styles provided
+       by pymentize program into buffer.
+       (LaTeX-minted-update-key-vals): New function to update key=vals in
+       `LaTeX-minted-key-val-options-local'.
+       (LaTeX-minted-auto-cleanup): Call `LaTeX-minted-update-key-vals'.
+       ("minted"): Use `LaTeX-minted-key-val-options-local' for all
+       key=val queries.  Update macros incl. fontification.  Run style
+       hook for `newfloat' when package option is given.
+
+2016-12-22  Tassilo Horn  <address@hidden>
+
+       Uniform font-lock updates/don't break prettify (bug#25245)
+
+       * font-latex.el (font-latex-update-font-lock): New function.
+       (font-latex-add-keywords): Use it.
+       (font-latex-after-hacking-local-variables): Use it.
+       * style/alltt.el: Use font-latex-update-font-lock.
+       * style/beamer.el: Ditto.
+       * style/comment.el: Ditto.
+       * style/expl3.el: Ditto.
+       * style/fancyhdr.el: Ditto.
+       * style/fancyvrb.el: Ditto.
+       * style/listings.el: Ditto.
+       * style/minted.el: Ditto.
+       * style/url.el: Ditto.
+
+2016-12-22  Mosè Giordano  <address@hidden>
+
+       Fix to TeX-add-local-master
+
+       * tex.el (TeX-add-local-master): Parse local variables again after
+         calling the mode function, which killed local variables.
+
+2016-12-21  Mosè Giordano  <address@hidden>
+
+       Add style/ directory to TeX-style-path for tests
+
+       * tests/latex/latex-test.el: Add our "style/" directory `TeX-style-path'
+         to make it possible to load style files inside tests.
+
+2016-12-20  Mosè Giordano  <address@hidden>
+
+       * tex.el (TeX-add-local-master): Inherit major mode from master file.
+
+2016-12-19  Arash Esbati  <address@hidden>
+
+       Mention that arguments to *-operator must be in braces
+
+       * doc/auctex.texi (Tabular-like): Mention that the new code for
+       counting columns in *{num}{cols} expects num and cols to be
+       enclosed in braces.
+
+2016-12-19  Arash Esbati  <address@hidden>
+
+       Add test for new column counting code
+
+       * tests/latex/tabular-count-ampersands-out.tex:
+       * tests/latex/tabular-count-ampersands-in.tex: New files.
+
+       * tests/latex/latex-test.el
+       (LaTeX-count-ampersands-inserted-in-tabular): Test new column
+       counting code in `LaTeX-array-count-columns'.
+
+2016-12-19  Arash Esbati  <address@hidden>
+
+       Count *-operator in column specification
+
+       * latex.el (LaTeX-array-count-columns): Detect *-operator in
+       column specification and count the arguments for final calculation
+       of columns.  Thanks to Ikumi Keita for pointing out this
+       deficiency and code to fix it.
+
+2016-12-19  Arash Esbati  <address@hidden>
+
+       Add new style/dcolumn.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/dcolumn.el: New file.
+
+2016-12-19  Arash Esbati  <address@hidden>
+
+       Accept non-letter characters as column specifier
+
+       * style/array.el (LaTeX-array-newcolumntype-regexp): Accept
+       non-letter characters as column specifier.
+
+2016-12-17  Arash Esbati  <address@hidden>
+
+       Use `LaTeX-item-longtable' while inserting longtable's
+
+       * style/longtable.el (LaTeX-longtable-skipping-regexp): New variable.
+       (LaTeX-item-longtable): New function.  This function is a
+       variation of `LaTeX-item-array' which uses
+       `LaTeX-longtable-skipping-regexp' when inserting ampersands.
+       ("longtable"): Append longtable to `LaTeX-item-list'.
+
+2016-12-17  Arash Esbati  <address@hidden>
+
+       Add "s" and "S" to `LaTeX-array-column-letters'
+
+       * style/siunitx.el ("siunitx"): Add column specification letters
+       "s" and "S" to `LaTeX-array-column-letters'.
+
+2016-12-17  Arash Esbati  <address@hidden>
+
+       Append tabular[xy] to `LaTeX-item-list'
+
+       * style/tabulary.el ("tabulary"):
+       * style/tabularx.el ("tabularx"): Append tabularx and tabulary to
+       `LaTeX-item-list'.
+
+2016-12-06  Arash Esbati  <address@hidden>
+
+       Support RefTeX with `reftex-add-index-macros' in style/splitidx.el
+
+       * style/splitidx.el ("splitidx"): Support RefTeX with
+       `reftex-add-index-macros' and not by appending macros to
+       `reftex-index-macros'.
+
+2016-12-06  Arash Esbati  <address@hidden>
+
+       Support RefTeX with `reftex-add-label-environments' in 
style/mathtools.el
+
+       * style/mathtools.el (LaTeX-mathtools-auto-cleanup, "mathtools"):
+       Support RefTeX with `reftex-add-label-environments' and not by
+       appending environments to `reftex-label-alist'.
+       ("mathtools"): Add fontification support for referencing macros.
+
+2016-12-06  Arash Esbati  <address@hidden>
+
+       Support RefTeX with `reftex-add-label-environments' in style/empheq.el
+
+       * style/empheq.el ("empheq"): Support RefTeX with
+       `reftex-add-label-environments' and not by appending environments
+       to `reftex-label-alist'.
+
+2016-12-05  Arash Esbati  <address@hidden>
+
+       Fix query for defined colors in style/textpos.el
+
+       * style/textpos.el ("textpos"): Use `cond' to check which color
+       defining package is loaded and use the respective function for
+       `completing-read'.
+
+2016-12-05  Arash Esbati  <address@hidden>
+
+       Fix query for defined colors in style/ntheorem.el
+
+       * style/ntheorem.el ("ntheorem"): Use `cond' to check which color
+       defining package is loaded and use the respective function for
+       `completing-read'.
+
+2016-11-30  Arash Esbati  <address@hidden>
+
+       Add support for LaTeX core command \textsubscript
+
+       * font-latex.el (font-latex-built-in-keyword-classes):
+       * latex.el (LaTeX-common-initialization): Add entry for
+       "textsubscript" which is in LaTeX core since 2015/01/01.
+
+2016-11-28  Arash Esbati  <address@hidden>
+
+       Do not spell-check arguments of \LTXtable
+
+       * tex-ispell.el (TeX-ispell-skip-cmds-list): Add entry for
+       \LTXtable.
+
+2016-11-28  Arash Esbati  <address@hidden>
+
+       Add \LTXtable to list of file-loading commands
+
+       * style/ltxtable.el (LaTeX-ltxtable-file-regexp): New variable.
+       ("ltxtable"): Make AUCTeX and RefTeX aware of \LTXtable as file
+       loading command.
+       Add fontification support.
+
+2016-11-25  Arash Esbati  <address@hidden>
+
+       Support new floats defined with newfloat package
+
+       * style/caption.el (LaTeX-caption-update-key-val-options): Append
+       new floating environments defined with "newfloat.sty" as values to
+       "type*?" keys in `LaTeX-caption-key-val-options-local'.
+
+2016-11-25  Arash Esbati  <address@hidden>
+
+       Append entry to `LaTeX-label-alist' for new "verbatim" floats
+
+       * style/newfloat.el (LaTeX-newfloat-auto-cleanup): Append an entry
+       for parsed environments of "verbatim" type to `LaTeX-label-alist'.
+
+2016-11-24  Arash Esbati  <address@hidden>
+
+       Insert \label inside the mandatory argument of \caption
+
+       * style/longtable.el ("longtable"): Append \label at the end of
+       caption text inside the mandatory argument.
+       (LaTeX-longtable-package-options): New variable to suppress the
+       query for package options.
+
+2016-11-24  Uwe Brauer  <address@hidden>
+
+       Add style file for subfiles package.
+
+       * Makefile.in (STYLESRC): add subfiles.el entry
+
+       * style/subfiles.el ("subfiles"): add new style.
+
+2016-11-23  Mosè Giordano  <address@hidden>
+
+       Min fix to kpfonts package
+
+       * style/kpfonts.el ("kpfonts"): Move setting of `TeX-font-list' inside
+         the hook.
+
+2016-11-23  Mosè Giordano  <address@hidden>
+
+       Add style file for amsfonts package
+
+       * style/amsfonts.el: New file.
+       * Makefile.in (STYLESRC): Install it.
+       * style/amssymb.el ("amssymb"): Run `amsfonts' hook.
+
+2016-11-21  Arash Esbati  <address@hidden>
+
+       Add new style/bicaption.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/bicaption.el: New file.
+
+2016-11-21  Arash Esbati  <address@hidden>
+
+       Add support for style/bicaption.el to style/caption.el
+
+       * style/caption.el (LaTeX-caption-supported-float-types): Add
+       supported caption types available with bicaption.el.
+       ("caption"): Append key=vals from bicaption.el to
+       `LaTeX-caption-key-val-options-local'.
+       ("caption"): Query for a second optional argument with
+       \captionsetup*? if bicaption.el is loaded.  Same for
+       fontification.
+
+2016-11-21  Arash Esbati  <address@hidden>
+
+       Do not insert a new line if \label is omitted
+
+       * style/subcaption.el (LaTeX-arg-subcaption-subcaption): Insert a
+       new line only if \label is given.
+
+2016-11-18  Arash Esbati  <address@hidden>
+
+       Improve caption and label insertion in style/caption.el
+
+       * style/caption.el (LaTeX-caption-key-val-options): Add key slc
+       which is an abbrev for singlelinecheck.
+       (LaTeX-arg-caption-captionbox): Delete unused prompt argument.
+       Ask for short caption acc. to the value of
+       `LaTeX-short-caption-prompt-length'.  Use `LaTeX-label' instead of
+       `TeX-insert-macro' to insert a label.  Use `TeX-argument-insert'
+       instead of conditional insert.
+       ("caption"): Do not fontify the last argument of \captionbox.
+       Fontification happens within \begin...\end{tabular} or
+       \includegraphics.
+
+2016-11-18  Arash Esbati  <address@hidden>
+
+       Improve caption and label insertion in style/subcaption.el
+
+       * style/subcaption.el (LaTeX-arg-subcaption-subcaption): Delete
+       unused prompt argument.  Ask for short caption acc. to the value
+       of `LaTeX-short-caption-prompt-length'.  Fill the inserted
+       sub-caption before using `LaTeX-label' to insert the label.
+       (LaTeX-arg-subcaption-subcaptionbox): Delete unused prompt
+       argument.  Ask for short caption acc. to the value of
+       `LaTeX-short-caption-prompt-length'.  Use `LaTeX-label' to insert
+       the label.  Use `TeX-argument-insert' instead of conditional
+       insert.
+       ("subcaption"): Append package environments to `LaTeX-label-alist'.
+       ("subcaption"): Do not fontify the last argument of
+       \subcaptionbox.  Fontification happens within
+       \begin...\end{tabular} or \includegraphics.
+
+2016-11-16  Arash Esbati  <address@hidden>
+
+       Add new style/FiraSans.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/FiraSans.el: New file.
+
+2016-11-16  Arash Esbati  <address@hidden>
+
+       Add new style/FiraMono.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/FiraMono.el: New file.
+
+2016-11-14  Mosè Giordano  <address@hidden>
+
+       Suggest to display warnings when there are no errors in error overview
+
+       * tex-buf.el (TeX-error-overview): When there are no errors, suggest to
+         display warnings and bad boxes, if present.  Fixes bug #24877.
+
+2016-11-04  Tassilo Horn  <address@hidden>
+
+       Refresh font-latex fontification if vars are modified
+
+       Refresh font-latex fontification if variables such as
+       LaTeX-verbatim-*-local are set in a file-local variables block or as
+       directory-local variables (bug#24868).
+
+       * font-latex.el (font-latex-after-hacking-local-variables): New 
function.
+       (font-latex-setup): Add it do hack-local-variables-hook.
+       * tex.el (TeX--list-of-string-p): New function.
+       * latex.el (LaTeX-verbatim-environments-local):
+       (LaTeX-verbatim-macros-with-braces-local):
+       (LaTeX-verbatim-macros-with-delims-local): Use it for
+       safe-local-variable property.
+
+2016-11-02  Arash Esbati  <address@hidden>
+
+       Update style/natbib.el to package version 8.31b
+
+       * style/natbib.el ("natbib"): Add missing macros to catch up with
+       package version 8.31b.  Rearrange code.
+       (LaTeX-arg-natbib-notes): Remove redundant check if
+       `TeX-arg-cite-note-p' is non-nil.
+
+2016-10-17  Tassilo Horn  <address@hidden>
+
+       Make Copyright headers conforming to convention
+
+2016-10-17  Arash Esbati  <address@hidden>
+
+       Do not insert unnecessary brackets for citation macros
+
+       * style/natbib.el (LaTeX-arg-natbib-notes): Rename function name
+       from `natbib-note-args'.
+       Improve the insertion of arguments in order not to have an empty
+       pair of brackets when both pre- and post-note are omitted.
+       ("natbib"): Replace occurrence of `natbib-note-args' with
+       `LaTeX-arg-natbib-notes'.
+
+2016-10-17  Arash Esbati  <address@hidden>
+
+       Use `TeX-argument-insert' instead of conditional `insert'
+
+       * style/biblatex.el (LaTeX-arg-biblatex-natbib-notes): Use
+       `TeX-argument-insert' instead of `insert' for arguments
+       insertion.
+
+2016-10-16  Arash Esbati  <address@hidden>
+
+       Add support for natbib macros to style/biblatex
+
+       * style/biblatex.el (LaTeX-arg-biblatex-natbib-notes): New
+       function.
+       ("biblatex"): Add completion and fontification support for natbib
+       compatibility macros.
+
+2016-10-14  Tassilo Horn  <address@hidden>
+
+       Manually merge changes that were only on the elpa branch
+
+2016-10-13  Tassilo Horn  <address@hidden>
+
+       Fix TeX--if-macro-fboundp edebug spec
+
+       * tex.el (TeX--if-macro-fboundp): Fix broken edebug spec.
+
+2016-09-27  Mosè Giordano  <address@hidden>
+
+       Fix to my previous commit
+
+       * tex-buf.el (TeX-BibTeX-sentinel): Fix misplaced `setq', it was inside
+         the `cond' form while it should have been outside.
+
+2016-09-19  Tassilo Horn  <address@hidden>
+
+       Improve docs added/changed in last commit
+
+       * doc/auctex.texi (Display): Rewrite WYSIWYG paragraph and add
+       references.
+       (Fontification of math): Switch order in which multi-level and invisible
+       are introduced.  Fix misplaced @xref.
+
+2016-09-19  Uwe Brauer  <address@hidden>
+
+       Add information about prettify and semi WYSIWYG features.
+
+       * doc/auctex.texi (Display): Add a sentence about
+       prettify-symbols-unprettify-at-point.
+       (Fontification of math): add `invisible' to
+       `font-latex-fontify-script'.
+
+2016-09-18  Tassilo Horn  <address@hidden>
+
+       Don't require \end{env} is on a separate line
+
+       * font-latex.el (font-latex-make-user-keywords):
+       (font-latex-set-syntactic-keywords): Don't require that \end{env} is on
+       a line of its own.  Also allow empty mandatory argument in verbatim
+       environments.
+
+2016-09-18  Mosè Giordano  <address@hidden>
+
+       Fix default command after running BibTeX with warnings
+
+       * tex-buf.el (TeX-BibTeX-sentinel): Always set `TeX-command-next' to
+         `TeX-command-default'.  As it was before, if BibTeX issued
+         warnings (or errors) the default next command would have been "View",
+         which is in no case what the user would expect.  This is the same
+         logic used in Biber sentinel (which has, in addition, a fatal error
+         after which Biber is run again).
+
+2016-09-18  Tassilo Horn  <address@hidden>
+
+       Improve font-locking of verbatim environments
+
+       * font-latex.el (font-latex-set-syntactic-keywords): Handle case where
+         verbatim content immediately follows \begin{verb-env}.
+
+2016-09-17  Uwe  <address@hidden>
+
+       Improve style/bidi and add make file entry.
+
+       * Makefile.in (STYLESRC): add bidi.el
+
+       * style/bidi.el ("bidi"): New file.
+
+2016-09-17  Arash Esbati  <address@hidden>
+
+       Improve style/graphicx.el
+
+       * doc/changes.texi: Document the changes about graphicx.el.
+
+       * tex-style.el (LaTeX-includegraphics-options-alist): Remove the
+       now no-op variable.
+
+       * style/graphics.el ("graphics"): Set
+       `LaTeX-graphics-package-options' after running hooks for
+       graphicx.el.
+
+       * style/graphicx.el (LaTeX-graphicx-key-val-options)
+       (LaTeX-includegraphics-dvips-extensions)
+       (LaTeX-includegraphics-pdftex-extensions)
+       (LaTeX-includegraphics-xetex-extensions)
+       (LaTeX-graphicx-package-options): New variables.
+       (LaTeX-arg-graphicx-includegraphics-key-val): New function.
+       (LaTeX-includegraphics-extensions): Return extensions for input
+       files depending on the used engine.
+       (LaTeX-arg-includegraphics): Only query for the image file to
+       include.  The query for the optional key-val argument is now done
+       by `LaTeX-arg-graphicx-includegraphics-key-val'.
+       ("graphicx"): Extend the query for commands \resizebox[*].
+       Commands shared with graphics.el are guarded respectively.
+       Add missing commands \graphicspath, \DeclareGraphicsExtensions and
+       \DeclareGraphicsRule.
+
+2016-09-14  Stefan Monnier  <address@hidden>
+
+       Cherry-pick 9c24759a96f41e288841ec2e815d62d58dc01e7a from elpa branch
+
+       * tex-ispell.el (TeX-ispell-sort-skip-cmds-list): Drop symbol-value
+
+       * tex-site.el.in (TeX-modes): Use #'.
+
+2016-09-04  Mosè Giordano  <address@hidden>
+
+       Do not use a function from cl
+
+       * tex-buf.el (TeX-parse-TeX): Do not use the `signum' function, provided
+         by `cl' library.
+
+2016-09-02  Mosè Giordano  <address@hidden>
+
+       Fix type of ConTeXt-Mark-version option
+
+       * context.el (ConTeXt-Mark-version): Fix the type, it was wrongly set
+         with a string in place of a symbol.  Reported by Tobias Berndt.
+
+2016-09-01  Arash Esbati  <address@hidden>
+
+       Add new style/menukeys.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/menukeys.el: New file.
+
+2016-09-01  Arash Esbati  <address@hidden>
+
+       Add new style/paracol.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/paracol.el: New file.
+
+2016-09-01  Arash Esbati  <address@hidden>
+
+       Add new style/framed.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/framed.el: New file.
+
+2016-08-31  Arash Esbati  <address@hidden>
+
+       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.
+
+2016-08-31  Arash Esbati  <address@hidden>
+
+       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.
+
+2016-08-31  Arash Esbati  <address@hidden>
+
+       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'.
+
+2016-08-25  Ikumi Keita  <address@hidden>
+
+       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.
+
+2016-08-25  Ikumi Keita  <address@hidden>
+
+       Add a Japanese error message translation
+
+       * tex-jp.el (TeX-error-description-list): Add a Japanese error
+       message translation.
+
+2016-08-25  Ikumi Keita  <address@hidden>
+
+       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.
+
+2016-08-24  Mosè Giordano  <address@hidden>
+
+       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'.
+
+2016-08-23  Arash Esbati  <address@hidden>
+
+       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'.
+
+2016-08-21  Mosè Giordano  <address@hidden>
+
+       Fold environments with * in name
+
+       * tex-fold.el (TeX-fold-item): Add asterisk to the regexp matching LaTeX
+         environment names.  Fixes bug#24263.
+
+2016-08-21  Mosè Giordano  <address@hidden>
+
+       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'.
+
+2016-08-14  Arash Esbati  <address@hidden>
+
+       Add new style/empheq.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/empheq.el: New file.
+
+2016-08-10  Arash Esbati  <address@hidden>
+
+       Add new style/commath.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/commath.el: New file.
+
+2016-08-02  Arash Esbati  <address@hidden>
+
+       Add new style/pdflscape.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/pdflscape.el: New file.
+
+2016-07-22  Arash Esbati  <address@hidden>
+
+       Document interaction with Ispell
+
+       * doc/auctex.texi (Selecting a Command): Document interaction with 
Ispell.
+
+2016-07-18  Arash Esbati  <address@hidden>
+
+       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.
+
+2016-07-08  Arash Esbati  <address@hidden>
+
+       Reset `LaTeX-auto-xcolor-definecolorset' before parsing
+
+       * style/xcolor.el (LaTeX-xcolor-auto-prepare): Reset
+       `LaTeX-auto-xcolor-definecolorset' before parsing.
+       Improve comments.
+
+2016-07-08  Arash Esbati  <address@hidden>
+
+       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.
+
+2016-06-29  Arash Esbati  <address@hidden>
+
+       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.
+
+2016-06-28  Masayuki Ataka  <address@hidden>  (tiny change)
+
+       Fix to doc/auctex.texi
+
+       * doc/auctex.texi (Prettifying): Insert missing '{}'.
+
+2016-06-27  Mosè Giordano  <address@hidden>
+
+       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.
+
+2016-06-11  Tassilo Horn  <address@hidden>
+
+       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.
+
+2016-06-11  Tassilo Horn  <address@hidden>
+
+       Document TeX-raise-frame-function
+
+       * doc/auctex.texi (I/O Correlation): Document TeX-raise-frame-function.
+
+2016-06-10  Tassilo Horn  <address@hidden>
+
+       New defcustom TeX-raise-frame-function
+
+       * tex.el (TeX-raise-frame-function): New defcustom.
+       (TeX-source-correlate-sync-source): Use it.
+
+2016-06-04  Uwe Brauer  <address@hidden>
+
+       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.
+
+2016-05-31  Mosè Giordano  <address@hidden>
+
+       Fix compatibility with GNU Emacs < 24
+
+       * tex.el (TeX-source-correlate-sync-source): Call `x-focus-frame' only
+         when it is available.
+
+2016-05-29  Tassilo Horn  <address@hidden>
+
+       Grab focus on Evince inverse search
+
+       * tex.el (TeX-source-correlate-sync-source): Call `x-focus-frame'.
+
+2016-05-29  Tassilo Horn  <address@hidden>
+
+       Don't use non-existing custom-buffer-done-function
+
+       * tex-wizard.el (TeX-wizard): Use `kill-buffer-hook' and
+       `custom-buffer-done-kill' instead of `custom-buffer-done-function' which
+       has been removed from Emacs a long time ago.
+
+2016-05-27  Tassilo Horn  <address@hidden>
+
+       Docs for prettification with Emacs 25+
+
+       * doc/auctex.texi (Prettifying): Document prettification.
+
+2016-05-27  Stefan Monnier  <address@hidden>
+
+       Fix byte-compiler warnings.
+
+       * context.el: Fix some byte-compiler warnings.
+       * tex-buf.el: Ditto.
+       * tex-jp.el: Ditto.
+       * tex-mik.el: Ditto.
+       * toolbar-x.el: Ditto.
+
+2016-05-24  Tassilo Horn  <address@hidden>
+
+       Fix copyright header of tex-jp.el
+
+       * tex-jp.el: Fix Copyright and Author headers.
+
+2016-05-22  Tassilo Horn  <address@hidden>
+
+       Convert ChangeLog.1 to UTF-8
+
+       * ChangeLog.1: Convert to UTF-8 and adjust encoding cookie.
+
+2016-05-22  Tassilo Horn  <address@hidden>
+
+       Make ChangeLog UTF-8
+
+       * ChangeLog-preview.1: Convert to UTF-8.
+       * build-aux/gitlog-to-auctexlog: Remove iconv call for converting
+         ChangeLog to ISO-8859-1.
+
+2016-05-21  Mosè Giordano  <address@hidden>
+
+       Append environment indentation rules to LaTeX-indent-environment-list
+
+       * style/alltt.el ("alltt"): Append indentation rule to
+         `LaTeX-indent-environment-list' in order not to override custom
+         settings.  Reported by François Patte.
+       * style/beamer.el ("beamer"): Ditto.
+       * style/doc.el ("doc"): Ditto.
+       * style/fancyvrb.el ("fancyvrb"): Ditto.
+       * style/filecontents.el ("filecontents"): Ditto.
+       * style/hyperref.el ("hyperref"): Ditto.
+       * style/listings.el (LaTeX-listings-auto-cleanup, "listings"): Ditto.
+       * style/longtable.el ("longtable"): Ditto.
+       * style/minted.el (LaTeX-minted-auto-cleanup, "minted"): Ditto.
+       * style/tabularx.el ("tabularx"): Ditto.
+       * style/tabulary.el ("tabulary"): Ditto.
+
+2016-05-18  Arash Esbati  <address@hidden>
+
+       Respect both "xcolor" and "color" for command queries
+
+       * style/textpos.el ("textpos"): Remove "color" from
+       `TeX-run-style-hooks'.
+       ("textpos"): Respect both "xcolor" and "color" for query to
+       "textblockcolour" and "textblockrulecolour" commands.
+
+2016-05-18  Arash Esbati  <address@hidden>
+
+       Respect both "xcolor" and "color" for query to "shadecolor"
+
+       * style/ntheorem.el ("ntheorem"): Respect both "xcolor" and
+       "color" for query to "shadecolor" command.
+
+2016-05-18  Arash Esbati  <address@hidden>
+
+       Adjust query commands for loading by xcolor.el
+
+       * style/colortbl.el ("colortbl"): Run style hook for "color" only
+       if "xcolor" is not an active style.
+       ("colortbl"): Check if "xcolor" is an active style and run
+       (TeX-arg-xcolor) or (TeX-arg-color) respectively to query for the
+       arguments.
+
+2016-05-18  Arash Esbati  <address@hidden>
+
+       Run `TeX-add-symbols' if "xcolor" is not an active style
+
+       * style/color.el ("color"): Check if "xcolor" is an active style
+       and then run `TeX-add-symbols' on commands defined by "color.sty"
+       and add fontification support.
+
+2016-05-18  Arash Esbati  <address@hidden>
+
+       Add new style/xcolor.el
+
+       * Makefile.in (STYLESRC): Add new style xcolor.el.
+
+       * style/xcolor.el: Add new file.
+
+2016-05-15  Tassilo Horn  <address@hidden>
+
+       Make TeX-view work better with regions
+
+       * tex-buf.el (TeX-region-update-point): New function which sets point in
+       the region buffer so that it matches the location of point in the
+       current buffer.
+       (TeX-view): Use it.
+
+2016-05-14  Arash Esbati  <address@hidden>
+
+       Improve the insertation of "macro" environment
+
+       * style/doc.el (LaTeX-env-no-comment): Check if argument
+       `environment' is "macro" and query/insert a name prefixed with
+       `TeX-esc'.
+       (LaTeX-doc-after-insert-macrocode): Add "macro" environment.
+       ("doc"): Run `LaTeX-env-no-comment' when "macro" environment is
+       inserted.
+
+2016-05-14  Mosè Giordano  <address@hidden>
+
+       Use commit date for package date also in configure
+
+       * aclocal.m4 (AC_DATE_VERSION_FROM_CHANGELOG): Use commit date rather
+         than author date.
+
+2016-05-14  Ikumi Keita  <address@hidden>
+
+       Tweak mode name only when file local variable is enabled.
+
+       * tex-jp.el (japanese-plain-tex-mode-initialization)
+         (japanese-latex-mode-initialization): Tweak mode name only
+         when `enable-local-variables' is non-nil.
+
+2016-05-12  Ikumi Keita  <address@hidden>
+
+       Adapt for upLaTeX
+
+       * tex-buf.el (TeX-LaTeX-sentinel): Accept banner line of upLaTeX.
+       * tex-jp.el (japanese-LaTeX-style-list): Add class file for upLaTeX.
+       * tex.el (TeX-format-list): Make upLaTeX class file names lead to
+         `japanese-latex-mode'.
+
+2016-05-09  Mosè Giordano  <address@hidden>
+
+       Do not check TeX engine with ifluatex package
+
+       * style/ifluatex.el ("ifluatex"): Set `TeX-check-engine-list' to nil so
+         that the engine is not checked when this package is loaded.
+
+2016-05-09  Mosè Giordano  <address@hidden>
+
+       Check TeX engine only once
+
+       * tex-buf.el (TeX-check-engine): If user does not want to change engine,
+         do not ask again.  Suggested by Joost Kremers.
+
+2016-05-09  Mosè Giordano  <address@hidden>
+
+       Use commit date to determine package date
+
+       * autogen.sh (AUCTEXDATE): Use commit date, rather than author date, to
+         determine package date.
+
+2016-05-09  Arash Esbati  <address@hidden>
+
+       Insert braces after some macros and \relax after \ProcessOptions
+
+       * style/ltx-base.el ("ltx-base"): Insert a pair of braces after
+       "DeclareOption*", "AtEndOfPackage", "AtEndOfClass",
+       "AtBeginDocument" and "AtEndDocument".
+       Insert a "\relax" after "ProcessOptions".
+
+2016-05-09  Arash Esbati  <address@hidden>
+
+       Improve style/doc.el
+
+       * style/doc.el ("doc"): Do not indent the content inside the "macro"
+       environment.
+       Insert a pair of braces after "DoNotIndex", "StopEventually",
+       "MacroFont", "AltMacroFont".
+       Prefix the string read with TeX-esc when inserting
+       "DescribeMacro", "cmd".
+       Ask for an argument ("parg", "oarg", "marg", "meta").
+       Add missing macro "cs".
+       Delete dups ("MacroFont", "AltMacroFont", "theCodelineNo").
+       Ask for .fdd and .dtx files to input or include ("DocInput",
+       "DocInclude").
+       Add lengths "MacrocodeTopsep", "MacroTopsep", "MacroIndent".
+
+2016-05-06  Mosè Giordano  <address@hidden>
+
+       Allow for negative offsets in region backward search
+
+       * tex.el (TeX-source-correlate-handle-TeX-region): Use the same regexp
+         used in `preview-parse-messages', that is also XEmacs compatible and
+         allows for negative offsets.  This makes backward search work also
+         when using `TeX-command-buffer' and `LaTeX-command-section'.  Reported
+         by Qiang Yin.
+
+2016-04-28  Ikumi Keita  <address@hidden>
+
+       Enable directory local variables in japanese-{latex, plain-tex}-mode
+
+               * tex-jp.el (japanese-latex-mode-initialization): Set
+               `major-mode' to `japanese-latex-mode' and reset it to
+               `latex-mode' after `hack-local-variables' is done.
+               (japanese-plain-tex-mode-initialization): Similar changes
+               for `japanese-plain-tex-mode'.
+               (japanese-TeX-reset-mode-name): New function.
+               (top-level) Make `latex-mode' is regarded as parent of
+               `japanese-latex-mode' in directory local variables.  Similar
+               addition for `japanese-plain-tex-mode', too.
+
+2016-04-23  Ikumi Keita  <address@hidden>
+
+       Make unloading of tex-site work on Emacs 24
+
+       * tex-site.el.in (tex-site-unload-hook): Run `TeX-modes-set' when
+         `advice-add' is defined.
+
+2016-04-20  Mosè Giordano  <address@hidden>
+
+       Fix TeX-error-overview-make-entries
+
+       * tex-buf.el (TeX-error-overview-make-entries): Add `active-buffer'
+         optional argument.  If `TeX-error-overview-open-after-TeX-run' is
+         non-nil and there is an error, TeX sentinels run this function but
+         `TeX-error-overview-active-buffer' hadn’t been initialized yet.  Fixes
+         bug#23318.
+
+2016-04-19  Mosè Giordano  <address@hidden>
+
+       Call TeX-newline-function interactively
+
+       * tex.el (TeX-newline): Replace `funcall' with `call-interactively'.
+         This makes `electric-indent-mode' work out-of-the-box.  Suggested by
+         alex (http://comments.gmane.org/gmane.emacs.auctex.devel/4631).
+
+2016-04-19  Ikumi Keita  <address@hidden>
+
+       Temporarily bind `TeX-insert-macro-default-style' to 
'show-optional-args'
+
+       * latex.el (LaTeX-item-argument): Temporarily bind
+       `TeX-insert-macro-default-style' to 'show-optional-args'.
+       This is necessary in description environment if the user customize the
+       option to `mandatory-args-only'.
+
+2016-04-17  Mosè Giordano  <address@hidden>
+
+       Reword documentation of TeX-PDF-from-DVI
+
+       * doc/auctex.texi (Processor Options): Make information about Japanese
+         documents more accurate.  Suggested by Ikumi Keita.
+
+2016-04-16  Mosè Giordano  <address@hidden>
+
+       Replace TeX-PDF-via-dvips-ps2pdf with TeX-PDF-from-DVI
+
+       * tex.el (TeX-command-list): Add Dvipdfmx.
+       (TeX-expand-list-builtin): Use `TeX-PDF-from-DVI' in place of
+       `TeX-PDF-via-dvips-ps2pdf'.
+       (TeX-PDF-from-DVI): New safe buffer-local and customizable variable.
+       (TeX-PDF-via-dvips-ps2pdf): Mark as obsolete.
+       (TeX-toggle-PDF-via-dvips-ps2pdf): Remove function.
+       (TeX-PDF-from-DVI): New function.
+       (TeX-mode-specific-command-menu-entries): Update menu to convert DVI to
+       PDF.
+       * tex-buf.el (TeX-command-default, TeX-run-set-command,
+       TeX-TeX-sentinel, TeX-TeX-sentinel-check, TeX-LaTeX-sentinel,
+       TeX-dvips-sentinel, TeX-ps2pdf-sentinel): Use `TeX-PDF-from-DVI' in
+       place of `TeX-PDF-via-dvips-ps2pdf'.
+       (TeX-run-dvipdfmx, TeX-dvipdfmx-sentinel): New function.
+       ():
+       * doc/auctex.texi (Processor Options): Document `TeX-PDF-from-DVI' and
+         remove mentions to `TeX-PDF-via-dvips-ps2pdf'
+       * doc/changes.texi: Mention `TeX-PDF-from-DVI'.
+
+2016-04-16  Ikumi Keita  <address@hidden>
+
+       Use customize option `TeX-region' instead of "_region_"
+
+       * tex-buf.el (TeX-output-revert-buffer): Use customize option
+       `TeX-region' instead of string literal "_region_".
+
+2016-04-16  Ikumi Keita  <address@hidden>
+
+       Use `deactivate-input-method' if defined
+
+       * tex.el (TeX-math-input-method-off): Use `deactivate-input-method'
+       instead of obsolete function `inactivate-input-method' when possible.
+
+2016-04-16  Ikumi Keita  <address@hidden>
+
+       Use `match-string-no-properties'
+
+       * texmathp.el (texmathp, texmathp-match-environment): For better
+       consistency with other parts of the file, change `match-string' to
+       `no-properties' variant.
+
+2016-04-16  Ikumi Keita  <address@hidden>
+
+       Fix small errors in doc string and comment
+
+       * tex.el (TeX-auto-add-type): Change the word `function' to `macro'
+       and add an `s' to the verb `create'.
+
+       * tex-buf.el (TeX-run-format): Correct a typo `debuger' to `debugger'.
+
+2016-04-14  Mosè Giordano  <address@hidden>
+
+       Fix in TeX sentinels
+
+       * tex-buf.el (TeX-TeX-sentinel, TeX-LaTeX-sentinel): Use
+         `TeX-error-overview-make-entries' to test presence of errors or
+         warnings.  This is the same test carried in `TeX-master-directory' and
+         prevents from getting an error when
+         `TeX-error-overview-open-after-TeX-run' is non-nil but
+         `TeX-debug-warnings' and/or `TeX-debug-bad-boxes' are nil.
+
+2016-04-13  Matthew Leach  <address@hidden>
+
+       Auto save `TeX-command-extra-options'.
+
+       * tex.el (TeX-auto-store): Save the value of `TeX-command-extra-options'
+         so it is set project-wide.
+
+2016-04-13  Matthew Leach  <address@hidden>
+
+       TikZ: Don't allow relative points with \coordinate.
+
+       * style/tikz.el (TeX-TikZ-point-function-map): Revert back to simple
+         point alist.
+         (TeX-TikZ-relative-point-function-map): New.
+         (TeX-TikZ-draw-arg-function-map): Use
+         `TeX-TikZ-relative-point-function-map'.
+
+2016-04-13  Matthew Leach  <address@hidden>
+
+       TikZ: Add the grid command.
+
+       * style/tikz.el (TeX-TikZ-arg-grid): New.
+         (TeX-TikZ-draw-arg-function-map): Map the 'Grid' command to
+         `TeX-TikZ-arg-grid'.
+
+2016-04-13  Matthew Leach  <address@hidden>
+
+       Fix a documentation type.
+
+       * doc/auctex.texi (Automatic Local): Fix a documentation typo.
+
+2016-04-13  Mosè Giordano  <address@hidden>
+
+       Prevent infinite loop in TeX-command-expand
+
+       * tex.el (TeX-view-command-raw): This function should always return a
+         string.  Throw an error if fails to do so.  This prevents an infinite
+         loop in `TeX-command-expand' in the case in which `command' is nil
+         because of a malformed viewer specification.
+       * tests/tex/command-expansion.el (TeX-view-command-raw-errors): Add
+         tests to trigger errors in `TeX-view-command-raw'.
+
+2016-04-10  Ikumi Keita  <address@hidden>
+
+       Integrate viewer support between tex.el and tex-jp.el
+
+       * tex.el (TeX-view-program-list-builtin): Integrate viewer support
+         between tex.el and tex-jp.el.
+       * tex-jp.el : Ditto.
+
+2016-04-09  Mosè Giordano  <address@hidden>
+
+       Do not use add-to-list for let-bound variable
+
+       * style/tikz.el (TeX-TikZ-find-named-points): Replace add-to-list with
+         `push'.
+
+2016-04-09  Mosè Giordano  <address@hidden>
+
+       Compatibility for XEmacs
+
+       * style/tikz.el (TeX-TikZ-single-macro-arg): Pass `function-alist' to
+         `TeX-TikZ-get-arg-type` because XEmacs requires an alist as argument
+         to `completing-read'.
+
+2016-04-08  Matthew Leach  <address@hidden>
+
+       TikZ: Remove unneeded function.
+
+       * style/tikz.el (TeX-TikZ-arg-rect-point): Delete.
+
+2016-04-08  Matthew Leach  <address@hidden>
+
+       TikZ: Add the 'sin' and 'cos' connectors.
+
+       * style/tikz.el (TeX-TikZ-path-connector-function-map): Add 'sin' and
+         'cos' mapping to `identity'.
+
+2016-04-08  Matthew Leach  <address@hidden>
+
+       TikZ: Make '+' and '++' prefixes apply to TikZ points
+
+       * style/tikz.el (TeX-TikZ-get-prefix-string): New.
+         (TeX-TikZ-arg-rect-point): Add optional argument `prefix'.
+         (TeX-TikZ-arg-polar-point): Likewise.
+         (TeX-TikZ-arg-named-point): Likewise.
+         (TeX-TikZ-single-macro-arg): Allow a variable number of arguments to
+         the argument name function map.
+         (TeX-TikZ-point-function-map): Prefix all point types with '+' and
+         '++'.
+         (TeX-TikZ-path-connector-function-map): Remove the '+' and '++'
+         suffixes.
+
+2016-04-04  Matthew Leach  <address@hidden>
+
+       TikZ: Add parabola command.
+
+       * style/tikz.el (TeX-TikZ-arg-bend): New.
+         (TeX-TikZ-arg-parabola): New.
+         (TeX-TikZ-draw-arg-function-map): Add mapping from "Parabola" to
+         `TeX-TikZ-arg-parabola'.
+
+2016-04-04  Matthew Leach  <address@hidden>
+
+       TikZ: Add optional parameter to `TeX-TikZ-single-macro-arg'.
+
+       * style/tikz.el (TeX-TikZ-single-macro-arg): New argument OPTIONAL.
+         (TeX-TikZ-macro-arg): Use OPTIONAL argument when calling
+         `TeX-TikZ-single-macro-arg'.
+
+2016-04-04  Matthew Leach  <address@hidden>
+
+       TikZ: make `TeX-TikZ-single-macro-arg' prompt required.
+
+       * style/tikz.el (TeX-TikZ-get-arg-type): Make prompt non-optional.
+         (TeX-TikZ-single-macro-arg): Likewise.
+         (TeX-TikZ-macro-arg): Make prompt explicit.
+
+2016-04-04  Matthew Leach  <address@hidden>
+
+       TikZ: Add the arc command.
+
+       * style/tikz.el (TeX-TikZ-arg-arc): New.
+         (TeX-TikZ-draw-arg-function-map): Map the 'Arc' command to
+         `Tex-TikZ-arg-arc'.
+
+2016-04-04  Matthew Leach  <address@hidden>
+
+       TikZ: Add circle command.
+
+       * style/tikz.el (TeX-TikZ-arg-circle): New.
+         (TeX-TikZ-draw-arg-function-map): Add mapping from 'Circle' to
+         `TeX-TikZ-arg-circle'.
+
+2016-04-04  Stefan Monnier  <address@hidden>
+
+       * tex-buf.el: Address some compiler warnings
+
+       Require `latex' since we refer to some of its variables.
+       Use #' to quote a function.  Use _ prefix for unused vars.
+       (TeX-current-process-region-p, TeX-save-query, TeX-parse-function)
+       (TeX-sentinel-function, TeX-sentinel-default-function)
+       (compilation-in-progress, TeX-current-page)
+       (TeX-error-overview-open-after-TeX-run, TeX-error-list)
+       (TeX-parse-all-errors, TeX-command-buffer, TeX-region): Declare before
+       the first use.
+       (TeX-command-text, TeX-command-pos): Declare as dyn-bound
+       (TeX-command-expand): Strength reduce `eval' to `symbol-name'.
+       (TeX-run-TeX): Use let*.
+       (TeX-sentinel-function, TeX-sentinel-default-function): Put something
+       in the function's body.
+       (TeX-TeX-sentinel-check): Check ConTeXt-Mark-version exists before
+       using it.  We could have (require 'context) instead.
+       (TeX-Biber-sentinel): Remove redundant `concat'.
+       (TeX-error-description-list): Move before first use.
+       (TeX-error-overview-mode-map): Remove unused var `menu-map'.
+       (TeX-output-revert-buffer): Remove unused var `command'.
+
+2016-04-02  Mosè Giordano  <address@hidden>
+
+       Fix compatibility with older Emacs versions
+
+       * tex.el: Dynamic determination of `delete-selection' behavior has been
+         introduced in Emacs 24.3.  For previous versions leave
+         `TeX-insert-dollar' without that property.
+
+2016-04-01  Mosè Giordano  <address@hidden>
+
+       Dinamically put delete-selection prop to TeX-insert-dollar
+
+       * tex.el (TeX-insert-dollar): Put `delete-selection' property only when
+         `TeX-electric-math' is nil.  Suggested by Roger Lipsett.  Fixes
+         bug#23177.
+
+2016-03-30  Mosè Giordano  <address@hidden>
+
+       Restore compatibility with XEmacs
+
+       * tex-buf.el (TeX-format-filter): Use `memq' in place of `memql'.  This
+         one is not available in XEmacs.
+
+2016-03-29  Mosè Giordano  <address@hidden>
+
+       Fix previous commit
+
+2016-03-29  Mosè Giordano  <address@hidden>
+
+       New function TeX-error-report-has-errors-p
+
+       * tex-buf.el (TeX-error-report-has-errors-p): New function.
+       (TeX-error-report-switches): Update docstring.
+       (TeX-LaTeX-sentinel, TeX-command-sequence-sentinel): Use
+       `TeX-error-report-has-errors-p'.
+       * tex-bar.el (TeX-bar-TeX-button-alist, TeX-bar-LaTeX-button-alist):
+         Ditto.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: Add more path connector types.
+
+       * style/tikz.el (TeX-TikZ-path-connector-function-map): New.
+         (TeX-TikZ-draw-arg-function-map): Use
+         `TeX-TikZ-path-connector-function-map'.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: Rename 'text' to 'label' to be consistent with TikZ terminology.
+
+       * style/tikz.el (TeX-TikZ-arg-label): Rename from `TeX-TikZ-arg-text'
+         and prompt for a 'Label' rather than 'Text'.
+         (TeX-TikZ-arg-node): Use new function name.
+         (TeX-TikZ-node-arg): Likewise.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: Ignore case when prompting for argument types.
+
+       * style/tikz.el (TeX-TikZ-get-arg-type): Let-bind
+         `completion-ignore-case' to t when prompting the user.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: Apply suggestions from checkdoc.
+
+       * style/tikz.el (TeX-TikZ-point-function-map): Make documentation
+         consistent with checkdoc.
+         (TeX-TikZ-draw-arg-function-map): Likewise.
+         (TeX-TikZ-draw-arg): Likewise and rename parameter to '_ignored'.
+         (TeX-TikZ-coordinate-arg): Likewise.
+         (TeX-TikZ-node-arg): Likewise.
+
+2016-03-29  Mosè Giordano  <address@hidden>
+
+       Fill environment content onley when auto-fill-mode is active
+
+       * latex.el (LaTeX-insert-environment): Fill only when
+         `auto-fill-function' is non-nil, that means auto-fill-mode is active.
+         Reported by Florian Lindner.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: Add 'Named Point' point type with completion.
+
+       * style/tikz.el (TeX-TikZ-point-name-regexp): New.
+         (TeX-TikZ-find-named-points): New.
+         (TeX-TikZ-arg-named-point): New.
+         (TeX-TikZ-point-function-map): Add 'Named Point' element that maps to
+         `TeX-TikZ-arg-named-point'.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: Add prompting for TikZ's \node macro.
+
+       * style/tikz.el (TeX-TikZ-node-arg): New.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: Add prompting for \coordinate macro.
+
+       * style/tikz.el (TeX-TikZ-point-function-map): New.
+         (TeX-TikZ-draw-arg-function-map): Use `TeX-TikZ-point-function-map'.
+         (TeX-TikZ-coordinate-arg): New.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: Extract the prompting of the next arg from TeX-TikZ-macro-arg.
+
+       * style/tikz.el (TeX-TikZ-single-macro-arg): New.
+         (TeX-TikZ-macro-arg): Use `TeX-TikZ-single-macro-arg' for prompting
+         the user and calling the appropriate function.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: allow arg type prompt to be specified.
+
+       * style/tikz.el (TeX-TikZ-get-arg-type): Add a new optional argument,
+         prompt, and show that to the user when non-nil, instead of the
+         default.
+
+2016-03-29  Matthew Leach  <address@hidden>
+
+       TikZ: split out the prompts to TeX-TikZ-arg-node & TeX-TikZ-macro-arg.
+
+       * style/tikz.el (TeX-TikZ-arg-options): New.
+         (TeX-TikZ-arg-name): New.
+         (TeX-TikZ-arg-text): New.
+         (TeX-TikZ-arg-node): Use new TikZ arg functions for prompting the
+         user.
+         (TeX-TikZ-macro-arg): Use `TeX-TikZ-arg-options' when prompting for
+         the options.
+
+2016-03-29  Arash Esbati  <address@hidden>
+
+       Add fontification support
+
+       * style/environ.el ("environ"): Add fontification support.
+
+2016-03-29  Arash Esbati  <address@hidden>
+
+       Fix a misplaced closing parenthesis
+
+       * style/splitidx.el (LaTeX-splitidx-auto-cleanup): Fix a misplaced
+       closing parenthesis.
+
+2016-03-29  Arash Esbati  <address@hidden>
+
+       Fix the name of argument in function body
+
+       * style/currvita.el (LaTeX-currvita-env-with-label): Fix the name
+       of argument in the body of function.
+
+2016-03-29  Arash Esbati  <address@hidden>
+
+       Delete redundant code
+
+       * style/enumitem.el (LaTeX-arg-SetLabelAlign)
+       (LaTeX-arg-SetEnumitemKey, LaTeX-arg-SetEnumitemValue): Delete
+       redundant code which is part of the function
+       `LaTeX-enumitem-update-key-val-options'.
+       (LaTeX-enumitem-env-with-opts): Fix the name of argument in the
+       body of function.
+
+2016-03-28  Mosè Giordano  <address@hidden>
+
+       Better control for presence of errors
+
+       * tex-buf.el (TeX-LaTeX-sentinel): Use `TeX-error-report-switches'
+         instead of `TeX-error-list'.
+
+2016-03-27  Tassilo Horn  <address@hidden>
+
+       Call TeX-after-compilation-finished-functions on warnings
+
+       * tex-buf.el (TeX-LaTeX-sentinel): Skip calling
+       TeX-after-compilation-finished-functions only if there are real errors.
+
+2016-03-27  Matthew Leach  <address@hidden>
+
+       Add the beginnings of TikZ support.
+
+       * style/tikz.el: New
+       * doc/changes.texi: Document TikZ style.
+       * Makefile.in: Add TikZ style to the build.
+
+2016-03-26  Tassilo Horn  <address@hidden>
+
+       Fix forward sync bug with multi-file documents
+
+       * tex.el (TeX-pdf-tools-sync-view): Use the current file for the
+       sync-view call, not always the master file (bug#23083).
+
+2016-03-19  Mosè Giordano  <address@hidden>
+
+       Temporarily bind gc-cons-threshold in time-consuming task
+
+       * tex.el (TeX-search-files-by-type): Bind `gc-cons-threshold' to
+         10000000 during the search, to reduce number of garbage collections
+         during the task.
+
+2016-03-17  Matthew Leach  <address@hidden>
+
+       Prompt for optional short caption parameter.
+
+       * latex.el (LaTeX-compose-caption-macro): New.
+         (LaTeX-short-caption-prompt-length): New.
+         (LaTeX-env-figure): Prompt for optional short caption parameter, when
+         the caption length is >= `LaTeX-short-caption-prompt-length', and pass
+         to `LaTeX-compose-caption-macro'.
+       * style/longtable.el ("longtable"): Likewise.
+       * style/psfig.el (LaTeX-env-psfigure): Likewise.
+       * doc/auctex.texi (Floats): Document short-caption prompting and
+         `LaTeX-short-caption-prompt-length'.
+       * doc/changes.texi: Likewise.
+
+2016-03-16  Matthew Leach  <address@hidden>
+
+       Improve prompts when defining LaTeX macros.
+
+       * latex.el (TeX-arg-default-argument-value): New.
+         (TeX-arg-define-macro-arguments): New.
+         (LaTeX-common-initialization): Use new LaTeX macro argument functions.
+
+2016-03-12  Matthew Leach  <address@hidden>
+
+       Ensure LaTeX-indent-environment-list environments aren't filled
+
+       * tests/latex/latex-filling-in.tex: Add a tabular environment to ensure
+         the body of the environment isn't filled as it is listed in
+         LaTeX-indent-environment-list.
+       * tests/latex/latex-filling-out.tex: Likewise.
+
+2016-03-08  Matthew Leach  <address@hidden>
+
+       Remove "table" and "table*" from LaTeX-indent-environment-list
+
+       * latex.el (LaTeX-indent-environment-list): Remove the "table" and
+         "table*" elements.
+
+2016-03-04  Mosè Giordano  <address@hidden>
+
+       Use TeX-quote-after-quote in all language style files
+
+       * style/icelandic.el ("icelandic"):
+       * style/polish.el ("polish"):
+       * style/polski.el ("polski"): Use value of `TeX-quote-after-quote'
+         instead of hard-coding t.
+
+2016-02-28  Mosè Giordano  <address@hidden>
+
+       Improve word-string regexp in TeX-warning
+
+       * tex-buf.el (TeX-warning): Match letters, numbers, colons, and hyphens,
+         not just word constituents.  They may be preceeded by both grave
+         accent and apostrophe, not only grave accent.
+       * tests/tex/compilation-log.txt: Add test case.
+       * tests/tex/error-parsing.el: Update result.
+
+2016-02-27  Mosè Giordano  <address@hidden>
+
+       Another fix for vertical bad box warnings
+
+       * tex-buf.el (TeX-parse-error): Use different regexps for horizontal and
+         vertical bad boxes, they cannot be handled together.
+       (TeX-warning): Do not move point when a vertical bad box has been found.
+       * tests/tex/compilation-log.txt: Add a test where the parser used to
+         fail to find the file for warnings after a vertical bad box warning.
+       * tests/tex/error-parsing.el: Update result accordingly.
+
+2016-02-26  Mosè Giordano  <address@hidden>
+
+       Fix parsing of vertical bad boxes context
+
+       * tex-buf.el (TeX-warning): Use as context for vertical bad boxes the
+       warning itself and don't move point.
+       * tests/tex/compilation-log.txt: Add a test for vertical bad boxes, and
+       horizontal bad boxes ending with "at line NN".  The two warnings are in
+       two consecutive lines, make sure the second one is correctly reported.
+       * tests/tex/error-parsing.el: Update result of the test accordingly.
+
+2016-02-26  Mosè Giordano  <address@hidden>
+
+       Catch more bad box warnings
+
+       * tex-buf.el (TeX-error-list): More information for some elements of the
+       list.
+       (TeX-parse-error): Change regexp to catch bad vertical boxes as well and
+       provide new argument to `TeX-warning'.
+       (TeX-warning): Require an additional mandatory argument, `bad-box'.
+       Improve regexp for detecting ending line of horizontal bad boxes in
+       order to cater for the case "...at line NN".
+       * tests/tex/error-parsing.el: Update result of the test.
+
+2016-02-23  Mosè Giordano  <address@hidden>
+
+       Avoid checking duplicate directories in TeX-check-files
+
+       * tex-buf.el (TeX-check-files): Delete duplicate directories in paths
+         list before performing the check.
+
+2016-02-21  Mosè Giordano  <address@hidden>
+
+       Fix detection of line number in TeX-warning
+
+       * tex-buf.el (TeX-warning): Require as additional mandatory argument the
+         position where the warning starts.  Use it to limit
+         `re-search-backward' when looking for the line number.
+       (TeX-parse-error): Provide additional argument to `TeX-warning'.
+       * tests/tex/compilation-log.txt: Add another case where the line number
+         of the warning was mistaken.
+       * tests/tex/error-parsing.el: Update expected result of the test
+         accordingly.
+
+2016-02-21  Mosè Giordano  <address@hidden>
+
+       Improve LaTeX-warnings-regexp
+
+       * tex-buf.el (LaTeX-warnings-regexp): Catch also "LaTeX Font" warnings.
+
+2016-02-21  Mosè Giordano  <address@hidden>
+
+       Another fix for TeX-parse-errro
+
+       * tex-buf.el (TeX-parse-error): Improve regexp for polishing file name.
+       * tests/tex/compilation-log.txt: Add example to test file.
+       * tests/tex/error-parsing.el: Update the expected result of the test
+         accordingly.
+
+2016-02-21  Mosè Giordano  <address@hidden>
+
+       Allow ignoring certain warnings
+
+       * tex.el (TeX-ignore-warnings, TeX-suppress-ignored-warnings): New
+         customizable options.
+       (TeX-toggle-suppress-ignored-warnings): New function.
+       (TeX-mode-map): Add key-binding for 
`TeX-toggle-suppress-ignored-warnings'.
+       * tex-buf.el (TeX-error-list-skip-warning-p): Add new argument and use 
it.
+       (TeX-parse-TeX): Provide additional argument to
+       `TeX-error-list-skip-warning-p'.
+       (TeX-error-list): Document new information.
+       (TeX-find-display-help): Add new (ignored) argument.
+       (TeX-error): Add new element to `TeX-error-list' entry.
+       (TeX-warning): Set the "ignore" flag for `TeX-error-list'
+       (TeX-error-overview-make-entries): Provide additional argument to
+       `TeX-error-list-skip-warning-p'.
+       (TeX-error-overview-toggle-debug-bad-boxes):
+       (TeX-error-overview-toggle-debug-warnings): Determine
+       `TeX-master-directory' in `TeX-command-buffer'.
+       (TeX-error-overview-toggle-suppress-ignored-warnings): New function.
+       (TeX-error-overview-mode-map): Add key-binding for
+       `TeX-error-overview-toggle-suppress-ignored-warnings'.
+       (TeX-error-overview-menu): Add entry for
+       `TeX-error-overview-toggle-suppress-ignored-warnings'.
+
+2016-02-21  Mosè Giordano  <address@hidden>
+
+       Show and hide warnings and bad boxes in error overview
+
+       * tex-buf.el (TeX-error-list-skip-warning-p): New function.
+       (TeX-parse-TeX): Skip warnings or bad boxes if they are to be ignored.
+       (TeX-error-list): Describe information present in the list.
+       (TeX-parse-error): When storing warnings and bad boxes, add them to
+       `TeX-error-list' even if `TeX-debug-bad-boxes' and `TeX-debug-warnings'
+       are nil.
+       (TeX-error-overview-make-entries): Skip warnings or bad boxes if they
+       are to be ignored.
+       (TeX-error-overview-toggle-debug-bad-boxes):
+       (TeX-error-overview-toggle-debug-warnings): New functions.
+       (TeX-error-overview-mode-map, TeX-error-overview-menu): Add
+       `TeX-error-overview-toggle-debug-bad-boxes' and
+       `TeX-error-overview-toggle-debug-warnings'.
+       (TeX-error-overview): Make the list of entries for the overview before
+       creating the buffer and use this list to decide whether there is
+       something to show.
+
+2016-02-14  Mosè Giordano  <address@hidden>
+
+       Fix TeX-check-files
+
+       * tex-buf.el (TeX-check-files): Run the test in `TeX-master-directory'
+         as well.
+
+2016-02-14  Arash Esbati  <address@hidden>
+
+       Add new style/splitidx.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * tex-style.el (LaTeX-splitidx-sindex-reftex-quick-id-key): Add
+       customizable variable.
+
+       * style/splitidx.el: New file.
+
+2016-02-14  Arash Esbati  <address@hidden>
+
+       Fix wrong usage of `TeX-auto-prepare-hook'
+
+       * style/theorem.el (TeX-auto-cleanup-hook):
+       * style/ntheorem.el (TeX-auto-cleanup-hook):
+       * style/newfloat.el (TeX-auto-cleanup-hook):
+       * style/amsthm.el (TeX-auto-cleanup-hook): Use
+       `TeX-auto-cleanup-hook' instead of mistakenly used
+       `TeX-auto-prepare-hook'.
+
+2016-02-14  Arash Esbati  <address@hidden>
+
+       Add support for missing macro \SetLabelAlign
+
+       * style/enumitem.el ("enumitem-SetLabelAlign"): Plug
+       \SetLabelAlign into AUCTeX parser.
+       (LaTeX-enumitem-SetLabelAlign-regexp): New variable.
+       (LaTeX-enumitem-auto-prepare): Reset
+       `LaTeX-auto-enumitem-SetLabelAlign'.
+       (LaTeX-arg-SetLabelAlign): New function to query the arguments of
+       \SetLabelAlign.
+       ("enumitem"): Add \SetLabelAlign to style hook incl. fontification.
+       (LaTeX-arg-SetEnumitemValue): Use `completing-read' instead of
+       `TeX-read-key-val'.
+
+2016-02-13  Mosè Giordano  <address@hidden>
+
+       Add support for Atril viewer
+
+       Suggested by Antoine Levitt.
+
+       * tex.el (TeX-evince-dbus-p): Take new arguments to specify desktop
+         environment and application names.
+       (TeX-evince-sync-view-1): Rename from `TeX-evince-sync-view'.  Take new
+         arguments to specify desktop environment and application names.
+       (TeX-atril-sync-view, TeX-evince-sync-view):
+       (TeX-view-program-select-evince): New functions.
+       (TeX-view-program-list-builtin): Add Atril entry and use
+       `TeX-view-program-select-evince' for Atril and Evince.
+       (TeX-source-correlate-mode): Register for Atril DBUS signal.
+       * doc/changes.texi: Mention Atril support.
+
+2016-02-09  Arash Esbati  <address@hidden>
+
+       Add support for dviout viewer
+
+       * doc/changes.texi: Mention support for dviout on Windows.
+
+       * tex.el (TeX-view-program-list-builtin): Add support for dviout
+       on Windows.  This setup works for `TeX-source-correlate-method'
+       set to (dvi . source-specials).
+       Reorder " %o" in entry for SumatraPDF.
+
+2016-02-09  Arash Esbati  <address@hidden>
+
+       Add support for SumatraPDF viewer
+
+       * doc/changes.texi: Mention support for SumatraPDF on Windows.
+       Fix typos.
+
+       * tex.el (TeX-view-program-list-builtin): Add support for
+       SumatraPDF on Windows.
+
+2016-02-08  Mosè Giordano  <address@hidden>
+
+       Add support for Zathura viewer
+
+       * tex.el (TeX-view-program-list-builtin): Add Zathura.
+       * doc/changes.texi: Mention Zathura support and reworked error parsing.
+
+2016-02-07  Mosè Giordano  <address@hidden>
+
+       Minor fix in TeX-documentation-texdoc
+
+       * tex.el (TeX-documentation-texdoc): Make it possible to run the
+         function in read-only buffers.
+
+2016-02-07  Mosè Giordano  <address@hidden>
+
+       Improve parsing of certain warnings
+
+       * tex-buf.el (TeX-warning): Get full context and line numbers for
+         warnings matching `LaTeX-warnings-regexp'.
+       * tests/tex/compilation-log.txt: Add example warnings for this case.
+       * tests/tex/error-parsing.el: Update result of test accordingly.
+
+2016-02-07  Mosè Giordano  <address@hidden>
+
+       Catch LaTeX class warnings
+
+       * tex-buf.el (LaTeX-warnings-regexp): New variable.  This is the same
+         regexp used before by `TeX-LaTeX-sentinel-has-warnings' and
+         `TeX-parse-error', but now catches class warnings as well.
+       (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error): Use
+       `LaTeX-warnings-regexp'.
+
+2016-02-07  Mosè Giordano  <address@hidden>
+
+       Fix TeX-parse-error
+
+       * tex-buf.el (TeX-parse-error): Remove from the file string pages of the
+         output file.
+       * tests/tex/compilation-log.txt: Add a warning containing such faulty
+         file name.
+       * tests/tex/error-parsing.el (TeX-error-parsing): Update result of the
+         test accordingly.
+
+2016-02-07  Mosè Giordano  <address@hidden>
+
+       Add ERT test for error parsing
+
+       * tests/tex/compilation-log.txt: Add minimal example of compilation log
+         that failed to be parsed correctly with the old parsing function.
+       * tests/tex/error-parsing.el: New ERT test.
+
+2016-02-07  Mosè Giordano  <address@hidden>
+
+       Add script to update the ChangeLog
+
+       * ChangeLog.1: Add copyright notice and information about included
+         commits.
+       * Makefile.in: Add ChangeLog-related variables and rules.
+       * build-aux/gitlog-to-auctexlog: New script, adapted from GNU Emacs.
+
+2016-02-03  Arash Esbati  <address@hidden>
+
+       Another fix for file name regexp in TeX-documentation-texdoc
+
+       * tex.el (TeX-documentation-texdoc): Add `space' and `()'
+       to file name regexp for Windows paths.
+
+2016-02-02  Arash Esbati  <address@hidden>
+
+       Fix file name regexp in TeX-documentation-texdoc
+
+       * tex.el (TeX-documentation-texdoc): Add backslash separator for Windows
+         paths.
+
+2016-02-02  Mosè Giordano  <address@hidden>
+
+       Capture warnings from packages with hyphens in name
+
+       * tex-buf.el (TeX-LaTeX-sentinel-has-warnings): Add hyphen to regexps.
+       (TeX-parse-error): Ditto.
+
+2016-02-02  Mosè Giordano  <address@hidden>
+
+       New function for reading documentation with texdoc
+
+       * tex.el (TeX-documentation-texdoc): New function.
+       (TeX-common-menu-entries): Replace `TeX-doc' with
+       `TeX-documentation-texdoc'.
+       (TeX-mode-map): Ditto.
+       * doc/auctex.texi (Documentation): Document `TeX-documentation-texdoc'
+       in place of `TeX-doc'.
+       * doc/changes.texi: Mention `TeX-documentation-texdoc'.
+
+2016-01-31  Tassilo Horn  <address@hidden>
+
+       Capture message of LaTeX warnings
+
+       * tex-buf.el (TeX-parse-error): Capture message of LaTeX warnings.
+
+2016-01-30  Mosè Giordano  <address@hidden>
+
+       Use default argument of completing-read in ConTeXt-environment
+
+       * context.el (ConTeXt-environment): Properly use default argument of
+         `completing-read'.  Do not set `ConTeXt-default-environment' to
+         `environment' if the latter is equal to the current default
+         environment, like in `LaTeX-environment'.
+
+2016-01-30  Mosè Giordano  <address@hidden>
+
+       Add completion for environments in ConTeXt
+
+       * context.el (ConTeXt-language-variable-list): Document variable.  Add
+         `ConTeXt-environment-list' so that now completion for environments
+         names in `ConTeXt-environment' function works.  Suggested by Andrea De
+         Michele.
+
+2016-01-27  Mosè Giordano  <address@hidden>
+
+       Change coding back to iso-8859-1, XEmacs doesn't support utf-8
+
+       * font-latex.el: Restore coding to iso-8859-1.
+       * style/alphanum.el: Ditto.
+       * style/dk-bib.el: Ditto.
+       * style/doc.el: Ditto.
+       * style/inputenc.el: Ditto.
+       * style/jura.el: Ditto.
+       * style/ltx-base.el: Ditto.
+       * style/ltxdoc.el: Ditto.
+       * tex-font.el: Ditto.
+       * tex.el: Ditto.
+
+2016-01-25  Mosè Giordano  <address@hidden>
+
+       Code cleaning
+
+       * latex.el (TeX-arg-document): Remove useless (mapcar 'identity ...).
+       Suggested by Marcin Borkowski.
+       * style/biblatex.el (LaTeX-biblatex-package-options): Ditto.
+
+2016-01-24  Arash Esbati  <address@hidden>
+
+       Improve style/enumitem
+
+       * style/enumitem.el (LaTeX-enumitem-newlist-list)
+       (LaTeX-enumitem-newlist-list-item-arg)
+       (LaTeX-auto-enumitem-newlist): Remove variables.
+       (LaTeX-enumitem-newlist-list-local): Fix docstring.
+       (LaTeX-enumitem-auto-cleanup): Plug \newlist into AUCTeX parser.
+       ("enumitem"): Offer only enumerated environments as completion for
+       \restartlist.
+
+2016-01-24  Arash Esbati  <address@hidden>
+
+       Improve font related queries
+
+       * style/theorem.el (LaTeX-theorem-fontdecl): Do not prefix the
+       elements with `TeX-esc'.
+       (LaTeX-arg-theorem-fontdecl): New function.
+       ("theorem"): Use `LaTeX-arg-theorem-fontdecl' for font related
+       queries.
+
+2016-01-24  Arash Esbati  <address@hidden>
+
+       Improve font related queries
+
+       * style/ntheorem.el (LaTeX-ntheorem-fontdecl): Do not prefix the
+       elements with `TeX-esc'.
+       (LaTeX-arg-ntheorem-fontdecl): New function.
+       ("ntheorem"): Use `LaTeX-arg-ntheorem-fontdecl' for font related
+       queries.
+
+2016-01-24  Arash Esbati  <address@hidden>
+
+       Improve font related queries
+
+       * style/amsthm.el (LaTeX-amsthm-fontdecl): Do not prefix the
+       elements with `TeX-esc'.
+       (LaTeX-arg-amsthm-fontdecl): New function.
+       ("amsthm"): Use `LaTeX-arg-amsthm-fontdecl' for font related
+       queries.
+
+2016-01-23  Mosè Giordano  <address@hidden>
+
+       Write TeX-style-hook-dialect to parsed file
+
+       * latex.el (BibTeX-auto-store): Run `TeX-bibtex-set-BibTeX-dialect'.
+       * tex.el (TeX-auto-store): Store `TeX-style-hook-dialect' from buffer
+         and write it to parsed file when present.
+
+2016-01-23  Mosè Giordano  <address@hidden>
+
+       Add new dialects
+
+       * context.el: Update copyright years.
+       (ConTeXt-dialect): New constant.
+       (ConTeXt-mode-common-initialization): Set `TeX-style-hook-dialect' to
+       `ConTeXt-dialect'.
+       * plain-tex.el: Update copyright years.
+       (plain-TeX-dialect): New constant.
+       (plain-TeX-common-initialization): Set `TeX-style-hook-dialect' to
+       `plain-TeX-dialect'.
+       * tex.el (TeX-style-hook-dialect): Document new dialects.
+       (TeX-style-hook-dialect-weight-alist): Add plain-tex and context 
dialects.
+
+2016-01-23  Mosè Giordano  <address@hidden>
+
+       Convert tex-font.el to UTF-8 coding
+
+       * tex-font.el: set coding to utf-8.
+
+2016-01-23  Mosè Giordano  <address@hidden>
+
+       Move \iff macro to Arrows section of LaTeX-math-default
+
+       * latex.el (LaTeX-math-default): \iff symbol is defined in base LaTeX,
+         move it to the "Arrows" section.
+
+2016-01-20  Mosè Giordano  <address@hidden>
+
+       Fix bug in subfigure style file
+
+       * style/subfigure.el ("subfigure"): Move `TeX-complete-list' inside
+         append argument.  Fixes bug#22417.
+
+2016-01-17  Mosè Giordano  <address@hidden>
+
+       Add some AMS arrows to LaTeX-math-default
+
+       * latex.el (LaTeX-math-default): Add `impliedby', `implies', and `iff'
+         arrows.  Suggested by Aiko Kyle.
+
+2016-01-10  Mosè Giordano  <address@hidden>
+
+       url macro accepts only braces in hyperref
+
+       * style/hyperref.el: Update copyright years.
+       ("hyperref"): Remove "url" from
+       `LaTeX-verbatim-macros-with-delims-local', it was added by url.el, but
+       in hyperref "\url" has a different syntax.
+
+2015-12-18  Ivan Andrus  <address@hidden>
+
+       Fix bug in `preview-LaTeX-disable-pdfoutput'
+
+       * preview.el.in (preview-LaTeX-disable-pdfoutput): Allow one or more
+       spaces between command line arguments.
+
+2015-12-04  Tassilo Horn  <address@hidden>
+
+       Delete .cvsignore
+
+       I'm pretty confident we won't switch back. ;-)
+
+2015-11-30  Arash Esbati  <address@hidden>
+
+       Fix query prompt
+
+       * style/ntheorem.el ("ntheorem"):
+       * style/theorem.el ("theorem"): Fix wrong query prompt.
+
+2015-11-30  Mosè Giordano  <address@hidden>
+
+       Fix regex in texmathp
+
+       * texmathp.el: Replace \t with \r.  Reported by Marcin Borkowski.
+
+2015-11-24  Tassilo Horn  <address@hidden>
+
+       Rename TeX-after-compilation-finished-hook to -functions
+
+       * tex-buf.el (TeX-after-compilation-finished-functions): Rename from
+       -hook to -functions.
+       (TeX-LaTeX-sentinel): Adapt.
+       * context.el (TeX-ConTeXt-sentinel): Adapt.
+
+2015-11-23  Arash Esbati  <address@hidden>
+
+       Add new style/ntheorem.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/ntheorem.el: New file.
+
+2015-11-23  Arash Esbati  <address@hidden>
+
+       Add new style/theorem.el
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/theorem.el: New file.
+
+2015-11-23  Arash Esbati  <address@hidden>
+
+       Improve style/amsthm.el
+
+       * style/amsthm.el (LaTeX-amsthm-fontdecl): Cover all font changing
+       declarations.
+       ("amsthm"): Overrule the defintion for \newtheorem in `latex.el'.
+       ("amsthm"): Use `TeX-completing-read-multiple' for font related
+       queries.
+
+2015-11-23  Tassilo Horn  <address@hidden>
+
+       Rename TeX-after-TeX-LaTeX-command-finished-hook
+
+       * tex-buf.el (TeX-after-compilation-finished-hook): Rename from
+       TeX-after-TeX-LaTeX-command-finished-hook.
+       * context.el (TeX-ConTeXt-sentinel): Run
+       TeX-after-compilation-finished-hook when the compilation was successful.
+       * doc/auctex.texi (Modes and Hooks): Adapt docs.
+
+2015-11-21  Mosè Giordano  <address@hidden>
+
+       Convert Elisp source files to UTF-8
+
+       * font-latex.el: Change coding to UTF-8
+       * style/alphanum.el: Ditto.
+       * style/dk-bib.el: Ditto.
+       * style/doc.el: Ditto.
+       * style/inputenc.el: Ditto.
+       * style/jura.el: Ditto.
+       * style/ltx-base.el: Ditto.
+       * style/ltxdoc.el: Ditto.
+       * tex.el: Ditto.
+
+2015-11-19  Mosè Giordano  <address@hidden>
+
+       Fix bug in TeX-command-sequence
+
+       * tex-buf.el (TeX-command-sequence): Ask for TeX-master if unknown,
+       otherwise running this function on a file without a known `TeX-master'
+       will result in `TeX-master' being automatically set to "<none>" at some
+       point.
+       (TeX-region-file): Add a third compatibility argument and update
+       docstring accordingly.
+
+2015-11-19  Mosè Giordano  <address@hidden>
+
+       Remove support to "Master:" line
+
+       * tex.el (TeX-convert-master): Remove now unused variable.
+       (TeX-master-file): Remove support to "Master:" line and update
+       documentation accordingly.
+
+2015-11-15  Mosè Giordano  <address@hidden>
+
+       Activate RefTeX reference styles
+
+       * tex-style.el (LaTeX-reftex-ref-style-auto-activate): New
+         customizable variable.
+       * style/cleveref.el ("cleveref"): Activate RefTeX reference style.
+       * style/fancyref.el ("fancyref"): Ditto.
+       * style/varioref.el ("varioref"): Ditto.
+       * style/hyperref.el ("hyperref"): Use
+         `LaTeX-reftex-ref-style-auto-activate'.
+
+2015-11-15  Mosè Giordano  <address@hidden>
+
+       Determine AUCTEXDATE and AUCTEXVERSION from git
+
+       * aclocal.m4 (AC_DATE_VERSION_FROM_CHANGELOG): if this is git
+         repository, use it to determine the variables.
+       * autogen.sh: Ditto.
+
+2015-11-14  Mosè Giordano  <address@hidden>
+
+       Fix error in autogen.sh, configure, and Makefile
+
+       * Makefile.in (doc/Makefile): Replace ChangeLog with ChangeLog.1.
+       * autogen.sh: Ditto.
+       * configure.ac: Ditto.
+       * doc/Makefile.in (version.texi): Ditto.
+
+2015-11-13  Mosè Giordano  <address@hidden>
+
+       Drop ChangeLog
+
+       * .gitignore: Add ChangeLog and auto dirs in tests.
+       * ChangeLog.1: Rename from ChangeLog.
+       * Makefile.in (EXCLUDEDFILES): Exclude build-aux directory.
+       * build-aux/gitlog-to-changelog: Copy script from gnulib.
+
+2014-05-02  Tassilo Horn  <address@hidden>
+
+       Improve new-file regex.
+
+       * tex-buf.el (TeX-parse-error): Improve new-file regex.
+
+2014-04-29  Tassilo Horn  <address@hidden>
+
+       Fix Wrong type argument: characterp, nil error.
+
+       * tex-buf.el (TeX-format-filter): Fix error caused by trying to
+       get char syntax from char after EOF.
+
+2014-04-27  Tassilo Horn  <address@hidden>
+
+       Don't use TRIM arg of split-string.
+
+       * tex-buf.el (TeX-parse-error): Don't use TRIM arg of
+       `split-string' which is new in emacs 24.4.
+
+2014-04-25  Tassilo Horn  <address@hidden>
+
+       Improve line wrap removal heuristics.
+
+       * tex-buf.el (TeX-format-filter): Remove linebreaks at columns 79
+       and also column 80.  Also remove linebreaks preceded by a period
+       that are followed by a word character to remove linebreaks in file
+       names that are wrapped just after the period starting the file
+       name extension.
+
+2014-04-24  Tassilo Horn  <address@hidden>
+
+       Improve TeX error parsing.
+
+       * tex-buf.el (TeX-error): Error if file containing the TeX error
+       doesn't exist instead of finding a new file.
+       (TeX-parse-error): Greatly simplify the new file and end of file
+       regexps.
+
 2015-11-13  Mosè Giordano  <address@hidden>
 
        * Version 11.89 released.
@@ -18298,7 +20825,7 @@
 
 This file records repository revisions from
 commit c865982cacab289f4480f9145b3438ec06824232 (exclusive) to
-commit df7dbbd3a029f02042b4fa01725c4a1f4502ff56 (inclusive).
+commit 826f17aeaf158b81653c2d9a03641c49d15d50fa (inclusive).
 
 ;; Local Variables:
 ;; coding: utf-8
diff --git a/Makefile.in b/Makefile.in
index c038460..b54a808 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -159,7 +159,9 @@ STYLESRC = style/prosper.el \
           style/framed.el    style/paracol.el   style/menukeys.el \
           style/bidi.el      style/FiraMono.el  style/FiraSans.el \
           style/bicaption.el style/amsfonts.el  style/subfiles.el \
-          style/dcolumn.el
+          style/dcolumn.el   style/mdframed.el  style/tcolorboxlib-raster.el \
+          style/titleps.el   style/titlesec.el  style/titletoc.el \
+          style/exam.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
@@ -466,34 +468,37 @@ change-history-commit:
 #    Run tests using ERT tool.  Not necessary but strongly suggested before a
 #    release.
 #
-# 1) release-commit TAG=<tag> COMMITTER=<committer>
+# 1) change-history
+#    Update the ChangeLog file.
+#
+# 2) release-commit TAG=<tag> COMMITTER=<committer>
 #    Tag the release.
 #    Pass `COMMITTER=<committer>' argument only if it is different from
 #    your git name and email.  `<committer>' should be in the form
 #        "John Doe  <address@hidden>"
 #
-# 2) dist TAG=<tag>
+# 3) dist TAG=<tag>
 #    Create the tar ball and other release files and put them into $FTPDIR.
 #
-# 3) xemacs-package TAG=<tag>
+# 4) xemacs-package TAG=<tag>
 #    Create the precompiled XEmacs package.
 #
-# 4) windows-package WEMACSVER=<emacs-version> TAG=<tag>
+# 5) windows-package WEMACSVER=<emacs-version> TAG=<tag>
 #    Create the precompiled AUCTeX package for Windows.
 #    This requires a compiled Emacs of the same version at location $WEMACS.
 #    NOTA BENE: you may need to use bash shell for this recipe to work.
 #
-# 5) release-sign TAG=<tag>
+# 6) release-sign TAG=<tag>
 #    Sign the tar ball and create directive files for upload.  NOTA BENE: you
 #    may need to use bash shell for this recipe to work.
 #
-# 6) release-upload
+# 7) release-upload
 #    Upload files to GNU FTP server.
 #
-# 7) www-doc TAG=<tag>
+# 8) www-doc TAG=<tag>
 #    Create documentation for AUCTeX home page.
 #
-# 8) preview-ball TAG=<tag>
+# 9) preview-ball TAG=<tag>
 #    Create preview package.  (Not for GNU FTP server but for CTAN.)
 
 dist: check-tag tar-ball
@@ -509,18 +514,18 @@ check:
 release-commit: check-tag
        @echo "Tagging release $(TAG) in Git ..."
        sleep 5
-       mv ChangeLog ChangeLog.old
+       mv $(CHANGELOG_N) ChangeLog.old
        mv ChangeLog-preview ChangeLog-preview.old
-# Make sure the release ChangeLog entry is encoded with ISO-8859-1.  This
-# requires the `iconv' program.
-       echo `date "+%Y-%m-%d "`" ${COMMITTER}" | iconv -t ISO-8859-1 - > 
ChangeLog
-       echo >> ChangeLog
-       echo "  * Version" $(TAG) released. >> ChangeLog
-       echo >> ChangeLog
-       cp ChangeLog ChangeLog-preview
-       cat ChangeLog.old >> ChangeLog
+# Make sure the release ChangeLog entry is encoded with UTF-8.
+# This requires the `iconv' program.
+       echo `date "+%Y-%m-%d "`" ${COMMITTER}" | iconv -t UTF-8 - > 
$(CHANGELOG_N)
+       echo >> $(CHANGELOG_N)
+       echo "  * Version" $(TAG) released. >> $(CHANGELOG_N)
+       echo >> $(CHANGELOG_N)
+       cp $(CHANGELOG_N) ChangeLog-preview
+       cat ChangeLog.old >> $(CHANGELOG_N)
        cat ChangeLog-preview.old >> ChangeLog-preview
-       git commit -m 'Release_$(TAG)' -- ChangeLog ChangeLog-preview
+       git commit -m '; Release_$(TAG)' -- $(CHANGELOG_N) ChangeLog-preview
        git tag release_`echo $(TAG) | sed -e 's/[.]/_/g'`
        @echo
        @echo "Congratulations!  Release $(TAG) of AUCTeX is ready."
@@ -547,7 +552,7 @@ tar-ball: doc/Makefile
        cd doc && $(MAKE) extradist
        rm -f doc/version.texi
        $(CP) doc/auctex.ps doc/auctex.pdf doc/tex-ref.ps doc/tex-ref.pdf 
$(FTPDIR)
-       $(CP) ChangeLog $(FTPDIR)
+       $(CP) $(CHANGELOG_N) $(FTPDIR)
 
 rpm-packages:
        rpmbuild -ta $(RPM_SIGN) $(FTPDIR)/auctex-$(TAG).tar.gz
diff --git a/RELEASE b/RELEASE
index 15eb656..d3253e2 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1,4 +1,4 @@
-Release notes for AUCTeX 11.89 with preview-latex
+Release notes for AUCTeX 11.90 with preview-latex
 =================================================
 
 AUCTeX provides by far the most wide-spread and sophisticated
@@ -21,58 +21,107 @@ AUCTeX needs volunteers in particular for non-programming 
tasks:
 documentation writing, tutorials, translations, reference material,
 sleuth work, testing.
 
-
 New features and fixed bugs in this release
 -------------------------------------------
 
-You can now run all commands needed to compile a document and then
-open the viewer with a single command: 'TeX-command-run-all', bound
-to 'C-c C-a'.
-
-Commands such as LaTeX and View can now be executed conveniently on
-the current section (or part, chapter, subsection, etc).  See
-'LaTeX-command-section' and 'LaTeX-command-section-change-level'.
-
-Forward and backward search with Evince now also work when only a
-region of the document is compiled/viewed.
-
-To open the PDF output file you can now use also PDF Tools, a
-document viewer for Emacs.  With it, as a plus, forward and
-backward search is accurate at word level.
-
-With new option 'TeX-PDF-via-dvips-ps2pdf' it is possible to
-compile a document to DVI and then convert it to PDF using
-'dvips'-'ps2pdf' before viewing it.
-
-New option 'TeX-file-line-error' allows to select file:line:error
-style for error messages.
-
-Indent '\[...\]' math mode as a regular environment by default.
-
-Now AUCTeX suggests to run 'makeindex' when appropriate.
-
-'TeX-view-program-list' can contain, as third optional element of
-each item, the name of the executable(s) needed to open the viewer.
-
-'TeX-expand-list' variable has been split into 'TeX-expand-list'
-and 'TeX-expand-list-builtin'.  Only the former is intended to be
-customized by the user, the latter contains built-in expanders.
-You might want to keep in 'TeX-expand-list' only new expansion
-strings.
-
-When new option 'TeX-check-engine' is non-nil, before running LaTeX
-commands AUCTeX will check whether the correct engine has been set,
-based upon known restrictions posed by LaTeX packages.
-
-Basic support to ConTeXt Mark IV has been added.  Users can now
-select the Mark version to be used with new option
-'ConTeXt-Mark-version', and AUCTeX is able to catch error messages
-in the output log of a Mark IV document.
-
-Support for tons of LaTeX packages has been addedd.
-
-Numbers of bugs have been fixed, many minor features have been
-addedd.
+In addition to the completion performed by 'TeX-complete-symbol',
+AUCTeX now also supports the new Emacs standard completion-at-point
+facility (see the Emacs command 'completion-at-point').  This also
+means that modern completion UIs like company-mode work out of the
+box in TeX and LaTeX buffers.
+
+Completion is now aware of being inside a math environment and then
+completes math macros.
+
+AUCTeX is able to display several levels of super- and subscripts,
+each one raised above and a bit smaller than its basis.  For this
+feature, have a look at the customize options
+'font-latex-fontify-script' (especially the new values 'multi-level'
+and 'invisible') and 'font-latex-fontify-script-max-level'.  Also, the
+script characters '^' and '_' are also fontified with a special face
+named 'font-latex-script-char-face'.
+
+Parsing of format specification in various tabular environments has
+been improved.  The function 'LaTeX-insert-item' ('C-c <LFD>') inserts
+suitable number of ampersands for '*{num}{cols}' constructs.  Style
+files for LaTeX packages 'tabularx', 'tabulary', 'longtable',
+'dcolumn' and 'siunitx' are adapted to take advantage of this
+improvement.
+
+AUCTeX has a new Ispell dictionary '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
+'TeX-ispell-extend-skip-list', which is set to 't' and activated by
+default.
+
+AUCTeX has a new customize option 'TeX-raise-frame-function' that is
+currently only used by Evince and Atril inverse search to raise the
+Emacs frame.
+
+When inserting a new float, AUCTeX will now prompt for a short-caption
+if the length of the caption provided is greater than a certain size.
+This size is controlled via a new user option
+'LaTeX-short-caption-prompt-length'.
+
+Parsing of the compilation log has been reworked.  You should
+encounter fewer mistaken files while navigating through errors and
+warnings.
+
+Two new user options, 'TeX-ignore-warnings' and
+'TeX-suppress-ignored-warnings', allow ignoring certain warnings
+after compilation of the document.
+
+A new option, 'TeX-PDF-from-DVI', controls if and how to produce a PDF
+file by converting a DVI file.  This supersedes
+'TeX-PDF-via-dvips-ps2pdf' which is still recognized but marked as
+obsolete and may be removed in future releases.
+
+Support for a number of external viewers has been added:
+   * Atril viewer.  Forward and inverse search requires version
+     1.9.1 or later to work.
+
+   * dviout viewer on Windows.  Note that this setup works when
+     'TeX-source-correlate-method' is set to use 'source-specials'
+     for DVI, e.g.:
+          (setq TeX-source-correlate-method
+                '((dvi . source-specials)
+                  (pdf . synctex)))
+     which is the default.
+
+   * SumatraPDF viewer on Windows.
+
+   * Zathura viewer.  Forward and inverse search requires a recent
+     version of the program to work (3.4 or later).
+
+A new function, 'TeX-documentation-texdoc', for reading
+documentation with 'texdoc' has been added.  'TeX-doc' is still
+available but now 'C-c ?' runs 'TeX-documentation-texdoc'.
+
+AUCTeX has a new custom option
+'LaTeX-reftex-cite-format-auto-activate' which controls the automatic
+activation of citation formats provided by RefTeX when a style file is
+loaded and RefTeX is enabled.  Currently, 'biblatex.el', 'harvard.el',
+'jurabib.el' and 'natbib.el' use this feature.  If you have customized
+'reftex-cite-format' and want to use your settings, you should set
+this variable to 'nil'.
+
+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 '\draw' macro.
+
+The style 'graphicx.el' went through a bigger overhaul.  The optional
+argument of command '\includegraphics' now supports key-val query;
+keys can independently be chosen anytime by pressing the <,> key.  As
+a side effect, the variable 'LaTeX-includegraphics-options-alist' is
+now no-op and is removed from 'tex-style.el'.  You can safely remove
+any customization of it from your init file.  The mandatory argument
+of '\includegraphics' knows about image file extensions supported by
+the used engine and offers them for inclusion.
+
+Support for other LaTeX packages was improved, and style files for
+several new packages were added.
+
+Many bugs were crushed along the way.
 
 Requirements
 ------------
@@ -97,15 +146,17 @@ used to speed up the conversion.
 Availability
 ------------
 
-AUCTeX can be downloaded in various formats from
+The easiest way for getting AUCTeX, for users running Emacs 24.1 or
+higher, is installing it with GNU ELPA, see
+<URL:https://elpa.gnu.org/packages/auctex.html> for more information.
+Other download options are available at
 <URL:ftp://ftp.gnu.org/gnu/auctex/>.  At release time, we provide the
-source tarball, a precompiled version for Emacs on Windows, and a
-platform-independent XEmacs package file (which you have to install
-yourself using XEmacs' own package system, after using it for removing
-the previous version of AUCTeX).  The easiest way for using AUCTeX, of
-course, is using versions of Emacs that already include AUCTeX or a
-software package management system for your operating system which
-provides you with the latest release.
+source tarball, and a platform-independent XEmacs package file (which
+you have to install yourself using XEmacs' own package system, after
+using it for removing the previous version of AUCTeX).  You can also
+use versions of Emacs that already include AUCTeX or a software
+package management system for your operating system which provides you
+with the latest release.
 
 The XEmacs package file can be discerned by `pkg' in its name.  It is
 usually more recent than what gets distributed from XEmacs servers and
@@ -120,7 +171,6 @@ You'll find more information at the web site of AUCTeX
 <URL:http://www.gnu.org/software/auctex/>, including its mailing list
 addresses.
 
-
 Future development and additional information
 ---------------------------------------------
 
@@ -132,26 +182,25 @@ contributors.  The principal authors and maintainers have 
already done
 so, but it would require a diligent and diplomatic volunteer to find
 and ask the rest.
 
-Current project manager is David Kastrup.  Paypal contributions to
-<URL:mailto:address@hidden> would be appreciated in order to
-compensate for time, money and hardware required for presenting AUCTeX
-at conferences.  Extensions may be commissioned: enquire on the
-developer list (see above).  Other than that, volunteering for tasks
-remains the most effective way of helping AUCTeX development.
+Current AUCTeX managers are Arash Esbati, Mos� Giordano, and Tassilo
+Horn.  Everybody is welcome to contribute to the project by reporting
+bugs and suggesting improvements, but the most effective way of
+helping AUCTeX development remains volunteering for tasks.
 
 The following people contributed to this release series (in
 alphabetical order): Ivan Andrus, Ralf Angeli, Masayuki Ataka, Fabrice
-Ben Hamouda, Thomas Baumann, Vincent Bela�che, Berend de Boer, Ken
-Brown, Joshua Buhl, Patrice Dumas, Arash Esbati, Werner Fink, Miguel
-Frasson, Peter S. Galbraith, Mos� Giordano, Patrick Gundlach, Jobst
-Hoffmann, Tassilo Horn, Yvon Hevel, Orlando Iovino, Mads Jensen, Arne
-J�rgensen, David Kastrup, Ikumi Keita, Philip Kime, Oleh Krehel, Joost
-Kremers, Frank K�ster, Jan-�ke Larsson, Matthew Leach, Antoine Levitt,
-Leo Liu, Vladimir Lomov, Stefan Monnier, Dan Nicolaescu, Piet van
-Oostrum, Nicolas Richard, Augusto Ritter Stoffel, Florent Rougon,
-Santiago Saavedra, Davide G. M. Salvetti, R�diger Sonderfeld, Holger
-Sparr, Mike Sperber, Reiner Steib, Christian Schlauer, Shiro Takeda,
-Mark Trettin (Please accept our apologies if we forgot somebody.)
+Ben Hamouda, Thomas Baumann, Vincent Bela�che, Berend de Boer, Uwe
+Brauer, Ken Brown, Joshua Buhl, Patrice Dumas, Arash Esbati, Werner
+Fink, Miguel Frasson, Peter S. Galbraith, Mos� Giordano, Patrick
+Gundlach, Jobst Hoffmann, Tassilo Horn, Yvon Hevel, Orlando Iovino,
+Mads Jensen, Arne J�rgensen, David Kastrup, Ikumi Keita, Philip Kime,
+Oleh Krehel, Joost Kremers, Frank K�ster, Jan-�ke Larsson, Matthew
+Leach, Antoine Levitt, Leo Liu, Vladimir Lomov, Stefan Monnier, Dan
+Nicolaescu, Piet van Oostrum, Nicolas Richard, Augusto Ritter Stoffel,
+Florent Rougon, Santiago Saavedra, Davide G. M. Salvetti, R�diger
+Sonderfeld, Holger Sparr, Mike Sperber, Reiner Steib, Christian
+Schlauer, Shiro Takeda, Mark Trettin (Please accept our apologies if
+we forgot somebody.)
 
 Footnotes: 
 
diff --git a/configure.ac b/configure.ac
index c61f4c7..29b80da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl along with AUCTeX; see the file COPYING.  If not, write 
to the Free
 dnl Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 dnl MA 02110-1301, USA.
 
-AC_INIT(auctex,11.89,address@hidden)
+AC_INIT(auctex,11.90,address@hidden)
 
 AC_CHECK_PROGS_REQUIRED(MAKECMD, make, [make not found, aborting!])
 AC_PROG_MAKE_SET
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 0bf2cab..13661c6 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1216,24 +1216,73 @@ If non-nil, insert braces after typing @key{^} and 
@key{_} in math mode.
 @cindex Arguments to @TeX{} macros
 
 Emacs lisp programmers probably know the @code{lisp-complete-symbol}
-command, usually bound to @address@hidden  Users of the wonderful
-ispell mode know and love the @code{ispell-complete-word} command from
-that package.  Similarly, @AUCTeX{} has a @code{TeX-complete-symbol}
-command, by default bound to @address@hidden which is equivalent to
address@hidden  Using @code{TeX-complete-symbol} makes it easier to type
-and remember the names of long @LaTeX{} macros.
+command which was bound to @address@hidden until completion-at-point
+became the new standard completion facility (see below).  Users of the
+wonderful ispell mode know and love the @code{ispell-complete-word}
+command from that package.  Similarly, @AUCTeX{} has a
address@hidden command, by default bound to
address@hidden@key{TAB}} which is equivalent to @kbd{M-C-i}.  Using
address@hidden makes it easier to type and remember the
+names of long @LaTeX{} macros.
 
 In order to use @code{TeX-complete-symbol}, you should write a backslash
 and the start of the macro.  Typing @address@hidden will now complete
 as much of the macro, as it unambiguously can.  For example, if you type
 address@hidden' and then @address@hidden, it will expand to
address@hidden'.
address@hidden'.  But there's more: if point is just after
address@hidden@{}, then @code{TeX-complete-symbol} will complete @LaTeX{}
+environments, etc.  This is controlled by @code{TeX-complete-list}.
 
 @deffn Command TeX-complete-symbol
 @kindex address@hidden
 (@address@hidden)  Complete @TeX{} symbol before point.
 @end deffn
 
address@hidden TeX-complete-list
+List of ways to complete the preceding text.
+
+Each entry is a list with the following elements:
+
address@hidden
address@hidden
+Regexp matching the preceding text or a predicate of arity 0 which
+returns non-nil and sets `match-data' appropriately if it is applicable.
address@hidden
+A number indicating the subgroup in the regexp containing the text.
address@hidden
+A function returning an alist of possible completions.
address@hidden
+Text to append after a succesful completion.
address@hidden enumerate
+
+Or alternatively:
+
address@hidden
address@hidden
+Regexp matching the preceding text.
address@hidden
+Function to do the actual completion.
address@hidden enumerate
address@hidden defvar
+
+More recent Emacs versions have a new completion mechanism.  Modes may
+define and register custom completion-at-point functions and when the
+user invokes @code{completion-at-point} (usually bound to
address@hidden@key{TAB}}), all such registered functions are consulted for
+checking for possible completions.  Modern completion UIs like
address@hidden support this completion-at-point facility.
+
address@hidden TeX--completion-at-point
address@hidden's completion-at-point function which is automatically added to
address@hidden in @TeX{} and @LaTeX{} buffers.
+
+It offers the same completion candidates as would
address@hidden (and is also controlled by
address@hidden) except that it doesn't fall back on
address@hidden which would be awkward with completion UIs
+like @i{company-mode}.
address@hidden defun
+
 A more direct way to insert a macro is with @code{TeX-insert-macro},
 bound to @kbd{C-c C-m} which is equivalent to @kbd{C-c @key{RET}}.  It
 has the advantage over completion that it knows about the argument of
@@ -1267,7 +1316,6 @@ called with prefix argument (@kbd{C-u}), it's the other 
way round.
 Note that for some macros, there are special mechanisms, e.g.
 @code{LaTeX-includegraphics-options-alist} and
 @code{TeX-arg-cite-note-p}.
-
 @end defopt
 
 
@@ -2197,19 +2245,47 @@ If non-nil, fontify subscript and superscript strings.  
Concretely, this
 means that the scripts are raised or lowered.
 
 Another possiblity is setting this variable to the symbol
address@hidden  In this case, in a formula @code{x^y^z}, y is
-raised above x, and z is raised above y.  With many script levels, the
-text might become too small to be readable.
address@hidden  In this case, in a formula @address@hidden@}}, @i{y} is
+raised above and smaller than @i{x}, and @i{z} is raised above and
+smaller than @i{y}.  With many script levels, the text might become too
+small to be readable.  (See @code{font-latex-fontify-script-max-level}
+below.)
 
 Lastly, you can set this variable to @code{invisible} whose behavior is
 like @code{multi-level}, and in addition the super-/subscript characters
address@hidden and @code{_} are not displayed.
address@hidden and @i{_} are not displayed.
 
 Note that this feature is not available on XEmacs, for which
 it is disabled per default.  In GNU Emacs raising and lowering is not
 enabled for versions 21.3 and before due to it working not properly.
 @end defopt
 
+
address@hidden font-latex-fontify-script-max-level
+Maximum scriptification level for which script faces are applied.
+
+The faces @code{font-latex-superscript-face} and
address@hidden define custom @code{:height} values <
+1.0.  Therefore, scripts are displayed with a slightly smaller font than
+normal math text.  If @code{font-latex-fontify-script} is
address@hidden or @code{invisible}, the font size becomes too small
+to be readable after a few levels.  This option allows to specify the
+maximum level after which the size of the script text won’t be shrunken
+anymore.
+
+For example, in the expression @address@hidden@address@hidden@}}, @i{x} has
+scriptification level 0, @i{y} has level 1, @i{z} has level 2, and both
address@hidden and @i{b} have scriptification level 3.
+
+If @code{font-latex-fontify-script-max-level} was 2, then @i{z}, @i{a},
+and @i{b} would have the same font size.  If it was 3 or more, then
address@hidden and @i{b} were smaller than @i{z} just in the same way as @i{z} 
is
+smaller than @i{y} and @i{y} is smaller than @i{x}.
address@hidden defopt
+
+The script characters @samp{^} and @samp{_} themselves are also
+fontified with an own face named @code{font-latex-script-char-face}.
+
 @defopt font-latex-script-display
 Display specification for subscript and superscript content.  The car is
 used for subscript, the cdr is used for superscript.  The feature is
@@ -4966,7 +5042,7 @@ Prompt for a @LaTeX{} counter completing with known 
counters.
 Prompt for a @LaTeX{} savebox completing with known saveboxes.
 
 @item TeX-arg-file
-Prompt for a filename in the current directory, and use it without the
+Prompt for a filename in the current directory, and use it with the
 extension.
 
 @item TeX-arg-file-name
diff --git a/doc/changes.texi b/doc/changes.texi
index 16f96be..3cdc886 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -1,5 +1,5 @@
 @c This is part of the AUCTeX manual.
address@hidden Copyright (C) 1994-2002, 2004-2010, 2012-2016 Free Software
address@hidden Copyright (C) 1994-2002, 2004-2010, 2012-2017 Free Software
 @c Foundation, Inc.
 @c See file auctex.texi for copying conditions.
 @include macros.texi
@@ -8,19 +8,43 @@
 
 @end ifset
 
address@hidden News since 11.89
address@hidden News in 11.90
 
 @itemize @bullet
 @item
-The style @file{graphicx.el} went through a bigger overhaul.  The
-optional argument of command @samp{\includegraphics} now supports
-key-val query; keys can independently be chosen anytime by pressing the
address@hidden,} key.  As a side effect, the variable
address@hidden is now no-op and is removed
-from @file{tex-style.el}.  You can safely remove any customization of it
-from your init file.  The mandatory argument of @samp{\includegraphics}
-knows about image file extensions supported by the used engine and
-offers them for inclusion.
+In addition to the completion performed by @code{TeX-complete-symbol},
address@hidden now also supports the new Emacs standard completion-at-point
+facility (see the Emacs command @code{completion-at-point}).  This also
+means that modern completion UIs like @i{company-mode} work out of the
+box in @TeX{} and @LaTeX{} buffers.
address@hidden rawfile
address@hidden, for details.
address@hidden ifclear
+
address@hidden
+Completion is now aware of being inside a math environment and then
+completes math macros.
+
address@hidden
address@hidden is able to display several levels of super- and subscripts,
+each one raised above and a bit smaller than its basis.  For this
+feature, have a look at the customize options
address@hidden (especially the new values
address@hidden and @code{invisible}) and
address@hidden  Also, the script characters
address@hidden and @samp{_} are also fontified with a special face named
address@hidden
address@hidden rawfile
address@hidden of math}, for details.
address@hidden ifclear
+
address@hidden
+Parsing of format specification in various tabular environments has been
+improved.  The function @code{LaTeX-insert-item} (@kbd{C-c @key{LFD}})
+inserts suitable number of ampersands for @address@hidden@address@hidden@}}
+constructs.  Style files for @LaTeX{} packages @samp{tabularx},
address@hidden, @samp{longtable}, @samp{dcolumn} and @samp{siunitx} are
+adapted to take advantage of this improvement.
 
 @item
 @AUCTeX{} has a new Ispell dictionary @file{tex-ispell.el} for macros
@@ -35,11 +59,6 @@ that is currently only used by Evince and Atril inverse 
search to raise
 the Emacs frame.
 
 @item
address@hidden 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.
-
address@hidden
 When inserting a new float, @AUCTeX{} will now prompt for a
 short-caption if the length of the caption provided is greater than a
 certain size.  This size is controlled via a new user option
@@ -94,6 +113,38 @@ A new function, @code{TeX-documentation-texdoc}, for reading
 documentation with @samp{texdoc} has been added.  @code{TeX-doc} is
 still available but now @kbd{C-c ?} runs
 @code{TeX-documentation-texdoc}.
+
address@hidden
address@hidden has a new custom option
address@hidden which controls the
+automatic activation of citation formats provided by RefTeX when a style
+file is loaded and RefTeX is enabled.  Currently, @file{biblatex.el},
address@hidden, @file{jurabib.el} and @file{natbib.el} use this
+feature.  If you have customized @code{reftex-cite-format} and want to
+use your settings, you should set this variable to @code{nil}.
+
address@hidden
address@hidden 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.
+
address@hidden
+The style @file{graphicx.el} went through a bigger overhaul.  The
+optional argument of command @samp{\includegraphics} now supports
+key-val query; keys can independently be chosen anytime by pressing the
address@hidden,} key.  As a side effect, the variable
address@hidden is now no-op and is removed
+from @file{tex-style.el}.  You can safely remove any customization of it
+from your init file.  The mandatory argument of @samp{\includegraphics}
+knows about image file extensions supported by the used engine and
+offers them for inclusion.
+
address@hidden
+Support for other @LaTeX{} packages was improved, and style files for
+several new packages were added.
+
address@hidden
+Many bugs were crushed along the way.
 @end itemize
 
 @heading News in 11.89
diff --git a/doc/install.texi b/doc/install.texi
index d814cca..184be7c 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -12,11 +12,19 @@
 @chapter Installing @AUCTeX{}
 @end ifclear
 
-The simplest way of installing @AUCTeX{} is by using the Emacs package
-manager integrated in Emacs 24 and greater (@acronym{ELPA}).  Simply do
address@hidden package-list-packages RET}, mark the auctex package for
-installation with @kbd{i}, and hit @kbd{x} to execute the installation
-procedure.  That's all.
+The modern and strongly recommended way of installing @AUCTeX{} is by
+using the Emacs package manager integrated in Emacs 24 and greater
+(@acronym{ELPA}).  Simply do @kbd{M-x list-packages RET}, mark the
+auctex package for installation with @kbd{i}, and hit @kbd{x} to execute
+the installation procedure.  That's all.  This installation procedure
+has several advantages.  Besides being platform and @acronym{OS}
+independent, you will receive intermediate releases between major
address@hidden releases conveniently.  For past @acronym{ELPA} releases, see
address@hidden://elpa.gnu.org/packages/auctex.html}.
address@hidden rawfile
+Once the installation is completed, you can skip the rest of this
+section and proceed to @ref{Quick Start}.
address@hidden ifclear
 
 The remainder of this section is about installing @AUCTeX{} from a
 release tarball or from a checkout of the @AUCTeX{} repository.
diff --git a/doc/quickstart.texi b/doc/quickstart.texi
index b382018..20d89c3 100644
--- a/doc/quickstart.texi
+++ b/doc/quickstart.texi
@@ -18,7 +18,8 @@ as well, @ref{Installation}.  We also assume that you are 
familiar with
 the way keystrokes are written in Emacs manuals.  If not, have a look at
 the Emacs Tutorial in the Help menu.
 
-If @AUCTeX{} is installed, you might still need to activate it, by
+If @AUCTeX{} is installed in any other way than from the Emacs package
+manager (@acronym{ELPA}), you might still need to activate it, by
 inserting
 
 @lisp
@@ -27,10 +28,16 @@ inserting
 
 in your user init address@hidden usually is a file in your home
 directory called @file{.emacs} if you are utilizing GNU Emacs or
address@hidden/init.el} if you are using XEmacs.}  If you've installed
address@hidden from the Emacs package manager (ELPA), you must not have this
-line in your user init file.  The installation procedure already cares
-about loading @AUCTeX{} correctly.
address@hidden/init.el} if you are using XEmacs.}
+
+If @AUCTeX{} is installed from @acronym{ELPA}, the installation
+procedure already cares about loading @AUCTeX{} correctly and you
address@hidden not} have the line above in your init file.  Note that this
+also applies if you have the following line in your init file
+
address@hidden
+(package-initialize)
address@hidden lisp
 
 In order to get support for many of the @LaTeX{} packages you will use
 in your documents, you should enable document parsing as well, which can
diff --git a/doc/tex-ref.tex b/doc/tex-ref.tex
index 5151a3d..0750cb6 100644
--- a/doc/tex-ref.tex
+++ b/doc/tex-ref.tex
@@ -1,4 +1,4 @@
-% Reference Card for AUCTeX version 11.89
+% Reference Card for AUCTeX version 11.90
 %**start of header
 \newcount\columnsperpage
 
@@ -42,9 +42,9 @@
 % Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
 % for creating the GNU Emacs Reference Card from which this was mutated
 
-\def\versionnumber{11.89}
-\def\year{2015}
-\def\version{November \year\ v\versionnumber}
+\def\versionnumber{11.90}
+\def\year{2017}
+\def\version{January \year\ v\versionnumber}
 
 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill
   \centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
diff --git a/font-latex.el b/font-latex.el
index df33ad0..91cb0de 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1,6 +1,6 @@
 ;;; font-latex.el --- LaTeX fontification for Font Lock mode.
 
-;; Copyright (C) 1996-2014  Free Software Foundation, Inc.
+;; Copyright (C) 1996-2017  Free Software Foundation, Inc.
 
 ;; Authors:    Peter S. Galbraith <address@hidden>
 ;;             Simon Marshall <address@hidden>
@@ -308,7 +308,7 @@ variable `font-latex-fontify-sectioning'." ',num)
       ("defbibentryset" "{{") ("Cite" "[[{") ("parencite" "*[[{") ("Parencite" 
"[[{")
       ("footcite" "[[{") ("footcitetext" "[[{") ("textcite" "[[{") ("Textcite" 
"[[{")
       ("smartcite" "[[{") ("Smartcite" "[[{") ("supercite" "{") ("autocite" 
"*[[{")
-      ("Autocite" "*[[{") ("citeauthor" "[[{") ("Citeauthor" "[[{") 
("citetitle" "*[[{")
+      ("Autocite" "*[[{") ("citeauthor" "*[[{") ("Citeauthor" "*[[{") 
("citetitle" "*[[{")
       ("citeyear" "*[[{") ("citedate" "*[[{") ("citeurl" "[[{") ("parentext" 
"{")
       ("brackettext" "{") ("fullcite" "[[{") ("fullfootcite" "[[{") ("volcite" 
"[{[[")
       ("Volcite" "[{[[") ("pvolcite" "[{[[") ("Pvolcite" "[{[[") ("fvolcite" 
"[{[[")
@@ -325,7 +325,7 @@ variable `font-latex-fontify-sectioning'." ',num)
      'font-lock-constant-face 2 command)
     ("reference"
      (("nocite" "*{") ("cite" "*[[{") ("label" "{") ("pageref" "{")
-      ("vref" "{") ("eqref" "{") ("ref" "{") ("include" "{")
+      ("vref" "*{") ("eqref" "{") ("ref" "{") ("include" "{")
       ("input" "{") ("bibliography" "{") ("index" "{") ("glossary" "{")
       ("footnote" "[{") ("footnotemark" "[") ("footnotetext" "[{"))
      'font-lock-constant-face 2 command)
@@ -820,7 +820,7 @@ Generated by `font-latex-make-user-keywords'.")))
             (font-latex-match-script
              (1 (font-latex-script (match-beginning 0)) append))
             (font-latex-match-script-chars
-             (0 '(face font-latex-math-face invisible t)))))
+             (1 (font-latex-script-char (match-beginning 1)) prepend))))
     (add-to-list 'font-latex-keywords-2 item t)))
 (font-latex-make-user-keywords)
 
@@ -861,7 +861,11 @@ are equally raised over x.
 
 If this variable is set to the symbol `multi-level', then y is
 raised above x, and z is raised above y.  With many script
-levels, the text might become too small to be readable.
+levels, the text might become too small to be readable, thus
+there is the option `font-latex-fontify-script-max-level'.  (The
+factors for text shrinking are defined in the faces
+`font-latex-superscript-face' and `font-latex-subscript-face' and
+the raise/lower factor in `font-latex-script-display'.)
 
 If this variable is set to the symbol `invisible', then the
 effect is essentially like `multi-level' but additionally the
@@ -875,7 +879,32 @@ script operators ^ and _ are not displayed."
        (or (TeX-booleanp val)
           (memq val '(multi-level invisible)))))
 
-(defcustom font-latex-script-display '((raise -0.3) . (raise 0.3))
+(defcustom font-latex-fontify-script-max-level 3
+  "Maximum scriptification level for which script faces are applied.
+The faces `font-latex-superscript-face' and
+`font-latex-subscript-face' define custom :height values < 1.0.
+Therefore, scripts are displayed with a slightly smaller font
+than normal math text.  If `font-latex-fontify-script' is
+`multi-level' or `invisible', the font size becomes too small to
+be readable after a few levels.  This option allows to specify
+the maximum level after which the size of the script text won't
+be shrunken anymore.
+
+For example, see this expression:
+
+  \\( x^{y^{z^a_b}} \\)
+
+x has scriptification level 0, y has level 1, z has level 2, and
+both a and b have scriptification level 3.
+
+If `font-latex-fontify-script-max-level' was 2, then z, a, and b
+would have the same font size.  If it was 3 or more, then a and b
+were smaller than z just in the same way as z is smaller than y
+and y is smaller than x."
+  :group 'font-latex
+  :type 'integer)
+
+(defcustom font-latex-script-display '((raise -0.5) . (raise 0.5))
   "Display specification for subscript and superscript content.
 The car is used for subscript, the cdr is used for superscripts."
   :group 'font-latex
@@ -1118,15 +1147,31 @@ have changed."
   :group 'font-latex-highlighting-faces)
 
 (defface font-latex-superscript-face
-  '((t (:height 0.8)))
+  '((t (:height 0.85)))
   "Face used for superscripts."
   :group 'font-latex-highlighting-faces)
 
 (defface font-latex-subscript-face
-  '((t (:height 0.8)))
+  '((t (:height 0.85)))
   "Face used for subscripts."
   :group 'font-latex-highlighting-faces)
 
+(defface font-latex-script-char-face
+  (let ((font (cond ((assq :inherit custom-face-attributes)
+                    '(:inherit underline))
+                   (t '(:underline t)))))
+    `((((class grayscale) (background light))
+       (:foreground "DarkGray" ,@font))
+      (((class grayscale) (background dark))
+       (:foreground "gray" ,@font))
+      (((class color) (background light))
+       (:foreground "salmon"))
+      (((class color) (background dark))
+       (:foreground "DarkRed"))
+      (t (,@font))))
+  "Face used for the script chars ^ and _."
+  :group 'font-latex-highlighting-faces)
+
 (defface font-latex-slide-title-face
   (let* ((scale 1.2)
         (size (when (featurep 'xemacs)
@@ -1328,14 +1373,12 @@ If optional argument is non-nil, print status messages."
   ;; property is only added if `font-lock-multiline' is bound.)
   (unless (boundp 'font-lock-multiline)
     (remove-text-properties beg end '(font-latex-multiline)))
+  (remove-text-properties beg end '(script-level))
   (let ((start beg))
     (while (< beg end)
       (let ((next (next-single-property-change beg 'display nil end))
            (prop (get-text-property beg 'display)))
        (if (and (eq (car-safe prop) 'raise)
-                (member (car-safe (cdr prop))
-                        (list (nth 1 (car font-latex-script-display))
-                              (nth 1 (cdr font-latex-script-display))))
                 (null (cddr prop)))
            (put-text-property beg next 'display nil))
        (setq beg next)))
@@ -1936,9 +1979,9 @@ END marks boundaries for searching for quotation ends."
     t))
 
 (defun font-latex-match-script-chars (limit)
-  (and (eq font-latex-fontify-script 'invisible)
-       (re-search-forward "[_^]" limit t)
-       (let ((pos (match-beginning 0)))
+  "Match subscript and superscript chars up to LIMIT."
+  (and (re-search-forward "[^_^]\\([_^]\\)" limit t)
+       (let ((pos (match-beginning 1)))
         (and (font-latex-faces-present-p 'font-latex-math-face pos)
              (not (font-latex-faces-present-p '(font-lock-constant-face
                                                 font-lock-builtin-face
@@ -1951,6 +1994,34 @@ END marks boundaries for searching for quotation ends."
                       (setq pos (1- pos) odd (not odd)))
                     odd))))))
 
+(defun font-latex--get-script-props (pos script-type)
+  (let* ((old-raise (or (plist-get (get-text-property pos 'display) 'raise) 
0.0))
+        (new-level (1+ (or (get-text-property pos 'script-level) 0)))
+        (disp-props (copy-sequence (case script-type
+                                     (:super (cdr font-latex-script-display))
+                                     (:sub   (car 
font-latex-script-display)))))
+        (new-disp-props (let ((raise (plist-get disp-props 'raise))
+                              (nl new-level))
+                          (if raise
+                              ;; This polynom approximates that the factor
+                              ;; which is multiplied with raise is 1 for nl=1,
+                              ;; 0.8 for nl=2, 0.64 for nl=3, etc. (so always
+                              ;; about 80% of the previous value).
+                              (plist-put disp-props 'raise
+                                         (+ old-raise
+                                            (* raise
+                                               (+ 1.1965254857142873
+                                                  (* nl -0.21841226666666758)
+                                                  (* nl nl 
0.012018514285714385)))))
+                            disp-props))))
+    `(face ,(if (<= new-level font-latex-fontify-script-max-level)
+               (case script-type
+                 (:super 'font-latex-superscript-face)
+                 (:sub   'font-latex-subscript-face))
+             nil)
+          script-level ,new-level
+          display ,new-disp-props)))
+
 ;; Copy and adaption of `tex-font-lock-suscript' from tex-mode.el in
 ;; GNU Emacs on 2004-07-07.
 (defun font-latex-script (pos)
@@ -1975,14 +2046,20 @@ END marks boundaries for searching for quotation ends."
     (let ((extra-props-flag (boundp 'font-lock-extra-managed-props)))
       (if (eq (char-after pos) ?_)
          (if extra-props-flag
-             `(face font-latex-subscript-face display
-                    ,(car font-latex-script-display))
+             (font-latex--get-script-props pos :sub)
            'font-latex-subscript-face)
        (if extra-props-flag
-           `(face font-latex-superscript-face display
-                  ,(cdr font-latex-script-display))
+           (font-latex--get-script-props pos :super)
          'font-latex-superscript-face)))))
 
+(defun font-latex-script-char (pos)
+  "Return face and display spec for subscript and superscript character at 
POS."
+  (if (boundp 'font-lock-extra-managed-props)
+      `(face font-latex-script-char-face
+            ,@(when (eq font-latex-fontify-script 'invisible)
+                '(invisible t)))
+    'font-latex-script-char-face))
+
 ;;; docTeX
 
 (defvar font-latex-doctex-preprocessor-face
diff --git a/latex.el b/latex.el
index e5601fb..6960749 100644
--- a/latex.el
+++ b/latex.el
@@ -5966,6 +5966,17 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
   :type '(repeat regexp)
   :group 'TeX-command)
 
+(defun LaTeX--after-math-macro-prefix-p ()
+  "Return non-nil if point is after a macro prefix in math mode.
+Also sets `match-data' so that group 1 is the already typed
+prefix.
+
+For example, in $a + \a| - 17$ with | denoting point, the
+function would return non-nil and `(match-string 1)' would return
+\"a\" afterwards."
+  (and (texmathp)
+       (TeX-looking-at-backward "\\\\\\([a-zA-Z]*\\)")))
+
 (defun LaTeX-common-initialization ()
   "Common initialization for LaTeX derived modes."
   (VirTeX-common-initialization)
@@ -6038,7 +6049,12 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
                  ("\\\\renewenvironment\\*?{\\([A-Za-z]*\\)"
                   1 LaTeX-environment-list-filtered "}")
                   ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)"
-                  2 LaTeX-pagestyle-list "}"))
+                  2 LaTeX-pagestyle-list "}")
+                 (LaTeX--after-math-macro-prefix-p
+                  1 (lambda ()
+                      (append (mapcar #'cadr LaTeX-math-list)
+                              (mapcar #'cadr LaTeX-math-default)))
+                  (if TeX-insert-braces "{}")))
                TeX-complete-list))
 
   (LaTeX-add-environments
diff --git a/latex/preview.dtx b/latex/preview.dtx
index 0e220cd..5372032 100644
--- a/latex/preview.dtx
+++ b/latex/preview.dtx
@@ -439,7 +439,7 @@
 \NeedsTeXFormat{LaTeX2e} address@hidden #1#2$#3:
 address@hidden #2#4 $}} address@hidden #1 #2${#1}
 \begingroup \catcode`\_=12
address@hidden@version $Name: release_11_89 $ address@hidden@empty
address@hidden@version $Name: release_11_90 $ address@hidden@empty
 address@hidden@version CVS-$Revision: 1.126 $ \endgroup \else
   \def\next release_{} \lccode`\_=`.
   \edef\next{\lowercase{\endgroup
diff --git a/style/Alegreya.el b/style/Alegreya.el
index 70e69e0..af95423 100644
--- a/style/Alegreya.el
+++ b/style/Alegreya.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-09-12
 ;; Keywords: tex
diff --git a/style/AlegreyaSans.el b/style/AlegreyaSans.el
index 494890d..a2e7ed1 100644
--- a/style/AlegreyaSans.el
+++ b/style/AlegreyaSans.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-09-12
 ;; Keywords: tex
diff --git a/style/AnonymousPro.el b/style/AnonymousPro.el
index 5ca3203..a9a436b 100644
--- a/style/AnonymousPro.el
+++ b/style/AnonymousPro.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-30
 ;; Keywords: tex
diff --git a/style/FiraMono.el b/style/FiraMono.el
index a037c68..d152087 100644
--- a/style/FiraMono.el
+++ b/style/FiraMono.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-11-11
 ;; Keywords: tex
diff --git a/style/FiraSans.el b/style/FiraSans.el
index 3874443..0cd7a14 100644
--- a/style/FiraSans.el
+++ b/style/FiraSans.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-11-11
 ;; Keywords: tex
diff --git a/style/MyriadPro.el b/style/MyriadPro.el
index 2ca0cc2..8e16e4a 100644
--- a/style/MyriadPro.el
+++ b/style/MyriadPro.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-21
 ;; Keywords: tex
diff --git a/style/XCharter.el b/style/XCharter.el
index df88f97..5ff866d 100644
--- a/style/XCharter.el
+++ b/style/XCharter.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-30
 ;; Keywords: tex
diff --git a/style/attachfile.el b/style/attachfile.el
index 3b27778..c720ea1 100644
--- a/style/attachfile.el
+++ b/style/attachfile.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-04-11
 ;; Keywords: tex
diff --git a/style/baskervaldx.el b/style/baskervaldx.el
index ce44d60..f793e02 100644
--- a/style/baskervaldx.el
+++ b/style/baskervaldx.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-11-18
 ;; Keywords: tex
diff --git a/style/biblatex.el b/style/biblatex.el
index 2b8ba85..aa5fcc9 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -206,9 +206,15 @@ for citation keys."
             (TeX-argument-insert
              (TeX-read-string (TeX-argument-prompt t nil "Postnote"))
              (equal prenote ""))))
-      (setq items (TeX-completing-read-multiple
-                  (TeX-argument-prompt optional prompt "Key")
-                  (LaTeX-bibitem-list)))
+      (setq items (if (and (fboundp 'reftex-citation)
+                          (fboundp 'reftex-plug-flag)
+                          (reftex-plug-flag 3))
+                     ;; Use RefTeX when enabled.
+                     (reftex-citation t)
+                   ;; Multiple citation keys in each argument are allowed.
+                   (TeX-completing-read-multiple
+                    (TeX-argument-prompt optional prompt "Key(s)")
+                    (LaTeX-bibitem-list))))
       (apply 'LaTeX-add-bibitems items)
       ;; If input is empty, insert an empty group only the first time, when
       ;; `noinsert' flag is nil.
@@ -370,6 +376,10 @@ for citation keys."
                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Citeauthor" (TeX-arg-conditional TeX-arg-cite-note-p
                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+    '("citeauthor*" (TeX-arg-conditional TeX-arg-cite-note-p
+                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+    '("Citeauthor*" (TeX-arg-conditional TeX-arg-cite-note-p
+                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citetitle" (TeX-arg-conditional TeX-arg-cite-note-p
                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citetitle*" (TeX-arg-conditional TeX-arg-cite-note-p
@@ -508,12 +518,12 @@ for citation keys."
      ;; Fontification for compat macros does not go into `font-latex.el':
      (when (and (featurep 'font-latex)
                (eq TeX-install-font-lock 'font-latex-setup))
-       (font-latex-add-keywords '(("citet"        "*[{")
-                                 ("Citet"        "*[{")
+       (font-latex-add-keywords '(("citet"        "*[[{")
+                                 ("Citet"        "*[[{")
                                  ("citep"        "*[[{")
                                  ("Citep"        "*[[{")
-                                 ("citealt"      "*[{")
-                                 ("Citealt"      "*[{")
+                                 ("citealt"      "*[[{")
+                                 ("Citealt"      "*[[{")
                                  ("citealp"      "*[[{")
                                  ("Citealp"      "*[[{"))
                                'biblatex))))
@@ -540,7 +550,37 @@ for citation keys."
     "NewBibliographyString")
    (LaTeX-declare-expert-environments
     "biblatex"
-    "refsection" "refsegment"))
+    "refsection" "refsegment")
+
+   ;; Tell RefTeX: If package option `natbib' is given, activate that
+   ;; format, otherwise stick with `biblatex':
+   (when (and LaTeX-reftex-cite-format-auto-activate
+             (fboundp 'reftex-set-cite-format))
+     (if (or (LaTeX-provided-package-options-member "biblatex" "natbib")
+            (LaTeX-provided-package-options-member "biblatex" "natbib=true"))
+        (reftex-set-cite-format 'natbib)
+       ;; The entry `biblatex' is defined in
+       ;; `reftex-cite-format-builtin' in reftex-vars.el which will be
+       ;; part of Emacs >= 25.3.  So check here if we find an entry,
+       ;; otherwise do it manually for older Emacsen.
+       (if (assoc 'biblatex reftex-cite-format-builtin)
+          (reftex-set-cite-format 'biblatex)
+        (reftex-set-cite-format
+         '((?\C-m . "\\cite[][]{%l}")
+           (?C    . "\\cite*[][]{%l}")
+           (?t    . "\\textcite[][]{%l}")
+           (?T    . "\\textcite*[][]{%l}")
+           (?p    . "\\parencite[][]{%l}")
+           (?P    . "\\parencite*[][]{%l}")
+           (?f    . "\\footcite[][]{%l}")
+           (?s    . "\\smartcite[][]{%l}")
+           (?u    . "\\autocite[][]{%l}")
+           (?U    . "\\autocite*[][]{%l}")
+           (?a    . "\\citeauthor{%l}")
+           (?A    . "\\citeauthor*{%l}")
+           (?y    . "\\citeyear{%l}")
+           (?Y    . "\\citeyear*{%l}")
+           (?n    . "\\nocite{%l}")))))))
  LaTeX-dialect)
 
 (defvar LaTeX-biblatex-package-options-list
diff --git a/style/bicaption.el b/style/bicaption.el
index b361393..5e40270 100644
--- a/style/bicaption.el
+++ b/style/bicaption.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-11-11
 ;; Keywords: tex
@@ -110,11 +110,12 @@ arguments."
        (TeX-argument-insert width t)
        (TeX-argument-insert inpos t)))
     (LaTeX-fill-paragraph)
-    ;; Insert label
-    (when (and (not label-inside) (not star))
+    ;; Insert label -- a new line is inserted only if label is there:
+    (when (and (not label-inside) (not star)
+              (save-excursion (LaTeX-label currenv 'environment)))
       (LaTeX-newline)
       (indent-according-to-mode)
-      (LaTeX-label currenv 'environment))))
+      (end-of-line))))
 
 (defun LaTeX-arg-bicaption-captionsetup (optional)
   "Query for 2 arguments for \"\\captionsetup\" with bicaption.sty loaded.
@@ -143,7 +144,7 @@ square brackets."
    (TeX-add-symbols
     '("bicaption"        (LaTeX-arg-bicaption-bicaption))
     '("bicaption*"       (LaTeX-arg-bicaption-bicaption  nil    t))
-    '("bicaptionbox"     (LaTeX-arg-bicaption-bicaption  nil   nil  t t)   t)
+    '("bicaptionbox"     (LaTeX-arg-bicaption-bicaption  nil   nil  t   t) t)
     '("bicaptionbox*"    (LaTeX-arg-bicaption-bicaption  nil    t   t)     t)
     '("bisubcaption"     (LaTeX-arg-bicaption-bicaption "sub-"))
     '("bisubcaption*"    (LaTeX-arg-bicaption-bicaption "sub-"  t))
diff --git a/style/caption.el b/style/caption.el
index d8699fa..ec1d36d 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-02-21
 ;; Keywords: tex
@@ -270,6 +270,49 @@ caption, insert only a caption."
   ;; (cf. `paragraph-start').
   (LaTeX-fill-paragraph))
 
+(defun LaTeX-arg-caption-captionof (optional &optional star)
+  "Query for the arguments of \"\\captionof\" macro and insert them.
+If OPTIONAL is non-nil, insert the arguments in brackets.  If
+STAR is non-nil, do not query for a short-caption and a label."
+  (let* ((envtype (completing-read (TeX-argument-prompt optional nil "Float 
type")
+                                  LaTeX-caption-supported-float-types))
+        (figtypes '("figure" "subfigure" "floatingfigure"
+                    "figwindow" "SCfigure" "measuredfigure" "wrapfigure"))
+        (tabtypes '("table"  "subtable" "floatingtable"  "tabwindow" "SCtable"
+                    "supertabular" "xtabular" "threeparttable"  "wraptable"))
+        (caption (TeX-read-string
+                  (TeX-argument-prompt optional nil "Caption")))
+        (short-caption
+         (when (and (not star)
+                    (>= (length caption) LaTeX-short-caption-prompt-length))
+           (TeX-read-string
+            (TeX-argument-prompt t nil "Short caption")))))
+    (indent-according-to-mode)
+    (TeX-argument-insert envtype optional)
+    (when (and short-caption (not (string= short-caption "")))
+      (insert LaTeX-optop short-caption LaTeX-optcl))
+    (TeX-argument-insert caption optional)
+    (LaTeX-fill-paragraph)
+    (unless star
+      ;; Check if `envtype' is a figure or a table, also consult
+      ;; `LaTeX-label-alist' for additions from user or newfloat.el,
+      ;; then run `LaTeX-label' w/ 'environment arg, otherwise w/o.
+      (save-excursion
+       (if (or (member envtype figtypes)
+               (member envtype tabtypes)
+               (assoc envtype LaTeX-label-alist))
+           (LaTeX-label (cond ((member envtype figtypes)
+                               "figure")
+                              ((member envtype tabtypes)
+                               "table")
+                              (t envtype))
+                        'environment)
+         (LaTeX-label envtype)))
+      (when (looking-at-p "\\\\label{")
+       (LaTeX-newline)
+       (indent-according-to-mode)
+       (end-of-line)))))
+
 (TeX-add-style-hook
  "caption"
  (lambda ()
@@ -305,15 +348,9 @@ caption, insert only a caption."
                    LaTeX-caption-supported-float-types]
       t)
 
-    '("captionof"
-      (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
-                   LaTeX-caption-supported-float-types)
-      ["Short caption"] t)
+    '("captionof" LaTeX-arg-caption-captionof)
 
-    '("captionof*"
-      (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
-                   LaTeX-caption-supported-float-types)
-      t)
+    '("captionof*" (LaTeX-arg-caption-captionof t))
 
     '("captionsetup"
       (TeX-arg-conditional (member "bicaption" (TeX-style-list))
diff --git a/style/cleveref.el b/style/cleveref.el
index 4d039e1..3150180 100644
--- a/style/cleveref.el
+++ b/style/cleveref.el
@@ -1,6 +1,6 @@
 ;;; cleveref.el --- Style hook for the `cleveref.sty' package.
 
-;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2016 Free Software Foundation, Inc.
 
 ;; Author: Matthew Leach <address@hidden>
 ;; Maintainer: address@hidden
@@ -25,19 +25,22 @@
 
 ;;; Code
 
-(defun TeX-arg-cleveref-multiple-labels (optional &optional prompt definition)
+(defun TeX-arg-cleveref-multiple-labels (optional &optional prompt)
   "Prompt for a series of labels completing with known labels.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
-string.  If DEFINITION is non-nil, add each chosen label to the
-list of defined labels."
-  (let* ((labels (TeX-completing-read-multiple
-                  (TeX-argument-prompt optional prompt "Keys")
-                  (LaTeX-label-list)))
-         (labels-string (mapconcat 'identity labels ",")))
-    (when definition
-      (apply 'LaTeX-add-labels labels))
-    (TeX-argument-insert labels-string optional optional)))
+string."
+  (if (and (fboundp 'reftex-arg-label)
+          (fboundp 'reftex-plug-flag)
+          (reftex-plug-flag 2))
+      ;; Use RefTeX when enabled
+      (TeX-arg-ref optional)
+    ;; Use AUCTeX interface
+    (let* ((labels (TeX-completing-read-multiple
+                   (TeX-argument-prompt optional prompt "Keys")
+                   (LaTeX-label-list)))
+          (labels-string (mapconcat #'identity labels ",")))
+      (TeX-argument-insert labels-string optional))))
 
 (TeX-add-style-hook
  "cleveref"
@@ -45,22 +48,22 @@ list of defined labels."
    (TeX-add-symbols
     '("cref" TeX-arg-cleveref-multiple-labels)
     '("Cref" TeX-arg-cleveref-multiple-labels)
-    '("crefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
-    '("Crefrange" (TeX-arg-label "key (first)") (TeX-arg-label "Key (last)"))
+    '("crefrange" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)"))
+    '("Crefrange" (TeX-arg-ref "key (first)") (TeX-arg-ref "Key (last)"))
     '("cpageref" TeX-arg-cleveref-multiple-labels)
     '("Cpageref" TeX-arg-cleveref-multiple-labels)
-    '("cpagerefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key 
(last)"))
-    '("Cpagerefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key 
(last)"))
+    '("cpagerefrange" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)"))
+    '("Cpagerefrange" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)"))
     '("cref*" TeX-arg-cleveref-multiple-labels)
     '("Cref*" TeX-arg-cleveref-multiple-labels)
-    '("crefrange*" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
-    '("Crefrange*" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
-    '("namecref" TeX-arg-label)
-    '("nameCref" TeX-arg-label)
-    '("lnamecref" TeX-arg-label)
-    '("namecrefs" TeX-arg-label)
-    '("nameCrefs" TeX-arg-label)
-    '("lnamecrefs" TeX-arg-label)
+    '("crefrange*" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)"))
+    '("Crefrange*" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)"))
+    '("namecref" TeX-arg-ref)
+    '("nameCref" TeX-arg-ref)
+    '("lcnamecref" TeX-arg-ref)
+    '("namecrefs" TeX-arg-ref)
+    '("nameCrefs" TeX-arg-ref)
+    '("lcnamecrefs" TeX-arg-ref)
     '("labelcref" TeX-arg-cleveref-multiple-labels)
     '("labelcpageref" TeX-arg-cleveref-multiple-labels))
 
@@ -68,12 +71,11 @@ list of defined labels."
    ;; normal referencing.
    (TeX-declare-expert-macros
     "cleveref"
-    "namecref" "nameCref" "lnamecref" "namecrefs" "nameCrefs"
-    "lnamecrefs" "labelcref" "labelcpageref")
+    "namecref" "nameCref" "lcnamecref" "namecrefs" "nameCrefs"
+    "lcnamecrefs" "labelcref" "labelcpageref")
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (fboundp 'font-latex-set-syntactic-keywords)
              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("cref" "*{")
                                ("Cref" "*{")
@@ -85,15 +87,13 @@ list of defined labels."
                                 ("Cpagerefrange" "{{")
                                 ("namecref" "{")
                                 ("nameCref" "{")
-                                ("lnamecref" "{")
+                                ("lcnamecref" "{")
                                 ("namecrefs" "{")
                                 ("nameCrefs" "{")
-                                ("lnamecrefs" "{")
+                                ("lcnamecrefs" "{")
                                 ("labelcref" "{")
                                 ("labelcpageref" "{"))
-                             'reference)
-     ;; For syntactic fontification, e.g. verbatim constructs.
-     (font-latex-set-syntactic-keywords))
+                             'reference))
 
    ;; Activate RefTeX reference style.
    (and LaTeX-reftex-ref-style-auto-activate
diff --git a/style/color.el b/style/color.el
index a7cce3f..1b878d3 100644
--- a/style/color.el
+++ b/style/color.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-01-16
 ;; Keywords: tex
diff --git a/style/colortbl.el b/style/colortbl.el
index be4b5b5..3fc1689 100644
--- a/style/colortbl.el
+++ b/style/colortbl.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-03-22
 ;; Keywords: tex
diff --git a/style/commath.el b/style/commath.el
index fd42550..0da55fe 100644
--- a/style/commath.el
+++ b/style/commath.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-07-31
 ;; Keywords: tex
diff --git a/style/currvita.el b/style/currvita.el
index bc6872d..0973190 100644
--- a/style/currvita.el
+++ b/style/currvita.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-01-05
 ;; Keywords: tex
diff --git a/style/dcolumn.el b/style/dcolumn.el
index d013b0f..29725ac 100644
--- a/style/dcolumn.el
+++ b/style/dcolumn.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-12-18
 ;; Keywords: tex
diff --git a/style/empheq.el b/style/empheq.el
index 2db9b93..268faf4 100644
--- a/style/empheq.el
+++ b/style/empheq.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-08-07
 ;; Keywords: tex
diff --git a/style/enumitem.el b/style/enumitem.el
index 02e3a25..94de0e9 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-20
 ;; Keywords: tex
diff --git a/style/environ.el b/style/environ.el
index 4f275e9..16cb0ca 100644
--- a/style/environ.el
+++ b/style/environ.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-07-04
 ;; Keywords: tex
diff --git a/style/erewhon.el b/style/erewhon.el
index f2ca6d4..b4d24e3 100644
--- a/style/erewhon.el
+++ b/style/erewhon.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-11-18
 ;; Keywords: tex
diff --git a/style/eso-pic.el b/style/eso-pic.el
index b1bedb2..7d56133 100644
--- a/style/eso-pic.el
+++ b/style/eso-pic.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-29
 ;; Keywords: tex
diff --git a/style/exam.el b/style/exam.el
new file mode 100644
index 0000000..d6dbc09
--- /dev/null
+++ b/style/exam.el
@@ -0,0 +1,378 @@
+;;; exam.el --- AUCTeX style for the (LaTeX) exam class
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Uwe Brauer <address@hidden>
+;; Created: 2016-03-06
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for the exam class.
+
+;; Acknowledgements
+;; Arash Esbati <address@hidden> for a almost complete rewrite.
+
+;;; Code:
+
+
+(defvar LaTeX-exam-class-options
+  '("answers" "noanswers" "cancelspace" "nocancelspace" "addpoints")
+  "Class options for the exam class.")
+
+(defun LaTeX-exam-insert-item ()
+  "Insert a new item in an environment from exam class.
+Item inserted depends on the environment."
+  (TeX-insert-macro
+   (cond ((string= environment "questions")
+          "question")
+         ((string= environment "parts")
+          "part")
+         ((string= environment "subparts")
+          "subpart")
+         ((string= environment "subsubparts")
+          "subsubpart")
+         ;; Fallback
+         (t "item"))))
+
+(defun LaTeX-exam-insert-label (_optional &optional name type)
+  "Indent the line and query/insert a label incl. the \"\\label\" macro.
+Arguments NAME and TYPE are the same as for the function
+`LaTeX-label'.  OPTIONAL is ignored."
+  (indent-according-to-mode)
+  (let ((currenv (LaTeX-current-environment)))
+    (LaTeX-label (or name currenv) (or type 'environment))))
+
+(TeX-add-style-hook
+ "exam"
+ (lambda ()
+   (TeX-run-style-hooks "article")
+   ;; Add options from `LaTeX-article-class-options' only once:
+   (dolist (opt LaTeX-article-class-options)
+     (add-to-list 'LaTeX-exam-class-options opt))
+   ;; Make our label prefix available ...
+   (let ((envs '("questions")))
+     (dolist (env envs)
+       ;; to AUCTeX
+       (add-to-list 'LaTeX-label-alist
+                    (cons env 'LaTeX-exam-label))
+       ;; to RefTeX with `reftex-add-label-environments'
+       (when (fboundp 'reftex-add-label-environments)
+         (reftex-add-label-environments
+          `((,env ,LaTeX-exam-reftex-quick-id-key ,LaTeX-exam-label
+                  "~\\ref{%s}" nil
+                  (regexp "[Qq]uestions?" "[Nn]umbers?")))))))
+   (when (or (member "xcolor" (TeX-style-list))
+             (member "color" (TeX-style-list)))
+     (TeX-add-symbols '("shadedsolutions" 0)))
+
+   (LaTeX-add-environments
+    '("solution" [ "Height" ])
+    '("solutionorbox" [ "Height" ])
+    '("solutionorlines" [ "Height" ])
+    '("solutionordottedlines" [ "Height" ])
+    '("solutionorgrid" [ "Height" ])
+    '("questions" LaTeX-env-item)
+    '("parts" LaTeX-env-item)
+    '("subparts" LaTeX-env-item)
+    '("subsubparts" LaTeX-env-item))
+
+   ;; Tell AUCTeX about special environments:
+   (let ((envs '("questions" "parts" "subparts" "subsubparts")))
+     (dolist (env envs)
+       (add-to-list 'LaTeX-item-list
+                    (cons env 'LaTeX-exam-insert-item))))
+
+   ;; Append us only once:
+   (unless (and (string-match "question" LaTeX-item-regexp)
+                (string-match "subsub" LaTeX-item-regexp))
+     (set (make-local-variable 'LaTeX-item-regexp)
+          (concat
+           LaTeX-item-regexp
+           "\\|"
+           "\\(titled\\)?question\\b"
+           "\\|"
+           "\\(sub\\|subsub\\)?part\\b"))
+     (LaTeX-set-paragraph-start))
+
+   (TeX-add-symbols
+    '("part" [ "Points" ] (TeX-arg-literal " "))
+    '("subpart" [ "Points" ] (TeX-arg-literal " "))
+    '("gradetable"
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Orientation")
+                     '("v" "h") ]
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Table index")
+                     '("questions" "pages") ] )
+    '("bonusgradetable"
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Orientation")
+                     '("v" "h") ]
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Table index")
+                     '("questions" "pages") ] )
+    '("bonuspointtable"
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Orientation")
+                     '("v" "h") ]
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Table index")
+                     '("questions" "pages") ] )
+    '("partialgradetable"
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Orientation")
+                     '("v" "h") ]
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Table index")
+                     '("questions" "pages") ] )
+    '("partialbonusgradetable"
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Orientation")
+                     '("v" "h") ]
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Table index")
+                     '("questions" "pages") ] )
+    '("partialbonuspointtable"
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Orientation")
+                     '("v" "h") ]
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Table index")
+                     '("questions" "pages") ] )
+    '("pointtable"
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Orientation")
+                     '("v" "h") ]
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Table index")
+                     '("questions" "pages") ] )
+    '("partialpointtable"
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Orientation")
+                     '("v" "h") ]
+      [ TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Table index")
+                     '("questions" "pages") ] )
+
+    '("subsubpart" [ "Points" ] (TeX-arg-literal " "))
+    '("question"  ["Points"] (TeX-arg-literal " "))
+    '("bonusquestion"  ["Points"] (TeX-arg-literal " "))
+    '("extrafootheight"  [ TeX-arg-length "Extra height 1. page footer" ]
+      (TeX-arg-length "Extra height footers"))
+    '("titledquestion" "Title" ["Points"] LaTeX-exam-insert-label 
(TeX-arg-literal " "))
+    '("ContinuedQuestion" 0)
+    '("CorrectChoice" 0)
+    '("CorrectChoiceEmphasis" 1)
+    '("IncompleteQuestion" 0)
+    '("SolutionEmphasis" 1)
+    '("addpoints" 0)
+    '("addquestionobject" 0)
+    '("answerclearance" 1)
+    '("answerline"  ["Points"] (TeX-arg-literal " "))
+    '("begingradingrange" 1)
+    '("bhpgword" 1)
+    '("bhpword" 1)
+    '("bhqword" 1)
+    '("bhsword" 1)
+    '("bhtword" 1)
+    '("bonuspart" 0)
+    '("bonuspointformat" 0)
+    '("bonuspointname" 1)
+    '("bonuspointpoints" 2)
+    '("bonuspointsinrange" 0)
+    '("bonuspointsofquestion" 1)
+    '("bonuspointsonpage" 0)
+    '("bonusqformat" 1)
+    '("bonussubpart" 0)
+    '("bonussubsubpart" 0)
+    '("bonustitledquestion" "Title" ["Points"] LaTeX-exam-insert-label 
(TeX-arg-literal " "))
+    '("bonustotalformat" 0)
+    '("boxedpoints" 0)
+    '("bracketedpoints" 0)
+    '("bvpgword" 1)
+    '("bvpword" 1)
+    '("bvqword" 1)
+    '("bvsword" 1)
+    '("bvtword" 1)
+    '("cancelspace" 0)
+    '("cellwidth" 1)
+    '("cfoot" 1)
+    '("chbpword" 1)
+    '("chead" 1)
+    '("checkboxchar" 1)
+    '("checkboxeshook" 0)
+    '("checkedchar" 1)
+    '("choice" 0)
+    '("choicelabel" 0)
+    '("choiceshook" 0)
+    '("chpgword" 1)
+    '("chpword" 1)
+    '("chqword" 1)
+    '("chsword" 1)
+    '("chsword" 1)
+    '("correctchoice" 0)
+    '("correctchoiceemphasis" 1)
+    '("covercfoot" 3)
+    '("coverchead" 3)
+    '("coverextrafootheight" 3)
+    '("coverextraheadheight" 3)
+    '("coverfirstpagefooter" 3)
+    '("coverfirstpageheader" 3)
+    '("coverfooter" 3)
+    '("coverheader" 3)
+    '("coverlfoot" 3)
+    '("coverlhead" 3)
+    '("coverrfoot" 3)
+    '("coverrhead" 3)
+    '("coverrunningfooter" 3)
+    '("coverrunningheader" 3)
+    '("cvbpword" 1)
+    '("cvpgword" 1)
+    '("cvpword" 1)
+    '("cvqword" 1)
+    '("cvsword" 1)
+    '("cvtword" 1)
+    '("dottedlinefillheight" 1)
+    '("droppoints" 0)
+    '("droptotalbonuspoints" 0)
+    '("droptotalpoints" 0)
+    '("endgradingrange" 1)
+    '("extraheadheight" 1)
+    '("extrawidth" 1)
+    '("fillwithdottedlines" 1)
+    '("fillwithdottedlines" 1)
+    '("fillwithlines" 1)
+    '("fillwithlines" 1)
+    '("firstpagefooter" 1)
+    '("firstpagefootrule" 0)
+    '("firstpageheader" 3)
+    '("firstpageheadrule" 0)
+    '("footer" 3)
+    '("footrule" 0)
+    '("framedsolutions" 0)
+    '("fullwidth" 1)
+    '("gradetablestretch" 0)
+    '("greeknum" 0)
+    '("half" 0)
+    '("hpgword" 1)
+    '("hpword" 1)
+    '("hqword" 1)
+    '("hsword" 1)
+    '("htword" 1)
+    '("ifcontinuation" 0)
+    '("ifincomplete" 0)
+    '("iflastpage" 0)
+    '("ifprintanswers" 0)
+    '("lfoot" 1)
+    '("lhead" 1)
+    '("linefillheight" 1)
+    '("linefillthickness" 1)
+    '("makeemptybox" 1)
+    '("marginbonuspointname" 1)
+    '("marginpointname" 1)
+    '("marginpointsep" 1)
+    '("marksnotpoints" 0)
+    '("noaddpoints" 0)
+    '("nobonusqformat" 1)
+    '("noboxedpoints" 0)
+    '("nobracketedpoints" 0)
+    '("nocancelspace" 0)
+    '("nomorequestions" 0)
+    '("nopointsinmargin" 0)
+    '("nopointsinrightmargin" 0)
+    '("noprintanswers" 0)
+    '("noqformat" 1)
+    '("numbonuspoints" 0)
+    '("numcoverpages" 0)
+    '("numpages" 0)
+    '("numparts" 0)
+    '("numpoints" 0)
+    '("numquestions" 0)
+    '("numsubparts" 0)
+    '("numsubsubparts" 0)
+    '("oddeven" 2)
+    '("partlabel" 0)
+    '("partopsep" 0)
+    '("partshook" 0)
+    '("pointname" 1)
+    '("pointpoints" 2)
+    '("pointsdroppedatright" 0)
+    '("pointsinmargin" 0)
+    '("pointsinrightmargin" 0)
+    '("pointsofquestion" 1)
+    '("pointsonpage" 1)
+    '("printanswers" 0)
+    '("qformat" 1)
+    '("questionlabel" 0)
+    '("questionshook" 0)
+    '("rfoot" 1)
+    '("rhead" 1)
+    '("rightpointsmargin" 0)
+    '("roman" 0)
+    '("romannumeral" 0)
+    '("runningfooter" 3)
+    '("runningfootrule" 0)
+    '("runningheader" 3)
+    '("runningheadrule" 0)
+    '("settabletotalbonuspoints" 1)
+    '("settabletotalpoints" 1)
+    '("shadedsolutions" 0)
+    '("solutiontitle" 0)
+    '("subpartlabel" 0)
+    '("subpartshook" 0)
+    '("subsubpartlabel" 0)
+    '("subsubpartshook" 0)
+    '("thechoice" 0)
+    '("themarginpoints" 0)
+    '("thepartno" 0)
+    '("thequestion" 0)
+    '("thequestiontitle" 0)
+    '("thesubpart" 0)
+    '("thesubsubpart" 0)
+    '("totalbonuspoints" 0)
+    '("totalformat" 0)
+    '("totalnumpages" 0)
+    '("totalpoints" 0)
+    '("unframedsolutions" 0)
+    '("uplevel" 1)
+    '("usehorizontalhalf" 0)
+    '("useslantedhalf" 0)
+    '("vpgword" 1)
+    '("vpword" 1)
+    '("vqword" 1)
+    '("vsword" 1)
+    '("vtword" 1)
+    '("thepoints" 0)
+    ;; ... more stuff here
+    )
+   (LaTeX-add-lengths "answerlinelength" "answerskip")
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("question"        "[")
+                                ("titledquestion"  "{[")
+                                ("subpart"         "[")
+                                ("subsubpart"      "["))
+                              'textual)))
+ LaTeX-dialect)
+
+;;; exam.el ends here
diff --git a/style/fbb.el b/style/fbb.el
index 1e4baba..c195c57 100644
--- a/style/fbb.el
+++ b/style/fbb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-11-19
 ;; Keywords: tex
diff --git a/style/fontaxes.el b/style/fontaxes.el
index 95dafb4..0db15e5 100644
--- a/style/fontaxes.el
+++ b/style/fontaxes.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-12
 ;; Keywords: tex
diff --git a/style/fontenc.el b/style/fontenc.el
index c57f6d7..e84aa5a 100644
--- a/style/fontenc.el
+++ b/style/fontenc.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-09-12
 ;; Keywords: tex
diff --git a/style/framed.el b/style/framed.el
index 44a69c5..91fa0a5 100644
--- a/style/framed.el
+++ b/style/framed.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-06-26
 ;; Keywords: tex
diff --git a/style/geometry.el b/style/geometry.el
index 973f63c..85be57c 100644
--- a/style/geometry.el
+++ b/style/geometry.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-02-21
 ;; Keywords: tex
diff --git a/style/harvard.el b/style/harvard.el
index 08addb4..9a97e71 100644
--- a/style/harvard.el
+++ b/style/harvard.el
@@ -103,7 +103,8 @@
                 LaTeX-item-list))
 
      ;; Tell RefTeX
-     (when (fboundp 'reftex-set-cite-format)
+     (when (and LaTeX-reftex-cite-format-auto-activate
+               (fboundp 'reftex-set-cite-format))
        (reftex-set-cite-format 'harvard)))
  LaTeX-dialect)
 
diff --git a/style/hologo.el b/style/hologo.el
index 64031cb..1bcb816 100644
--- a/style/hologo.el
+++ b/style/hologo.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-10-31
 ;; Keywords: tex
diff --git a/style/jurabib.el b/style/jurabib.el
index 1919c06..b8fc87c 100644
--- a/style/jurabib.el
+++ b/style/jurabib.el
@@ -144,9 +144,8 @@
                                'variable))
 
      ;; Tell RefTeX (Thanks, Carsten)
-     (when (and (fboundp 'reftex-set-cite-format)
-               ;; Is it `reftex-cite-format' customized?
-               (not (get 'reftex-cite-format 'saved-value)))
+     (when (and LaTeX-reftex-cite-format-auto-activate
+               (fboundp 'reftex-set-cite-format))
        ;; Check if RefTeX supports jurabib.
        (if (assoc 'jurabib reftex-cite-format-builtin)
           ;; Yes, use the provided default.
diff --git a/style/ltablex.el b/style/ltablex.el
index 5e0fad5..29a21b5 100644
--- a/style/ltablex.el
+++ b/style/ltablex.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-03-14
 ;; Keywords: tex
diff --git a/style/ltxtable.el b/style/ltxtable.el
index 4ce184b..8924a52 100644
--- a/style/ltxtable.el
+++ b/style/ltxtable.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-03-14
 ;; Keywords: tex
diff --git a/style/mdframed.el b/style/mdframed.el
new file mode 100644
index 0000000..e6caeb3
--- /dev/null
+++ b/style/mdframed.el
@@ -0,0 +1,421 @@
+;;; mdframed.el --- AUCTeX style for `mdframed.sty' (v1.9b)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; 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 `mdframed.sty' (v1.9b) from 2013/07/01.
+;; `mdframed.sty' is part of TeXLive.
+
+;; This style offers only a set of mandatory options for completion
+;; while loading the package
+;; (cf. `LaTeX-mdframed-package-options-list').  All other options are
+;; offered for completion as part of `\mdfsetup'.  Please use this
+;; command to set options of the package.
+
+;;; Code:
+
+;; Needed for compiling `pushnew':
+(eval-when-compile (require 'cl))
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+(defvar LaTeX-mdframed-key-val-options
+  '(;; 6.2. Restoring the settings
+    ("style" ("defaultoptions"))
+    ("default")
+    ;; 6.3. Options with lengths
+    ("defaultunit" ("pt" "pc" "in" "bp" "cm" "mm" "dd" "cc" "sp" "ex" "em"))
+    ("skipabove")
+    ("skipbelow")
+    ("leftmargin")
+    ("rightmargin")
+    ("innerleftmargin")
+    ("innerrightmargin")
+    ("innertopmargin")
+    ("innerbottommargin")
+    ("linewidth")
+    ("innerlinewidth")
+    ("middlelinewidth")
+    ("outerlinewidth")
+    ("roundcorner")
+    ;; 6.4. Colored Options
+    ("linecolor")
+    ("innerlinecolor")
+    ("middlelinecolor")
+    ("outerlinecolor")
+    ("backgroundcolor")
+    ("fontcolor")
+    ("font")
+    ;; 6.5. Shadows
+    ("shadowsize")
+    ("shadowcolor")
+    ;; 6.6. Hidden Lines
+    ("topline" ("true" "false"))
+    ("rightline" ("true" "false"))
+    ("leftline" ("true" "false"))
+    ("bottomline" ("true" "false"))
+    ("hidealllines" ("true" "false"))
+    ;; 6.7. Working in twoside-mode
+    ("outermargin")
+    ("innermargin")
+    ("usetwoside" ("true" "false"))
+    ;; 6.8. Footnotes
+    ("footnotedistance")
+    ("footnoteinside" ("true" "false"))
+    ;; 6.9. Page breaks
+    ("nobreak" ("true" "false"))
+    ("everyline" ("true" "false"))
+    ("splittopskip")
+    ("splitbottomskip")
+    ;; 6.10. Frametitle
+    ("frametitle")
+    ("frametitlefont")
+    ("frametitlealignment" ("\\raggedleft" "\\raggedright" "\\centering"))
+    ("frametitlerule" ("true" "false"))
+    ("frametitlerulewidth")
+    ("frametitleaboveskip")
+    ("frametitlebelowskip")
+    ("frametitlebackgroundcolor")
+    ("repeatframetitle" ("true" "false"))
+    ;; 6.11. Title commands inside the environment
+    ("subtitleaboveline" ("true" "false"))
+    ("subtitlebelowline" ("true" "false"))
+    ("subtitlefont")
+    ("subtitlebackgroundcolor")
+    ("subtitleabovelinecolor")
+    ("subtitlebelowlinecolor")
+    ("subtitleabovelinewidth")
+    ("subtitlebelowlinewidth")
+    ("subtitleaboveskip")
+    ("subtitlebelowskip")
+    ("subtitleinneraboveskip")
+    ("subtitleinnerbelowskip")
+    ;; 6.12. General options
+    ("ntheorem" ("true" "false"))
+    ("needspace")
+    ("ignorelastdescenders" ("true" "false"))
+    ("userdefinedwidth" ("\\linewidth" "\\columnwidth"))
+    ("align" ("left" "right" "center"))
+    ;; 6.13. TikZ options
+    ("tikzsetting")
+    ("apptotikzsetting")
+    ;; 6.14. PSTricks options
+    ("pstrickssetting")
+    ("pstricksappsetting")
+    ;; 7. Hooks and Bools
+    ("settings")
+    ("extra")
+    ("singleextra")
+    ("firstextra")
+    ("middleextra")
+    ("secondextra")
+    ("mdfsingleframe" ("true" "false"))
+    ("mdffirstframe" ("true" "false"))
+    ("mdfmiddleframe" ("true" "false"))
+    ("mdflastframe" ("true" "false"))
+    ("beforesingleframe")
+    ("aftersingleframe")
+    ("beforebreak")
+    ("afterbreak")
+    ("beforelastframe")
+    ("afterlastframe")
+    ("startcode")
+    ("startinnercode")
+    ("endinnercode")
+    ("endcode")
+    ;; 8. Theorems
+    ("theoremseparator")
+    ("theoremtitlefont")
+    ("theoremspace"))
+  "Key=value options for mdframed macros and environments.")
+
+(defvar LaTeX-mdframed-key-val-options-local nil
+  "Buffer-local key=value options for mdframed macros and environments.")
+(make-variable-buffer-local 'LaTeX-mdframed-key-val-options-local)
+
+;; Setup for \newmdenv
+
+(TeX-auto-add-type "mdframed-newmdenv" "LaTeX")
+
+(defvar LaTeX-mdframed-newmdenv-regexp
+  `(,(concat
+      "\\\\newmdenv"
+      "[ \t\n\r%]*"
+      "\\(?:\\[[^][]*"
+        "\\(?:{[^}{]*"
+         "\\(?:{[^}{]*"
+           "\\(?:{[^}{]*}[^}{]*\\)*"
+         "}[^}{]*\\)*"
+       "}[^][]*\\)*"
+      "\\]\\)?"
+      "[ \t\n\r%]*"
+      "{\\([^}]+\\)}")
+    1 LaTeX-auto-mdframed-newmdenv)
+  "Matches the argument of \\newmdenv from mdframed package.")
+
+;; Setup for \mdfdefinestyle
+
+(TeX-auto-add-type "mdframed-mdfdefinestyle" "LaTeX")
+
+(defvar LaTeX-mdframed-mdfdefinestyle-regexp
+  '("\\\\mdfdefinestyle[ \t\n\r%]*{\\([^}]+\\)}"
+    1 LaTeX-auto-mdframed-mdfdefinestyle)
+  "Matches the argument of \\mdfdefinestyle from mdframed package.")
+
+;; Setup for \newmdtheoremenv & \mdtheorem
+
+(TeX-auto-add-type "mdframed-mdtheorem" "LaTeX")
+
+(defvar LaTeX-mdframed-mdtheorem-regexp
+  `(,(concat
+      "\\\\\\(new\\)?mdtheorem\\(?:env\\)?"
+      "[ \t\n\r%]*"
+      "\\(?:\\[[^][]*"
+        "\\(?:{[^}{]*"
+         "\\(?:{[^}{]*"
+           "\\(?:{[^}{]*}[^}{]*\\)*"
+         "}[^}{]*\\)*"
+       "}[^][]*\\)*"
+      "\\]\\)?"
+      "[ \t\n\r%]*"
+      "{\\([^}]+\\)}")
+    (2 1) LaTeX-auto-mdframed-mdtheorem)
+  "Matches the argument of \\newmdtheoremenv and \\mdtheorem from mdframed 
package.")
+
+(defun LaTeX-mdframed-update-style-key ()
+  "Update some key=values in `LaTeX-mdframed-key-val-options-local'."
+  ;; Add new "style"s to key=vals:
+  (when (LaTeX-mdframed-mdfdefinestyle-list)
+    (let* ((key (car (assoc "style" LaTeX-mdframed-key-val-options-local)))
+          (val (cadr (assoc "style" LaTeX-mdframed-key-val-options)))
+          (temp (copy-alist LaTeX-mdframed-key-val-options-local))
+          (opts (assq-delete-all (car (assoc key temp)) temp)))
+      (pushnew (list key (delete-dups
+                         (append val (mapcar #'car 
(LaTeX-mdframed-mdfdefinestyle-list)))))
+              opts :test #'equal)
+      (setq LaTeX-mdframed-key-val-options-local
+           (copy-alist opts))))
+  ;;
+  ;; Check if any color defininig package is loaded and update the
+  ;; key=values for coloring.  Prefer xcolor.sty if both packages are
+  ;; loaded.
+  (when (or (member "xcolor" (TeX-style-list))
+           (member "color" (TeX-style-list)))
+    (let* ((colorcmd (if (member "xcolor" (TeX-style-list))
+                        #'LaTeX-xcolor-definecolor-list
+                      #'LaTeX-color-definecolor-list))
+          (keys '("linecolor"
+                  "innerlinecolor"
+                  "middlelinecolor"
+                  "outerlinecolor"
+                  "backgroundcolor"
+                  "fontcolor"
+                  "shadowcolor"
+                  "frametitlebackgroundcolor"
+                  "subtitlebackgroundcolor"
+                  "subtitleabovelinecolor"
+                  "subtitlebelowlinecolor"))
+          (tmp (copy-alist LaTeX-mdframed-key-val-options-local)))
+      (dolist (x keys)
+       (assq-delete-all (car (assoc x tmp)) tmp)
+       (pushnew (list x (mapcar #'car (funcall colorcmd))) tmp :test #'equal))
+      (setq LaTeX-mdframed-key-val-options-local
+           (copy-alist tmp)))))
+
+(defun LaTeX-mdframed-auto-prepare ()
+  "Clear variables before parsing for mdframed package."
+  (setq LaTeX-auto-mdframed-newmdenv       nil
+       LaTeX-auto-mdframed-mdfdefinestyle nil
+       LaTeX-auto-mdframed-mdtheorem      nil))
+
+(defun LaTeX-mdframed-auto-cleanup ()
+  "Process parsed elements for mdframed package."
+  (dolist (env (mapcar #'car (LaTeX-mdframed-newmdenv-list)))
+    (LaTeX-add-environments
+     `(,env LaTeX-env-args [ TeX-arg-key-val 
LaTeX-mdframed-key-val-options-local ] ))
+    (TeX-ispell-skip-setcdr `((,env ispell-tex-skip-alist 0))))
+  (dolist (newenv (LaTeX-mdframed-mdtheorem-list))
+    (let ((env (car newenv))
+         (new (cadr newenv)))
+      (LaTeX-add-environments (list env (vector "Heading")))
+      (unless (and new (not (string= new "")))
+       (LaTeX-add-environments (list (concat env "*") (vector "Heading"))))))
+  (LaTeX-mdframed-update-style-key))
+
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-mdframed-auto-prepare t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-mdframed-auto-cleanup t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
+
+(TeX-add-style-hook
+ "mdframed"
+ (lambda ()
+
+   ;; Add mdframed to the parser
+   (TeX-auto-add-regexp LaTeX-mdframed-newmdenv-regexp)
+   (TeX-auto-add-regexp LaTeX-mdframed-mdfdefinestyle-regexp)
+   (TeX-auto-add-regexp LaTeX-mdframed-mdtheorem-regexp)
+
+   ;; Local version of key-val options
+   (setq LaTeX-mdframed-key-val-options-local
+        (copy-alist LaTeX-mdframed-key-val-options))
+
+   ;; 4. Commands
+   (TeX-add-symbols
+    '("mdfsetup"
+      (TeX-arg-key-val LaTeX-mdframed-key-val-options-local))
+
+    '("newmdenv"
+      [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
+      (TeX-arg-eval
+       (lambda ()
+        (let ((env (TeX-read-string
+                    (TeX-argument-prompt optional nil "Environment"))))
+          (LaTeX-add-environments
+           `(,env LaTeX-env-args [ TeX-arg-key-val 
LaTeX-mdframed-key-val-options-local ]))
+          ;; Add new env's to `ispell-tex-skip-alist': skip the optional 
argument
+          (TeX-ispell-skip-setcdr `((,env ispell-tex-skip-alist 0)))
+          (format "%s" env)))))
+
+    '("renewmdenv"
+      [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Environment")
+                   (LaTeX-mdframed-newmdenv-list)))
+
+    '("surroundwithmdframed"
+      [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
+      TeX-arg-environment)
+
+    '("mdflength"
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Length")
+                   '(("skipabove")
+                     ("skipbelow")
+                     ("leftmargin")
+                     ("rightmargin")
+                     ("innerleftmargin")
+                     ("innerrightmargin")
+                     ("innertopmargin")
+                     ("innerbottommargin")
+                     ("linewidth")
+                     ("innerlinewidth")
+                     ("middlelinewidth")
+                     ("outerlinewidth"))))
+
+    ;; 5. Defining your own style
+    '("mdfdefinestyle"
+      (TeX-arg-eval
+       (lambda ()
+        (let ((style (TeX-read-string
+                      (TeX-argument-prompt optional nil "Style name"))))
+          (LaTeX-add-mdframed-mdfdefinestyles style)
+          (LaTeX-mdframed-update-style-key)
+          (format "%s" style))))
+      (TeX-arg-key-val LaTeX-mdframed-key-val-options-local))
+
+    '("mdfapptodefinestyle"
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Style name")
+                   (LaTeX-mdframed-mdfdefinestyle-list))
+      (TeX-arg-key-val LaTeX-mdframed-key-val-options-local))
+
+    ;; 6.11. Title commands inside the environment
+    '("mdfsubtitle"
+      [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
+      "Subtitle")
+
+    ;; 8. Theorems
+    '("newmdtheoremenv"
+      [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
+      (TeX-arg-eval
+       (lambda ()
+        (let ((nthm (TeX-read-string
+                     (TeX-argument-prompt optional nil "Environment"))))
+          (LaTeX-add-environments (list nthm (vector "Heading")))
+          (format "%s" nthm))))
+      [ TeX-arg-environment "Numbered like" ]
+      t [ (TeX-arg-eval progn (if (eq (save-excursion
+                                       (backward-char 2)
+                                       (preceding-char)) ?\])
+                                 ()
+                               (TeX-arg-counter t "Within counter"))
+                       "") ])
+
+    '("mdtheorem"
+      [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
+      (TeX-arg-eval
+       (lambda ()
+        (let ((nthm (TeX-read-string
+                     (TeX-argument-prompt optional nil "Environment"))))
+          (LaTeX-add-environments (list nthm (vector "Heading"))
+                                  (list (concat nthm "*") (vector "Heading")))
+          (format "%s" nthm))))
+      [ TeX-arg-environment "Numbered like" ]
+      t [ (TeX-arg-eval progn (if (eq (save-excursion
+                                       (backward-char 2)
+                                       (preceding-char)) ?\])
+                                 ()
+                               (TeX-arg-counter t "Within counter"))
+                       "") ]))
+
+   ;; Main environment defined by mdframed.sty
+   (LaTeX-add-environments
+    '("mdframed" LaTeX-env-args
+      [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ] ))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("newmdenv"             "[{")
+                               ("renewmdenv"           "[{")
+                               ("surroundwithmdframed" "[{")
+                               ("mdfsetup"             "[{")
+                               ("mdfdefinestyle"       "{{")
+                               ("mdfapptodefinestyle"  "{{")
+                               ("newmdtheoremenv"      "[{[{[")
+                               ("mdtheorem"            "[{[{["))
+                             'function)
+     (font-latex-add-keywords '(("mdfsubtitle"          "[{"))
+                             'sectioning-5)
+     (font-latex-add-keywords '(("mdflength"            "{"))
+                             'variable)))
+ LaTeX-dialect)
+
+(defvar LaTeX-mdframed-package-options-list
+  '(("xcolor")
+    ("framemethod" ("default" "tex" "latex" "none" "0"
+                   "tikz" "pgf" "1"
+                   "pstricks" "ps" "postscript" "2"))
+    ("tikz") ("TikZ")
+    ("ps") ("pstricks") ("PSTricks"))
+  "Package options for the framed package.")
+
+(defun LaTeX-mdframed-package-options ()
+  "Prompt for package options for the mdframed package."
+  (TeX-read-key-val t LaTeX-mdframed-package-options-list))
+
+;;; mdframed.el ends here
diff --git a/style/mdsymbol.el b/style/mdsymbol.el
index b37729e..6ca690b 100644
--- a/style/mdsymbol.el
+++ b/style/mdsymbol.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-25
 ;; Keywords: tex
diff --git a/style/menukeys.el b/style/menukeys.el
index bc30a84..360cd4e 100644
--- a/style/menukeys.el
+++ b/style/menukeys.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-02-07
 ;; Keywords: tex
diff --git a/style/minted.el b/style/minted.el
index b4bc572..914ee66 100644
--- a/style/minted.el
+++ b/style/minted.el
@@ -1,4 +1,4 @@
-;;; minted.el --- AUCTeX style for `minted.sty'
+;;; minted.el --- AUCTeX style for `minted.sty' (v2.4.1)
 
 ;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
 
@@ -26,7 +26,7 @@
 
 ;;; Commentary:
 
-;; This file adds support for `minted.sty'.
+;; This file adds support for `minted.sty' (v2.4.1) from 2016/10/31.
 
 ;;; Code:
 
@@ -35,12 +35,31 @@
 (defvar LaTeX-minted-key-val-options
   '(("autogobble" ("true" "false"))
     ("baselinestretch" ("auto"))
+    ("breakafter")
+    ("breakaftergroup" ("true" "false"))
+    ("breakaftersymbolpre")
+    ("breakaftersymbolpost")
+    ("breakbytoken" ("true" "false"))
+    ("breakbytokenanywhere" ("true" "false"))
+    ("breakindent")
+    ("breaklines" ("true" "false"))
+    ("breaksymbol")
+    ("breaksymbolleft")
+    ("breaksymbolright")
+    ("breaksymbolindent")
+    ("breaksymbolindentleft")
+    ("breaksymbolindentright")
+    ("breaksymbolsep")
+    ("breaksymbolsepleft")
+    ("breaksymbolsepright")
     ("bgcolor")
     ("codetagify")
+    ("curlyquotes" ("true" "false"))
     ("encoding")
     ("outencoding")
+    ("escapeinside")
     ("firstline")
-    ("firstnumber" ("auto"))
+    ("firstnumber" ("auto" "last" "integer"))
     ("fontfamily" ("tt" "courier" "helvetica"))
     ("fontseries" ("auto"))
     ("fontsize" ("auto" "\\tiny" "\\large" "\\scriptsize" "\\Large"
@@ -53,12 +72,15 @@
     ("framesep")
     ("funcnamehighlighting" ("true" "false"))
     ("gobble")
+    ("highlightcolor")
+    ("highlightlines")
     ("keywordcase" ("lower" "upper" "capitalize"))
     ("label")
     ("labelposition" ("none" "topline" "bottomline" "all"))
     ("lastline")
     ("linenos" ("true" "false"))
-    ("numbers" ("left" "right"))
+    ("numberfirstline" ("true" "false"))
+    ("numbers" ("left" "right" "both" "none"))
     ("mathescape" ("true" "false"))
     ("numberblanklines" ("true" "false"))
     ("numbersep")
@@ -69,10 +91,27 @@
     ("samepage" ("true" "false"))
     ("showspaces" ("true" "false"))
     ("showtabs" ("true" "false"))
+    ("space")
+    ("spacecolor")
     ("startinline" ("true" "false"))
-    ("style")
+    ;; FIXME: It would be nice to use the function
+    ;; `LaTeX-minted-style-list' here, but with a file local var like:
+    ;;     %%% TeX-command-extra-options: "-shell-escape"
+    ;; in a .tex file, Emacs asks to apply a variable which is not
+    ;; safe and does not restore the frame; the splitted frame
+    ;; remains.  I couldn't figure out why, so for now, I add the
+    ;; styles from Pygments version 2.1.3 here.
+    ("style" ("colorful" "default" "emacs" "friendly" "fruity" "igor"
+             "lovelace" "manni" "monokai" "murphy" "native"
+             "paraiso-dark" "paraiso-light" "pastie" "perldoc"
+             "rrt" "tango" "trac" "vim" "vs" "xcode"))
     ("stepnumber")
+    ("stepnumberfromfirst")
+    ("stepnumberoffsetvalues" ("true" "false"))
+    ("stripall" ("true" "false"))
     ("stripnl")
+    ("tab")
+    ("tabcolor")
     ("tabsize")
     ("texcl" ("true" "false"))
     ("texcomments" ("true" "false"))
@@ -80,11 +119,18 @@
     ("xrightmargin"))
   "Key=value options for minted macros and environments.")
 
+(defvar LaTeX-minted-key-val-options-local nil
+  "Buffer-local key=value options for minted macros and environments.")
+(make-variable-buffer-local 'LaTeX-minted-key-val-options-local)
+
 (defvar LaTeX-minted-pygmentize-program (executable-find "pygmentize"))
 
-(defvar LaTeX-minted-language-list nil)
+(defvar LaTeX-minted-language-list nil
+  "List containing languages provided by pymentize program.")
 
 (defun LaTeX-minted-language-list (&rest _ignored)
+  "Return a list of languages provided by pymentize program.
+Update the variable `LaTeX-minted-language-list' if still nil."
   (or LaTeX-minted-language-list
       (when LaTeX-minted-pygmentize-program
        (with-temp-buffer
@@ -95,14 +141,67 @@
            (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t)
              (dolist (lang (split-string (match-string 1) "[[:space:],]" t))
                (push lang languages)))
-           languages)))))
+           (setq LaTeX-minted-language-list languages))
+         LaTeX-minted-language-list))))
 
 (defun LaTeX-arg-minted-language (optional &optional prompt)
+    "Insert a selected pygmentize language as argument for macros from 
minted.sty.
+If OPTIONAL is non-nil, insert it as optional argument in
+brackets.  PROMPT replaces the standard one."
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "Language")
                    (LaTeX-minted-language-list))
    optional))
 
+(defvar LaTeX-minted-style-list nil
+  "List containing styles provided by pymentize program.")
+
+(defun LaTeX-minted-style-list (&rest _ignored)
+  "Return a list of styles provided by pymentize program.
+Update the variable `LaTeX-minted-style-list' if still nil."
+  (or LaTeX-minted-style-list
+      (when LaTeX-minted-pygmentize-program
+       (with-temp-buffer
+         (shell-command (concat LaTeX-minted-pygmentize-program " -L styles")
+                        (current-buffer))
+         (goto-char (point-min))
+         (let (styles)
+           (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t)
+             (dolist (style (split-string (match-string 1) "[[:space:],]" t))
+               (push style styles)))
+           (setq LaTeX-minted-style-list styles))
+         LaTeX-minted-style-list))))
+
+(defun LaTeX-arg-minted-style (optional &optional prompt)
+  "Insert a selected pygmentize style as argument for macros from minted.sty.
+If OPTIONAL is non-nil, insert it as optional argument in
+brackets.  PROMPT replaces the standard one."
+  (TeX-argument-insert
+   (completing-read (TeX-argument-prompt optional prompt "Style")
+                   (LaTeX-minted-style-list))
+   optional))
+
+(defun LaTeX-minted-update-key-vals ()
+  "Update color related key-vals in `LaTeX-minted-key-val-options-local'.
+This function checks if one of the packages \"xcolor.sty\" or
+\"xcolor.sty\" is loaded and appends defined colors as values to
+color related key.  \"xcolor.sty\" is preferred if both packages
+are loaded."
+  (when (or (member "xcolor" (TeX-style-list))
+           (member "color" (TeX-style-list)))
+    (let* ((colorcmd (if (member "xcolor" (TeX-style-list))
+                        #'LaTeX-xcolor-definecolor-list
+                      #'LaTeX-color-definecolor-list))
+          (colorkeys '("bgcolor" "highlightcolor"
+                       "rulecolor" "spacecolor" "tabcolor"))
+          (opts (copy-alist LaTeX-minted-key-val-options-local)))
+      (dolist (key colorkeys)
+       (assq-delete-all (car (assoc key opts)) opts)
+       (push (list key (mapcar #'car (funcall colorcmd)))
+             opts))
+      (setq LaTeX-minted-key-val-options-local
+           (copy-alist opts)))))
+
 (defvar LaTeX-minted-auto-newminted nil)
 (defvar LaTeX-minted-newminted-regexp
   '("\\\\newminted\\(?:\\[\\([^]]+\\)\\]\\)?{\\([^}]+\\)}{[^}]*}"
@@ -127,7 +226,9 @@
   (setq LaTeX-minted-auto-newminted     nil
        LaTeX-minted-auto-newmint       nil
        LaTeX-minted-auto-newmintinline nil
-       LaTeX-minted-auto-newmintedfile nil))
+       LaTeX-minted-auto-newmintedfile nil
+       LaTeX-minted-language-list      nil
+       LaTeX-minted-style-list         nil))
 
 (defun LaTeX-minted-auto-cleanup ()
   ;; \newminted{lang}{opts} => new langcode and langcode* envs.
@@ -140,7 +241,7 @@
       (add-to-list 'LaTeX-auto-environment (list env))
       (add-to-list 'LaTeX-auto-environment
                   (list env* 'LaTeX-env-args
-                        '(TeX-arg-key-val LaTeX-minted-key-val-options)))
+                        '(TeX-arg-key-val LaTeX-minted-key-val-options-local)))
       (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) 
t)
       (add-to-list 'LaTeX-indent-environment-list `(,env* current-indentation) 
t)
       (add-to-list 'LaTeX-verbatim-environments-local env)
@@ -171,7 +272,9 @@
   (when (and (fboundp 'font-latex-update-font-lock)
             (eq TeX-install-font-lock 'font-latex-setup))
     ;; Refresh font-locking so that the verbatim envs take effect.
-    (font-latex-update-font-lock t)))
+    (font-latex-update-font-lock t))
+  ;; Also update the key=vals
+  (LaTeX-minted-update-key-vals))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-minted-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-minted-auto-cleanup t)
@@ -180,25 +283,63 @@
 (TeX-add-style-hook
  "minted"
  (lambda ()
+
+   ;; Activate local-version of key=vals
+   (setq LaTeX-minted-key-val-options-local
+        (copy-alist LaTeX-minted-key-val-options))
+
    ;; New symbols
    (TeX-add-symbols
     '("mint" LaTeX-arg-minted-language TeX-arg-verb)
     '("mintinline" LaTeX-arg-minted-language TeX-arg-verb)
-    '("listoflistings")
     '("newminted" ["Environment Name"] LaTeX-arg-minted-language
-      (TeX-arg-key-val LaTeX-minted-key-val-options))
+      (TeX-arg-key-val LaTeX-minted-key-val-options-local))
     '("newmint" ["Macro Name"] LaTeX-arg-minted-language
-      (TeX-arg-key-val LaTeX-minted-key-val-options))
+      (TeX-arg-key-val LaTeX-minted-key-val-options-local))
     '("newmintinline" ["Macro Name"] LaTeX-arg-minted-language
-      (TeX-arg-key-val LaTeX-minted-key-val-options))
+      (TeX-arg-key-val LaTeX-minted-key-val-options-local))
     '("newmintedfile" ["Macro Name"] LaTeX-arg-minted-language
-      (TeX-arg-key-val LaTeX-minted-key-val-options)))
+      (TeX-arg-key-val LaTeX-minted-key-val-options-local))
+    ;; 3.3 Formatting source code
+    '("inputminted"
+      [ TeX-arg-key-val LaTeX-minted-key-val-options-local ]
+      (LaTeX-arg-minted-language)
+      TeX-arg-file)
+    ;; 3.4 Using different styles
+    '("usemintedstyle"
+      [ LaTeX-arg-minted-language ] LaTeX-arg-minted-style)
+    ;; 5.2 Macro option usage
+    '("setminted"
+      [ LaTeX-arg-minted-language ]
+      (TeX-arg-key-val LaTeX-minted-key-val-options-local))
+    '("setmintedinline"
+      [ LaTeX-arg-minted-language ]
+      (TeX-arg-key-val LaTeX-minted-key-val-options-local)))
 
    ;; New environments
    (LaTeX-add-environments
-    '("minted" LaTeX-env-args [TeX-arg-key-val LaTeX-minted-key-val-options]
-      LaTeX-arg-minted-language)
-    '("listing" ["Float Position"]))
+    '("minted" LaTeX-env-args [TeX-arg-key-val 
LaTeX-minted-key-val-options-local]
+      LaTeX-arg-minted-language))
+
+   ;; 4 Floating listings: If option "newfloat" is given, run the
+   ;; style hook and use the interface provided by the style,
+   ;; otherwise add "listing" manually
+   (if (or (LaTeX-provided-package-options-member "minted" "newfloat")
+          (LaTeX-provided-package-options-member "minted" "newfloat=true"))
+       (progn
+        (TeX-run-style-hooks "newfloat")
+        (LaTeX-add-newfloat-DeclareFloatingEnvironments
+         '("listing" "verbatim")))
+     (LaTeX-add-environments '("listing" ["Float Position"]))
+     (TeX-add-symbols '("listoflistings")
+                     '("listingscaption")
+                     '("listoflistingscaption"))
+     (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
+                 '("listing" current-indentation) t)
+     (add-to-list 'LaTeX-label-alist '("listing" . "lst:") t)
+     (when (fboundp 'reftex-add-label-environments)
+       (reftex-add-label-environments
+       '(("listing" ?l "lst:" "~\\ref{%s}" caption nil nil)))))
 
    ;; Add to the auto parser
    (TeX-auto-add-regexp LaTeX-minted-newminted-regexp)
@@ -218,18 +359,30 @@
    (when (and (fboundp 'font-latex-add-keywords)
              (fboundp 'font-latex-update-font-lock)
              (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(;; FIXME: Those have the form \mint{lang}|code|
+     (font-latex-add-keywords '(("usemintedstyle"  "[{")
+                               ("setminted"       "[{")
+                               ("setmintedinline" "[{")
+                               ("newminted"       "[{{")
+                               ("newmint"         "[{{")
+                               ("newmintedinline" "[{{")
+                               ("newmintedfile"   "[{{")
+                               ;; FIXME: Those have the form \mint{lang}|code|
                                ;; so ideally the verbatim arg should be
                                ;; recognized.
                                "mint" "mintinline")
                              'function)
+     (font-latex-add-keywords '(("inputminted" "[{{"))
+                             'textual)
      ;; Tell font-lock about the update.
      (font-latex-update-font-lock t)))
  LaTeX-dialect)
 
-(defvar LaTeX-minted-package-options '("section" "chapter" "cache"
-                                      "outputdir" "cachedir"
-                                      "langlinenos")
+(defvar LaTeX-minted-package-options '("chapter"     "cache"
+                                      "cachedir"    "finalizecache"
+                                      "frozencache" "draft"
+                                      "final"       "kpsewhich"
+                                      "langlinenos" "newfloat"
+                                      "outputdir"   "section")
   "Package options for the minted package.")
 
 ;;; minted.el ends here
diff --git a/style/natbib.el b/style/natbib.el
index 2bad500..f0664fd 100644
--- a/style/natbib.el
+++ b/style/natbib.el
@@ -159,8 +159,9 @@
                              'function))
 
    ;; Tell RefTeX
-   (if (fboundp 'reftex-set-cite-format)
-       (reftex-set-cite-format 'natbib)))
+   (when (and LaTeX-reftex-cite-format-auto-activate
+             (fboundp 'reftex-set-cite-format))
+     (reftex-set-cite-format 'natbib)))
  LaTeX-dialect)
 
 (defun LaTeX-arg-natbib-notes (optional)
diff --git a/style/newfloat.el b/style/newfloat.el
index 166eff5..8ad5438 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-09-19
 ;; Keywords: tex
@@ -116,7 +116,7 @@ If `caption.el' is loaded, add the new floating environment 
to
               (reftex-add-label-environments
                `((,flt ?t ,LaTeX-table-label "~\\ref{%s}" caption nil nil)))))
            ((string-equal type "verbatim")
-            (LaTeX-add-environments flt)
+            (LaTeX-add-environments `(,flt ["Float Position"]))
             (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
                          `(,flt current-indentation) t)
             (add-to-list 'LaTeX-label-alist `(,flt . "lst:") t)
@@ -124,7 +124,7 @@ If `caption.el' is loaded, add the new floating environment 
to
               (reftex-add-label-environments
                `((,flt ?l "lst:" "~\\ref{%s}" caption nil nil)))))
            (t
-            (LaTeX-add-environments flt)))
+            (LaTeX-add-environments `(,flt ["Float Position"]))))
       (when (boundp 'LaTeX-caption-supported-float-types)
        (add-to-list (make-local-variable 'LaTeX-caption-supported-float-types)
                     flt))
diff --git a/style/newpxmath.el b/style/newpxmath.el
index c9496db..df0abab 100644
--- a/style/newpxmath.el
+++ b/style/newpxmath.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-05-02
 ;; Keywords: tex
diff --git a/style/newpxtext.el b/style/newpxtext.el
index 3bb9ab8..b571001 100644
--- a/style/newpxtext.el
+++ b/style/newpxtext.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-05-02
 ;; Keywords: tex
diff --git a/style/newtxmath.el b/style/newtxmath.el
index b0145ca..6ae898b 100644
--- a/style/newtxmath.el
+++ b/style/newtxmath.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-11-22
 ;; Keywords: tex
diff --git a/style/newtxsf.el b/style/newtxsf.el
index 979a155..236a2ad 100644
--- a/style/newtxsf.el
+++ b/style/newtxsf.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-11-22
 ;; Keywords: tex
diff --git a/style/newtxtext.el b/style/newtxtext.el
index 7fb6e76..16a860b 100644
--- a/style/newtxtext.el
+++ b/style/newtxtext.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-11-19
 ;; Keywords: tex
diff --git a/style/newtxttt.el b/style/newtxttt.el
index 74f852a..48362bc 100644
--- a/style/newtxttt.el
+++ b/style/newtxttt.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-11-22
 ;; Keywords: tex
diff --git a/style/ntheorem.el b/style/ntheorem.el
index 5ce4803..b7a4433 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-10-31
 ;; Keywords: tex
diff --git a/style/paracol.el b/style/paracol.el
index f8b5d85..6e64a4c 100644
--- a/style/paracol.el
+++ b/style/paracol.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-05-26
 ;; Keywords: tex
@@ -224,6 +224,9 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
 
     '("flushpage" 0))
 
+   ; \switchcolumn should get its own line:
+   (LaTeX-paragraph-commands-add-locally "switchcolumn")
+
    ;; Fontification
    (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
diff --git a/style/pdflscape.el b/style/pdflscape.el
index 33bb2ac..1cf6e1f 100644
--- a/style/pdflscape.el
+++ b/style/pdflscape.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2016-07-31
 ;; Keywords: tex
diff --git a/style/pdfpages.el b/style/pdfpages.el
index d034668..6e7c8c3 100644
--- a/style/pdfpages.el
+++ b/style/pdfpages.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-05-23
 ;; Keywords: tex
diff --git a/style/relsize.el b/style/relsize.el
index 20dc975..ceaabf5 100644
--- a/style/relsize.el
+++ b/style/relsize.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-12-14
 ;; Keywords: tex
diff --git a/style/splitidx.el b/style/splitidx.el
index 554c7a3..7af22f1 100644
--- a/style/splitidx.el
+++ b/style/splitidx.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-09-19
 ;; Keywords: tex
diff --git a/style/subcaption.el b/style/subcaption.el
index fc5fc63..2893041 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-09-19
 ;; Keywords: tex
diff --git a/style/subfiles.el b/style/subfiles.el
index 604e4f9..4099315 100644
--- a/style/subfiles.el
+++ b/style/subfiles.el
@@ -24,8 +24,8 @@
 ;; 02110-1301, USA.
 
 ;; Acknowledgements
-;; Mosè Giordano  <address@hidden>
-;; Arash Esbati <address@hidden>
+;; Mosè Giordano <address@hidden>
+;; Arash Esbati <address@hidden>
 
 ;;; Commentary:
 
@@ -39,18 +39,39 @@
 (TeX-add-style-hook
  "subfiles"
  (lambda ()
-   ;; The following code will fontify `\subfile{}' like  include.
-   (when (and (featurep 'font-latex)
-              (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(("subfile" "{"))
-                              'reference))
-   ;; The following code will run `TeX-run-style-hooks' on the subfile master 
file.
-   ;; Thanks to Mosè Giordano <address@hidden> for presenting a better 
solution using `assoc'.
+
+   ;; The following code will run `TeX-run-style-hooks' on the subfile
+   ;; master file.  Thanks to Mosè Giordano <address@hidden> for
+   ;; presenting a better solution using `assoc'.
    (TeX-run-style-hooks
     (file-name-base (cadr (assoc "subfiles" LaTeX-provided-class-options))))
+
    (TeX-add-symbols
-    '("subfile" TeX-arg-file)))
- LaTeX-dialect)
+    '("subfile" TeX-arg-file))
+
+   ;; Ensure that \subfile stays in one line
+   (LaTeX-paragraph-commands-add-locally "subfile")
 
+   ;; Tell AUCTeX that \subfile loads a file.  regexp is the same as
+   ;; for \input or \include.  This will run `TeX-run-style-hooks' on
+   ;; subfile(s) when master file is loaded.
+   (TeX-auto-add-regexp
+    `(,(concat
+       "\\\\subfile"
+       "{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}")
+      1 TeX-auto-file))
+
+   ;; Tell RefTeX the same thing.
+   (when (and (boundp 'reftex-include-file-commands)
+             (not (member "subfile" reftex-include-file-commands)))
+     (add-to-list 'reftex-include-file-commands "subfile" t)
+     (reftex-compile-variables))
+
+   ;; The following code will fontify `\subfile{}' like \input.
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("subfile" "{"))
+                             'reference)))
+ LaTeX-dialect)
 
 ;;; subfiles.el ends here
diff --git a/style/tcolorbox.el b/style/tcolorbox.el
index 73c8555..493565a 100644
--- a/style/tcolorbox.el
+++ b/style/tcolorbox.el
@@ -1,6 +1,6 @@
-;;; tcolorbox.el --- AUCTeX style for `tcolorbox.sty'
+;;; tcolorbox.el --- AUCTeX style for `tcolorbox.sty' (v3.96)
 
-;; Copyright (C) 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
 ;; Author: Tassilo Horn <address@hidden>
 ;; Maintainer: address@hidden
@@ -26,13 +26,30 @@
 
 ;;; Commentary:
 
-;; This file adds support for `tcolorbox.sty'.
+;; This file adds support for `tcolorbox.sty' (v3.96) from 2016/11/18.
+
+;; This style file adds support for core macros and environments and
+;; their options provided by `tcolorbox.sty'.  Macros and environments
+;; provided by libraries should go in their own style files where the
+;; file is prefixed with `tcolorboxlib-',
+;; e.g. `tcolorboxlib-raster.el'.
+
+;; Libraries should also append their key=val option to variable
+;; `LaTeX-tcolorbox-keyval-options-full'.  This variable is called
+;; with macro `\tcbset'.
 
 ;;; Code:
 
-;; TODO: There are tons of more options...
+;; Needed for compiling `pushnew':
+(eval-when-compile (require 'cl))
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+;; FIXME: Anything missing?
 (defvar LaTeX-tcolorbox-keyval-options
-  '(("title")
+  '(;; 4.1 Title
+    ("title")
     ("notitle")
     ("adjusted title")
     ("adjust text")
@@ -41,13 +58,19 @@
     ("detach title")
     ("attach title")
     ("attach title to upper")
+    ;; 4.2 Subtitle
+    ("subtitle style")
+    ;; 4.3 Upper Part
     ("upperbox" ("visible" "invisible"))
     ("visible")
     ("invisible")
+    ("saveto")
+    ;; 4.4 Lower Part
     ("lowerbox" ("visible" "invisible" "ignored"))
     ("savelowerto")
     ("lower separated" ("true" "false"))
     ("savedelimiter")
+    ;; 4.5 Colors and Fonts
     ("colframe")
     ("colback")
     ("title filled" ("true" "false"))
@@ -56,27 +79,612 @@
     ("collower")
     ("coltext")
     ("coltitle")
-    ("fontupper")
-    ("fontlower")
-    ("fonttitle")
+    ("fontupper" ("\\rmfamily" "\\sffamily" "\\ttfamily" "\\mdseries" 
"\\bfseries"
+                 "\\upshape" "\\itshape" "\\slshape" "\\scshape"
+                 "\\tiny"  "\\scriptsize" "\\footnotesize"
+                 "\\small" "\\normalsize" "\\large"
+                 "\\Large" "\\LARGE" "\\huge" "\\Huge" "\\normalfont"))
+    ("fontlower" ("\\rmfamily" "\\sffamily" "\\ttfamily" "\\mdseries" 
"\\bfseries"
+                 "\\upshape" "\\itshape" "\\slshape" "\\scshape"
+                 "\\tiny"  "\\scriptsize" "\\footnotesize"
+                 "\\small" "\\normalsize" "\\large"
+                 "\\Large" "\\LARGE" "\\huge" "\\Huge" "\\normalfont"))
+    ("fonttitle" ("\\rmfamily" "\\sffamily" "\\ttfamily" "\\mdseries" 
"\\bfseries"
+                 "\\upshape" "\\itshape" "\\slshape" "\\scshape"
+                 "\\tiny"  "\\scriptsize" "\\footnotesize"
+                 "\\small" "\\normalsize" "\\large"
+                 "\\Large" "\\LARGE" "\\huge" "\\Huge" "\\normalfont"))
+    ;; 4.6 Text Alignment
+    ("halign" ("justify" "left" "flush left" "right"
+              "flush right" "center" "flush center"))
+    ("halign lower" ("justify" "left" "flush left" "right"
+                    "flush right" "center" "flush center"))
+    ("halign title" ("justify" "left" "flush left" "right"
+                    "flush right" "center" "flush center"))
+    ("flushleft upper")
+    ("center upper")
+    ("flushright upper")
+    ("flushleft lower")
+    ("center lower")
+    ("flushright lower")
+    ("flushleft title")
+    ("center title")
+    ("flushright title")
+    ("valign" ("top" "center" "bottom" "scale" "scale*"))
+    ("valign upper" ("top" "center" "bottom" "scale" "scale*"))
+    ("valign lower" ("top" "center" "bottom" "scale" "scale*"))
+    ("valign scale limit")
+    ;; 4.7 Geometry:
+    ;; 4.7.1 Width
     ("width")
+    ("text width")
+    ("add to width")
+    ;; 4.7.2 Rules
+    ("toprule")
+    ("bottomrule")
+    ("leftrule")
+    ("rightrule")
+    ("titlerule")
+    ("boxrule")
+    ;; 4.7.3 Arcs
+    ("arc")
+    ("circular arc")
+    ("bean arc")
+    ("octogon arc")
+    ("arc is angular")
+    ("arc is curved")
+    ("outer arc")
+    ("auto outer arc")
+    ;; 4.7.4 Spacing
+    ("boxsep")
+    ("left")
+    ("lefttitle")
+    ("leftupper")
+    ("leftlower")
+    ("right")
+    ("righttitle")
+    ("rightupper")
+    ("rightlower")
+    ("top")
+    ("toptitle")
+    ("bottom")
+    ("bottomtitle")
+    ("middle")
+    ;; 4.7.5 Size Shortcuts
+    ("size" ("normal" "title" "small" "fbox" "tight" "minimal"))
+    ("oversize")
+    ("toggle left and right" ("none" "forced" "evenpage"))
+    ;; 4.8 Corners
+    ("sharp corners" ("northwest" "northeast" "southwest" "southeast"
+                     "north" "south" "east" "west" "downhill" "uphill" "all"))
+    ("rounded corners" ("northwest" "northeast" "southwest" "southeast"
+                       "north" "south" "east" "west" "downhill" "uphill" 
"all"))
+    ("sharpish corners")
+    ;; 4.9 Transparency
+    ("opacityframe")
+    ("opacityback")
+    ("opacitybacktitle")
+    ("opacityfill")
+    ("opacityupper")
+    ("opacitylower")
+    ("opacitytext")
+    ("opacitytitle")
+    ;; 4.10 Height Control
+    ("natural height")
     ("height")
+    ("height plus")
+    ("height from")
+    ("text height")
+    ("add to height")
+    ("add to natural height")
+    ("height fill" ("true" "false" "maximum"))
+    ("square")
+    ("space")
+    ("space to upper")
+    ("space to lower")
+    ("space to both")
+    ("space to")
+    ("split")
+    ("equal height group")
+    ("minimum for equal height group")
+    ("minimum for current equal height group")
+    ("use height from group")
+    ;; 4.11 Box Content Additions
+    ("before title")
+    ("after title")
+    ("before upper")
+    ("after upper")
+    ("after upper*")
+    ("before lower")
+    ("after lower")
+    ("after lower*")
+    ("text fill")
+    ("tabularx")
+    ("tabularx*")
+    ("tikz upper")
+    ("tikz lower")
+    ("tikznode upper")
+    ("tikznode lower")
+    ("tikznode")
+    ("varwidth upper")
+    ;; 4.12 Overlays
+    ("overlay")
+    ("no overlay")
+    ("overlay broken")
+    ("overlay unbroken")
+    ("overlay first")
+    ("overlay middle")
+    ("overlay last")
+    ("overlay unbroken and first")
+    ("overlay middle and last")
+    ("overlay unbroken and last")
+    ("overlay first and middle")
+    ;; 4.13 Floating Objects
+    ("floatplacement" ("htbp" "t" "b" "h" "p"))
+    ("float" ("htbp" "t" "b" "h" "p"))
+    ("float*" ("htbp" "t" "b" "h" "p"))
+    ("nofloat")
+    ("every float" ("\\centering" "\\raggedleft" "\\raggedright"))
+    ;; 4.14 Embedding into the Surroundings
+    ("before")
     ("after")
-    ("before")))
+    ("parskip")
+    ("noparskip")
+    ("autoparskip")
+    ("nobeforeafter")
+    ("forces nobeforeafter")
+    ("baseline")
+    ("box align" ("bottom" "top" "center" "base"  ))
+    ("before skip")
+    ("after skip")
+    ("beforeafter skip")
+    ("left skip")
+    ("right skip")
+    ("leftright skip")
+    ("ignore nobreak" ("true" "false"))
+    ("before nobreak")
+    ;; 4.15 Bounding Box
+    ("enlarge top initially by")
+    ("enlarge bottom finally by")
+    ("enlarge top at break by")
+    ("enlarge bottom at break by")
+    ("enlarge top by")
+    ("enlarge bottom by")
+    ("enlarge left by")
+    ("enlarge right by")
+    ("enlarge by")
+    ("flush left")
+    ("flush right")
+    ("center")
+    ("grow to left by")
+    ("grow to right by")
+    ("toggle enlargement" ("none" "forced" "evenpage"))
+    ("shrink tight")
+    ("extrude left by")
+    ("extrude right by")
+    ("extrude top by")
+    ("extrude bottom by")
+    ("extrude by")
+    ;; 4.16 Layered Boxes and Every Box Settings
+    ("every box")
+    ("every box on layer 1")
+    ("every box on layer 2")
+    ("every box on layer 3")
+    ("every box on layer 4")
+    ("every box on higher layers")
+    ;; 4.17 Capture Mode
+    ("capture" ("minipage" "hbox" "fitbox"))
+    ("hbox")
+    ("minipage")
+    ;; 4.18 Text Characteristics
+    ("parbox" ("true" "false"))
+    ("hyphenationfix" ("true" "false"))
+    ;; 4.19 Files
+    ("tempfile")
+    ;; 4.21 Counters, Labels, and References
+    ("phantom")
+    ("nophantom")
+    ("label")
+    ("phantomlabel")
+    ;; FIXME: Are these types documented somewhere in cleveref.pdf?
+    ("label type")
+    ("no label type")
+    ("step")
+    ("step and label")
+    ("list entry")
+    ("list text")
+    ("add to list")
+    ("nameref")
+    ;; 4.22 Even and Odd Pages
+    ("check odd page" ("true" "false"))
+    ("if odd page")
+    ("if odd page or oneside")
+    ;; FIXME: This one should be added w/ `breakable' lib:
+    ;; ("if odd page*")
+    ;; 4.24 Miscellaneous
+    ("reset")
+    ("only")
+    ("code")
+    ("void")
+    ;; 6 Side by Side
+    ("sidebyside" ("true" "false"))
+    ("sidebyside align" ("center" "top" "bottom" "center seam"
+                        "top seam" "bottom seam"))
+    ("sidebyside gap")
+    ("lefthand width")
+    ("righthand width")
+    ("lefthand ratio")
+    ("righthand ratio")
+    ;; 8 Recording options
+    ("record")
+    ("no recording"))
+  "Key=value options for tcolorbox macros and environments.")
+
+(defvar LaTeX-tcolorbox-keyval-options-local nil
+   "Buffer-local key=value options for tcolorbox macros and environments.")
+(make-variable-buffer-local 'LaTeX-tcolorbox-keyval-options-local)
+
+(defvar LaTeX-tcolorbox-keyval-options-full nil
+  "Key=value options of tcolorbox core and all loaded libraries.")
+(make-variable-buffer-local 'LaTeX-tcolorbox-keyval-options-full)
+
+(defvar LaTeX-tcolorbox-tcbox-options
+  '(;; 4.20 \tcbox Specials
+    ("tcbox raise")
+    ("tcbox raise base")
+    ("on line")
+    ("tcbox width" ("auto" "auto limited" "forced center"
+                   "forced left" "forced right" "minimum center"
+                   "minimum left" "minimum right")))
+  "Key=value options only for \\tcbox and \\tcboxmath from tcolorbox.sty.")
+
+(defvar LaTeX-tcolorbox-init-options
+  '(;; 5 Initialization Option Keys
+    ;; 5.1 Numbered Boxes
+    ("auto counter")
+    ("use counter from")
+    ("use counter")
+    ("use counter*")
+    ("no counter")
+    ("number within" ("part" "chapter" "section" "subsection"))
+    ("number format" ("\\arabic" "\\roman" "\\Roman" "\\Alph" "\\alph"))
+    ("number freestyle")
+    ("crefname")
+    ("Crefname")
+    ("blend into" ("figures" "tables" "listings"))
+    ("blend before title" ("colon" "dash" "colon hang" "dash hang"))
+    ("blend before title code")
+    ;; 5.2 Lists of tcolorboxes
+    ("list inside")
+    ("list type"))
+  "Initialization key=value options for tcolorbox macros.")
+
+(defvar LaTeX-tcolorbox-library-list
+  '("skins"
+    "vignette"
+    "raster"
+    "listings"
+    "listingsutf8"
+    "minted"
+    "theorems"
+    "breakable"
+    "magazine"
+    "fitting"
+    "hooks"
+    "xparse"
+    "external"
+    "documentation"
+    "many" "most" "all")
+  "List with libraries provided by tcolorbox package.")
+
+;; Setup for \newtcolorbox:
+(TeX-auto-add-type "tcolorbox-newtcolorbox" "LaTeX" "tcolorbox-newtcolorboxes")
+
+(defvar LaTeX-tcolorbox-newtcolorbox-regexp
+  `(,(concat "\\\\\\(re\\)?newtcolorbox"
+            "[ \t\n\r%]*"
+            "\\(?:\\[[^][]*"
+              "\\(?:{[^}{]*"
+                "\\(?:{[^}{]*"
+                  "\\(?:{[^}{]*}[^}{]*\\)*"
+                "}[^}{]*\\)*"
+              "}[^][]*\\)*"
+            "\\]\\)?"
+            "[ \t\n\r%]*"
+            "{\\([a-zA-Z0-9]+\\)}"
+            "[ \t\n\r%]*"
+            "\\(?:\\[\\([0-9]*\\)\\]\\)?"
+            "[ \t\n\r%]*"
+            "\\(\\[\\)?")
+    (2 3 4 1) LaTeX-auto-tcolorbox-newtcolorbox)
+  "Matches the arguments of \\newtcolorbox from tcolorbox package.")
+
+;; Setup for \newtcbox:
+(TeX-auto-add-type "tcolorbox-newtcbox" "LaTeX" "tcolorbox-newtcboxes")
+
+(defvar LaTeX-tcolorbox-newtcbox-regexp
+  `(,(concat "\\\\\\(re\\)?newtcbox"
+            "[ \t\n\r%]*"
+            "\\(?:\\[[^][]*"
+              "\\(?:{[^}{]*"
+                "\\(?:{[^}{]*"
+                  "\\(?:{[^}{]*}[^}{]*\\)*"
+                "}[^}{]*\\)*"
+              "}[^][]*\\)*"
+            "\\]\\)?"
+            "[ \t\n\r%]*"
+            "{\\\\\\([a-zA-Z]+\\)}"
+            "[ \t\n\r%]*"
+            "\\(?:\\[\\([0-9]*\\)\\]\\)?"
+            "[ \t\n\r%]*"
+            "\\(\\[\\)?")
+    (2 3 4 1) LaTeX-auto-tcolorbox-newtcbox)
+  "Matches the arguments of \\newtcbox from tcolorbox package.")
+
+;; Setup for \tcbuselibrary:
+(TeX-auto-add-type "tcolorbox-tcbuselibrary" "LaTeX" "tcbuselibraries")
+
+(defvar LaTeX-tcolorbox-tcbuselibrary-regexp
+  '("\\\\tcbuselibrary{\\([^}]+\\)}"
+    1 LaTeX-auto-tcolorbox-tcbuselibrary)
+  "Matches the arguments of \\tcbuselibrary from tcolorbox package.")
+
+(defun LaTeX-tcolorbox-load-used-libraries ()
+  "Check which tcolorbox libraries are loaded and run respective style hooks.
+This functions checks the arguments of \\tcbuselibrary and the
+name of libraries given in the optional argument of \\usepackage
+call for tcolorbox and runs the style hook for them.  The file
+for style must have the prefix \"tcolorboxlib-\" in the name,
+e.g. \"tcolorboxlib-raster.el\"."
+  (when (LaTeX-tcolorbox-tcbuselibrary-list)
+    (let (libs)
+      (dolist (x (LaTeX-tcolorbox-tcbuselibrary-list))
+       (push (replace-regexp-in-string "[ %\n\r\t]" "" (car x)) libs))
+      (setq libs (mapconcat #'identity libs ","))
+      (dolist (x (split-string libs "," t))
+       (TeX-run-style-hooks (concat "tcolorboxlib-" x)))))
+  (when (assoc "tcolorbox" LaTeX-provided-package-options)
+    (let ((opts (cdr (assoc "tcolorbox" LaTeX-provided-package-options))))
+      (dolist (x opts)
+       (when (member x LaTeX-tcolorbox-library-list)
+         (TeX-run-style-hooks (concat "tcolorboxlib-" x)))))))
+
+(defun LaTeX-tcolorbox-update-style-key ()
+  "Update some key=values in `LaTeX-tcolorbox-keyval-options-local'."
+  ;; Update the key=values for coloring.
+  (let* ((keys '("colframe"
+                "colback"
+                "colbacktitle"
+                "colupper"
+                "collower"
+                "coltext"
+                "coltitle"))
+        (tmp (copy-alist LaTeX-tcolorbox-keyval-options-local)))
+    (dolist (key keys)
+      (assq-delete-all (car (assoc key tmp)) tmp)
+      (pushnew
+       (list key (mapcar #'car (LaTeX-xcolor-definecolor-list))) tmp :test 
#'equal))
+    (setq LaTeX-tcolorbox-keyval-options-local (copy-alist tmp)))
+  (setq LaTeX-tcolorbox-keyval-options-full
+       (copy-alist LaTeX-tcolorbox-keyval-options-local)))
+
+(defun LaTeX-tcolorbox-auto-prepare ()
+  "Clear various LaTeX-tcolorbox-* variables before parsing."
+  (setq LaTeX-auto-tcolorbox-newtcolorbox  nil
+       LaTeX-auto-tcolorbox-newtcbox      nil
+       LaTeX-auto-tcolorbox-tcbuselibrary nil))
+
+(defun LaTeX-tcolorbox-auto-cleanup ()
+  "Process parsed results."
+  ;; Process new env's from \newtcolorbox
+  (dolist (newtcbox (apply #'append LaTeX-tcolorbox-newtcolorbox-list))
+    (let ((box (nth 0 newtcbox))
+         (arg (nth 1 newtcbox))
+         (opt (nth 2 newtcbox))
+         (renew (when (string= (nth 3 newtcbox) "re")
+                  (nth 3 newtcbox))))
+      ;; When renew'ing, delete any entry from
+      ;; `LaTeX-environment-list' first:
+      (when renew
+       (setq LaTeX-environment-list
+             (assq-delete-all
+              (car (assoc box (LaTeX-environment-list)))
+              LaTeX-environment-list)))
+      (cond (;; opt. 1st argument and mandatory argument(s)
+            (and arg (not (string= arg ""))
+                 opt (not (string= opt  "")))
+            (LaTeX-add-environments
+             (list box
+                   'LaTeX-env-args
+                   (vector 'TeX-arg-key-val 
'LaTeX-tcolorbox-keyval-options-local)
+                   (1- (string-to-number arg)))))
+           (;; mandatory argument(s) only
+            (and arg (not (string= arg ""))
+                 (string-equal opt ""))
+            (LaTeX-add-environments
+             (list box (string-to-number arg))))
+           (t ; No args
+            (LaTeX-add-environments (list box))))))
+  ;;
+  ;; Process new macros from \newtcbox
+  (dolist (newtcbox (apply #'append LaTeX-tcolorbox-newtcbox-list))
+    (let ((box (nth 0 newtcbox))
+         (arg (nth 1 newtcbox))
+         (opt (nth 2 newtcbox))
+         (renew (when (string= (nth 3 newtcbox) "re")
+                  (nth 3 newtcbox))))
+      ;; When renew'ing, delete any entry from `TeX-symbol-list'
+      ;; first:
+      (when renew
+       (setq TeX-symbol-list
+             (assq-delete-all
+              (car (assoc box (TeX-symbol-list)))
+              TeX-symbol-list)))
+      (cond (;; opt. 1st argument and mandatory argument(s)
+            (and arg (not (string= arg ""))
+                 opt (not (string= opt  "")))
+            (TeX-add-symbols (list box
+                              (vector 'TeX-arg-key-val 
'LaTeX-tcolorbox-keyval-options-local)
+                              (1- (string-to-number arg)))))
+           (;; mandatory argument(s) only
+            (and arg (not (string= arg ""))
+                 (string-equal opt ""))
+            (TeX-add-symbols (list box (string-to-number arg))))
+           (t ; No args -- in pratice, this will probably never happen
+            (TeX-add-symbols (list box))))))
+  ;;
+  ;; Update key=vals
+  (LaTeX-tcolorbox-update-style-key)
+  ;;
+  ;; Load style hooks for libraries, if any.
+  (LaTeX-tcolorbox-load-used-libraries))
+
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-tcolorbox-auto-prepare t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-tcolorbox-auto-cleanup t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (TeX-add-style-hook
  "tcolorbox"
  (lambda ()
-   ;; TODO: There are many more macros
+
+   ;; Activate the buffer-local version of key-vals.
+   (setq LaTeX-tcolorbox-keyval-options-local
+        (copy-alist LaTeX-tcolorbox-keyval-options))
+
+   ;; Collect key=val's from libraries in
+   ;; `LaTeX-tcolorbox-keyval-options-full'; \tcbset needs this:
+   (setq LaTeX-tcolorbox-keyval-options-full
+        (copy-alist LaTeX-tcolorbox-keyval-options-local))
+
+   ;; Add tcolorbox to the parser.
+   (TeX-auto-add-regexp LaTeX-tcolorbox-newtcolorbox-regexp)
+   (TeX-auto-add-regexp LaTeX-tcolorbox-newtcbox-regexp)
+   (TeX-auto-add-regexp LaTeX-tcolorbox-tcbuselibrary-regexp)
+
+   ;; We just run the style hook for `xcolor' which is loaded by pgf.sty
+   (TeX-run-style-hooks "xcolor")
+
+   ;; FIXME: Anything missing?
    (TeX-add-symbols
-    "tcblower"
+
+    ;; 1.3 Libraries
+    '("tcbuselibrary"
+      (TeX-arg-eval mapconcat #'identity
+                   (TeX-completing-read-multiple
+                    (TeX-argument-prompt optional nil "Libraries")
+                    LaTeX-tcolorbox-library-list) ","))
+
+    ;; 3 Macros for Box Creation
+    '("tcblower" 0)
+
     '("tcbset"
-      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options))
+      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options-full))
+
     '("tcbsetforeverylayer"
-      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options)))
+      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local))
+
+    '("tcbox"
+      [ TeX-arg-eval TeX-read-key-val optional
+                    (append
+                     LaTeX-tcolorbox-tcbox-options
+                     LaTeX-tcolorbox-keyval-options-local) ]
+      t)
+
+    '("newtcolorbox"
+      [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
+      "Name"
+      [ TeX-arg-define-macro-arguments ]
+      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local))
+
+    '("renewtcolorbox"
+      [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Color box")
+                   (LaTeX-tcolorbox-newtcolorbox-list))
+      [ TeX-arg-define-macro-arguments ]
+      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local))
+
+    '("newtcbox"
+      [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
+      TeX-arg-macro
+      [ TeX-arg-define-macro-arguments ]
+      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local))
+
+    '("renewtcbox"
+      [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
+      (TeX-arg-eval
+       (lambda ()
+        (let ((macro (completing-read
+                      (TeX-argument-prompt optional nil "Macro: \\" t)
+                      (LaTeX-tcolorbox-newtcbox-list))))
+          (concat TeX-esc macro))))
+      [ TeX-arg-define-macro-arguments ]
+      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local))
+
+    '("tcolorboxenvironment"
+      TeX-arg-environment
+      (TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local))
+
+    ;; 4.16 Layered Boxes and Every Box Settings
+    '("tcbsetmanagedlayer" "Number")
+
+    ;; 4.22 Even and Odd Pages
+    '("tcbifoddpage" 2)
+    '("tcbifoddpageoroneside" 2)
+    '("thetcolorboxnumber" 0)
+    '("thetcolorboxpage" 0)
+
+    ;; 5.2 Lists of tcolorboxes
+    '("tcblistof"
+      [ TeX-arg-eval completing-read
+                    (TeX-argument-prompt optional nil "Macro")
+                    (if (< (LaTeX-largest-level) 2)
+                        '("\\chapter" "\\section" "\\subsection" 
"\\subsubsection")
+                      '("\\section" "\\subsection" "\\subsubsection")) ]
+      2)
+
+    ;; 7 Saving and Loading of Verbatim Texts
+    '("tcbusetemp")
+
+    ;; 8 Recording
+    '("tcbstartrecording" [ "File name" ])
+    '("tcbstoprecording")
+    '("tcbrecord" t)
+    '("tcbinputrecords" [ TeX-arg-file ]) ) ; Terminate TeX-add-symbols
+
    (LaTeX-add-environments
+    ;; 3 Macros for Box Creation: Main env
     '("tcolorbox" LaTeX-env-args
-      [TeX-arg-key-val LaTeX-tcolorbox-keyval-options])))
+      [ TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local ])
+
+    ;; 7 Saving and Loading of Verbatim Texts
+    '("tcbverbatimwrite" "File name")
+    '("tcbwritetemp"))
+
+   ;; Do not indent text in verbatim environments:
+   (make-local-variable 'LaTeX-indent-environment-list)
+   (add-to-list 'LaTeX-indent-environment-list
+               '("tcbverbatimwrite" current-indentation) t)
+   (add-to-list 'LaTeX-indent-environment-list
+               '("tcbwritetemp" current-indentation) t)
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("tcbuselibrary"        "{")
+                               ("tcbset"               "{")
+                               ("tcbsetforeverylayer"  "{")
+                               ("tcbox"                "[{")
+                               ("newtcolorbox"         "[{[[{")
+                               ("renewtcolorbox"       "[{[[{")
+                               ("newtcbox"             "[{[[{")
+                               ("renewtcbox"           "[{[[{")
+                               ("tcolorboxenvironment" "{{")
+                               ("tcbsetmanagedlayer"   "{"))
+                             'function)))
  LaTeX-dialect)
 
+(defvar LaTeX-tcolorbox-package-options LaTeX-tcolorbox-library-list
+  "Package options for the tcolorbox package.")
+
 ;;; tcolorbox.el ends here
diff --git a/style/tcolorboxlib-raster.el b/style/tcolorboxlib-raster.el
new file mode 100644
index 0000000..2bf33ee
--- /dev/null
+++ b/style/tcolorboxlib-raster.el
@@ -0,0 +1,192 @@
+;;; tcolorboxlib-raster.el --- AUCTeX style for `raster' library from tcolorbox
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; 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 `raster' library from tcolorbox.sty.
+
+;;; Code:
+
+(defvar LaTeX-tcolorbox-lib-raster-keyval-options
+  '(;; 14.3 Option Keys of the Library
+    ("raster columns")
+    ("raster rows")
+    ("raster width")
+    ("raster height")
+    ("raster before skip")
+    ("raster after skip")
+    ("raster equal skip")
+    ("raster left skip")
+    ("raster right skip")
+    ("raster column skip")
+    ("raster row skip")
+    ("raster halign" ("left" "center" "right"))
+    ("raster valign" ("top" "center" "bottom"))
+    ("raster equal height" ("noe" "rows" "all"))
+    ("raster equal height group")
+    ("raster force size" ("true" "false"))
+    ("raster reset")
+    ;; 14.4 Adding Styles for Specific Boxes
+    ("raster every box")
+    ("raster odd column")
+    ("raster even column")
+    ("raster column 1")
+    ("raster column 2")
+    ("raster column 3")
+    ("raster column 4")
+    ("raster odd row")
+    ("raster even row")
+    ("raster row 1")
+    ("raster row 2")
+    ("raster row 3")
+    ("raster row 4")
+    ("raster odd number")
+    ("raster even number")
+    ;; raster row m column n is left to user
+    ("raster number 1")
+    ("raster number 2")
+    ("raster number 3")
+    ("raster number 4")
+    ;; 14.5 Combining Columns or Rows
+    ("raster multicolumn")
+    ("raster multirow"))
+  "Key=value options for raster library from tcolorbox.")
+
+(defun LaTeX-tcolorbox-lib-raster-env-item (environment)
+  "Insert ENVIRONMENT, ask for arguments and the first item."
+  (LaTeX-insert-environment
+   environment
+   (let ((opts (TeX-read-key-val t (append
+                                   LaTeX-tcolorbox-lib-raster-keyval-options
+                                   LaTeX-tcolorbox-keyval-options-local)
+                                (when (string= environment "tcboxeditemize")
+                                  "Raster options (k=v)")))
+        (box-opts (when (string= environment "tcboxeditemize")
+                    (TeX-read-key-val nil LaTeX-tcolorbox-keyval-options-local
+                                      "Box options (k=v)"))))
+     (concat
+      (when (and opts (not (string= opts "")))
+       (format "[%s]" opts))
+      (when (string= environment "tcboxeditemize")
+       (format "{%s}" box-opts)))))
+  (if (TeX-active-mark)
+      (progn
+       (LaTeX-find-matching-begin)
+       (end-of-line 1))
+    (end-of-line 0))
+  (delete-char 1)
+  (when (looking-at (concat "^[ \t]+$\\|"
+                           "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
+    (delete-region (point) (line-end-position)))
+  (delete-horizontal-space)
+  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
+  ;; from swapping point and mark and the \item ending up right after
+  ;; \begin{...}.
+  (TeX-deactivate-mark)
+  (LaTeX-insert-item)
+  ;; The inserted \item may have outdented the first line to the
+  ;; right.  Fill it, if appropriate.
+  (when (and (not (looking-at "$"))
+            (not (assoc environment LaTeX-indent-environment-list))
+            (> (- (line-end-position) (line-beginning-position))
+               (current-fill-column)))
+    (LaTeX-fill-paragraph nil)))
+
+(defun LaTeX-tcolorbox-lib-raster-insert-item ()
+  "Insert \"tcbitem\" and query for optional argument."
+  (TeX-insert-macro "tcbitem"))
+
+(TeX-add-style-hook
+ "tcolorboxlib-raster"
+ (lambda ()
+
+   ;; Append key-vals from library to `LaTeX-tcolorbox-keyval-options-full':
+   (setq LaTeX-tcolorbox-keyval-options-full
+        (append LaTeX-tcolorbox-lib-raster-keyval-options
+                LaTeX-tcolorbox-keyval-options-full))
+
+   (TeX-add-symbols
+    ;; 14.2 Macros of the Library
+    '("tcbitem"
+      [ TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local "Item options 
(k=v)" ]
+      (TeX-arg-literal " ")))
+
+   (LaTeX-add-environments
+    ;; 14.2 Macros of the Library
+    '("tcbraster"
+      (lambda (env)
+       (LaTeX-insert-environment
+        env
+        (let ((raster-opts
+               (TeX-read-key-val t (append
+                                    LaTeX-tcolorbox-lib-raster-keyval-options
+                                    LaTeX-tcolorbox-keyval-options-local))))
+          (when (and raster-opts (not (string= raster-opts "")))
+            (concat LaTeX-optop raster-opts LaTeX-optcl))))))
+
+    '("tcbitemize" LaTeX-tcolorbox-lib-raster-env-item)
+
+    '("tcboxedraster"
+      (lambda (env)
+       (LaTeX-insert-environment
+        env
+        (let ((raster-opts
+               (TeX-read-key-val t (append
+                                    LaTeX-tcolorbox-lib-raster-keyval-options
+                                    LaTeX-tcolorbox-keyval-options-local)
+                                 "Raster options (k=v)"))
+              (box-opts
+               (TeX-read-key-val nil LaTeX-tcolorbox-keyval-options-local
+                                 "Box options (k=v)")))
+          (concat
+           (when (and raster-opts (not (string= raster-opts "")))
+             (concat LaTeX-optop raster-opts LaTeX-optcl))
+           TeX-grop box-opts TeX-grcl)))))
+
+    '("tcboxeditemize" LaTeX-tcolorbox-lib-raster-env-item))
+
+   ;; Append tcb(oxed)?itemize to `LaTeX-item-list':
+   (add-to-list 'LaTeX-item-list
+               '("tcbitemize" . LaTeX-tcolorbox-lib-raster-insert-item) t)
+   (add-to-list 'LaTeX-item-list
+               '("tcboxeditemize" . LaTeX-tcolorbox-lib-raster-insert-item) t)
+
+   ;; Append tcbitem to `LaTeX-item-regexp':
+   (unless (string-match "tcbitem" LaTeX-item-regexp)
+     (set (make-local-variable 'LaTeX-item-regexp)
+         (concat
+          LaTeX-item-regexp
+          "\\|"
+          "tcbitem\\b"))
+     (LaTeX-set-paragraph-start))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("tcbitem" "["))
+                             'textual)))
+ LaTeX-dialect)
+
+;;; tcolorboxlib-raster.el ends here
diff --git a/style/textcomp.el b/style/textcomp.el
index 7f9a441..8a6df9b 100644
--- a/style/textcomp.el
+++ b/style/textcomp.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-25
 ;; Keywords: tex
diff --git a/style/textpos.el b/style/textpos.el
index e8a31e6..437ca5a 100644
--- a/style/textpos.el
+++ b/style/textpos.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-07-04
 ;; Keywords: tex
diff --git a/style/theorem.el b/style/theorem.el
index 49e55e6..f6ce86d 100644
--- a/style/theorem.el
+++ b/style/theorem.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-10-31
 ;; Keywords: tex
diff --git a/style/titleps.el b/style/titleps.el
new file mode 100644
index 0000000..19a3d92
--- /dev/null
+++ b/style/titleps.el
@@ -0,0 +1,233 @@
+;;; titleps.el --- AUCTeX style for `titleps.sty' (v1.1.1)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2016-06-22
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `titleps.sty' (v1.1.1) from 2016/03/15.
+;; `titleps.sty' is part of TeXLive.
+
+;;; Code:
+
+(defvar LaTeX-titleps-section-command-list
+  '("part"
+    "chapter"
+    "section"
+    "subsection"
+    "subsubsection"
+    "paragraph"
+    "subparagraph")
+  "List of sectioning commands available in \"titleps.sty\".")
+
+(defun LaTeX-titleps-section-command-list ()
+  "Remove \"chapter\" from variable
+`LaTeX-titleps-section-command-list' and return the remainder.
+Removal is based on the return value of function
+`LaTeX-largest-level'."
+  (if (< (LaTeX-largest-level) 2)
+      (symbol-value 'LaTeX-titleps-section-command-list)
+    (remove "chapter" LaTeX-titleps-section-command-list)))
+
+(defvar LaTeX-titleps-newpagestyle-regexp
+  '("\\\\newpagestyle[ \t\n\r%]*{\\([^}]+\\)}" 1 LaTeX-auto-pagestyle)
+  "Match the argument of \"\\newpagestyle\" from titleps.sty.")
+
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
+
+(TeX-add-style-hook
+ "titleps"
+ (lambda ()
+
+   ;; Add titleps to the parser.
+   (TeX-auto-add-regexp LaTeX-titleps-newpagestyle-regexp)
+
+   ;; Add \<section>title's
+   (dolist (sec (LaTeX-titleps-section-command-list))
+     (TeX-add-symbols `(,(concat sec "title") 0)))
+
+   (TeX-add-symbols
+   ;; 2. Defining Page Styles
+    '("newpagestyle"
+      (TeX-arg-eval
+       (lambda ()
+        (let ((ps (TeX-read-string
+                   (TeX-argument-prompt optional nil "Page style"))))
+          (LaTeX-add-pagestyles ps)
+          (format "%s" ps))))
+      (TeX-arg-conditional (y-or-n-p "With optional global style? ")
+                          ( [ t ] nil)
+                        ( t )))
+
+    '("renewpagestyle" TeX-arg-pagestyle
+      (TeX-arg-conditional (y-or-n-p "With optional global style? ")
+                          ( [ t ] nil)
+                        ( t )))
+
+    '("sethead"
+      (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
+                          ( [ 3 ] nil nil nil)
+                        ( 3 )))
+
+    '("setfoot"
+      (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
+                          ( [ 3 ] nil nil nil)
+                        ( 3 )))
+
+    '("sethead*" 3)
+    '("setfoot*" 3)
+
+    '("settitlemarks"
+      (TeX-arg-eval mapconcat #'identity
+                   (TeX-completing-read-multiple
+                    (TeX-argument-prompt optional nil "Level names")
+                    (LaTeX-titleps-section-command-list))
+                   ","))
+
+    '("settitlemarks"
+      (TeX-arg-eval mapconcat #'identity
+                   (TeX-completing-read-multiple
+                    (TeX-argument-prompt optional nil "Level names")
+                    (LaTeX-titleps-section-command-list))
+                   ","))
+
+    '("headrule" 0)
+    '("setheadrule" "Thickness")
+
+    '("footrule" 0)
+    '("setfootrule" "Thickness")
+
+    '("makeheadrule" 0)
+    '("makefootrule" 0)
+
+    ;; 3. On \markboth and \markleft
+    '("setmarkboth" t)
+    '("resetmarkboth" 0)
+
+    ;; 4. Headline/footline width
+    '("widenhead"
+      (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
+                          ( [ 2 ] nil nil)
+                        ( 2 )))
+
+    '("widenhead*" 2)
+
+    '("TitlepsPatchSection"
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Sectioning command")
+                   (LaTeX-titleps-section-command-list)))
+
+    '("TitlepsPatchSection*"
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Sectioning command")
+                   (LaTeX-titleps-section-command-list)))
+
+    ;; 5. Marks
+    '("bottitlemarks"     0)
+    '("toptitlemarks"     0)
+    '("firsttitlemarks"          0)
+    '("nexttoptitlemarks" 0)
+    '("outertitlemarks"   0)
+    '("innertitlemarks"   0)
+
+    '("newtitlemark" (TeX-arg-macro "Command name"))
+    '("newtitlemark*" (TeX-arg-counter "Variable name"))
+
+    '("pretitlemark"
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Sectioning command")
+                   (LaTeX-titleps-section-command-list))
+      "Text")
+
+    '("pretitlemark*"
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Sectioning command")
+                   (LaTeX-titleps-section-command-list))
+      "Text")
+
+    '("ifsamemark"
+      (TeX-arg-macro "Marks group: \\")
+      (TeX-arg-macro "Command: \\")
+      2)
+
+    ;; 6. Running heads with floats
+    '("setfloathead"
+      (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
+                          ( [ 3 ] nil nil nil nil [ nil ] )
+                        ( 4 [ nil ] )))
+
+    '("setfloatfoot"
+      (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
+                          ( [ 3 ] nil nil nil nil [ nil ] )
+                        ( 4 [ nil ] )))
+
+    '("setfloathead*" 4 [ nil ] )
+    '("setfloatfoot*" 4 [ nil ] )
+
+    '("nextfloathead"
+      (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
+                          ( [ 3 ] nil nil nil nil [ nil ] )
+                        ( 4 [ nil ] )))
+
+    '("nextfloatfoot"
+      (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
+                          ( [ 3 ] nil nil nil nil [ nil ] )
+                        ( 4 [ nil ] )))
+
+    '("nextfloathead*" 4 [ nil ] )
+    '("nextfloatfoot*" 4 [ nil ] )
+
+    ;; 7. Extra marks: I'm not clear how the marks commands work;
+    ;; until then, I ignore them
+    )
+
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("newpagestyle"         "{[{")
+                               ("renewpagestyle"       "{[{")
+                               ("settitlemarks"        "*{")
+                               ("widenhead"            "*[[{{")
+                               ("TitlepsPatchSection"  "*{")
+                               ("newtitlemark"         "*{")
+                               ("pretitlemark"         "*{{")
+                               ("nextfloathead"        "*[[[{{{{[")
+                               ("nextfloatfoot"        "*[[[{{{{["))
+                             'function)))
+ LaTeX-dialect)
+
+(defvar LaTeX-titleps-package-options
+  '(;; 4. Headline/footline width
+    "nopatches"
+
+    ;; 5. Marks
+    "outermarks" "innermarks" "topmarks" "botmarks"
+
+    ;; 6. Running heads with floats
+    "psfloats"
+
+    ;; 7. Extra marks
+    "extramarks")
+  "Package options for the titleps package.")
+
+;;; titleps.el ends here
diff --git a/style/titlesec.el b/style/titlesec.el
new file mode 100644
index 0000000..d723970
--- /dev/null
+++ b/style/titlesec.el
@@ -0,0 +1,255 @@
+;;; titlesec.el --- AUCTeX style for `titlesec.sty' (v2.10.0)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2015-09-19
+;; 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 `titlesec.sty' (v2.10.0) from
+;; 2011/12/15.  `titlesec.sty' is part of TeXLive.
+
+;;; Code:
+
+(defvar LaTeX-titlesec-key-val-options
+  '(("page" ("even" "odd"))
+    ("numberless"))
+  "Key=value options for \"\\titleformat\" and \"\\titlespacing\"
+macros provided by \"titlesec.sty\".")
+
+(defvar LaTeX-titlesec-section-command-list
+  '("part"
+    "chapter"
+    "section"
+    "subsection"
+    "subsubsection"
+    "paragraph"
+    "subparagraph")
+  "List of sectioning commands available in \"titlesec.sty\".")
+
+(defvar LaTeX-titlesec-section-shape-list
+  '("hang"
+    "block"
+    "display"
+    "runin"
+    "leftmargin"
+    "rightmargin"
+    "drop"
+    "wrap"
+    "frame")
+  "List of sectioning shapes available for \"\\titleformat\" command.")
+
+(defun LaTeX-titlesec-section-command-list ()
+  "Remove \"chapter\" from variable
+`LaTeX-titlesec-section-command-list' and return the remainder.
+Removal is based on the return value of function
+`LaTeX-largest-level'.  Items returned are prefixed with
+`TeX-esc'."
+  (mapcar (lambda (elt) (concat TeX-esc elt))
+         (if (< (LaTeX-largest-level) 2)
+             (symbol-value 'LaTeX-titlesec-section-command-list)
+           (remove "chapter" LaTeX-titlesec-section-command-list))))
+
+(defun LaTeX-arg-titlesec-titlespec (optional)
+  "Insert the first argument of \"\\titleformat\" and \"\\titlespacing\".
+Depending on returned value of function `LaTeX-largest-level',
+append a \"name\" key with corresponding values to
+`LaTeX-titlesec-key-val-options'.  The values are retrieved from
+`LaTeX-titlesec-section-command-list'.  The values of this list
+are also added stand-alone as keys.  If OPTIONAL is non-nil,
+insert the argument in brackets."
+  (let ((keyvals
+        (TeX-read-key-val
+         optional
+         (append
+          `(("name"
+             ,(mapcar (lambda (elt) (concat TeX-esc elt))
+                      (if (< (LaTeX-largest-level) 2)
+                          (symbol-value 'LaTeX-titlesec-section-command-list)
+                        (remove "chapter" 
LaTeX-titlesec-section-command-list)))))
+          (mapcar #'list
+                  (mapcar (lambda (elt) (concat TeX-esc elt))
+                          (if (< (LaTeX-largest-level) 2)
+                              (symbol-value 
'LaTeX-titlesec-section-command-list)
+                            (remove "chapter" 
LaTeX-titlesec-section-command-list))))
+          LaTeX-titlesec-key-val-options)
+         "Sectioning command")))
+    (TeX-argument-insert keyvals optional)))
+
+(TeX-add-style-hook
+ "titlesec"
+ (lambda ()
+
+   ;; Load "titleps.el" when "pagestyles" package option is given
+   (when (LaTeX-provided-package-options-member "titlesec" "pagestyles")
+     (TeX-run-style-hooks "titleps"))
+
+   (TeX-add-symbols
+    ;; 2.4. Tools
+    '("titlelabel" t)
+
+    ;; \titleformat*{<command>}{<format>}
+    '("titleformat*" (LaTeX-arg-titlesec-titlespec) t)
+
+    ;; 3. Advanced Interface
+    ;; 
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
+    '("titleformat"
+      (LaTeX-arg-titlesec-titlespec)
+      [TeX-arg-eval completing-read
+                    (TeX-argument-prompt optional nil "Shape")
+                    LaTeX-titlesec-section-shape-list]
+      (TeX-arg-conditional (y-or-n-p "With optional after-code? ")
+                          (4 [nil])
+                        (4)))
+
+    '("chaptertitlename" 0)
+
+    ;; 3.2. Spacing
+    ;; \titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}[<right-sep>]
+    '("titlespacing"
+      (LaTeX-arg-titlesec-titlespec)
+      (TeX-arg-length "Left margin")
+      (TeX-arg-length "Before vertical space")
+      (TeX-arg-length "Space between title and text")
+      [TeX-arg-length "Right margin"])
+
+    '("titlespacing*"
+      (LaTeX-arg-titlesec-titlespec)
+      (TeX-arg-length "Left margin")
+      (TeX-arg-length "Before vertical space")
+      (TeX-arg-length "Space between title and text")
+      [TeX-arg-length "Right margin"])
+
+    ;; 3.3. Spacing related tools
+    '("filright"  0)
+    '("filcenter" 0)
+    '("filleft"          0)
+    '("fillast"   0)
+    '("filinner"  0)
+    '("filouter"  0)
+    '("wordsep"          0)
+
+    ;; 3.4. Rules
+    '("titleline"
+      [TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Alignment")
+                   '("l" "r" "c")]
+      t)
+
+    '("titlerule" [TeX-arg-length "Rule height"])
+
+    '("titlerule*" [TeX-arg-length "Box width"] "Text")
+
+    '("iftitlemeasuring" 2)
+
+    ;; 3.5. Page styles
+    '("assignpagestyle"
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Sectioning command")
+                   (LaTeX-titlesec-section-command-list))
+      (TeX-arg-pagestyle))
+
+    ;; 3.9. Creating new levels and changing the class
+    '("titleclass"
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Sectioning command")
+                   (LaTeX-titlesec-section-command-list))
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Class")
+                   '("page" "top" "straight"))
+      [TeX-arg-eval completing-read
+                   (TeX-argument-prompt optional nil "Super level command")
+                   (LaTeX-titlesec-section-command-list)]) )
+
+   ;; 3.4. Rules: A variant of \titleline to be used only with calcwidth
+   (when (LaTeX-provided-package-options-member "titlesec" "calcwidth")
+     (TeX-add-symbols
+      '("titleline*"
+       (TeX-arg-eval completing-read
+                     (TeX-argument-prompt optional nil "Alignment")
+                     '("l" "r" "c"))
+       t)))
+
+   ;; The length of the longest line is returned in \titlewidth
+   (LaTeX-add-lengths "titlewidth"
+                     "titlewidthlast"
+                     "titlewidthfirst")
+
+   ;; Fontification: We only add macros which are used at top level;
+   ;; most of macros definded above are intended to be used in
+   ;; arguments of \titleformat
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("titlelabel"        "{")
+                               ;;
+                               ;; \titleformat comes in 2 flavors:
+                               ;; with *, it takes only 2 mandatory
+                               ;; argument; w/o *, a lot more.  It is
+                               ;; not (yet) possible to realize this
+                               ;; behaviour within font-latex.  Hence
+                               ;; we reduce the fontification to the
+                               ;; first 2 mandatory arguments and
+                               ;; ignore the rest.  *[ are optional anyway.
+                               ("titleformat"       "*{[{")
+                               ("titlespacing"      "*{{{{[")
+                               ("iftitlemeasuring"  "{{")
+                               ("assignpagestyle"   "{{")
+                               ("titleclass"        "{[{["))
+                             'function)))
+ LaTeX-dialect)
+
+(defvar LaTeX-titlesec-package-options
+  '(;; 2.1. Format
+    "rm" "sf" "tt" "md" "bf" "up" "it" "sl" "sc"
+    "big" "medium" "small" "tiny"
+    "raggedleft" "center" "raggedright"
+
+    ;; 2.2. Spacing
+    "compact"
+
+    ;; 2.3. Uppercase
+    "uppercase"
+
+    ;; 3.3. Spacing related tools
+    "indentafter"   "noindentafter"
+    "rigidchapters" "rubberchapters"
+    "bottomtitles"  "nobottomtitles" "nobottomtitles*"
+    "aftersep"      "largestsep"     "pageatnewline"
+
+    ;; 3.4. Rules
+    "calcwidth"
+
+    ;; 3.7. Other Package Options
+    "explicit"
+    "newparttoc"
+    "oldparttoc"
+    "clearempty"
+    "toctitles"
+    "newlinetospace"
+    "loadonly"
+
+    ;; 5. titleps and Page Styles
+    "pagestyles")
+  "Package options for the titlesec package.")
+
+;;; titlesec.el ends here
diff --git a/style/titletoc.el b/style/titletoc.el
new file mode 100644
index 0000000..25a06c4
--- /dev/null
+++ b/style/titletoc.el
@@ -0,0 +1,193 @@
+;;; titletoc.el --- AUCTeX style for `titletoc.sty' (v1.6)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2015-09-19
+;; 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 `titletoc.sty' (v1.6) from
+;; 2011/12/15.  `titletoc.sty' is part of TeXLive.
+
+;;; Code:
+
+(defvar LaTeX-titletoc-section-command-list
+  '("part"
+    "chapter"
+    "section"
+    "subsection"
+    "subsubsection"
+    "paragraph"
+    "subparagraph"
+    "figure"
+    "table")
+  "List of sectioning commands available in \"titletoc.sty\".
+Other environments producing a \"Table of ENVIRONMENT\" (figure,
+table) are also available in this variable.")
+
+(defun LaTeX-titletoc-section-command-list ()
+  "Remove \"chapter\" from variable
+`LaTeX-titletoc-section-command-list' and return the remainder.
+Removal is based on the return value of function
+`LaTeX-largest-level'."
+  (if (< (LaTeX-largest-level) 2)
+      (symbol-value 'LaTeX-titletoc-section-command-list)
+    (remove "chapter" LaTeX-titletoc-section-command-list)))
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+;; Setup for \contentsuse:
+(TeX-auto-add-type "titletoc-contentsuse" "LaTeX")
+
+(defvar LaTeX-titletoc-contentsuse-regexp
+  '("\\\\contentsuse{\\([^}]+\\)}"
+    1 LaTeX-auto-titletoc-contentsuse)
+  "Matches the argument of \\contentsuse from titletoc package.")
+
+(defun LaTeX-titletoc-auto-prepare ()
+  "Clear `LaTeX-auto-titletoc-contentsuse' before parsing."
+  (setq LaTeX-auto-titletoc-contentsuse nil))
+
+(defun LaTeX-titletoc-auto-cleanup ()
+  "Move parsed arguments of \"\\contentsuse\" to the variable
+`LaTeX-titletoc-section-command-list'."
+  (when (LaTeX-titletoc-contentsuse-list)
+    (make-local-variable 'LaTeX-titletoc-section-command-list)
+    (dolist (content (mapcar #'car (LaTeX-titletoc-contentsuse-list)))
+      (add-to-list 'LaTeX-titletoc-section-command-list content))))
+
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-titletoc-auto-prepare t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-titletoc-auto-cleanup t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
+
+(TeX-add-style-hook
+ "titletoc"
+ (lambda ()
+
+   ;; Add titletoc to the parser
+   (TeX-auto-add-regexp LaTeX-titletoc-contentsuse-regexp)
+
+   (TeX-add-symbols
+    ;; Basic macros
+    ;; \dottedcontents{<section>}[<left>]{<above-code>}
+    ;;                {<label width>}{<leader width>}
+    '("dottedcontents"
+      (TeX-arg-eval completing-read
+                    (TeX-argument-prompt optional nil "Sectioning command")
+                    (LaTeX-titletoc-section-command-list))
+      [ TeX-arg-length "Left margin" ] 3)
+
+    ;; \titlecontents{<section>}[<left>]{<above-code>}
+    ;;               {<numbered-entry-format>}{<numberless-entry-format>}
+    ;;               {<filler-page-format>}[<below-code>]
+    '("titlecontents"
+      (TeX-arg-eval completing-read
+                    (TeX-argument-prompt optional nil "Sectioning command")
+                    (LaTeX-titletoc-section-command-list))
+      [ TeX-arg-length "Left margin" ]
+      (TeX-arg-conditional (y-or-n-p "With optional below code argument? ")
+                          (4 [nil])
+                        (4)))
+
+    ;; \titlecontents*{<section>}[<left>]{<above-code>}
+    ;;                {<numbered-entry-format>}{<numberless-entry-format>}
+    ;;                {<filler-page-format>}[<separator>]
+    '("titlecontents*"
+      (TeX-arg-eval completing-read
+                    (TeX-argument-prompt optional nil "Sectioning command")
+                    (LaTeX-titletoc-section-command-list))
+      [ TeX-arg-length "Left margin" ]
+      (TeX-arg-conditional (y-or-n-p "With optional separator argument? ")
+                          (4 [nil])
+                        (4)))
+
+    ;; \contentsmargin[<correction>]{<right>}
+    '("contentsmargin" [ "Correction" ] "Right margin")
+
+    '("thecontentslabel" 0)
+
+    '("thecontentspage" 0)
+
+    '("contentslabel" [ "Format" ] (TeX-arg-length "Space"))
+
+    '("contentspage" [ "Format" ])
+
+    '("contentspush" t)
+
+    ;; Check if newfloat.el is loaded and any new environment is
+    ;; defined with it.  titletoc.sty can also be used to customize
+    ;; new environments defined with newfloat.sty.  As a prerequisite,
+    ;; the environments must be introduced to titletoc.sty with
+    ;; \contentuse{ENV} and then can be used as argument to \titlecontents.
+    '("contentsuse"
+      (TeX-arg-eval
+       (lambda ()
+        (let ((name (if (and (member "newfloat" (TeX-active-styles))
+                             (LaTeX-newfloat-DeclareFloatingEnvironment-list))
+                        (completing-read
+                         (TeX-argument-prompt optional nil "Name of contents")
+                         (mapcar #'car
+                                 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+                      (TeX-read-string
+                       (TeX-argument-prompt optional nil "Name of 
contents")))))
+          (make-local-variable 'LaTeX-titletoc-section-command-list)
+          (add-to-list 'LaTeX-titletoc-section-command-list name)
+          (format "%s" name))))
+      "File extension")
+
+    ;; 6.3. Partial TOC's
+    '("startcontents" [ "Name" ])
+
+    '("stopcontents" [ "Name" ])
+
+    '("resumecontents" [ "Name" ])
+
+    '("printcontents" [ "Name" ] "Prefix" "Start level" t)
+
+    ;; 6.4. Partial lists
+    '("startlist" [ "Name" ] "List")
+
+    '("stoplist" [ "Name" ] "List")
+
+    '("resumelist" [ "Name" ] "List")
+
+    '("printlist" [ "Name" ] "Prefix" t) )
+
+   ;; Fontification: We only add macros which are used at top level;
+   ;; most of macros definded above are intended to be used in
+   ;; arguments of \dottedcontents or \titlecontents
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("dottedcontents"  "{[{{{")
+                               ("titlecontents"   "*{[{{{[[[")
+                               ("contentsmargin"  "[{")
+                               ("contentsuse"     "{{"))
+                             'function)) )
+ LaTeX-dialect)
+
+(defvar LaTeX-titletoc-package-options
+  '("leftlabels" "rightlabels" "dotinlabels")
+  "Package options for the titletoc package.")
+
+;;; titletoc.el ends here
diff --git a/style/transparent.el b/style/transparent.el
index 3a7fad5..a345924 100644
--- a/style/transparent.el
+++ b/style/transparent.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-08-15
 ;; Keywords: tex
diff --git a/style/varioref.el b/style/varioref.el
index 7684ba4..1d87507 100644
--- a/style/varioref.el
+++ b/style/varioref.el
@@ -66,6 +66,19 @@
               2 LaTeX-label-list "}"))
            TeX-complete-list))
 
+     ;; Fontification
+     (when (and (fboundp 'font-latex-add-keywords)
+               (eq TeX-install-font-lock 'font-latex-setup))
+       (font-latex-add-keywords '(;; vref is already in font-latex.el,
+                                 ;; so don't add it here again
+                                 ("Vref"          "*{")
+                                 ("vpageref"      "*[[{")
+                                 ("vrefrange"     "*[{{")
+                                 ("Ref"           "{")
+                                 ("fullref"       "{")
+                                 ("vpagerefrange" "*[{{"))
+                               'reference))
+
      ;; Activate RefTeX reference style.
      (and LaTeX-reftex-ref-style-auto-activate
          (fboundp 'reftex-ref-style-activate)
diff --git a/style/vwcol.el b/style/vwcol.el
index 0a74edf..7fbc10d 100644
--- a/style/vwcol.el
+++ b/style/vwcol.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-07-04
 ;; Keywords: tex
diff --git a/style/wrapfig.el b/style/wrapfig.el
index 64bb265..11fe473 100644
--- a/style/wrapfig.el
+++ b/style/wrapfig.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-12-13
 ;; Keywords: tex
diff --git a/style/xcolor.el b/style/xcolor.el
index 8ac0bad..34e2484 100644
--- a/style/xcolor.el
+++ b/style/xcolor.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2015-07-04
 ;; Keywords: tex
diff --git a/style/zlmtt.el b/style/zlmtt.el
index 02e6204..7d6d019 100644
--- a/style/zlmtt.el
+++ b/style/zlmtt.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Created: 2014-10-31
 ;; Keywords: tex
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index e8d8900..205af00 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -118,11 +118,13 @@ line and from another directory."
              (buffer-string)))))
 
 ;; Test for inserting &'s with `M-RET' in various tabular environment.
-;; FIXME: One thing missing is running style hooks while running the test.
+;; Following styles are loaded: tabularx, tabulary, longtable,
+;; dcolumn, siunitx
 (ert-deftest LaTeX-count-ampersands-inserted-in-tabular ()
   (should (string=
           (with-temp-buffer
             (insert-file-contents tabular-count-ampersands/in)
+            (setq TeX-parse-self t)
             (LaTeX-mode)
             (goto-char (point-min))
             ;; Do not ask for opt. argument in (TeX-insert-macro "\\"):
diff --git a/tests/latex/tabular-count-ampersands-in.tex 
b/tests/latex/tabular-count-ampersands-in.tex
index 97bc5f8..28c9bc6 100644
--- a/tests/latex/tabular-count-ampersands-in.tex
+++ b/tests/latex/tabular-count-ampersands-in.tex
@@ -1,5 +1,5 @@
 \documentclass{article}
-% \usepackage{tabularx,tabulary,longtable}
+\usepackage{tabularx,tabulary,longtable,dcolumn,siunitx}
 \begin{document}
 
 Standard LaTeX tabular:
@@ -33,4 +33,52 @@ Standard LaTeX tabular*:
   1 & 2 & 3 & LaTeX-insert-item
 \end{tabular*}
 
+tabularx:
+\begin{tabularx}{1.0\linewidth}{llX}
+  1 & 2 & LaTeX-insert-item
+\end{tabularx}
+
address@hidden>{\tiny\hfill}l<address@hidden
+  1 & 2 & LaTeX-insert-item
+\end{tabularx}
+
+\begin{tabularx}{1.0\linewidth}[t]{*{3}{|>{\tiny\hfill}X<{\hfill}}l}
+  1 & 2 & 3 & LaTeX-insert-item
+\end{tabularx}
+
+longtable:
+\begin{longtable}[l]{llr}
+  \caption{Some caption}\\
+  1 & 2 & LaTeX-insert-item
+\end{longtable}
+
+\begin{longtable}[c]{*{3}{l}r}
+  \caption{Some caption}\\
+  1 & 2 & 3 & LaTeX-insert-item
+\end{longtable}
+
+\begin{longtable}[r]{*{3}{lc*{2}{l}} r}
+  \caption{Some caption}\\
+  1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & LaTeX-insert-item
+\end{longtable}
+
+dcolumn:
+\begin{tabular}{D{,}{,}{2}D{,}{,}{2}D{,}{,}{2}}
+  1 & 2 & LaTeX-insert-item
+\end{tabular}
+
+\begin{tabular}{*{3}{D{,}{,}{2}}}
+  1 & 2 & LaTeX-insert-item
+\end{tabular}
+
+siunitx:
+\begin{tabular}{%
+  s
+  S[table-number-alignment = center]
+  s[table-number-alignment = left]
+  S[table-number-alignment = right]
+  }
+  1 & 2 & 3 & LaTeX-insert-item
+\end{tabular}
+
 \end{document}
diff --git a/tests/latex/tabular-count-ampersands-out.tex 
b/tests/latex/tabular-count-ampersands-out.tex
index 1163637..add9fd8 100644
--- a/tests/latex/tabular-count-ampersands-out.tex
+++ b/tests/latex/tabular-count-ampersands-out.tex
@@ -1,5 +1,5 @@
 \documentclass{article}
-% \usepackage{tabularx,tabulary,longtable}
+\usepackage{tabularx,tabulary,longtable,dcolumn,siunitx}
 \begin{document}
 
 Standard LaTeX tabular:
@@ -40,4 +40,61 @@ Standard LaTeX tabular*:
     &&&
 \end{tabular*}
 
+tabularx:
+\begin{tabularx}{1.0\linewidth}{llX}
+  1 & 2 & LaTeX-insert-item \\
+    &&
+\end{tabularx}
+
address@hidden>{\tiny\hfill}l<address@hidden
+  1 & 2 & LaTeX-insert-item \\
+    &&
+\end{tabularx}
+
+\begin{tabularx}{1.0\linewidth}[t]{*{3}{|>{\tiny\hfill}X<{\hfill}}l}
+  1 & 2 & 3 & LaTeX-insert-item \\
+    &&&
+\end{tabularx}
+
+longtable:
+\begin{longtable}[l]{llr}
+  \caption{Some caption}\\
+  1 & 2 & LaTeX-insert-item \\
+    &&
+\end{longtable}
+
+\begin{longtable}[c]{*{3}{l}r}
+  \caption{Some caption}\\
+  1 & 2 & 3 & LaTeX-insert-item \\
+    &&&
+\end{longtable}
+
+\begin{longtable}[r]{*{3}{lc*{2}{l}} r}
+  \caption{Some caption}\\
+  1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & LaTeX-insert-item \\
+    &&&&&&&&&&&&
+\end{longtable}
+
+dcolumn:
+\begin{tabular}{D{,}{,}{2}D{,}{,}{2}D{,}{,}{2}}
+  1 & 2 & LaTeX-insert-item \\
+    &&
+\end{tabular}
+
+\begin{tabular}{*{3}{D{,}{,}{2}}}
+  1 & 2 & LaTeX-insert-item \\
+    &&
+\end{tabular}
+
+siunitx:
+\begin{tabular}{%
+  s
+  S[table-number-alignment = center]
+  s[table-number-alignment = left]
+  S[table-number-alignment = right]
+  }
+  1 & 2 & 3 & LaTeX-insert-item \\
+    &&&
+\end{tabular}
+
 \end{document}
diff --git a/tex-buf.el b/tex-buf.el
index 07bb78b..6497777 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -3429,8 +3429,7 @@ errors.  If nil, defaults to 
`TeX-error-overview-active-buffer'."
               msg  (nth 3 entry))
         ;; Add the entry only if it isn't to be skipped.
         (unless (TeX-error-list-skip-warning-p type (nth 10 entry))
-          (add-to-list
-           'entries
+          (push
            (list
             ;; ID.
             id
@@ -3458,15 +3457,22 @@ errors.  If nil, defaults to 
`TeX-error-overview-active-buffer'."
               (t
                ""))
              ;; Message.
-             (list (if (stringp msg) msg "")
+             (list (if (stringp msg)
+                       ;; Sometimes, the message can be longer than one line,
+                       ;; but print here only the first one.
+                       (progn
+                         (string-match "^.*" msg)
+                         (match-string 0 msg))
+                     "")
                    'face 'link
                    'follow-link t
                    'id id
-                   'action 'TeX-error-overview-goto-source))) t))
+                   'action 'TeX-error-overview-goto-source)))
+           entries))
         ;; Increase the `id' counter in any case.
         (setq id (1+ id)))
        TeX-error-list)
-      entries)))
+      (reverse entries))))
 
 (defun TeX-error-overview-next-error (&optional arg)
   "Move to the next line and find the associated error.
diff --git a/tex-ispell.el b/tex-ispell.el
index 9578a91..2eb13c0 100644
--- a/tex-ispell.el
+++ b/tex-ispell.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016 Free Software Foundation, Inc.
 
-;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Author: Arash Esbati <address@hidden>
 ;; Maintainer: address@hidden
 ;; Keywords: tex, wp, convenience
 
@@ -59,6 +59,7 @@
 ;; splitidx.sty
 ;; tabularx.sty
 ;; tabulary.sty
+;; tcolorbox.sty
 ;; tikz.sty
 ;; varioref.sty
 
@@ -173,6 +174,12 @@
       ("SI" . 2)
       ;; splitidx.sty
       ("sindex" . 1)
+      ;; tcolorbox.sty
+      ("tcbox" . 0)
+      ("tcbset" . 1)
+      ("tcbsetforeverylayer" . 1)
+      ;; tcolorbox.sty -- raster library
+      ("tcbitem" . 0)
       ;; varioref.sty
       ("vref" . 1)
       ("Vref" . 1)
@@ -184,11 +191,12 @@
       ("vrefrange" . 2)
       ("vrefrange*" . 2)
       ("vpagerefrange" . 2)
-      ("vpagerefrange*" . 2) )
+      ("vpagerefrange*" . 2))
     "List of commands with arguments to be skipped.
 Each element of the list is a cons cell with command name
 \(string) as car and the number of mandatory arguments to be
-skipped as cdr."))
+skipped as cdr.  If number is 0, then only skip over the optional
+argument and spell check the mandatory one."))
 
 
 ;; Add new environments with one optional argument here:
@@ -202,7 +210,12 @@ skipped as cdr."))
       "itemize"
       "itemize*"
       ;; mdframed.sty
-      "mdframed")
+      "mdframed"
+      ;; tcolorbox.sty
+      "tcolorbox"
+      ;; tcolorbox.sty -- raster library
+      "tcbraster"
+      "tcbitemize")
     "List of LaTeX environments with an opt argument to be skipped."))
 
 
@@ -235,6 +248,8 @@ skipped as cdr."))
    ("minted" . "\\\\end{minted}")
    ;; tabularx.sty, tabulary.sty, Standard LaTeX tabular*-env
    ("tabular[*xy]" TeX-ispell-tex-arg-end)
+   ;; tcolorbox.sty -- raster library
+   ("tcboxed\\(raster\\|itemize\\)" ispell-tex-arg-end)
    ;; tikz.sty
    ("tikzpicture" . "\\\\end{tikzpicture}")
    ;; fancyvrb.sty: In practice, all verbatim environments have a *
@@ -248,13 +263,19 @@ skipped as cdr."))
 (eval-when-compile
   (defun TeX-ispell-sort-skip-cmds-list (arg)
     "Return elements from `TeX-ispell-skip-cmds-list' acc. to ARG."
-    (when (member arg '(1 2 3))
+    (when (member arg '(0 1 2 3))
       (let (cmds)
        (dolist (elt TeX-ispell-skip-cmds-list)
          (when (= (cdr elt) arg)
            (push (car elt) cmds)))
        cmds))))
 
+(defvar TeX-ispell-skip-cmds-opt-arg-regexp
+  (eval-when-compile
+    (concat "\\\\"
+           (regexp-opt (TeX-ispell-sort-skip-cmds-list 0) t)))
+  "Regexp of LaTeX commands with only optional arguments to be skipped.")
+
 (defvar TeX-ispell-skip-cmds-one-arg-regexp
   (eval-when-compile
     (concat "\\\\"
@@ -280,7 +301,8 @@ skipped as cdr."))
 
 ;; Make them available to Ispell:
 (TeX-ispell-skip-setcar
- `((,TeX-ispell-skip-cmds-one-arg-regexp ispell-tex-arg-end)
+ `((,TeX-ispell-skip-cmds-opt-arg-regexp ispell-tex-arg-end 0)
+   (,TeX-ispell-skip-cmds-one-arg-regexp ispell-tex-arg-end)
    (,TeX-ispell-skip-cmds-two-args-regexp ispell-tex-arg-end 2)
    (,TeX-ispell-skip-cmds-three-args-regexp ispell-tex-arg-end 3)))
 
diff --git a/tex-style.el b/tex-style.el
index b6e2e4d..223c364 100644
--- a/tex-style.el
+++ b/tex-style.el
@@ -41,6 +41,11 @@
   :type 'boolean
   :group 'LaTeX-style)
 
+(defcustom LaTeX-reftex-cite-format-auto-activate t
+  "Whether to activate automatically RefTeX citation format."
+  :type 'boolean
+  :group 'LaTeX-style)
+
 ;; style/amsmath.el
 
 (defcustom LaTeX-amsmath-label nil
@@ -272,6 +277,22 @@ produced by emp.sty and then re-LaTeX the document."
   :type 'boolean
   :group 'LaTeX-style)
 
+;; style/exam.el
+
+(defcustom LaTeX-exam-reftex-quick-id-key ?x
+  "Unique letter identifying exam class macros in RefTeX.
+
+A character argument for quick identification when RefTeX inserts
+new labels with `reftex-label'.  It must be unique.  It is
+initialized to ?x."
+  :group 'LaTeX-style
+  :type 'character)
+
+(defcustom LaTeX-exam-label "exm:"
+  "Default prefix to labels in environments of exam class."
+  :group 'LaTeX-style
+  :type 'string)
+
 ;; style/fontspec.el
 
 (defcustom LaTeX-fontspec-arg-font-search t
diff --git a/tex.el b/tex.el
index ab301fd..02946b9 100644
--- a/tex.el
+++ b/tex.el
@@ -3143,8 +3143,11 @@ Expert %s are completed depending on 
`TeX-complete-expert-commands'."
 
 Each entry is a list with the following elements:
 
-0. Regexp matching the preceding text.
-1. A number indicating the subgroup in the regexp containing the text.
+0. Regexp matching the preceding text or a predicate of arity 0
+which returns non-nil and sets `match-data' appropriately if it
+is applicable.
+1. A number indicating the subgroup in the regexp containing the
+text.
 2. A function returning an alist of possible completions.
 3. Text to append after a succesful completion.
 
@@ -3153,54 +3156,80 @@ Or alternatively:
 0. Regexp matching the preceding text.
 1. Function to do the actual completion.")
 
-(defun TeX-complete-symbol ()
-  "Perform completion on TeX/LaTeX symbol preceding point."
-  (interactive "*")
+(defun TeX--complete-find-entry ()
+  "Return the first applicable entry of `TeX-complete-list'."
   (let ((list TeX-complete-list)
        entry)
     (while list
       (setq entry (car list)
            list (cdr list))
-      (if (TeX-looking-at-backward (car entry) 250)
-         (setq list nil)))
-    (if (numberp (nth 1 entry))
-       (let* ((sub (nth 1 entry))
-              (close (nth 3 entry))
-              (begin (match-beginning sub))
-              (end (match-end sub))
-              (pattern (TeX-match-buffer 0))
-              (symbol (buffer-substring begin end))
-              (list (funcall (nth 2 entry)))
-              (completion (try-completion symbol list))
-              (buf-name "*Completions*"))
-         (cond ((eq completion t)
-                (and close
-                     (not (looking-at (regexp-quote close)))
-                     (insert close))
-                (let ((window (get-buffer-window buf-name)))
-                  (when window (delete-window window))))
-               ((null completion)
-                (error "Can't find completion for \"%s\"" pattern))
-               ((not (string-equal symbol completion))
-                (delete-region begin end)
-                (insert completion)
-                (and close
-                     (eq (try-completion completion list) t)
-                     (not (looking-at (regexp-quote close)))
-                     (insert close))
-                (let ((window (get-buffer-window buf-name)))
-                  (when window (delete-window window))))
-               (t
-                (if (fboundp 'completion-in-region)
-                    (completion-in-region begin end
-                                          (all-completions symbol list nil))
-                  (message "Making completion list...")
-                  (let ((list (all-completions symbol list nil)))
-                    (with-output-to-temp-buffer buf-name
-                      (display-completion-list list)))
-                  (set-window-dedicated-p (get-buffer-window buf-name) 'soft)
-                  (message "Making completion list...done")))))
-      (funcall (nth 1 entry)))))
+      (when (if (functionp (car entry))
+               (funcall (car entry))
+             (TeX-looking-at-backward (car entry) 250))
+       (setq list nil)))
+    entry))
+
+(defun TeX-complete-symbol ()
+  "Perform completion on TeX/LaTeX symbol preceding point."
+  (interactive "*")
+  (let ((entry (TeX--complete-find-entry)))
+    (when entry
+      (if (numberp (nth 1 entry))
+         (let* ((sub (nth 1 entry))
+                (close (nth 3 entry))
+                (begin (match-beginning sub))
+                (end (match-end sub))
+                (pattern (TeX-match-buffer 0))
+                (symbol (buffer-substring begin end))
+                (list (funcall (nth 2 entry)))
+                (completion (try-completion symbol list))
+                (buf-name "*Completions*"))
+           (cond ((eq completion t)
+                  (and close
+                       (not (looking-at (regexp-quote close)))
+                       (insert close))
+                  (let ((window (get-buffer-window buf-name)))
+                    (when window (delete-window window))))
+                 ((null completion)
+                  (error "Can't find completion for \"%s\"" pattern))
+                 ((not (string-equal symbol completion))
+                  (delete-region begin end)
+                  (insert completion)
+                  (and close
+                       (eq (try-completion completion list) t)
+                       (not (looking-at (regexp-quote close)))
+                       (insert close))
+                  (let ((window (get-buffer-window buf-name)))
+                    (when window (delete-window window))))
+                 (t
+                  (if (fboundp 'completion-in-region)
+                      (completion-in-region begin end
+                                            (all-completions symbol list nil))
+                    (message "Making completion list...")
+                    (let ((list (all-completions symbol list nil)))
+                      (with-output-to-temp-buffer buf-name
+                        (display-completion-list list)))
+                    (set-window-dedicated-p (get-buffer-window buf-name) 'soft)
+                    (message "Making completion list...done")))))
+       (funcall (nth 1 entry))))))
+
+(defun TeX--completion-at-point ()
+  "(La)TeX completion at point function.
+See `completion-at-point-functions'."
+  (let ((entry (TeX--complete-find-entry)))
+    (when entry
+      (if (numberp (nth 1 entry))
+         (let* ((sub (nth 1 entry))
+                (begin (match-beginning sub))
+                (end (match-end sub))
+                (symbol (buffer-substring-no-properties begin end))
+                (list (funcall (nth 2 entry))))
+           (list begin end (all-completions symbol list)))
+       ;; We intentionally don't call the fallback completion functions because
+       ;; they do completion on their own and don't work too well with things
+       ;; like company-mode.  And the default function `ispell-complete-word'
+       ;; isn't so useful anyway.
+       nil))))
 
 (defcustom TeX-default-macro "ref"
   "*The default macro when creating new ones with `TeX-insert-macro'."
@@ -3730,6 +3759,18 @@ The algorithm is as follows:
       (set (make-local-variable 'prettify-symbols-compose-predicate)
           #'TeX--prettify-symbols-compose-p)))
 
+  ;; Standard Emacs completion-at-point support
+  (when (boundp 'completion-at-point-functions)
+    (add-hook 'completion-at-point-functions
+             #'TeX--completion-at-point nil t)
+
+    ;; Support for company-mode
+    (when (fboundp 'company-mode)
+      ;; By default, company completions kick in after a prefix of 3 chars has
+      ;; been typed.  Since we don't have too many completions, that's too
+      ;; much.
+      (set (make-local-variable 'company-minimum-prefix-length) 1)))
+
   ;; Let `TeX-master-file' be called after a new file was opened and
   ;; call `TeX-update-style' on any file opened.  (The addition to the
   ;; hook has to be made here because its local value will be deleted



reply via email to

[Prev in Thread] Current Thread [Next in Thread]