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

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

[elpa] externals/auctex 0844fa2 7/7: Merge remote-tracking branch 'origi


From: Tassilo Horn
Subject: [elpa] externals/auctex 0844fa2 7/7: Merge remote-tracking branch 'origin/master' into externals/auctex
Date: Tue, 29 Dec 2020 12:13:44 -0500 (EST)

branch: externals/auctex
commit 0844fa20e8286d744d7d05fe02429f915323d31d
Merge: b7c3a5f d4165cf
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>

    Merge remote-tracking branch 'origin/master' into externals/auctex
---
 .dir-locals.el                    |   18 +
 bib-cite.el                       | 1490 ++++++------
 context.el                        |  888 +++----
 font-latex.el                     | 1754 +++++++-------
 latex.el                          | 4616 +++++++++++++++++++------------------
 multi-prompt.el                   |  138 +-
 plain-tex.el                      |   58 +-
 preview.el                        | 3620 ++++++++++++++---------------
 style/Alegreya.el                 |   28 +-
 style/AlegreyaSans.el             |   34 +-
 style/CJK.el                      |    2 +-
 style/FiraMono.el                 |   24 +-
 style/FiraSans.el                 |   34 +-
 style/MinionPro.el                |   10 +-
 style/MyriadPro.el                |   20 +-
 style/XCharter.el                 |   18 +-
 style/acro.el                     |   92 +-
 style/acronym.el                  |   64 +-
 style/algorithm.el                |   18 +-
 style/alltt.el                    |    6 +-
 style/alphanum.el                 |   62 +-
 style/amsfonts.el                 |   14 +-
 style/amsmath.el                  |  122 +-
 style/amsopn.el                   |    4 +-
 style/amstex.el                   |   16 +-
 style/amsthm.el                   |   92 +-
 style/appendix.el                 |    4 +-
 style/arabxetex.el                |   76 +-
 style/array.el                    |   32 +-
 style/article.el                  |    2 +-
 style/attachfile.el               |   28 +-
 style/babel.el                    |  264 +--
 style/baskervaldx.el              |   28 +-
 style/beamer.el                   |  266 +--
 style/biblatex.el                 |  360 +--
 style/bicaption.el                |  144 +-
 style/bidi.el                     |   36 +-
 style/bm.el                       |   40 +-
 style/book.el                     |    2 +-
 style/booktabs.el                 |   28 +-
 style/breqn.el                    |   28 +-
 style/bulgarian.el                |    6 +-
 style/captcont.el                 |    6 +-
 style/caption.el                  |  332 +--
 style/changelog.el                |  120 +-
 style/cleveref.el                 |   98 +-
 style/color.el                    |  178 +-
 style/colortbl.el                 |   36 +-
 style/commath.el                  |   28 +-
 style/comment.el                  |   32 +-
 style/csquotes.el                 |  358 +--
 style/currvita.el                 |   12 +-
 style/danish.el                   |    4 +-
 style/dashundergaps.el            |   34 +-
 style/dcolumn.el                  |    2 +-
 style/dinbrief.el                 |  268 +--
 style/dk-bib.el                   |   38 +-
 style/doc.el                      |   80 +-
 style/emp.el                      |   58 +-
 style/empheq.el                   |  348 +--
 style/enumitem.el                 |  264 +--
 style/environ.el                  |   50 +-
 style/epigraph.el                 |   32 +-
 style/erewhon.el                  |   34 +-
 style/exam.el                     |   86 +-
 style/expl3.el                    |    8 +-
 style/fancyhdr.el                 |    6 +-
 style/fancyref.el                 |   34 +-
 style/fancyvrb.el                 |  576 ++---
 style/fbb.el                      |   26 +-
 style/fbox.el                     |   10 +-
 style/filecontents.el             |   10 +-
 style/flashcards.el               |   16 +-
 style/floatrow.el                 |  494 ++--
 style/foils.el                    |   16 +-
 style/fontaxes.el                 |    4 +-
 style/fontenc.el                  |    6 +-
 style/fontspec.el                 |  254 +-
 style/footmisc.el                 |    6 +-
 style/french.el                   |    6 +-
 style/frenchb.el                  |   10 +-
 style/fvextra.el                  |   70 +-
 style/geometry.el                 |   62 +-
 style/german.el                   |   34 +-
 style/gloss-italian.el            |   26 +-
 style/graphicx.el                 |  224 +-
 style/harvard.el                  |   74 +-
 style/hologo.el                   |  172 +-
 style/hyperref.el                 |   42 +-
 style/icelandic.el                |    4 +-
 style/ifluatex.el                 |   10 +-
 style/imakeidx.el                 |   14 +-
 style/index.el                    |   28 +-
 style/inputenc.el                 |   66 +-
 style/italian.el                  |   20 +-
 style/jarticle.el                 |    2 +-
 style/jbook.el                    |    2 +-
 style/jreport.el                  |    2 +-
 style/jsarticle.el                |    2 +-
 style/jsbook.el                   |    6 +-
 style/jsreport.el                 |    2 +-
 style/jurabib.el                  |  172 +-
 style/kpfonts.el                  |  178 +-
 style/latexinfo.el                |  214 +-
 style/letter.el                   |  160 +-
 style/lettrine.el                 |   18 +-
 style/listings.el                 |  176 +-
 style/longtable.el                |   30 +-
 style/ltugboat.el                 |   92 +-
 style/ltxguide.el                 |   24 +-
 style/ltxtable.el                 |   26 +-
 style/luacode.el                  |   20 +-
 style/luatextra.el                |    6 +-
 style/makeidx.el                  |    8 +-
 style/marginnote.el               |    8 +-
 style/mathtools.el                |  234 +-
 style/mdframed.el                 |  200 +-
 style/mdwlist.el                  |   18 +-
 style/menukeys.el                 |  488 ++--
 style/metalogo.el                 |   36 +-
 style/mflogo.el                   |   10 +-
 style/minted.el                   |  260 +--
 style/mn2e.el                     |   44 +-
 style/mnras.el                    |   12 +-
 style/moodle.el                   |  164 +-
 style/multind.el                  |   24 +-
 style/multirow.el                 |    6 +-
 style/nameref.el                  |   20 +-
 style/natbib.el                   |  164 +-
 style/newfloat.el                 |  124 +-
 style/newpxtext.el                |   10 +-
 style/newtxtext.el                |   10 +-
 style/newtxttt.el                 |   12 +-
 style/ngerman.el                  |   34 +-
 style/nicefrac.el                 |    6 +-
 style/nomencl.el                  |    8 +-
 style/ntheorem.el                 |  276 +--
 style/ocg-p.el                    |   70 +-
 style/ocgx.el                     |   14 +-
 style/overpic.el                  |   48 +-
 style/paracol.el                  |  162 +-
 style/paralist.el                 |   24 +-
 style/pdfpages.el                 |   24 +-
 style/pdfsync.el                  |   88 +-
 style/plext.el                    |   36 +-
 style/polski.el                   |    4 +-
 style/polyglossia.el              |  146 +-
 style/preview.el                  |   28 +-
 style/prosper.el                  |   34 +-
 style/psfig.el                    |   40 +-
 style/pst-node.el                 |    8 +-
 style/pst-plot.el                 |    2 +-
 style/pstricks.el                 |   22 +-
 style/pythontex.el                |  416 ++--
 style/ragged2e.el                 |   14 +-
 style/relsize.el                  |   20 +-
 style/report.el                   |    2 +-
 style/revtex4-2.el                |  102 +-
 style/scholax.el                  |   32 +-
 style/scrbase.el                  |  308 +--
 style/scrbook.el                  |   60 +-
 style/scrlttr2.el                 |  124 +-
 style/scrpage2.el                 |   88 +-
 style/scrreprt.el                 |   18 +-
 style/setspace.el                 |    8 +-
 style/shortvrb.el                 |   16 +-
 style/siunitx.el                  |  102 +-
 style/slides.el                   |    4 +-
 style/slovak.el                   |    4 +-
 style/sourcecodepro.el            |   24 +-
 style/splitidx.el                 |  160 +-
 style/subcaption.el               |   92 +-
 style/subfigure.el                |   44 +-
 style/subfiles.el                 |   28 +-
 style/swedish.el                  |    2 +-
 style/tabularx.el                 |    4 +-
 style/tabulary.el                 |    4 +-
 style/tcolorbox.el                |  256 +-
 style/tcolorboxlib-raster.el      |   98 +-
 style/tex-live.el                 |  108 +-
 style/textpos.el                  |   68 +-
 style/theorem.el                  |   62 +-
 style/thm-restate.el              |   26 +-
 style/thmtools.el                 |  186 +-
 style/tikz.el                     |   12 +-
 style/titleps.el                  |  104 +-
 style/titlesec.el                 |  114 +-
 style/titletoc.el                 |   56 +-
 style/transparent.el              |   10 +-
 style/ulem.el                     |   42 +-
 style/unicode-math.el             |   22 +-
 style/units.el                    |    6 +-
 style/url.el                      |   44 +-
 style/varioref.el                 |   40 +-
 style/verbatim.el                 |   12 +-
 style/virtex.el                   |  142 +-
 style/vwcol.el                    |    8 +-
 style/wrapfig.el                  |  116 +-
 style/xcolor.el                   |  330 +--
 style/xkcdcolors.el               | 1902 +++++++--------
 style/xltabular.el                |   26 +-
 style/xparse.el                   |  252 +-
 style/xspace.el                   |   12 +-
 style/zlmtt.el                    |    4 +-
 tests/japanese/error-parsing.el   |   46 +-
 tests/japanese/parse-timing.el    |   10 +-
 tests/japanese/preview-latex.el   |  226 +-
 tests/latex/font-latex-test.el    |   16 +-
 tests/latex/latex-test.el         |  184 +-
 tests/latex/preview-latex-test.el |    8 +-
 tests/latex/texmathp-test.el      |   24 +-
 tests/tex/command-expansion.el    |   96 +-
 tests/tex/error-parsing.el        |   66 +-
 tests/tex/navigation.el           |    2 +-
 tests/tex/path-expansion.el       |    6 +-
 tex-bar.el                        |  468 ++--
 tex-buf.el                        | 2720 +++++++++++-----------
 tex-fold.el                       |  732 +++---
 tex-font.el                       |  206 +-
 tex-info.el                       |  398 ++--
 tex-ispell.el                     |   30 +-
 tex-jp.el                         |  530 ++---
 tex-mik.el                        |    2 +-
 tex-site.el.in                    |   58 +-
 tex-style.el                      |  174 +-
 tex-wizard.el                     |   94 +-
 tex.el                            | 4380 +++++++++++++++++------------------
 texmathp.el                       |  258 +--
 toolbar-x.el                      | 1500 ++++++------
 229 files changed, 20739 insertions(+), 20699 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..58cf88a
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,18 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((nil . ((bug-reference-url-format . "https://debbugs.gnu.org/%s";)
+         (fill-column . 70)
+         (sentence-end-double-space . t)
+         (tab-width . 8)))
+ (change-log-mode . ((mode . bug-reference)
+                     (add-log-time-zone-rule . t)
+                     (fill-column . 74)))
+ (emacs-lisp-mode . ((mode . bug-reference-prog)
+                     (electric-quote-comment . nil)
+                     (electric-quote-string . nil)
+                     (indent-tabs-mode . nil)))
+ (texinfo-mode . ((mode . bug-reference-prog)
+                  (electric-quote-comment . nil)
+                  (electric-quote-string . nil)
+                  (fill-column . 74))))
diff --git a/bib-cite.el b/bib-cite.el
index 122a35e..095ccf5 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -596,11 +596,11 @@
 
 ;; Silence the compiler:
 (declare-function dired-replace-in-string "ext:dired"
-                 (regexp newtext string))
+                  (regexp newtext string))
 (declare-function dired-split "ext:dired-aux"
-                 (pat str &optional limit))
+                  (pat str &optional limit))
 (declare-function reftex-view-crossref "ext:reftex-dcr"
-                 (&optional arg auto-how fail-quietly))
+                  (&optional arg auto-how fail-quietly))
 
 (defgroup bib-cite nil
   "bib-cite, LaTeX minor-mode to display \\cite, \\ref and \\label commands."
@@ -625,8 +625,8 @@ You may use `switch-to-buffer' 
`switch-to-buffer-other-window' or
 `switch-to-buffer-other-frame'."
   :group 'bib-cite
   :type '(choice (function-item switch-to-buffer)
-                (function-item switch-to-buffer-other-window)
-                (function-item switch-to-buffer-other-frame)))
+                 (function-item switch-to-buffer-other-window)
+                 (function-item switch-to-buffer-other-frame)))
 
 (defcustom bib-highlight-mouse-t t
   "Call bib-highlight-mouse from `LaTeX-mode-hook' to add green highlight."
@@ -638,7 +638,7 @@ You may use `switch-to-buffer' 
`switch-to-buffer-other-window' or
 If nil, do not display info."
   :group 'bib-cite
   :type '(radio (const :tag "Don't display info" nil)
-               string))
+                string))
 
 (defcustom bib-bibtex-env-variable "BIBINPUTS"
   "Environment variable setting the path where BiBTeX input files are found.
@@ -665,7 +665,7 @@ directory.  You may set this variable to let bib-cite find 
these .aux files."
   :type '(repeat (file :format "%v")))
 
 (defcustom bib-dos-or-os2-variable (or (equal 'emx system-type)
-                                      (equal 'ms-dos system-type))
+                                       (equal 'ms-dos system-type))
   ;; Under OS/2 system-type equals emx
   ;; Under DOS  system-type equals ms-dos
   "Whether you use DOS or OS/2 for bib-make-bibliography/bib-display.
@@ -756,22 +756,22 @@ runs bib-find, and [mouse-3] runs bib-display."
   (interactive "P")
   (set (make-local-variable 'bib-cite-minor-mode)
        (if arg
-          (> (prefix-numeric-value arg) 0)
-        (not bib-cite-minor-mode)))
+           (> (prefix-numeric-value arg) 0)
+         (not bib-cite-minor-mode)))
   (cond
    (bib-cite-minor-mode                 ;Setup the minor-mode
     ;; Christoph Wedler's <wedler@fmi.uni-passau.de> suggestion for xemacs
     ;; Added for version 2.19
     (if (boundp 'tags-always-exact)
-       (progn
-         (set (make-local-variable 'tags-always-exact) nil)))
+        (progn
+          (set (make-local-variable 'tags-always-exact) nil)))
     ;; mouse overlay
     (if bib-highlight-mouse-t
-       (progn
-         (bib-cite-setup-highlight-mouse-keymap)
-         (bib-highlight-mouse)
-         (add-hook 'after-change-functions
-                   'bib-cite-setup-mouse-function nil t))))
+        (progn
+          (bib-cite-setup-highlight-mouse-keymap)
+          (bib-highlight-mouse)
+          (add-hook 'after-change-functions
+                    'bib-cite-setup-mouse-function nil t))))
    (t
    ;;;Undo the minor-mode
     ;; mouse overlay
@@ -780,7 +780,7 @@ runs bib-find, and [mouse-3] runs bib-display."
       ;; FIXME This detroys all mouse-faces and local-maps!
       ;; FIXME Hope no other package is using them in this buffer!
       (remove-text-properties (point-min) (point-max)
-                             '(mouse-face t local-map t))))))
+                              '(mouse-face t local-map t))))))
 
 ;;This must be eval'ed when the LaTeX mode is in use.
 ;; bib-highlight-mouse-keymap is a local variable so each buffer can have it's
@@ -794,24 +794,24 @@ runs bib-find, and [mouse-3] runs bib-display."
    ;;; FIXME: Check out (mouse-major-mode-menu) to see how it grabs the local
    ;;;        menus to display.  Maybe on `highlighted' commands we could only
    ;;;        display the bib-cite stuff (or a subset of it).
-       (let ((m (copy-keymap (current-local-map))))
-         ;; emacs 19
-         (cond
-          ((commandp 'action-key)
-           (substitute-key-definition 'action-key 'bib-find m global-map)
-           (substitute-key-definition 'assist-key 'bib-display m global-map)
-           (substitute-key-definition 'action-mouse-key-emacs19
-                                      'bib-find-mouse m global-map)
-           (substitute-key-definition 'assist-mouse-key-emacs19
-                                      'bib-display-mouse m global-map)
-           (substitute-key-definition 'action-key-depress-emacs19
-                                      nil m global-map)
-           (substitute-key-definition 'assist-key-depress-emacs19
-                                      nil m global-map))
-          (t                               ; emacs 19, not hyperbole
-           (define-key m [down-mouse-3] 'bib-display-mouse)
-           (define-key m [mouse-2] 'bib-find-mouse)))
-         m)))
+        (let ((m (copy-keymap (current-local-map))))
+          ;; emacs 19
+          (cond
+           ((commandp 'action-key)
+            (substitute-key-definition 'action-key 'bib-find m global-map)
+            (substitute-key-definition 'assist-key 'bib-display m global-map)
+            (substitute-key-definition 'action-mouse-key-emacs19
+                                       'bib-find-mouse m global-map)
+            (substitute-key-definition 'assist-mouse-key-emacs19
+                                       'bib-display-mouse m global-map)
+            (substitute-key-definition 'action-key-depress-emacs19
+                                       nil m global-map)
+            (substitute-key-definition 'assist-key-depress-emacs19
+                                       nil m global-map))
+           (t                               ; emacs 19, not hyperbole
+            (define-key m [down-mouse-3] 'bib-display-mouse)
+            (define-key m [mouse-2] 'bib-find-mouse)))
+          m)))
 
 ;;;###autoload
 (defun turn-on-bib-cite ()
@@ -822,10 +822,10 @@ runs bib-find, and [mouse-3] runs bib-display."
   (save-excursion
     (save-match-data
       (save-restriction
-       (narrow-to-region
-        (progn (goto-char beg) (beginning-of-line) (point))
-        (progn (goto-char end) (forward-line 1) (point)))
-       (bib-highlight-mouse)))))
+        (narrow-to-region
+         (progn (goto-char beg) (beginning-of-line) (point))
+         (progn (goto-char end) (forward-line 1) (point)))
+        (bib-highlight-mouse)))))
 
 (defvar bib-cite-minor-mode-map
   (let ((map (make-sparse-keymap)))
@@ -853,11 +853,11 @@ runs bib-find, and [mouse-3] runs bib-display."
 ;; Install ourselves:
 (or (assq 'bib-cite-minor-mode minor-mode-alist)
     (setq minor-mode-alist
-         (cons '(bib-cite-minor-mode " BCite") minor-mode-alist)))
+          (cons '(bib-cite-minor-mode " BCite") minor-mode-alist)))
 (or (assq 'bib-cite-minor-mode minor-mode-map-alist)
     (setq minor-mode-map-alist
-         (cons (cons 'bib-cite-minor-mode bib-cite-minor-mode-map)
-               minor-mode-map-alist)))
+          (cons (cons 'bib-cite-minor-mode bib-cite-minor-mode-map)
+                minor-mode-map-alist)))
 
 
 ;; Following from bibtex.el
@@ -914,7 +914,7 @@ If text under cursor is a \\cite command, then display its 
BibTeX info from
 \\bibliography input file.
    Example with cursor located over cite command or arguments:
      \cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94}
-       ^Display-all-citations          ^Display-this-citation
+        ^Display-all-citations          ^Display-this-citation
 
 If text under cursor is a \\ref command, then display environment associated
 with its matching \\label command.
@@ -932,7 +932,7 @@ A TAGS file is created and used for multi-file documents 
under auctex."
     (cond
      ;; reftex doesn't handle label->ref
      ((and bib-cite-use-reftex-view-crossref
-          (memq kind '(ref cite)))
+           (memq kind '(ref cite)))
       ;;;FIXME: reftex doesn't want point on \ref or \cite part, but on keyword
       (require 'reftex)
       (reftex-view-crossref nil))
@@ -947,7 +947,7 @@ A TAGS file is created and used for multi-file documents 
under auctex."
 For multi-entry cite commands, the cursor should be on the actual cite key
 desired (otherwise a random entry will be selected).
 e.g.: \cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94}
-                       ^Display-this-citation
+                        ^Display-this-citation
 
 If text under cursor is a \\ref command, then point is moved to its matching
 \\label command.
@@ -965,7 +965,7 @@ A TAGS file is created and used for multi-file documents 
under auctex."
     (cond
      ;; reftex doesn't handle label->ref
      ((and bib-cite-use-reftex-view-crossref
-          (memq kind '(ref cite)))
+           (memq kind '(ref cite)))
       (require 'reftex)
       (reftex-view-crossref t))
      ((eq kind 'cite)
@@ -986,21 +986,21 @@ find the next occurrence of a regexp."
       ;; FIXME: This check for `xref-find-definitions' should be
       ;; removed once AUCTeX requires Emacs >= 25.1
       (let ((func (if (fboundp 'xref-find-definitions)
-                     'xref-find-definitions
-                   'find-tag)))
-       (if prev-p
-           (funcall func t '- t)
-         (funcall func t t t)))
+                      'xref-find-definitions
+                    'find-tag)))
+        (if prev-p
+            (funcall func t '- t)
+          (funcall func t t t)))
     (if bib-cite-search-ring
-       ;;FIXME: Should first make sure I move off initial \ref{}.
-       (let ((regexp (concat bib-ref-regexpc bib-cite-search-ring "}")))
-         (if prev-p
-             (if (not (re-search-backward regexp nil t))
-                 (message "No previous occurrence of reference %s"
-                          bib-cite-search-ring))
-           (if (not (re-search-forward regexp nil t))
-               (message "No next occurrence of reference %s"
-                        bib-cite-search-ring))))
+        ;;FIXME: Should first make sure I move off initial \ref{}.
+        (let ((regexp (concat bib-ref-regexpc bib-cite-search-ring "}")))
+          (if prev-p
+              (if (not (re-search-backward regexp nil t))
+                  (message "No previous occurrence of reference %s"
+                           bib-cite-search-ring))
+            (if (not (re-search-forward regexp nil t))
+                (message "No next occurrence of reference %s"
+                         bib-cite-search-ring))))
       (message "Sorry, no previous reference to find.  Use bib-find?"))))
 
 (defun bib-display-mouse (EVENT)
@@ -1026,40 +1026,40 @@ by using bib-apropos sequentially."
   ;;(interactive "sBibTeX apropos: ")
   (interactive)
   (let* ((keylist (and (boundp 'TeX-auto-update) ;Avoid error in FRAMEPOP
-                      (fboundp 'LaTeX-bibitem-list) ;Use this if using auctex
-                      (LaTeX-bibitem-list)))
-        (keyword (bib-apropos-keyword-at-point))
-        (keyword (completing-read "BiBTeX apropos: " keylist nil nil keyword))
-        (the-text)(key-point)(start-point)
-        (new-buffer-f (and (not (string-match "^bib" mode-name))
-                           (not (string-equal "*Help*" (buffer-name)))))
-        (bib-buffer (or (and new-buffer-f (bib-get-bibliography nil))
-                        (current-buffer))))
+                       (fboundp 'LaTeX-bibitem-list) ;Use this if using auctex
+                       (LaTeX-bibitem-list)))
+         (keyword (bib-apropos-keyword-at-point))
+         (keyword (completing-read "BiBTeX apropos: " keylist nil nil keyword))
+         (the-text)(key-point)(start-point)
+         (new-buffer-f (and (not (string-match "^bib" mode-name))
+                            (not (string-equal "*Help*" (buffer-name)))))
+         (bib-buffer (or (and new-buffer-f (bib-get-bibliography nil))
+                         (current-buffer))))
     (with-current-buffer bib-buffer
       (goto-char (point-min))
       (while (and (re-search-forward "^[ \t]*@" nil t)
-                 (re-search-forward keyword nil t))
-       (setq key-point (point))        ;To make sure this is within entry
-       (re-search-backward "^[ \t]*@" nil t)
-       (setq start-point (point))
-       (forward-list 1)
-       (if (< (point) key-point)       ;And this is that test...
-           (goto-char key-point)       ;Not within entry, skip it.
-         (setq the-text
-               (cons (concat (buffer-substring start-point (point)) "\n")
-                     the-text))))
+                  (re-search-forward keyword nil t))
+        (setq key-point (point))        ;To make sure this is within entry
+        (re-search-backward "^[ \t]*@" nil t)
+        (setq start-point (point))
+        (forward-list 1)
+        (if (< (point) key-point)       ;And this is that test...
+            (goto-char key-point)       ;Not within entry, skip it.
+          (setq the-text
+                (cons (concat (buffer-substring start-point (point)) "\n")
+                      the-text))))
       (if (not the-text)
-         (message "Sorry, no matches found.")
-       (with-output-to-temp-buffer "*Help*"
-         (mapc #'princ (nreverse the-text)))
-       (bib-cite-fontify-help-as-bibtex)
-       (if bib-novice
-           (message
-            (substitute-command-keys
-             (concat "Use \\[bib-apropos] again in the *help* buffer"
-                     " to trim the search")))))
+          (message "Sorry, no matches found.")
+        (with-output-to-temp-buffer "*Help*"
+          (mapc #'princ (nreverse the-text)))
+        (bib-cite-fontify-help-as-bibtex)
+        (if bib-novice
+            (message
+             (substitute-command-keys
+              (concat "Use \\[bib-apropos] again in the *help* buffer"
+                      " to trim the search")))))
       (if new-buffer-f
-         (kill-buffer bib-buffer)))))
+          (kill-buffer bib-buffer)))))
 
 (defvar bib-document-citekeys-obarray-warnings nil
   "Bib-cite internal variable.")
@@ -1079,53 +1079,53 @@ This function is useful when you want to share a LaTeX 
file, and therefore want
 to create a bibtex file containing only the references used in the document."
   (interactive)
   (let* ((the-keys-obarray (or (bib-document-citekeys-obarray)
-                              (bib-buffer-citekeys-obarray)))
-                                       ;1st in case of error
-        (new-buffer
-         (create-file-buffer
-          (concat (substring (buffer-name) 0
-                             (or (string-match "\\." (buffer-name))
-                                 (length (buffer-name))))
-                  "-bib.bib")))
-        (bib-buffer (bib-get-bibliography nil))
-        (the-warnings (bib-get-citations the-keys-obarray
-                                         bib-buffer
-                                         new-buffer
-                                         nil)))
+                               (bib-buffer-citekeys-obarray)))
+                                        ;1st in case of error
+         (new-buffer
+          (create-file-buffer
+           (concat (substring (buffer-name) 0
+                              (or (string-match "\\." (buffer-name))
+                                  (length (buffer-name))))
+                   "-bib.bib")))
+         (bib-buffer (bib-get-bibliography nil))
+         (the-warnings (bib-get-citations the-keys-obarray
+                                          bib-buffer
+                                          new-buffer
+                                          nil)))
     (kill-buffer bib-buffer)
 ;;; (switch-to-buffer new-buffer)
     (funcall bib-switch-to-buffer-function new-buffer)
     (bibtex-mode)
     (if (or bib-document-citekeys-obarray-warnings
-           the-warnings)
-       (progn
-         (cond
-          ((and bib-document-citekeys-obarray-warnings the-warnings)
-           (with-output-to-temp-buffer "*Help*"
-             (princ bib-document-citekeys-obarray-warnings the-warnings)))
-          (bib-document-citekeys-obarray-warnings
-           (with-output-to-temp-buffer "*Help*"
-             (princ bib-document-citekeys-obarray-warnings)))
-          (the-warnings
-           (with-output-to-temp-buffer "*Help*" (princ the-warnings))))
-         (setq bib-document-citekeys-obarray-warnings nil) ;Reset
-         (bib-cite-fontify-red)))
+            the-warnings)
+        (progn
+          (cond
+           ((and bib-document-citekeys-obarray-warnings the-warnings)
+            (with-output-to-temp-buffer "*Help*"
+              (princ bib-document-citekeys-obarray-warnings the-warnings)))
+           (bib-document-citekeys-obarray-warnings
+            (with-output-to-temp-buffer "*Help*"
+              (princ bib-document-citekeys-obarray-warnings)))
+           (the-warnings
+            (with-output-to-temp-buffer "*Help*" (princ the-warnings))))
+          (setq bib-document-citekeys-obarray-warnings nil) ;Reset
+          (bib-cite-fontify-red)))
     (if bib-novice
-       (message
-        (substitute-command-keys
-         "Use \\[save-buffer] to save this buffer to a file.")))))
+        (message
+         (substitute-command-keys
+          "Use \\[save-buffer] to save this buffer to a file.")))))
 
 (defun bib-cite-fontify-red (&optional limit)
   "Fontify *Help* buffer in red-bold up to optional LIMIT."
   (if (and window-system                ;Not exactly correct for XEmacs
-          (not (facep 'red-bold)))
+           (not (facep 'red-bold)))
       (progn
-       (copy-face 'bold 'red-bold)
-       (set-face-foreground 'red-bold "red")))
+        (copy-face 'bold 'red-bold)
+        (set-face-foreground 'red-bold "red")))
   (with-current-buffer "*Help*"
     (let ((before-change-functions) (after-change-functions))
       (put-text-property (point-min)(or limit (point-max))
-                        'face 'red-bold))))
+                         'face 'red-bold))))
 
 (defun bib-cite--fontify-help ()
   ;; FIXME: This looks ugly and incorrect.
@@ -1164,14 +1164,14 @@ to create a bibtex file containing only the references 
used in the document."
       ;; (setq font-lock-string-face font-latex-math-face
       ;;       font-latex-string-face (default-value 'font-lock-string-face))
       (let ((font-lock-defaults
-            (if (featurep 'font-latex)
-                '((font-latex-keywords font-latex-keywords-1
-                                       font-latex-keywords-2)
-                  nil nil ((?\( . ".") (?\) . ".") (?$ . "\"")) nil
-                  (font-lock-comment-start-regexp . "%")
-                  (font-lock-mark-block-function . mark-paragraph))
-              '(tex-font-lock-keywords nil nil ((?$ . "\""))))))
-       (bib-cite--fontify-help))))))
+             (if (featurep 'font-latex)
+                 '((font-latex-keywords font-latex-keywords-1
+                                        font-latex-keywords-2)
+                   nil nil ((?\( . ".") (?\) . ".") (?$ . "\"")) nil
+                   (font-lock-comment-start-regexp . "%")
+                   (font-lock-mark-block-function . mark-paragraph))
+               '(tex-font-lock-keywords nil nil ((?$ . "\""))))))
+        (bib-cite--fontify-help))))))
 
 (defvar bib-document-TeX-files-warnings nil
   "Bib-cite internal variable.")
@@ -1185,10 +1185,10 @@ See variables bib-etags-command and bib-etags-filename"
   (interactive)
   (require 'etags)
   (let* ((the-file-list (bib-document-TeX-files))
-        (the-file (car the-file-list))
-        (dir (or masterdir (bib-master-directory)))
-        (the-tags-file (expand-file-name bib-etags-filename dir))
-        (the-tags-buffer (get-file-buffer the-tags-file)))
+         (the-file (car the-file-list))
+         (dir (or masterdir (bib-master-directory)))
+         (the-tags-file (expand-file-name bib-etags-filename dir))
+         (the-tags-buffer (get-file-buffer the-tags-file)))
     ;; Create TAGS file with first TeX file (master file)
     (shell-command (concat bib-etags-command the-tags-file " " the-file))
     (setq the-file-list (cdr the-file-list))
@@ -1199,12 +1199,12 @@ See variables bib-etags-command and bib-etags-filename"
        (concat bib-etags-append-command the-tags-file " " the-file))
       (setq the-file-list (cdr the-file-list)))
     (if the-tags-buffer                 ;buffer existed; we must refresh it.
-       (with-current-buffer the-tags-buffer
-         (revert-buffer t t)))
+        (with-current-buffer the-tags-buffer
+          (revert-buffer t t)))
 
     ;; Check value of tags-file-name against the-tags-file
     (or (equal the-tags-file  tags-file-name) ;make sure it's current
-       (visit-tags-table the-tags-file))
+        (visit-tags-table the-tags-file))
 
     ;(set (make-local-variable 'tags-file-name) the-tags-file))
     ;; above should not be needed
@@ -1217,16 +1217,16 @@ See variables bib-etags-command and bib-etags-filename"
     ;;  To get around this.  I'm setting this variable in the TAGS buffer.
     ;; (Changed by Anders Stenman)
     (if (get-file-buffer the-tags-file)
-       (with-current-buffer (get-file-buffer the-tags-file)
-         (set (make-local-variable 'tags-file-name) the-tags-file))))
+        (with-current-buffer (get-file-buffer the-tags-file)
+          (set (make-local-variable 'tags-file-name) the-tags-file))))
 
 
   (if bib-document-TeX-files-warnings   ;free variable loose in emacs!
       (progn
-       (with-output-to-temp-buffer "*Help*"
-         (princ bib-document-TeX-files-warnings))
-       (setq bib-document-TeX-files-warnings nil) ;Reset
-       (bib-cite-fontify-red))))
+        (with-output-to-temp-buffer "*Help*"
+          (princ bib-document-TeX-files-warnings))
+        (setq bib-document-TeX-files-warnings nil) ;Reset
+        (bib-cite-fontify-red))))
 
 (defun bib-Is-hidden ()
   "Return true is current point is hidden."
@@ -1234,10 +1234,10 @@ See variables bib-etags-command and bib-etags-filename"
       nil                               ;Not hidden if not using this...
     (save-excursion
       (if (not (re-search-backward "[\n\^M]" nil t))
-         nil                           ;Play safe
-       (if (string-equal (match-string 0) "\n")
-           nil
-         t)))))
+          nil                           ;Play safe
+        (if (string-equal (match-string 0) "\n")
+            nil
+          t)))))
 
 (defun bib-highlight-mouse ()
   "Make that nice green highlight when the mouse is over LaTeX commands."
@@ -1253,39 +1253,39 @@ See variables bib-etags-command and bib-etags-filename"
   ;;      )
   (save-excursion
     (let ((s)(e)(extent)(local-extent-list bib-ext-list)
-         (inhibit-read-only t)
-         (modified (buffer-modified-p))) ;put-text-property changing this?
+          (inhibit-read-only t)
+          (modified (buffer-modified-p))) ;put-text-property changing this?
       ;; * peta Wed Nov  8 16:27:29 1995 -- better remove the mouse face
       ;;   properties first.
-      (setq bib-ext-list nil)          ;Reconstructed below...
+      (setq bib-ext-list nil)           ;Reconstructed below...
       ;; Remove properties for regular emacs
       ;; FIXME This detroys all mouse-faces and local-maps!
       ;; FIXME Hope no other package is using them in this buffer!
       (let ((before-change-functions) (after-change-functions))
-       (remove-text-properties (point-min) (point-max)
-                               '(mouse-face t local-map t)))
+        (remove-text-properties (point-min) (point-max)
+                                '(mouse-face t local-map t)))
       (goto-char (point-min))
       (while
-         (re-search-forward
-          (concat
-           "\\\\\\(" (substring bib-ref-regexp 2)
-           "\\|label\\|[A-Za-z]*cite[A-Za-z]*\\(\\[[^]]*\\]\\)*\\){[^}]*}")
-          nil t)
-       (setq s (match-beginning 0))
-       (setq e (match-end 0))
-       (let ((before-change-functions) (after-change-functions)
-             ;;(this-overlay (make-overlay s e))
-             )
+          (re-search-forward
+           (concat
+            "\\\\\\(" (substring bib-ref-regexp 2)
+            "\\|label\\|[A-Za-z]*cite[A-Za-z]*\\(\\[[^]]*\\]\\)*\\){[^}]*}")
+           nil t)
+        (setq s (match-beginning 0))
+        (setq e (match-end 0))
+        (let ((before-change-functions) (after-change-functions)
+              ;;(this-overlay (make-overlay s e))
+              )
 ;;;  Even using overlays doesn't help here.  If bib-highlight-mouse-keymap
 ;;;  does not include the AucTeX menus, then these disappear when we click
 ;;;  onto a \cite command.  Perhaps using bib-cite as a minor mode will fix
 ;;;  this?  For now, bib-cite must be loaded after these menus are built.
 ;;;  It must therefore be loaded in a mode-hook.
-         (put-text-property s e 'local-map bib-highlight-mouse-keymap)
-         (put-text-property s e 'mouse-face 'highlight)
-         ;;(overlay-put this-overlay 'local-map bib-highlight-mouse-keymap)
-         ;;(overlay-put this-overlay 'mouse-face 'highlight)
-         ))
+          (put-text-property s e 'local-map bib-highlight-mouse-keymap)
+          (put-text-property s e 'mouse-face 'highlight)
+          ;;(overlay-put this-overlay 'local-map bib-highlight-mouse-keymap)
+          ;;(overlay-put this-overlay 'mouse-face 'highlight)
+          ))
       (set-buffer-modified-p modified))))
 
 (defun bib-toggle-highlight ()
@@ -1295,10 +1295,10 @@ See variables bib-etags-command and bib-etags-filename"
   (if (setq bib-highlight-mouse-t (not bib-highlight-mouse-t))
       (bib-highlight-mouse)
     (let ((modified (buffer-modified-p))
-         (inhibit-read-only t))
+          (inhibit-read-only t))
       (let ((before-change-functions) (after-change-functions))
-       (remove-text-properties (point-min) (point-max)
-                               '(mouse-face local-map)))
+        (remove-text-properties (point-min) (point-max)
+                                '(mouse-face local-map)))
       (set-buffer-modified-p modified))))
 
 (defun bib-label-help-echo (object)
@@ -1312,11 +1312,11 @@ See variables bib-etags-command and bib-etags-filename"
 Use mouse button 3 to display the %s."))
   (save-match-data
     (let* ((string (extent-string object))
-          (type (cond ((string-match "^\\\\[A-Za-z]*cite[A-Za-z]*" string) 
"citation")
-                      ((string-match
-                        (concat "^" bib-ref-regexp) string) "\\label{}")
-                      ((string-match "^\\\\label" string) "\\ref{}")
-                      (t "this (unknown) reference"))))
+           (type (cond ((string-match "^\\\\[A-Za-z]*cite[A-Za-z]*" string) 
"citation")
+                       ((string-match
+                         (concat "^" bib-ref-regexp) string) "\\label{}")
+                       ((string-match "^\\\\label" string) "\\ref{}")
+                       (t "this (unknown) reference"))))
       (format format type type))))
 
 ;;----------------------------------------------------------------------------
@@ -1329,27 +1329,27 @@ Example with cursor located over cite command or 
arguments:
    ^Display-all-citations          ^Display-this-citation"
   (save-excursion
     (let* ((the-keys-obarray (bib-get-citekeys-obarray)) ;1st in case of error
-          (work-buffer (get-buffer-create "*bibtex-work*"))
-          (bib-buffer (bib-get-bibliography nil))
-          (the-warnings (bib-get-citations
-                         the-keys-obarray
-                         bib-buffer
-                         work-buffer
-                         bib-substitute-string-in-display))
-          (the-warn-point))
+           (work-buffer (get-buffer-create "*bibtex-work*"))
+           (bib-buffer (bib-get-bibliography nil))
+           (the-warnings (bib-get-citations
+                          the-keys-obarray
+                          bib-buffer
+                          work-buffer
+                          bib-substitute-string-in-display))
+           (the-warn-point))
       (if the-warnings
-         (progn
-           (set-buffer work-buffer)
-           (goto-char 1)
-           (insert the-warnings)
-           (setq the-warn-point (point))))
+          (progn
+            (set-buffer work-buffer)
+            (goto-char 1)
+            (insert the-warnings)
+            (setq the-warn-point (point))))
       (with-output-to-temp-buffer
-         "*Help*"
-       (set-buffer work-buffer)
-       (princ (buffer-substring 1 (point-max))))
+          "*Help*"
+        (set-buffer work-buffer)
+        (princ (buffer-substring 1 (point-max))))
       (bib-cite-fontify-help-as-bibtex)
       (if the-warn-point
-         (bib-cite-fontify-red the-warn-point))
+          (bib-cite-fontify-red the-warn-point))
       (kill-buffer bib-buffer)
       (kill-buffer work-buffer))))
 
@@ -1360,32 +1360,32 @@ under cursor from \bibliography input file.
 In a multi-entry cite command, the cursor should be on the actual cite key
 desired (otherwise a random entry will be selected).
 e.g.: \cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94}
-                       ^Display-this-citation"
+                        ^Display-this-citation"
   (let ((the-keys-obarray (bib-get-citekeys-obarray)) ;1st in case of error
-       (bib-buffer (bib-get-bibliography t))
-       (the-key)(the-file))
+        (bib-buffer (bib-get-bibliography t))
+        (the-key)(the-file))
     (save-excursion
       (mapatoms                     ;Do this for each cite-key found...
        (lambda (cite-key)
-        (setq the-key (symbol-name cite-key)))
+         (setq the-key (symbol-name cite-key)))
        the-keys-obarray)
       (set-buffer bib-buffer)
       (goto-char (point-min))
       (if (not (re-search-forward
-               (concat "@[^{(]+[{(][\t ]*" (regexp-quote the-key) "[ ,\n]")
-               nil t))
-         (progn
-           (kill-buffer bib-buffer)
-           (error "Sorry, could not find bib entry for %s" the-key))
-       (re-search-backward "%%%Filename: \\([^\n]*\\)" nil t)
-       (setq the-file (match-string 1))
-       (kill-buffer bib-buffer)))
+                (concat "@[^{(]+[{(][\t ]*" (regexp-quote the-key) "[ ,\n]")
+                nil t))
+          (progn
+            (kill-buffer bib-buffer)
+            (error "Sorry, could not find bib entry for %s" the-key))
+        (re-search-backward "%%%Filename: \\([^\n]*\\)" nil t)
+        (setq the-file (match-string 1))
+        (kill-buffer bib-buffer)))
 ;;; (find-file the-file)
     (funcall bib-switch-to-buffer-function (find-file-noselect the-file))
     (goto-char (point-min))             ;V2.19 fix
     (re-search-forward (concat "@[^{(]+[{(][\t ]*"
-                              (regexp-quote the-key)
-                              "[ ,\n]") nil t)))
+                               (regexp-quote the-key)
+                               "[ ,\n]") nil t)))
 
 ;;--------------------------------------------------------------------------
 ;; Function for bib-apropos
@@ -1396,11 +1396,11 @@ e.g.: \cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94}
     (let ((here (point)))
       (cond
        ((and (re-search-backward "[\n{, ]" nil t)
-            (string-equal "{" (buffer-substring (match-beginning 0)
-                                                (match-end 0))))
-       (if (fboundp 'buffer-substring-no-properties)
-           (buffer-substring-no-properties (1+ (point)) here)
-       (buffer-substring (1+ (point)) here)))))))
+             (string-equal "{" (buffer-substring (match-beginning 0)
+                                                 (match-end 0))))
+        (if (fboundp 'buffer-substring-no-properties)
+            (buffer-substring-no-properties (1+ (point)) here)
+        (buffer-substring (1+ (point)) here)))))))
 
 ;;--------------------------------------------------------------------------
 ;; Functions for Displaying or moving to matching \ref or \label command
@@ -1413,7 +1413,7 @@ label.  If you answer with an empty string, a second 
prompt for a ref will
 be given."
   (let ((the-regexp (bib-guess-or-prompt-for-label)))
     (if (not the-regexp)
-       (message "No name given")
+        (message "No name given")
       (bib-display-or-find-label the-regexp t))))
 
 (defun bib-find-label ()
@@ -1435,7 +1435,7 @@ If within a multi-file document (in auctex only)
      C-u - M-.   Go back to previous tag found."
   (let ((the-regexp (bib-guess-or-prompt-for-label)))
     (if (not the-regexp)
-       (message "No name given")
+        (message "No name given")
       (bib-display-or-find-label the-regexp nil))))
 
 ;;--------------------------------------------------------------------------
@@ -1444,59 +1444,59 @@ If within a multi-file document (in auctex only)
 (defun bib-display-or-find-label (the-regexp displayf)
 ;; work horse for bib-find-label and bib-display-label
   (let* ((masterfile (bib-master-file))
-        (masterdir (and masterfile
-                        (file-name-directory masterfile)))
-        (new-point)(new-buffer))
+         (masterdir (and masterfile
+                         (file-name-directory masterfile)))
+         (new-point)(new-buffer))
     (save-excursion
       ;; Now we are either in a simple file, or with a multi-file document
       (cond
        (masterfile                   ;Multi-file document
-       (cond
-        (displayf                  ;Display only
-         (set-buffer (bib-etags-find-noselect the-regexp masterdir))
-         (re-search-forward the-regexp nil t)
-         ;; ...because tags puts point on beginning of line
-         (if (string-match "^\\\\\\\\label" the-regexp)
-             (bib-display-this-environment) ;display the label's environment
-           (bib-display-this-ref)))    ;     display the ref's context
-        (t                         ;Move to it
-         (setq new-buffer (bib-etags-find-noselect the-regexp masterdir))
-         (if bib-novice
-             (message
-              (substitute-command-keys
-               (concat "Use \\[bib-find-next] to find the next occurrence "
-                       "and C-u \\[bib-find-next] to find previous."))))
-         (if (equal new-buffer (current-buffer))
-             (setq new-point (point)))))) ;Moving with the same buffer
+        (cond
+         (displayf                  ;Display only
+          (set-buffer (bib-etags-find-noselect the-regexp masterdir))
+          (re-search-forward the-regexp nil t)
+          ;; ...because tags puts point on beginning of line
+          (if (string-match "^\\\\\\\\label" the-regexp)
+              (bib-display-this-environment) ;display the label's environment
+            (bib-display-this-ref)))    ;     display the ref's context
+         (t                         ;Move to it
+          (setq new-buffer (bib-etags-find-noselect the-regexp masterdir))
+          (if bib-novice
+              (message
+               (substitute-command-keys
+                (concat "Use \\[bib-find-next] to find the next occurrence "
+                        "and C-u \\[bib-find-next] to find previous."))))
+          (if (equal new-buffer (current-buffer))
+              (setq new-point (point)))))) ;Moving with the same buffer
        (t                           ;Single-file document
-       (goto-char (point-min))
-       (cond
-        ((re-search-forward the-regexp nil t)
-         (if displayf
-             (if (string-match "^\\\\label" the-regexp)
-                 (bib-display-this-environment) ;Display the environment
-               (bib-display-this-ref)) ;         display the ref's context
-           (setq new-point (match-beginning 0))  ;or move there
-           (if (string-match "{\\(.*\\)}" the-regexp)
-               (setq bib-cite-search-ring (match-string 1 the-regexp)))
-           (if bib-novice
-               (message
-                (substitute-command-keys
-                 (concat "Use \\[bib-find-next] to find the next occurrence "
-                         "and C-u \\[bib-find-next] to find previous."))))))
-        (t
-         (message "Sorry, cannot find it (%s)" the-regexp))))))
+        (goto-char (point-min))
+        (cond
+         ((re-search-forward the-regexp nil t)
+          (if displayf
+              (if (string-match "^\\\\label" the-regexp)
+                  (bib-display-this-environment) ;Display the environment
+                (bib-display-this-ref)) ;         display the ref's context
+            (setq new-point (match-beginning 0))  ;or move there
+            (if (string-match "{\\(.*\\)}" the-regexp)
+                (setq bib-cite-search-ring (match-string 1 the-regexp)))
+            (if bib-novice
+                (message
+                 (substitute-command-keys
+                  (concat "Use \\[bib-find-next] to find the next occurrence "
+                          "and C-u \\[bib-find-next] to find previous."))))))
+         (t
+          (message "Sorry, cannot find it (%s)" the-regexp))))))
     (if new-point
-       (progn
-         (push-mark (point) t nil)   ;We've moving there... push mark
-         (goto-char new-point))
+        (progn
+          (push-mark (point) t nil)   ;We've moving there... push mark
+          (goto-char new-point))
       (if new-buffer                    ;We've changing buffer
-         ;;(switch-to-buffer new-buffer)
-         (funcall bib-switch-to-buffer-function new-buffer)))
+          ;;(switch-to-buffer new-buffer)
+          (funcall bib-switch-to-buffer-function new-buffer)))
     (if (bib-Is-hidden)
-       (save-excursion
-         (beginning-of-line)
-         (show-entry)))))
+        (save-excursion
+          (beginning-of-line)
+          (show-entry)))))
 
 (defvar bib-label-prompt-map
   (let ((map (make-sparse-keymap)))
@@ -1508,36 +1508,36 @@ If within a multi-file document (in auctex only)
   "Guess from context, or prompt the user for a label command."
   (save-excursion
     (if (not (looking-at "\\\\"))        ;If not on beginning of a command
-            (re-search-backward "[\\]"
-                                (save-excursion (beginning-of-line)(point))
-                                t))
+             (re-search-backward "[\\]"
+                                 (save-excursion (beginning-of-line)(point))
+                                 t))
     (cond
      ((looking-at bib-ref-regexpc)   ;On \ref, looking for matching \label
       (let ((b (progn (search-forward "{" nil t)(forward-char -1)(point)))
-           (e (progn (forward-sexp 1)(point))))
-       (concat "\\\\label" (regexp-quote (buffer-substring b e)))))
+            (e (progn (forward-sexp 1)(point))))
+        (concat "\\\\label" (regexp-quote (buffer-substring b e)))))
      ((looking-at "\\\\label{")         ;On \label, looking for matching \ref
       (let ((b (progn (search-forward "{" nil t)(forward-char -1)(point)))
-           (e (progn (forward-sexp 1)(point))))
-       (concat  bib-ref-regexp (regexp-quote (buffer-substring b e)))))
+            (e (progn (forward-sexp 1)(point))))
+        (concat  bib-ref-regexp (regexp-quote (buffer-substring b e)))))
      (t                                 ;Prompt the user
       (let* ((minibuffer-local-completion-map bib-label-prompt-map)
-            (the-alist (create-alist-from-list
-                        (cdr (reverse LaTeX-label-list))))
-       ;;; LaTeX-label-list example:
-       ;;;  '(("label3" "label4")("label1" "label2") nil)
-       ;; so let's get rid of that nil part in embedded list.
-            (the-name
-             (completing-read "Label: " the-alist nil nil nil
-                              'LaTeX-find-label-hist-alist)))
-       (if (not (equal the-name ""))
-           (concat "\\\\label{" (regexp-quote the-name) "}")
-         ;; else try to get a \ref
-         (setq the-name (completing-read "Ref: " the-alist nil nil nil
-                                         'LaTeX-find-label-hist-alist))
-         (if (not (equal the-name ""))
-             (concat bib-ref-regexpc (regexp-quote the-name) "}")
-           nil)))))))
+             (the-alist (create-alist-from-list
+                         (cdr (reverse LaTeX-label-list))))
+        ;;; LaTeX-label-list example:
+        ;;;  '(("label3" "label4")("label1" "label2") nil)
+        ;; so let's get rid of that nil part in embedded list.
+             (the-name
+              (completing-read "Label: " the-alist nil nil nil
+                               'LaTeX-find-label-hist-alist)))
+        (if (not (equal the-name ""))
+            (concat "\\\\label{" (regexp-quote the-name) "}")
+          ;; else try to get a \ref
+          (setq the-name (completing-read "Ref: " the-alist nil nil nil
+                                          'LaTeX-find-label-hist-alist))
+          (if (not (equal the-name ""))
+              (concat bib-ref-regexpc (regexp-quote the-name) "}")
+            nil)))))))
 
 (defun bib-display-this-ref ()
   "Display a few lines around current point."
@@ -1546,34 +1546,34 @@ If within a multi-file document (in auctex only)
     (with-output-to-temp-buffer "*BiBTemp*"
       (princ
        (buffer-substring
-       (save-excursion
-         (let ((i 3))
-           (while (and (> i 0)
-                       (re-search-backward "[\n\^M]" nil t)
-                       (setq i (1- i)))))
-         (point))
-       (save-excursion
-         (let ((i 3))
-           (while (and (> i 0)
-                       (re-search-forward "[\n\^M]" nil t)
-                       (setq i (1- i)))))
-         (point)))))
+        (save-excursion
+          (let ((i 3))
+            (while (and (> i 0)
+                        (re-search-backward "[\n\^M]" nil t)
+                        (setq i (1- i)))))
+          (point))
+        (save-excursion
+          (let ((i 3))
+            (while (and (> i 0)
+                        (re-search-forward "[\n\^M]" nil t)
+                        (setq i (1- i)))))
+          (point)))))
     (set-buffer "*BiBTemp*")
     (while (search-forward "\^M" nil t)
       (replace-match "\n" nil t))
     (goto-char 1)
     (if (looking-at "\n")  ;Remove first empty line...
-       (delete-char 1))
+        (delete-char 1))
     (with-output-to-temp-buffer "*Help*"
       (princ (buffer-substring (point-min) (point-max))))
     (bib-cite-fontify-help-as-latex)
     (kill-buffer "*BiBTemp*"))
    (t
     (with-output-to-temp-buffer ;     display the ref's context
-       "*Help*"
+        "*Help*"
       (princ
        (buffer-substring (save-excursion (forward-line -2)(point))
-                        (save-excursion (forward-line 3)(point)))))
+                         (save-excursion (forward-line 3)(point)))))
     (bib-cite-fontify-help-as-latex))))
 
 (defun bib-display-this-environment ()
@@ -1592,48 +1592,48 @@ Does not save excursion."
 ;;    Function: Return the level of the section that contain point.
 ;; but then this code would only work as part of AUCTeX...
   (let ((the-point (point))
-       (end-point (point))
-       (the-environment)(foundf))
+        (end-point (point))
+        (the-environment)(foundf))
     (while (and (not foundf)
-               (goto-char end-point) ;Past end of last search
-               (re-search-forward "\\(^\\|\^M\\)[ \t]*\\\\end{\\([^}]*\\)}"
-                                  nil t))
+                (goto-char end-point) ;Past end of last search
+                (re-search-forward "\\(^\\|\^M\\)[ \t]*\\\\end{\\([^}]*\\)}"
+                                   nil t))
       (setq end-point (point))
       (setq the-environment (match-string 2))
       (and (not (string-match "document" the-environment))
-          (re-search-backward (concat "\\(^\\|\^M\\)[ \t]*\\\\begin{"
-                                      (regexp-quote the-environment) "}"))
-          (<= (point) the-point)
-          (setq foundf t)))
+           (re-search-backward (concat "\\(^\\|\^M\\)[ \t]*\\\\begin{"
+                                       (regexp-quote the-environment) "}"))
+           (<= (point) the-point)
+           (setq foundf t)))
     (if foundf                          ;A good environment
-       (progn
-         (cond ((bib-Is-hidden)        ;Better way is: replace-within-string
-                (with-output-to-temp-buffer "*BiBTemp*"
-                  (princ (buffer-substring (point) end-point)))
-                (set-buffer "*BiBTemp*")
-                (while (search-forward "\^M" nil t)
-                  (replace-match "\n" nil t))
-                (goto-char 1)
-                (if (looking-at "\n")  ;Remove first empty line...
-                    (delete-char 1))
-                (with-output-to-temp-buffer "*Help*"
-                  (princ (buffer-substring 1 (point-max))))
-                (kill-buffer "*BiBTemp*"))
-               (t
-                (with-output-to-temp-buffer "*Help*"
-                  (princ (buffer-substring (point) end-point)))))
-         (bib-cite-fontify-help-as-latex))
+        (progn
+          (cond ((bib-Is-hidden)        ;Better way is: replace-within-string
+                 (with-output-to-temp-buffer "*BiBTemp*"
+                   (princ (buffer-substring (point) end-point)))
+                 (set-buffer "*BiBTemp*")
+                 (while (search-forward "\^M" nil t)
+                   (replace-match "\n" nil t))
+                 (goto-char 1)
+                 (if (looking-at "\n")  ;Remove first empty line...
+                     (delete-char 1))
+                 (with-output-to-temp-buffer "*Help*"
+                   (princ (buffer-substring 1 (point-max))))
+                 (kill-buffer "*BiBTemp*"))
+                (t
+                 (with-output-to-temp-buffer "*Help*"
+                   (princ (buffer-substring (point) end-point)))))
+          (bib-cite-fontify-help-as-latex))
       ;; Just find the section declaration
       (goto-char the-point)
       (if (re-search-backward
 ;;;        "\\(^\\|\^M\\)[ \t]*\\\\\\(sub\\)*section{\\([^}]*\\)}" nil t)
 ;;;  Michael Steiner <steiner@cs.uni-sb.de> patch
-          "\\(^\\|\^M\\)[ \t]*\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*?\
+           "\\(^\\|\^M\\)[ 
\t]*\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*?\
 {\\([^}]*\\)}"
-          nil t)
-         (message (match-string 0))
-       (error
-        "Sorry, could not find an environment or section declaration")))))
+           nil t)
+          (message (match-string 0))
+        (error
+         "Sorry, could not find an environment or section declaration")))))
 
 (defvar LaTeX-find-label-hist-alist nil "History list for LaTeX-find-label.")
 (defvar LaTeX-label-list nil "Used by AUCTeX to store label names.")
@@ -1660,16 +1660,16 @@ into
   (let ((new-list nil))
     (while l
       (cond ((null (car l)))
-           ((symbolp (car l))
-            (setq new-list (cons (symbol-name (car l)) new-list)))
-           ((numberp (car l))
-            (setq new-list (cons (int-to-string (car l)) new-list)))
-           ((equal (car l) ""))
-           ((stringp (car l)) (setq new-list (cons (car l) new-list)))
-           ((listp (car l))
-            (setq new-list (nconc (bib-cite-mh-list-to-string-1 (car l))
-                                  new-list)))
-           (t (error "Bad element in mh-list-to-string: %s" (car l))))
+            ((symbolp (car l))
+             (setq new-list (cons (symbol-name (car l)) new-list)))
+            ((numberp (car l))
+             (setq new-list (cons (int-to-string (car l)) new-list)))
+            ((equal (car l) ""))
+            ((stringp (car l)) (setq new-list (cons (car l) new-list)))
+            ((listp (car l))
+             (setq new-list (nconc (bib-cite-mh-list-to-string-1 (car l))
+                                   new-list)))
+            (t (error "Bad element in mh-list-to-string: %s" (car l))))
       (setq l (cdr l)))
     new-list))
 
@@ -1684,160 +1684,160 @@ into
 Substitute strings if SUBSTITUTE is t
 Return the-warnings as text."
   (let ((the-warnings)                  ;The only variable to remember...
-       (case-fold-search t))           ;All other results go into new-buffer
+        (case-fold-search t))           ;All other results go into new-buffer
     ;; bibtex is not case-sensitive for keys.
     (save-excursion
       (let ((the-text))
-       (set-buffer bib-buffer)
-       (mapatoms                         ;Do this for each cite-key found...
-        (lambda (cite-key)
-          (goto-char (point-min))
-          (if (re-search-forward
-               (concat "@[^{(]+[{(][\t ]*"
-                       (regexp-quote (symbol-name cite-key))
-                       "\\([, ]\\\|$\\)")
-               ;;           ^^     ^  comma, space or end-of-line
-               nil t)
-              (setq the-text (concat the-text
-                                     (buffer-substring
-                                      (progn (beginning-of-line)(point))
-                                      (progn (forward-sexp 2)(point)))
-                                     "\n\n"))
-            (setq the-warnings (concat the-warnings
-                                       "Cannot find entry for: "
-                                       (symbol-name cite-key) "\n"))))
-        keys-obarray)
-       (if (not the-text)
-           (error "Sorry, could not find any of the references"))
-       ;; Insert the citations in the new buffer
-       (set-buffer new-buffer)
-       (insert the-text)
-       (goto-char 1))
+        (set-buffer bib-buffer)
+        (mapatoms                         ;Do this for each cite-key found...
+         (lambda (cite-key)
+           (goto-char (point-min))
+           (if (re-search-forward
+                (concat "@[^{(]+[{(][\t ]*"
+                        (regexp-quote (symbol-name cite-key))
+                        "\\([, ]\\\|$\\)")
+                ;;           ^^     ^  comma, space or end-of-line
+                nil t)
+               (setq the-text (concat the-text
+                                      (buffer-substring
+                                       (progn (beginning-of-line)(point))
+                                       (progn (forward-sexp 2)(point)))
+                                      "\n\n"))
+             (setq the-warnings (concat the-warnings
+                                        "Cannot find entry for: "
+                                        (symbol-name cite-key) "\n"))))
+         keys-obarray)
+        (if (not the-text)
+            (error "Sorry, could not find any of the references"))
+        ;; Insert the citations in the new buffer
+        (set-buffer new-buffer)
+        (insert the-text)
+        (goto-char 1))
 
       ;; We are at beginning of new-buffer.
       ;; Now handle crossrefs
       (let ((crossref-obarray (make-vector 201 0)))
-       (while (re-search-forward
-               "[, \t]*crossref[ \t]*=[ \t]*\\(\"\\|\{\\)" nil t)
-         ;;handle {text} or "text" cases
-         (if (string-equal "{" (match-string 1))
-             (re-search-forward "[^\}]+" nil t)
-           (re-search-forward "[^\"]+" nil t))
-         (intern (match-string 0) crossref-obarray))
-       ;; Now find the corresponding keys,
-       ;; but add them only if not already in `keys-obarray'
-       (set-buffer bib-buffer)
-       (goto-char 1)
-       (let ((the-text))
-         (mapatoms                     ;Do this for each crossref key found...
-          (lambda (crossref-key)
-            (if (not (intern-soft (symbol-name crossref-key) keys-obarray))
-                (progn
-                  ;; Not in keys-obarray, so not yet displayed.
-                  (goto-char (point-min))
-                  (if (re-search-forward
-                       (concat "@[^{(]+[{(][\t ]*"
-                               (regexp-quote (symbol-name crossref-key))
-                               "\\(,\\|$\\)")
-                       nil t)
-                      (setq the-text
-                            (concat the-text
-                                    (buffer-substring
-                                     (progn (beginning-of-line)(point))
-                                     (progn (forward-sexp 2)(point)))
-                                    "\n\n"))
-                    (setq the-warnings
-                          (concat the-warnings
-                                  "Cannot find crossref entry for: "
-                                  (symbol-name crossref-key) "\n"))))))
-          crossref-obarray)
-         ;; Insert the citations in the new buffer
-         (set-buffer new-buffer)
-         (goto-char (point-max))
-         (if the-text
-             (insert the-text)))
-       (goto-char 1))
+        (while (re-search-forward
+                "[, \t]*crossref[ \t]*=[ \t]*\\(\"\\|\{\\)" nil t)
+          ;;handle {text} or "text" cases
+          (if (string-equal "{" (match-string 1))
+              (re-search-forward "[^\}]+" nil t)
+            (re-search-forward "[^\"]+" nil t))
+          (intern (match-string 0) crossref-obarray))
+        ;; Now find the corresponding keys,
+        ;; but add them only if not already in `keys-obarray'
+        (set-buffer bib-buffer)
+        (goto-char 1)
+        (let ((the-text))
+          (mapatoms                     ;Do this for each crossref key found...
+           (lambda (crossref-key)
+             (if (not (intern-soft (symbol-name crossref-key) keys-obarray))
+                 (progn
+                   ;; Not in keys-obarray, so not yet displayed.
+                   (goto-char (point-min))
+                   (if (re-search-forward
+                        (concat "@[^{(]+[{(][\t ]*"
+                                (regexp-quote (symbol-name crossref-key))
+                                "\\(,\\|$\\)")
+                        nil t)
+                       (setq the-text
+                             (concat the-text
+                                     (buffer-substring
+                                      (progn (beginning-of-line)(point))
+                                      (progn (forward-sexp 2)(point)))
+                                     "\n\n"))
+                     (setq the-warnings
+                           (concat the-warnings
+                                   "Cannot find crossref entry for: "
+                                   (symbol-name crossref-key) "\n"))))))
+           crossref-obarray)
+          ;; Insert the citations in the new buffer
+          (set-buffer new-buffer)
+          (goto-char (point-max))
+          (if the-text
+              (insert the-text)))
+        (goto-char 1))
 
       ;; Now we have all citations in new-buffer, collect all used @String keys
       ;; Ex:  journal =      JPO,
       (let ((strings-obarray (make-vector 201 0)))
-       (while (re-search-forward bib-string-regexp nil t)
-         (intern (match-string 1) strings-obarray))
-       ;; Now find the corresponding @String commands
-       ;; Collect either the @string commands, or the string to substitute
-       (set-buffer bib-buffer)
-       (goto-char 1)
-       (let ((string-alist)
-             (the-text))
-         (mapatoms                     ;Do this for each string-key found...
-          (lambda (string-key)
-            (goto-char (point-min))
-            ;; search for @string{ key = {text}} or @string{ key = "text"}
-            (if (re-search-forward
-                 (concat "^[ \t]*@string[{(]"
-                         (regexp-quote (symbol-name string-key))
-                         "[\t ]*=[\t ]*\\(\"\\|\{\\)")
-                 nil t)
-                (let ((the-string-start (1- (match-end 1))) ;catch bracket
-                      ;;handle {text} or "text" cases
-                      (the-string-end
-                       (cond
-                        ((string-equal "\"" (match-string 1))
-                         (re-search-forward "[^\\]\"" nil t)
-                         (point))
-                        (t
-                         (forward-char -1)
-                         (forward-list 1)
-                         (point)))))
-                  (if substitute      ;Collect substitutions
-                      (setq string-alist
-                            (append
-                             string-alist
-                             (list
-                              (cons (symbol-name string-key)
-                                       ;(regexp-quote
-                                    (buffer-substring the-string-start
-                                                      the-string-end)))));)
-                    ;;Collect the strings command themseves
-                    (setq the-text
-                          (concat the-text
-                                  (buffer-substring
-                                   (progn (forward-char 1)(point))
-                                   (re-search-backward "^[ \t]*@string[{(]"
-                                                       nil t))
-                                  "\n"))))
-              ;; @string entry not found
-              (if (not (member-cis (symbol-name string-key)
-                                   bib-string-ignored-warning))
-                  (setq the-warnings
-                        (concat the-warnings
-                                "Cannot find @String entry for: "
-                                (symbol-name string-key) "\n")))))
-          strings-obarray)
-         ;; Now we have `the-text' of @string commands,
-         ;; or the `string-alist' to substitute.
-         (set-buffer new-buffer)
-         (if substitute
-             (while string-alist
-               (goto-char 1)
-               (let* ((the-key (car (car string-alist)))
-                      (the-string (cdr (car string-alist)))
-                      (slashed-string  ; "J. of Geo.\" -> "J. of Geo.\\\\"
-                       (dired-replace-in-string
-                        "\\\\" "\\\\" the-string)))
-
-                 (while (re-search-forward
-                         (concat "\\(^[, \t]*[a-zA-Z]+[ \t]*=[ \t]*\\)"
-                                 (regexp-quote the-key)
-                                 "\\([, \t\n]\\)")
-                         nil t)
-                   (replace-match (concat "\\1" slashed-string "\\2") t nil)))
-               (setq string-alist (cdr string-alist)))
-           ;; substitute is nil; Simply insert text of @string commands
-           (goto-char 1)
-           (if the-text
-               (insert the-text "\n")))
-         (goto-char 1))))
+        (while (re-search-forward bib-string-regexp nil t)
+          (intern (match-string 1) strings-obarray))
+        ;; Now find the corresponding @String commands
+        ;; Collect either the @string commands, or the string to substitute
+        (set-buffer bib-buffer)
+        (goto-char 1)
+        (let ((string-alist)
+              (the-text))
+          (mapatoms                     ;Do this for each string-key found...
+           (lambda (string-key)
+             (goto-char (point-min))
+             ;; search for @string{ key = {text}} or @string{ key = "text"}
+             (if (re-search-forward
+                  (concat "^[ \t]*@string[{(]"
+                          (regexp-quote (symbol-name string-key))
+                          "[\t ]*=[\t ]*\\(\"\\|\{\\)")
+                  nil t)
+                 (let ((the-string-start (1- (match-end 1))) ;catch bracket
+                       ;;handle {text} or "text" cases
+                       (the-string-end
+                        (cond
+                         ((string-equal "\"" (match-string 1))
+                          (re-search-forward "[^\\]\"" nil t)
+                          (point))
+                         (t
+                          (forward-char -1)
+                          (forward-list 1)
+                          (point)))))
+                   (if substitute      ;Collect substitutions
+                       (setq string-alist
+                             (append
+                              string-alist
+                              (list
+                               (cons (symbol-name string-key)
+                                        ;(regexp-quote
+                                     (buffer-substring the-string-start
+                                                       the-string-end)))));)
+                     ;;Collect the strings command themseves
+                     (setq the-text
+                           (concat the-text
+                                   (buffer-substring
+                                    (progn (forward-char 1)(point))
+                                    (re-search-backward "^[ \t]*@string[{(]"
+                                                        nil t))
+                                   "\n"))))
+               ;; @string entry not found
+               (if (not (member-cis (symbol-name string-key)
+                                    bib-string-ignored-warning))
+                   (setq the-warnings
+                         (concat the-warnings
+                                 "Cannot find @String entry for: "
+                                 (symbol-name string-key) "\n")))))
+           strings-obarray)
+          ;; Now we have `the-text' of @string commands,
+          ;; or the `string-alist' to substitute.
+          (set-buffer new-buffer)
+          (if substitute
+              (while string-alist
+                (goto-char 1)
+                (let* ((the-key (car (car string-alist)))
+                       (the-string (cdr (car string-alist)))
+                       (slashed-string  ; "J. of Geo.\" -> "J. of Geo.\\\\"
+                        (dired-replace-in-string
+                         "\\\\" "\\\\" the-string)))
+
+                  (while (re-search-forward
+                          (concat "\\(^[, \t]*[a-zA-Z]+[ \t]*=[ \t]*\\)"
+                                  (regexp-quote the-key)
+                                  "\\([, \t\n]\\)")
+                          nil t)
+                    (replace-match (concat "\\1" slashed-string "\\2") t nil)))
+                (setq string-alist (cdr string-alist)))
+            ;; substitute is nil; Simply insert text of @string commands
+            (goto-char 1)
+            (if the-text
+                (insert the-text "\n")))
+          (goto-char 1))))
 
     ;; We are done!
     ;; Return the warnings...
@@ -1857,42 +1857,42 @@ Comparison is case-insensitive."
     (let((listelt (car LIST))(listrest (cdr LIST)))
       ;; see if car is equal to ELT
       (if (string-equal (downcase ELT) (downcase listelt))
-         t ;; if so return true
-       ;; else recurse for rest of list
-       (member-cis ELT listrest)))))
+          t ;; if so return true
+        ;; else recurse for rest of list
+        (member-cis ELT listrest)))))
 
 (defun bib-get-citekeys-obarray ()
   "Return obarray of citation key (within curly brackets) under cursor."
   (save-excursion
     ;; First find *only* a key *within a cite command
     (let ((the-point (point))
-         (keys-obarray (make-vector 201 0)))
+          (keys-obarray (make-vector 201 0)))
       ;; First try to match a cite command
       (if (and (skip-chars-backward "a-zA-Z") ;Stops on \ or {
-              (looking-at "[a-zA-Z]*cite[a-zA-Z]*"))
-         (progn
-           ;;skip over any optional arguments to \cite[][]{key} command
-           (skip-chars-forward "a-zA-Z")
-           (while (looking-at "\\[")
-             (forward-list 1))
-           (re-search-forward "{[ \n]*\\([^,} \n]+\\)" nil t)
-           (intern (match-string 1) keys-obarray)
-           (while (and (skip-chars-forward " \n") ;no effect on while
-                       (looking-at ","))
-             (forward-char 1)
-             ;;The following re-search skips over leading spaces
-             (re-search-forward "\\([^,} \n]+\\)" nil t)
-             (intern (match-string 1) keys-obarray)))
-       ;; Assume we are on the keyword
-       (goto-char the-point)
-       (let ((the-start (re-search-backward "[\n{, ]" nil t))
-             (the-end (progn (goto-char the-point)
-                             (re-search-forward "[\n}, ]" nil t))))
-         (if (and the-start the-end)
-             (intern (buffer-substring (1+ the-start) (1- the-end))
-                     keys-obarray)
-           ;; Neither...
-           (error "Sorry, can't find a reference here"))))
+               (looking-at "[a-zA-Z]*cite[a-zA-Z]*"))
+          (progn
+            ;;skip over any optional arguments to \cite[][]{key} command
+            (skip-chars-forward "a-zA-Z")
+            (while (looking-at "\\[")
+              (forward-list 1))
+            (re-search-forward "{[ \n]*\\([^,} \n]+\\)" nil t)
+            (intern (match-string 1) keys-obarray)
+            (while (and (skip-chars-forward " \n") ;no effect on while
+                        (looking-at ","))
+              (forward-char 1)
+              ;;The following re-search skips over leading spaces
+              (re-search-forward "\\([^,} \n]+\\)" nil t)
+              (intern (match-string 1) keys-obarray)))
+        ;; Assume we are on the keyword
+        (goto-char the-point)
+        (let ((the-start (re-search-backward "[\n{, ]" nil t))
+              (the-end (progn (goto-char the-point)
+                              (re-search-forward "[\n}, ]" nil t))))
+          (if (and the-start the-end)
+              (intern (buffer-substring (1+ the-start) (1- the-end))
+                      keys-obarray)
+            ;; Neither...
+            (error "Sorry, can't find a reference here"))))
       keys-obarray)))
 
 (defun bib-buffer-citekeys-obarray ()
@@ -1903,23 +1903,23 @@ Comparison is case-insensitive."
       ;; Following must allow for \cite[e.g.][]{key} !!!
       ;; regexp for \cite{key1,key2} was "\\\\[a-Z]*cite[a-Z]*{\\([^,}]+\\)"
       (while (re-search-forward "\\\\[a-zA-Z]*cite[a-zA-Z]*\\(\\[\\|{\\)"
-                               nil t)
-       (backward-char 1)
-       (while (looking-at "\\[")       ; ...so skip all bracketted options
-         (forward-sexp 1))
-       ;; then lookup first key
-       (if (looking-at "{[ \n]*\\([^,} \n]+\\)")
-           (progn
-             (intern (match-string 1) keys-obarray)
-             (goto-char (match-end 1))
-             (while (and (skip-chars-forward " \n")
-                         (looking-at ","))
-               (forward-char 1)
-               (re-search-forward "\\([^,} \n]+\\)" nil t)
-               (intern (match-string 1) keys-obarray)))))
+                                nil t)
+        (backward-char 1)
+        (while (looking-at "\\[")       ; ...so skip all bracketted options
+          (forward-sexp 1))
+        ;; then lookup first key
+        (if (looking-at "{[ \n]*\\([^,} \n]+\\)")
+            (progn
+              (intern (match-string 1) keys-obarray)
+              (goto-char (match-end 1))
+              (while (and (skip-chars-forward " \n")
+                          (looking-at ","))
+                (forward-char 1)
+                (re-search-forward "\\([^,} \n]+\\)" nil t)
+                (intern (match-string 1) keys-obarray)))))
       (if keys-obarray
-         keys-obarray
-       (error "Sorry, could not find any citation keys in this buffer")))))
+          keys-obarray
+        (error "Sorry, could not find any citation keys in this buffer")))))
 
 ;;---------------------------------------------------------------------------
 ;; Multi-file document programming requirements:
@@ -1949,31 +1949,31 @@ Comparison is case-insensitive."
 If no master file, then return current default."
   (let ((masterfile (bib-master-file)))
     (if masterfile
-       (file-name-directory (expand-file-name (TeX-master-file)))
+        (file-name-directory (expand-file-name (TeX-master-file)))
       default-directory)))
 
 (defun bib-master-file ()
   "Return master file full path, or nil if not a multi-file document."
 ;; I wish there were a better way to tell about non multi-file documents...
   (let ((master
-        (cond
-         ((not (boundp 'TeX-master))
-          ;; This buffer doesn't know what a master file is, so return now.
-          nil)
-         ((and TeX-master              ;Set, but not to t
-               (not (symbolp TeX-master))) ; then we have an actual name
-          (expand-file-name TeX-master))
-         ((and (eq TeX-master 't)      ;Test if master file itself
-               (progn                  ;But also require at least one \include
-                 (save-excursion
-                   (goto-char 1)       ;Too bad I have to do this search...
-                   ;; Require that user uses \input{file}
-                   ;; rather than            \input file
-                   (re-search-forward "^[ \t]*\\\\\\(include\\|input\\){"
-                                      nil t))))
-          (buffer-file-name))
-         (t
-          nil))))
+         (cond
+          ((not (boundp 'TeX-master))
+           ;; This buffer doesn't know what a master file is, so return now.
+           nil)
+          ((and TeX-master              ;Set, but not to t
+                (not (symbolp TeX-master))) ; then we have an actual name
+           (expand-file-name TeX-master))
+          ((and (eq TeX-master 't)      ;Test if master file itself
+                (progn                  ;But also require at least one \include
+                  (save-excursion
+                    (goto-char 1)       ;Too bad I have to do this search...
+                    ;; Require that user uses \input{file}
+                    ;; rather than            \input file
+                    (re-search-forward "^[ \t]*\\\\\\(include\\|input\\){"
+                                       nil t))))
+           (buffer-file-name))
+          (t
+           nil))))
     (cond
      ((not master)
       nil)
@@ -2012,41 +2012,41 @@ No checking is done that this is a real multi-file 
document.
 Sets global variable bib-document-TeX-files-warnings."
   (setq bib-document-TeX-files-warnings nil)
   (let* ((masterfile (bib-master-file))
-        (dir (and masterfile (file-name-directory masterfile)))
-        (tex-buffer (get-buffer-create "*tex-document*"))
-        (the-list (list masterfile)))
+         (dir (and masterfile (file-name-directory masterfile)))
+         (tex-buffer (get-buffer-create "*tex-document*"))
+         (the-list (list masterfile)))
     (if (not masterfile)
-       (progn
-         (kill-buffer tex-buffer)
-         (error
-          "Sorry, but this is not a multi-file document (Try C-u C-c C-n if 
using auctex)")))
+        (progn
+          (kill-buffer tex-buffer)
+          (error
+           "Sorry, but this is not a multi-file document (Try C-u C-c C-n if 
using auctex)")))
     (with-current-buffer tex-buffer
       ;; set its directory so relative includes work without expanding
       (setq default-directory dir)
       (insert-file-contents masterfile)
       (goto-char (point-min))
       (while (re-search-forward "^[ \t]*\\\\\\(input\\|include\\){\\(.*\\)}"
-                               nil t)
-       (let ((the-file (match-string 2)))
-         (if (string-match ".sty$" the-file) ;Skip over style files!
-             nil
-           (if (and (not (file-readable-p (expand-file-name the-file dir)))
-                    (not (string-match ".ltx$" the-file))
-                    (file-readable-p
-                     (expand-file-name (concat the-file ".ltx") dir)))
-               (setq the-file (concat the-file ".ltx")))
-           (if (and (not (file-readable-p (expand-file-name the-file dir)))
-                    (not (string-match ".tex$" the-file)))
-               (setq the-file (concat the-file ".tex")))
-           (setq the-file (expand-file-name the-file dir))
-           (if (not (file-readable-p the-file))
-               (setq bib-document-TeX-files-warnings
-                     (concat
-                      bib-document-TeX-files-warnings
-                      (format "Warning: File not found: %s" the-file)))
-             (setq the-list (cons (expand-file-name the-file dir) the-list))
-             (end-of-line)(insert "\n")
-             (insert-file-contents the-file))))))
+                                nil t)
+        (let ((the-file (match-string 2)))
+          (if (string-match ".sty$" the-file) ;Skip over style files!
+              nil
+            (if (and (not (file-readable-p (expand-file-name the-file dir)))
+                     (not (string-match ".ltx$" the-file))
+                     (file-readable-p
+                      (expand-file-name (concat the-file ".ltx") dir)))
+                (setq the-file (concat the-file ".ltx")))
+            (if (and (not (file-readable-p (expand-file-name the-file dir)))
+                     (not (string-match ".tex$" the-file)))
+                (setq the-file (concat the-file ".tex")))
+            (setq the-file (expand-file-name the-file dir))
+            (if (not (file-readable-p the-file))
+                (setq bib-document-TeX-files-warnings
+                      (concat
+                       bib-document-TeX-files-warnings
+                       (format "Warning: File not found: %s" the-file)))
+              (setq the-list (cons (expand-file-name the-file dir) the-list))
+              (end-of-line)(insert "\n")
+              (insert-file-contents the-file))))))
     (kill-buffer tex-buffer)
     (nreverse the-list)))
 
@@ -2058,76 +2058,76 @@ Also, see bib-buffer-citekeys-obarray.
 Sets global variable bib-document-citekeys-obarray-warnings."
   (setq bib-document-citekeys-obarray-warnings nil)
   (let ((master-tex (bib-master-file))
-       (master-aux))
+        (master-aux))
     (if (not master-tex)
-       nil                             ;Not a multifile document.  No need...
+        nil                             ;Not a multifile document.  No need...
       (setq master-aux (bib-return-aux-file-from-tex master-tex "aux"))
       (or (file-readable-p master-aux)
-         (error "Sorry, cannot read file %s" master-aux))
+          (error "Sorry, cannot read file %s" master-aux))
       (and (file-newer-than-file-p master-tex master-aux)
-          (setq bib-document-citekeys-obarray-warnings
-                (format "Warning: %s is out of date relative to %s.\n"
-                        master-aux master-tex)))
+           (setq bib-document-citekeys-obarray-warnings
+                 (format "Warning: %s is out of date relative to %s.\n"
+                         master-aux master-tex)))
       (let ((work-buffer (get-buffer-create "*bib-cite-work*"))
-           (keys-obarray (make-vector 201 0)))
-       (with-current-buffer work-buffer
-         (insert-file-contents master-aux)
-         ;; Because we will be looking for \input statements, we need to set
-         ;; the default directory to that of the master file.
-         (setq default-directory (file-name-directory master-tex))
-         ;; bib-make-bibliography will need this also to find .bib files
-         ;; look for \@input{chap1/part1.aux}
-         (while (re-search-forward "^\\\\@input{\\(.*\\)}$" nil t)
-           (let* ((auxfile (match-string 1))
-                  (texfile (bib-return-aux-file-from-tex auxfile "tex")))
-             (if (not (file-readable-p auxfile))
-                 (setq bib-document-citekeys-obarray-warnings
-                       (concat
-                        bib-document-citekeys-obarray-warnings
-                        (format "Warning: %s is not found or readable.\n"
-                                auxfile)))
-               (if (file-newer-than-file-p texfile auxfile)
-                   (setq bib-document-citekeys-obarray-warnings
-                         (concat
-                          bib-document-citekeys-obarray-warnings
-                          (format
-                           "Warning: %s is out of date relative to %s.\n"
-                           auxfile texfile))))
-               (end-of-line)(insert "\n")
-               (insert-file-contents auxfile))))
-         (goto-char 1)
+            (keys-obarray (make-vector 201 0)))
+        (with-current-buffer work-buffer
+          (insert-file-contents master-aux)
+          ;; Because we will be looking for \input statements, we need to set
+          ;; the default directory to that of the master file.
+          (setq default-directory (file-name-directory master-tex))
+          ;; bib-make-bibliography will need this also to find .bib files
+          ;; look for \@input{chap1/part1.aux}
+          (while (re-search-forward "^\\\\@input{\\(.*\\)}$" nil t)
+            (let* ((auxfile (match-string 1))
+                   (texfile (bib-return-aux-file-from-tex auxfile "tex")))
+              (if (not (file-readable-p auxfile))
+                  (setq bib-document-citekeys-obarray-warnings
+                        (concat
+                         bib-document-citekeys-obarray-warnings
+                         (format "Warning: %s is not found or readable.\n"
+                                 auxfile)))
+                (if (file-newer-than-file-p texfile auxfile)
+                    (setq bib-document-citekeys-obarray-warnings
+                          (concat
+                           bib-document-citekeys-obarray-warnings
+                           (format
+                            "Warning: %s is out of date relative to %s.\n"
+                            auxfile texfile))))
+                (end-of-line)(insert "\n")
+                (insert-file-contents auxfile))))
+          (goto-char 1)
 
 ;;;  Patched by calvanes@dis.uniroma1.it (Diego Calvanese)
 ;;;      ;; look for \citation{gertsenshtein59}
 ;;;       (while (re-search-forward "^\\\\citation{\\(.*\\)}$" nil t)
 ;;;         (intern (buffer-substring (match-beginning 1)(match-end 1))
 ;;;                 keys-obarray))
-         ;; look for \citation{gertsenshtein59,vardi88,...,ullmann90}
-         ;; comma-separation generated by certain LaTeX styles.
-         (while (re-search-forward "^\\\\citation{\\(.*\\)}$" nil t)
-           (let ((string (match-string 1))
-                 (start 0))
-             (while (string-match "\\([^,\n]+\\)" string start)
-               (intern (substring string (match-beginning 1) (match-end 1))
-                       keys-obarray)
-               (setq start (match-end 0))))))
-       (kill-buffer work-buffer)
-       keys-obarray))))
+          ;; look for \citation{gertsenshtein59,vardi88,...,ullmann90}
+          ;; comma-separation generated by certain LaTeX styles.
+          (while (re-search-forward "^\\\\citation{\\(.*\\)}$" nil t)
+            (let ((string (match-string 1))
+                  (start 0))
+              (while (string-match "\\([^,\n]+\\)" string start)
+                (intern (substring string (match-beginning 1) (match-end 1))
+                        keys-obarray)
+                (setq start (match-end 0))))))
+        (kill-buffer work-buffer)
+        keys-obarray))))
 
 (defun bib-return-aux-file-from-tex (texname ext)
   "Given name.name.XXX in TEXNAME return name.name.EXT."
 ;; FIXME: Check if in ./, else search
   (let* ((filename (if (string-match "\\(.*\\)\\.[^\\.]+" texname)
-                      (concat (match-string 1 texname) "." ext)
-                    (concat texname "." ext)))
-        (sansdir (file-name-nondirectory filename)))
+                       (concat (match-string 1 texname) "." ext)
+                     (concat texname "." ext)))
+         (sansdir (file-name-nondirectory filename)))
     (if (file-exists-p filename)
-       filename
+        filename
       ;; Search bib-cite-aux-inputs path
       (let ((filename (psg-checkfor-file-list sansdir bib-cite-aux-inputs)))
-       (if (and filename (file-exists-p filename))
-           filename
-         (error "Could not find file %s" sansdir))))))
+        (if (and filename (file-exists-p filename))
+            filename
+          (error "Could not find file %s" sansdir))))))
 
 (defun bib-etags-find-noselect (tag &optional masterdir)
   "Returns a buffer with point on TAG.
@@ -2135,17 +2135,17 @@ Buffer is not selected.
 Makes sure TAGS file exists, etc."
   (require 'etags)
   (let* ((master (or masterdir (bib-master-directory)))
-        (the-buffer (current-buffer))
-        (new-buffer)
-        (the-tags-file-name (expand-file-name bib-etags-filename master)))
+         (the-buffer (current-buffer))
+         (new-buffer)
+         (the-tags-file-name (expand-file-name bib-etags-filename master)))
     (or (file-exists-p the-tags-file-name) ;make sure TAGS exists
-       (bib-etags master))
+        (bib-etags master))
     (or (equal the-tags-file-name tags-file-name) ;make sure it's current
-       (visit-tags-table the-tags-file-name))
+        (visit-tags-table the-tags-file-name))
     ;; find-tag-noselect should set the TAGS file for the new buffer
     ;; that's what C-h f visit-tags-table says...
     (setq new-buffer (find-tag-noselect tag nil t))
-                                       ; -> Seems to set buffer to TAGS
+                                        ; -> Seems to set buffer to TAGS
     (set-buffer the-buffer)
     new-buffer))
 
@@ -2169,16 +2169,16 @@ of each bib file.
 Puts the buffer in text-mode such that forward-sexp works with german \"
 accents embeded in bibtex entries."
   (let ((bib-list (or (and (fboundp 'LaTeX-bibliography-list)
-                          (boundp 'TeX-auto-update)
-                          (LaTeX-bibliography-list))
+                           (boundp 'TeX-auto-update)
+                           (LaTeX-bibliography-list))
 ;; LaTeX-bibliography-list (if bound) returns an unformatted list of
 ;; bib files used in the document, but only if parsing is turned on
 ;; or C-c C-n was used.
-                     (bib-bibliography-list)))
-       (bib-buffer (get-buffer-create "*bibtex-bibliography*"))
-       ;; Path is relative to the master directory
-       (default-directory (bib-master-directory))
-       (the-name)(the-warnings)(the-file))
+                      (bib-bibliography-list)))
+        (bib-buffer (get-buffer-create "*bibtex-bibliography*"))
+        ;; Path is relative to the master directory
+        (default-directory (bib-master-directory))
+        (the-name)(the-warnings)(the-file))
     (with-current-buffer bib-buffer
       ;; such that forward-sexp works with embeeded \" in german,
       ;; and unbalanced ()
@@ -2194,37 +2194,37 @@ accents embeded in bibtex entries."
       (setq the-name (car (car bib-list))) ;Extract the string only
       (setq bib-list (cdr bib-list))
       (setq the-name
-           (substring the-name
-                      (string-match "[^ ]+" the-name) ;remove leading spaces
-                      (string-match "[ ]+$" the-name))) ;remove trailing space
+            (substring the-name
+                       (string-match "[^ ]+" the-name) ;remove leading spaces
+                       (string-match "[ ]+$" the-name))) ;remove trailing space
       (if (not (string-match "\\.bib$" the-name))
-         (setq the-name (concat the-name ".bib")))
+          (setq the-name (concat the-name ".bib")))
       (setq the-file
-           (or (and (file-readable-p the-name) the-name)
-               (psg-checkfor-file-list
-                the-name (psg-list-env bib-bibtex-env-variable))
-               ;; Check for BIBINPUT env variable as well (by popular demand!)
-               (psg-checkfor-file-list the-name (psg-list-env "BIBINPUT"))
-               (and bib-cite-inputs
-                    (psg-checkfor-file-list the-name bib-cite-inputs))
-               (and (boundp 'TeX-check-path)
-                    (psg-checkfor-file-list the-name TeX-check-path))))
+            (or (and (file-readable-p the-name) the-name)
+                (psg-checkfor-file-list
+                 the-name (psg-list-env bib-bibtex-env-variable))
+                ;; Check for BIBINPUT env variable as well (by popular demand!)
+                (psg-checkfor-file-list the-name (psg-list-env "BIBINPUT"))
+                (and bib-cite-inputs
+                     (psg-checkfor-file-list the-name bib-cite-inputs))
+                (and (boundp 'TeX-check-path)
+                     (psg-checkfor-file-list the-name TeX-check-path))))
       (if the-file
-         (with-current-buffer bib-buffer
-           (goto-char (point-max))
-           (if include-filenames-f
-               (insert "%%%Filename: " the-file "\n"))
-           (insert-file-contents the-file nil)
-           (goto-char 1))
-       (setq the-warnings
-             (concat the-warnings "Could not read file: " the-name "\n"))))
+          (with-current-buffer bib-buffer
+            (goto-char (point-max))
+            (if include-filenames-f
+                (insert "%%%Filename: " the-file "\n"))
+            (insert-file-contents the-file nil)
+            (goto-char 1))
+        (setq the-warnings
+              (concat the-warnings "Could not read file: " the-name "\n"))))
     (if the-warnings
-       (progn
-         (with-output-to-temp-buffer "*Help*"
-           (princ the-warnings))
-         (kill-buffer bib-buffer)
-         (error
-          "Sorry, can't find all bibtex files in \\bibliography command"))
+        (progn
+          (with-output-to-temp-buffer "*Help*"
+            (princ the-warnings))
+          (kill-buffer bib-buffer)
+          (error
+           "Sorry, can't find all bibtex files in \\bibliography command"))
       bib-buffer)))
 
 (defun bib-bibliography-list ()
@@ -2235,22 +2235,22 @@ although BiBTeX doesn't allow it!"
   (save-excursion
     (goto-char 1)
     (if (not (re-search-forward "^[ \t]*\\\\bibliography{[ \t]*\\([^},]+\\)"
-                               nil t))
-       (error "Sorry, can't find \\bibliography command anywhere")
+                                nil t))
+        (error "Sorry, can't find \\bibliography command anywhere")
       (let ((the-list (list (match-string 1)))
-           (doNext t))
-       (while doNext
-         (if (looking-at ",")
-             (setq the-list
-                   (append the-list
-                           (list (buffer-substring
-                                  (progn (skip-chars-forward ", ")(point))
-                                  (progn (re-search-forward "[,}]" nil t)
-                                         (backward-char 1)
-                                         (skip-chars-backward ", ")
-                                         (point))))))
-           (setq doNext nil)))
-       (mapcar 'list the-list)))))
+            (doNext t))
+        (while doNext
+          (if (looking-at ",")
+              (setq the-list
+                    (append the-list
+                            (list (buffer-substring
+                                   (progn (skip-chars-forward ", ")(point))
+                                   (progn (re-search-forward "[,}]" nil t)
+                                          (backward-char 1)
+                                          (skip-chars-backward ", ")
+                                          (point))))))
+            (setq doNext nil)))
+        (mapcar 'list the-list)))))
 
 (defvar TeX-auto-save)
 (defvar TeX-auto-update)
@@ -2280,7 +2280,7 @@ although BiBTeX doesn't allow it!"
     ;; TeX-auto-write may call TeX-master-file which may fail if
     ;; TeX-header-end is unset (by LaTeX-common-initialization in latex-mode)
     (if (not TeX-header-end)
-       (setq TeX-header-end LaTeX-header-end))
+        (setq TeX-header-end LaTeX-header-end))
 
     (TeX-auto-write)))
 
@@ -2293,35 +2293,35 @@ although BiBTeX doesn't allow it!"
   ;;USAGE: (psg-checkfor-file-list "gri-mode.el" load-path)
   ;;USAGE: (psg-checkfor-file-list "gri.cmd" (psg-translate-ff-list "gri.tmp"))
   (let ((the-list list)
-       (filespec))
+        (filespec))
     (while the-list
       (if (not (car the-list))          ; it is nil
-         (setq filespec (expand-file-name filename))
-       (setq filespec
-             (concat
-              (expand-file-name (file-name-as-directory (car the-list)))
-              filename)))
+          (setq filespec (expand-file-name filename))
+        (setq filespec
+              (concat
+               (expand-file-name (file-name-as-directory (car the-list)))
+               filename)))
       (if (file-exists-p filespec)
-           (setq the-list nil)
-       (setq filespec nil)
-       (setq the-list (cdr the-list))))
+            (setq the-list nil)
+        (setq filespec nil)
+        (setq the-list (cdr the-list))))
     (if filespec
-       filespec
+        filespec
       ;; If I have not found a file yet, then check if some directories
       ;; ended in // and recurse through them.
       (let ((the-list list))
-       (while the-list
-         (if (not (string-match "//$" (car the-list))) nil
-           (setq filespec (car
-                           (search-directory-tree
-                            (substring (car the-list) 0 (match-beginning 0))
-                            (concat "^" filename "$")
-                            t
-                            t)))
-           (if filespec                ;Success!
-               (setq the-list nil)))
-         (setq the-list (cdr the-list)))
-       filespec))))
+        (while the-list
+          (if (not (string-match "//$" (car the-list))) nil
+            (setq filespec (car
+                            (search-directory-tree
+                             (substring (car the-list) 0 (match-beginning 0))
+                             (concat "^" filename "$")
+                             t
+                             t)))
+            (if filespec                ;Success!
+                (setq the-list nil)))
+          (setq the-list (cdr the-list)))
+        filespec))))
 
 
 (defun search-directory-tree (directories extension-regexp recurse first-file)
@@ -2329,7 +2329,7 @@ although BiBTeX doesn't allow it!"
 DIRECTORIES is a list or a single-directory string
 EXTENSION-REGEXP is actually (any) regexp, usually \\\\.bib$
 If RECURSE is t, then we will recurse into the directory tree,
-             nil, we will only search the list given.
+              nil, we will only search the list given.
 If FIRST-FILE is t, stop after first file is found."
   (or (listp directories)
       (setq directories (list directories)))
@@ -2337,26 +2337,26 @@ If FIRST-FILE is t, stop after first file is found."
   (let (match)
     (while directories
       (let* ((directory (file-name-as-directory  (car directories)))
-            (content (and directory
-                          (file-readable-p directory)
-                          (file-directory-p directory)
-                          (directory-files directory))))
-       (setq directories (cdr directories))
-       (while content
-         (let ((file (expand-file-name (car content) directory)))
-           (cond ((string-match "[.]+$" (car content))) ;This or parent dir
-                 ((not (file-readable-p file)))
-                 ((and recurse
-                       (file-directory-p file))
-                  (setq directories
-                        (cons (file-name-as-directory file) directories)))
-                 ((string-match extension-regexp
-                                (file-name-nondirectory file))
-                  (and first-file
-                       (setq content nil
-                             directories nil))
-                  (setq match (cons file match)))))
-         (setq content (cdr content)))))
+             (content (and directory
+                           (file-readable-p directory)
+                           (file-directory-p directory)
+                           (directory-files directory))))
+        (setq directories (cdr directories))
+        (while content
+          (let ((file (expand-file-name (car content) directory)))
+            (cond ((string-match "[.]+$" (car content))) ;This or parent dir
+                  ((not (file-readable-p file)))
+                  ((and recurse
+                        (file-directory-p file))
+                   (setq directories
+                         (cons (file-name-as-directory file) directories)))
+                  ((string-match extension-regexp
+                                 (file-name-nondirectory file))
+                   (and first-file
+                        (setq content nil
+                              directories nil))
+                   (setq match (cons file match)))))
+          (setq content (cdr content)))))
 
     match))
 
@@ -2380,12 +2380,12 @@ If FIRST-FILE is t, stop after first file is found."
       ;; Replace REGEXP with NEWTEXT everywhere in STRING and return result.
       ;; NEWTEXT is taken literally---no \\DIGIT escapes will be recognized.
       (let ((result "") (start 0) mb me)
-       (while (string-match regexp string start)
-         (setq mb (match-beginning 0)
-               me (match-end 0)
-               result (concat result (substring string start mb) newtext)
-               start me))
-       (concat result (substring string start)))))
+        (while (string-match regexp string start)
+          (setq mb (match-beginning 0)
+                me (match-end 0)
+                result (concat result (substring string start mb) newtext)
+                start me))
+        (concat result (substring string start)))))
 
 
 ;; Could use fset here to equal TeX-split-string to dired-split if only
@@ -2400,29 +2400,29 @@ sections which in string was seperated by REGEXP.
 Examples:
 
       (TeX-split-string \"\:\" \"abc:def:ghi\")
-         -> (\"abc\" \"def\" \"ghi\")
+          -> (\"abc\" \"def\" \"ghi\")
 
       (TeX-split-string \" *\" \"dvips -Plw -p3 -c4 testfile.dvi\")
 
-         -> (\"dvips\" \"-Plw\" \"-p3\" \"-c4\" \"testfile.dvi\")
+          -> (\"dvips\" \"-Plw\" \"-p3\" \"-c4\" \"testfile.dvi\")
 
 If CHAR is nil, or \"\", an error will occur."
 
        (let ((regexp char)
-            (start 0)
-            (result '()))
-        (while (string-match regexp string start)
-          (let ((match (string-match regexp string start)))
-            (setq result (cons (substring string start match) result))
-            (setq start (match-end 0))))
-        (setq result (cons (substring string start nil) result))
-        (nreverse result))))
+             (start 0)
+             (result '()))
+         (while (string-match regexp string start)
+           (let ((match (string-match regexp string start)))
+             (setq result (cons (substring string start match) result))
+             (setq start (match-end 0))))
+         (setq result (cons (substring string start nil) result))
+         (nreverse result))))
 
 (defun bib-cite-file-directory-p (file)
   "Like default `file-directory-p' but allow FILE to end in // for ms-windows."
   (save-match-data
     (if (string-match "\\(.*\\)//$" file)
-       (file-directory-p (match-string 1 file))
+        (file-directory-p (match-string 1 file))
       (file-directory-p file))))
 
 (defun psg-list-env (env)
@@ -2436,13 +2436,13 @@ bib-dos-or-os2-variable affects:
   (if (not (getenv env))
       nil                               ;Because dired-replace-in-string fails
     (let* ((value (if bib-dos-or-os2-variable
-                     (dired-replace-in-string "\\\\" "/" (getenv env))
-                   (getenv env)))
-          (sep-char (or (and bib-dos-or-os2-variable ";") ":"))
-          (entries (and value
-                        (or (and (fboundp 'TeX-split-string)
-                                 (TeX-split-string sep-char value))
-                            (dired-split sep-char value)))))
+                      (dired-replace-in-string "\\\\" "/" (getenv env))
+                    (getenv env)))
+           (sep-char (or (and bib-dos-or-os2-variable ";") ":"))
+           (entries (and value
+                         (or (and (fboundp 'TeX-split-string)
+                                  (TeX-split-string sep-char value))
+                             (dired-split sep-char value)))))
       (cl-loop for x in entries if (bib-cite-file-directory-p x) collect x))))
 
 (provide 'bib-cite)
diff --git a/context.el b/context.el
index 6f150d5..cb285ff 100644
--- a/context.el
+++ b/context.el
@@ -177,9 +177,9 @@
 (defun ConTeXt-project-structure (N)
   "Insert a ConTeXt project structure where N is in index into 
`ConTeXt-project-structure-list'."
   (funcall (intern(concat
-                  "ConTeXt-project-"
-                  (nth N ConTeXt-project-structure-list)
-                  "-insert"))))
+                   "ConTeXt-project-"
+                   (nth N ConTeXt-project-structure-list)
+                   "-insert"))))
 
 (defun ConTeXt-project-project-insert ()
   "Insert a basic template for a new ConTeXt project."
@@ -199,38 +199,38 @@
   "Insert a basic template for the environment of a ConTeXt project."
   (save-excursion
     (insert "% The name 'myenvironment' is an example only.\n"
-           "% It must match the name in your project file.\n")
+            "% It must match the name in your project file.\n")
     (insert TeX-esc (ConTeXt-environment-start-name)
-           (nth 1 ConTeXt-project-structure-list) " myenvironment\n\n")
+            (nth 1 ConTeXt-project-structure-list) " myenvironment\n\n")
     (insert "% Put environment charateristics that must be defined at the "
-           "highest level here\n\n")
+            "highest level here\n\n")
     (insert TeX-esc (ConTeXt-environment-stop-name)
-           (nth 1 ConTeXt-project-structure-list))))
+            (nth 1 ConTeXt-project-structure-list))))
 
 (defun ConTeXt-project-product-insert ()
   "Insert a basic template for a product of a ConTeXt project."
   (save-excursion
     (insert "% The following names are examples only\n")
     (insert TeX-esc (ConTeXt-environment-start-name)
-           (nth 2 ConTeXt-project-structure-list) " myproduct1")
+            (nth 2 ConTeXt-project-structure-list) " myproduct1")
     (newline 2)
     (insert TeX-esc (nth 0 ConTeXt-project-structure-list) " myproject")
     (newline 2)
     (insert "% Components are optional. "
-           "You can also just start your document here.\n")
+            "You can also just start your document here.\n")
     (insert TeX-esc (nth 3 ConTeXt-project-structure-list) " mycomponent1")
     (newline 2)
     (insert TeX-esc (nth 3 ConTeXt-project-structure-list) " mycomponent2")
     (newline 2)
     (insert TeX-esc (ConTeXt-environment-stop-name)
-           (nth 2 ConTeXt-project-structure-list))))
+            (nth 2 ConTeXt-project-structure-list))))
 
 (defun ConTeXt-project-component-insert ()
   "Insert a basic template for a component of a ConTeXt project."
   (save-excursion
     (insert "% The following names are examples only\n")
     (insert TeX-esc (ConTeXt-environment-start-name)
-           (nth 3 ConTeXt-project-structure-list) " mycomponent1")
+            (nth 3 ConTeXt-project-structure-list) " mycomponent1")
     (newline 2)
     (insert TeX-esc (nth 0 ConTeXt-project-structure-list) " myproject\n")
     (insert TeX-esc (nth 2 ConTeXt-project-structure-list) " myproduct1")
@@ -238,7 +238,7 @@
     (insert "% ... text here ...")
     (newline 2)
     (insert TeX-esc (ConTeXt-environment-stop-name)
-           (nth 3 ConTeXt-project-structure-list))))
+            (nth 3 ConTeXt-project-structure-list))))
 
 
 ;;; Section blocks
@@ -269,19 +269,19 @@ If ARG is a list (selected by \\[universal-argument]), go 
downward one level.
 If ARG is negative, go up that many levels.
 If ARG is positive or zero, use absolute level:
 
-       0 : part
-       1 : chapter
-       2 : section
-       3 : subsection
-       4 : subsubsection
-       5 : subsubsubsection
+        0 : part
+        1 : chapter
+        2 : section
+        3 : subsection
+        4 : subsubsection
+        5 : subsubsubsection
 
 Or:
 
-       0 : title
-       1 : subject
-       2 : subsubject
-       3 : subsubsubject
+        0 : title
+        1 : subject
+        2 : subsubject
+        3 : subsubsubject
 
 The following variables can be set to customize:
 
@@ -290,22 +290,22 @@ The following variables can be set to customize:
 
   (interactive "*P")
   (let* ((val (prefix-numeric-value arg))
-        (ConTeXt-level (cond ((null arg)
-                              (ConTeXt-current-section))
-                             ((listp arg)
-                              (ConTeXt-down-section))
-                             ((< val 0)
-                              (ConTeXt-up-section (- val)))
-                             (t val)))
-        (ConTeXt-name (ConTeXt-numbered-section-name ConTeXt-level))
-        (ConTeXt-title "")
+         (ConTeXt-level (cond ((null arg)
+                               (ConTeXt-current-section))
+                              ((listp arg)
+                               (ConTeXt-down-section))
+                              ((< val 0)
+                               (ConTeXt-up-section (- val)))
+                              (t val)))
+         (ConTeXt-name (ConTeXt-numbered-section-name ConTeXt-level))
+         (ConTeXt-title "")
          (ConTeXt-reference nil)
-        (ConTeXt-done-mark (make-marker)))
+         (ConTeXt-done-mark (make-marker)))
     (newline)
     (run-hooks 'ConTeXt-numbered-section-hook)
     (newline)
     (if (marker-position ConTeXt-done-mark)
-       (goto-char (marker-position ConTeXt-done-mark)))
+        (goto-char (marker-position ConTeXt-done-mark)))
     (set-marker ConTeXt-done-mark nil)))
 
 ;; LaTeX has a max function here, which makes no sense.
@@ -315,9 +315,9 @@ The following variables can be set to customize:
 See also `ConTeXt-section' for description of levels."
   (save-excursion
     (min (ConTeXt-largest-level)
-        (if (re-search-backward outline-regexp nil t)
-            (+ 1 (- (ConTeXt-outline-level) (ConTeXt-outline-offset)))
-          (ConTeXt-largest-level)))))
+         (if (re-search-backward outline-regexp nil t)
+             (+ 1 (- (ConTeXt-outline-level) (ConTeXt-outline-offset)))
+           (ConTeXt-largest-level)))))
 
 (defun ConTeXt-down-section ()
   "Return the value of a section one level under the current.
@@ -326,31 +326,31 @@ text, if this fail, it will just return one less than the 
current
 section."
   (save-excursion
     (let ((current (ConTeXt-current-section))
-         (next nil)
-         (regexp outline-regexp))
+          (next nil)
+          (regexp outline-regexp))
       (if (not (re-search-backward regexp nil t))
-         (1+ current)
-       (while (not next)
-         (cond
-          ((eq (ConTeXt-current-section) current)
-           (if (re-search-forward regexp nil t)
-               (if (<= (setq next (ConTeXt-current-section)) current) ;Wow!
-                   (setq next (1+ current)))
-             (setq next (1+ current))))
-          ((not (re-search-backward regexp nil t))
-           (setq next (1+ current)))))
-       next))))
+          (1+ current)
+        (while (not next)
+          (cond
+           ((eq (ConTeXt-current-section) current)
+            (if (re-search-forward regexp nil t)
+                (if (<= (setq next (ConTeXt-current-section)) current) ;Wow!
+                    (setq next (1+ current)))
+              (setq next (1+ current))))
+           ((not (re-search-backward regexp nil t))
+            (setq next (1+ current)))))
+        next))))
 
 (defun ConTeXt-up-section (arg)
   "Return the value of the section ARG levels above this one."
   (save-excursion
     (if (zerop arg)
-       (ConTeXt-current-section)
+        (ConTeXt-current-section)
       (let ((current (ConTeXt-current-section)))
-       (while (and (>= (ConTeXt-current-section) current)
-                   (re-search-backward outline-regexp
-                                       nil t)))
-       (ConTeXt-up-section (1- arg))))))
+        (while (and (>= (ConTeXt-current-section) current)
+                    (re-search-backward outline-regexp
+                                        nil t)))
+        (ConTeXt-up-section (1- arg))))))
 
 (defvar ConTeXt-numbered-section-list ()
   "ConTeXt-XX-section-list where XX is the current interface.")
@@ -365,17 +365,17 @@ section."
 (defun ConTeXt-numbered-section-name (level)
   "Return the name of the section corresponding to LEVEL."
   (let ((entry (TeX-member level ConTeXt-numbered-section-list
-                          (function (lambda (a b) (equal a (nth 1 b)))))))
+                           (function (lambda (a b) (equal a (nth 1 b)))))))
     (if entry
-       (nth 0 entry)
+        (nth 0 entry)
       nil)))
 
 (defun ConTeXt-unnumbered-section-name (level)
   "Return the name of the section corresponding to LEVEL."
   (let ((entry (TeX-member level ConTeXt-unnumbered-section-list
-                          (function (lambda (a b) (equal a (nth 1 b)))))))
+                           (function (lambda (a b) (equal a (nth 1 b)))))))
     (if entry
-       (nth 0 entry)
+        (nth 0 entry)
       nil)))
 
 (defun ConTeXt-numbered-section-level (name)
@@ -430,10 +430,10 @@ ConTeXt-section-ref: Insert a reference for this section 
command.
 To get a full featured `ConTeXt-section' command, insert
 
  (setq ConTeXt-numbered-section-hook
-                        '(ConTeXt-numbered-section-heading
-                                ConTeXt-section-title
-                                ConTeXt-section-section
-                                ConTeXt-section-ref))
+                         '(ConTeXt-numbered-section-heading
+                                 ConTeXt-section-title
+                                 ConTeXt-section-section
+                                 ConTeXt-section-ref))
 
 in your .emacs file."
   :group 'ConTeXt-macro
@@ -478,10 +478,10 @@ ConTeXt-section-ref: Insert a reference for this section 
command.
 To get a full featured `ConTeXt-section' command, insert
 
  (setq ConTeXt-unnumbered-section-hook
-                        '(ConTeXt-unnumbered-section-heading
-                                ConTeXt-section-title
-                                ConTeXt-section-section
-                                ConTeXt-section-ref))
+                         '(ConTeXt-unnumbered-section-heading
+                                 ConTeXt-section-title
+                                 ConTeXt-section-section
+                                 ConTeXt-section-ref))
 
 in your .emacs file."
   :group 'ConTeXt-macro
@@ -505,24 +505,24 @@ in your .emacs file."
 Insert this hook into `ConTeXt-numbered-section-hook' to allow the user to 
change
 the name of the sectioning command inserted with `\\[ConTeXt-section]'."
   (let ((string (completing-read
-                (concat "Select level (default " ConTeXt-name "): ")
-                ConTeXt-numbered-section-list
-                nil nil nil)))
+                 (concat "Select level (default " ConTeXt-name "): ")
+                 ConTeXt-numbered-section-list
+                 nil nil nil)))
     ;; Update name
     (if (not (zerop (length string)))
-       (setq ConTeXt-name string))))
+        (setq ConTeXt-name string))))
 
 (defun ConTeXt-unnumbered-section-heading ()
   "Hook to prompt for ConTeXt section name.
 Insert this hook into `ConTeXt-unnumbered-section-hook' to allow the user to 
change
 the name of the sectioning command inserted with `\\[ConTeXt-section]'."
   (let ((string (completing-read
-                (concat "Select level (default " ConTeXt-name "): ")
-                ConTeXt-unnumbered-section-list
-                nil nil nil)))
+                 (concat "Select level (default " ConTeXt-name "): ")
+                 ConTeXt-unnumbered-section-list
+                 nil nil nil)))
     ;; Update name
     (if (not (zerop (length string)))
-       (setq ConTeXt-name string))))
+        (setq ConTeXt-name string))))
 
 (defun ConTeXt-section-title ()
   "Hook to prompt for ConTeXt section title.
@@ -538,12 +538,12 @@ which sets the `ConTeXt-name', `ConTeXt-title', and
 assumes the section already is inserted."
   (insert TeX-esc ConTeXt-name)
   (cond ((null ConTeXt-reference))
-       ((zerop (length ConTeXt-reference))
-        (insert ConTeXt-optop)
-        (set-marker ConTeXt-done-mark (point))
-        (insert ConTeXt-optcl))
-       (t
-        (insert ConTeXt-optop ConTeXt-reference ConTeXt-optcl)))
+        ((zerop (length ConTeXt-reference))
+         (insert ConTeXt-optop)
+         (set-marker ConTeXt-done-mark (point))
+         (insert ConTeXt-optcl))
+        (t
+         (insert ConTeXt-optop ConTeXt-reference ConTeXt-optcl)))
   (insert TeX-grop)
   (if (zerop (length ConTeXt-title))
       (set-marker ConTeXt-done-mark (point)))
@@ -559,9 +559,9 @@ Insert this hook into `ConTeXt-numbered-section-hook' to 
prompt for a label to b
 inserted after the sectioning command."
   (setq ConTeXt-reference
         (completing-read
-        (TeX-argument-prompt t nil
-                             "Comma separated list of references")
-        (LaTeX-label-list) nil nil))
+         (TeX-argument-prompt t nil
+                              "Comma separated list of references")
+         (LaTeX-label-list) nil nil))
   ;; No reference or empty string entered?
   (if (string-equal "" ConTeXt-reference)
       (setq ConTeXt-reference nil)))
@@ -575,43 +575,43 @@ inserted after the sectioning command."
    ((with-current-buffer TeX-command-buffer
       (string= ConTeXt-Mark-version "IV"))
     (cond ((TeX-TeX-sentinel-check process name))
-         ((re-search-forward "fatal error: " nil t)
-          (message (concat name ": problems after "
-                           (TeX-current-pages)))
-          (setq TeX-command-next TeX-command-default))
-         (t
-          (message (concat name ": successfully formatted "
-                           (TeX-current-pages)))
-          (setq TeX-command-next TeX-command-Show))))
+          ((re-search-forward "fatal error: " nil t)
+           (message (concat name ": problems after "
+                            (TeX-current-pages)))
+           (setq TeX-command-next TeX-command-default))
+          (t
+           (message (concat name ": successfully formatted "
+                            (TeX-current-pages)))
+           (setq TeX-command-next TeX-command-Show))))
    ;; Mark II
    (t
     (cond ((TeX-TeX-sentinel-check process name))
-         ((save-excursion
-            ;; in a full ConTeXt run there will multiple texutil
-            ;; outputs. Just looking for "another run needed" would
-            ;; find the first occurence
-            (goto-char (point-max))
-            (re-search-backward "TeXUtil " nil t)
-            (re-search-forward "another run needed" nil t))
-          (message (concat "You should run ConTeXt again "
-                           "to get references right, "
-                           (TeX-current-pages)))
-          (setq TeX-command-next TeX-command-default))
-         ((re-search-forward "removed files :" nil t)
-          (message "sucessfully cleaned up"))
-         ((re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange 
regexp --pg
-          (message (concat name ": successfully formatted "
-                           (TeX-current-pages)))
-          (setq TeX-command-next TeX-command-Show))
-         (t
-          (message (concat name ": problems after "
-                           (TeX-current-pages)))
-          (setq TeX-command-next TeX-command-default)))))
+          ((save-excursion
+             ;; in a full ConTeXt run there will multiple texutil
+             ;; outputs. Just looking for "another run needed" would
+             ;; find the first occurence
+             (goto-char (point-max))
+             (re-search-backward "TeXUtil " nil t)
+             (re-search-forward "another run needed" nil t))
+           (message (concat "You should run ConTeXt again "
+                            "to get references right, "
+                            (TeX-current-pages)))
+           (setq TeX-command-next TeX-command-default))
+          ((re-search-forward "removed files :" nil t)
+           (message "sucessfully cleaned up"))
+          ((re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange 
regexp --pg
+           (message (concat name ": successfully formatted "
+                            (TeX-current-pages)))
+           (setq TeX-command-next TeX-command-Show))
+          (t
+           (message (concat name ": problems after "
+                            (TeX-current-pages)))
+           (setq TeX-command-next TeX-command-default)))))
   (unless TeX-error-list
     (run-hook-with-args 'TeX-after-compilation-finished-functions
-                       (with-current-buffer TeX-command-buffer
-                         (expand-file-name
-                          (TeX-active-master (TeX-output-extension)))))))
+                        (with-current-buffer TeX-command-buffer
+                          (expand-file-name
+                           (TeX-active-master (TeX-output-extension)))))))
 
 
 ;;; Environments
@@ -634,7 +634,7 @@ inserted after the sectioning command."
   (setq ConTeXt-menu-changed t))
 
 ;; (defvar ConTeXt-environment-list ()
-;;     "ConTeXt-environment-list-XX where XX is the current interface.")
+;;      "ConTeXt-environment-list-XX where XX is the current interface.")
 
 (defvar ConTeXt-environment-history nil)
 
@@ -642,35 +642,35 @@ inserted after the sectioning command."
   "Return the \\start translated to the language in current interface."
   ;; it is "inizia", others are "start"
   (cond ((equal ConTeXt-current-interface "it")
-        "inizia")
-       ((member ConTeXt-current-interface ConTeXt-known-interfaces)
-        "start")
-       (t
-        ;; this should not happen
-        (error "Unknown interface: %s" ConTeXt-current-interface))))
+         "inizia")
+        ((member ConTeXt-current-interface ConTeXt-known-interfaces)
+         "start")
+        (t
+         ;; this should not happen
+         (error "Unknown interface: %s" ConTeXt-current-interface))))
 
 (defun ConTeXt-environment-stop-name ()
   "Return the \\stop translated to the language in current interface."
   ;; it is "termina", others are "stop"
   (cond ((equal ConTeXt-current-interface "it")
-        "termina")
-       ((member ConTeXt-current-interface ConTeXt-known-interfaces)
-        "stop")
-       (t
-        ;; this should not happen
-        (error "Unknown interface: %s" ConTeXt-current-interface))))
+         "termina")
+        ((member ConTeXt-current-interface ConTeXt-known-interfaces)
+         "stop")
+        (t
+         ;; this should not happen
+         (error "Unknown interface: %s" ConTeXt-current-interface))))
 
 (defun ConTeXt-environment (arg)
   "Make ConTeXt environment (\\start...-\\stop... pair).
 With optional ARG, modify current environment."
   (interactive "*P")
   (let* ((default (cond
-                  ((TeX-near-bobp) "text")
-                  (t ConTeXt-default-environment)))
-        (environment
-         (completing-read (concat "Environment type (default " default "): ")
-                          ConTeXt-environment-list nil nil nil
-                          'ConTeXt-environment-history default)))
+                   ((TeX-near-bobp) "text")
+                   (t ConTeXt-default-environment)))
+         (environment
+          (completing-read (concat "Environment type (default " default "): ")
+                           ConTeXt-environment-list nil nil nil
+                           'ConTeXt-environment-history default)))
     ;; Use `environment' as default for the next time only if it is different
     ;; from the current default.
     (unless (equal environment default)
@@ -678,28 +678,28 @@ With optional ARG, modify current environment."
 
     (let ((entry (assoc environment ConTeXt-environment-list)))
       (if (null entry)
-         (ConTeXt-add-environments (list environment)))
+          (ConTeXt-add-environments (list environment)))
 
       (if arg
-         (ConTeXt-modify-environment environment)
-       (ConTeXt-environment-menu environment)))))
+          (ConTeXt-modify-environment environment)
+        (ConTeXt-environment-menu environment)))))
 
 (defun ConTeXt-modify-environment (environment)
   "Modify current environment."
   (save-excursion
     (ConTeXt-find-matching-stop)
     (re-search-backward (concat (regexp-quote TeX-esc)
-                               (ConTeXt-environment-stop-name)
-                               " *\\([a-zA-Z]*\\)")
-                       (save-excursion (beginning-of-line 1) (point)))
+                                (ConTeXt-environment-stop-name)
+                                " *\\([a-zA-Z]*\\)")
+                        (save-excursion (beginning-of-line 1) (point)))
     (replace-match
      (concat TeX-esc (ConTeXt-environment-stop-name) environment) t t)
     (beginning-of-line 1)
     (ConTeXt-find-matching-start)
     (re-search-forward (concat (regexp-quote TeX-esc)
-                              (ConTeXt-environment-start-name)
-                              " *\\([a-zA-Z]*\\)")
-                      (save-excursion (end-of-line 1) (point)))
+                               (ConTeXt-environment-start-name)
+                               " *\\([a-zA-Z]*\\)")
+                       (save-excursion (end-of-line 1) (point)))
     (replace-match
      (concat TeX-esc (ConTeXt-environment-start-name) environment) t t)))
 
@@ -708,27 +708,27 @@ With optional ARG, modify current environment."
   "Insert ENVIRONMENT around point or region."
   (let ((entry (assoc environment ConTeXt-environment-list)))
     (cond ((not (and entry (nth 1 entry)))
-          (ConTeXt-insert-environment environment))
-         ((numberp (nth 1 entry))
-          (let ((count (nth 1 entry))
-                (args ""))
-            (while (> count 0)
-              (setq args (concat args TeX-grop TeX-grcl))
-              (setq count (- count 1)))
-            (ConTeXt-insert-environment environment args)))
-         ((stringp (nth 1 entry))
-          (let ((prompts (cdr entry))
-                (args ""))
-            (while prompts
-              (setq args (concat args
-                                 TeX-grop
-                                 (read-from-minibuffer
-                                  (concat (car prompts) ": "))
-                                 TeX-grcl))
-              (setq prompts (cdr prompts)))
-            (ConTeXt-insert-environment environment args)))
-         (t
-          (apply (nth 1 entry) environment (nthcdr 2 entry))))))
+           (ConTeXt-insert-environment environment))
+          ((numberp (nth 1 entry))
+           (let ((count (nth 1 entry))
+                 (args ""))
+             (while (> count 0)
+               (setq args (concat args TeX-grop TeX-grcl))
+               (setq count (- count 1)))
+             (ConTeXt-insert-environment environment args)))
+          ((stringp (nth 1 entry))
+           (let ((prompts (cdr entry))
+                 (args ""))
+             (while prompts
+               (setq args (concat args
+                                  TeX-grop
+                                  (read-from-minibuffer
+                                   (concat (car prompts) ": "))
+                                  TeX-grcl))
+               (setq prompts (cdr prompts)))
+             (ConTeXt-insert-environment environment args)))
+          (t
+           (apply (nth 1 entry) environment (nthcdr 2 entry))))))
 
 (defun ConTeXt-close-environment ()
   "Insert \\stop... to match the current environment."
@@ -737,9 +737,9 @@ With optional ARG, modify current environment."
   (let ((empty-line (looking-at "[ \t]*$")))
     (end-of-line)
     (if (not empty-line)
-       (newline)))
+        (newline)))
   (insert TeX-esc (ConTeXt-environment-stop-name)
-         (ConTeXt-current-environment))
+          (ConTeXt-current-environment))
   ;; indent broken, so don't do it.
   ;;(indent-according-to-mode)
   (end-of-line)
@@ -748,26 +748,26 @@ With optional ARG, modify current environment."
 (defun ConTeXt-insert-environment (environment &optional extra)
   "Insert ENVIRONMENT, with optional argument EXTRA."
   (if (and (TeX-active-mark)
-          (not (eq (mark) (point))))
+           (not (eq (mark) (point))))
       (save-excursion
-       (if (< (mark) (point))
-           (exchange-point-and-mark))
-       (insert TeX-esc (ConTeXt-environment-start-name) environment)
-       (newline)
-       (forward-line -1)
-       (indent-according-to-mode)
-       (if extra (insert extra))
-       (goto-char (mark))
-       (or (TeX-looking-at-backward "^[ \t]*")
-           (newline))
-       (insert TeX-esc (ConTeXt-environment-stop-name) environment)
-       (newline)
-       (forward-line -1)
-       (indent-according-to-mode)
-       ;;(goto-char (point))
-       )
+        (if (< (mark) (point))
+            (exchange-point-and-mark))
+        (insert TeX-esc (ConTeXt-environment-start-name) environment)
+        (newline)
+        (forward-line -1)
+        (indent-according-to-mode)
+        (if extra (insert extra))
+        (goto-char (mark))
+        (or (TeX-looking-at-backward "^[ \t]*")
+            (newline))
+        (insert TeX-esc (ConTeXt-environment-stop-name) environment)
+        (newline)
+        (forward-line -1)
+        (indent-according-to-mode)
+        ;;(goto-char (point))
+        )
     (or (TeX-looking-at-backward "^[ \t]*")
-       (newline))
+        (newline))
     (insert TeX-esc (ConTeXt-environment-start-name) environment)
     (indent-according-to-mode)
     (if extra (insert extra))
@@ -776,7 +776,7 @@ With optional ARG, modify current environment."
     (newline)
     (insert TeX-esc (ConTeXt-environment-stop-name) environment)
     (or (looking-at "[ \t]*$")
-       (save-excursion (newline-and-indent)))
+        (save-excursion (newline-and-indent)))
     (indent-according-to-mode)
     (end-of-line 0)))
 
@@ -833,7 +833,7 @@ An entry looks like: (\"environment\" . function)")
   "Takes current environment and does something on it (todo: documentation)."
   (interactive)
   (let ((fun (cdr (assoc (ConTeXt-current-environment)
-                        ConTeXt-environment-helper))))
+                         ConTeXt-environment-helper))))
     (when (functionp fun)
       (funcall fun))))
 
@@ -851,7 +851,7 @@ An entry looks like: (\"environment\" . function)")
 (defun ConTeXt-last-unended-start ()
   "Leave point at the beginning of the last `\\start...' that is unstopped 
looking from the current cursor."
   (while (and (re-search-backward "\\\\start[a-zA-Z]*\\|\\\\stop[a-zA-Z]*")
-             (looking-at "\\\\stop[a-zA-Z]*"))
+              (looking-at "\\\\stop[a-zA-Z]*"))
     (ConTeXt-last-unended-start)))
 
 (defun ConTeXt-mark-environment (&optional inner)
@@ -873,31 +873,31 @@ If INNER is non-nil, go to the point just past before
 \\stop... macro.  Otherwise goto the point just past \\stop..."
   (interactive)
   (let ((regexp (concat (regexp-quote TeX-esc)
-                       "\\("
-                       (ConTeXt-environment-start-name)
-                       "\\|"
-                       (ConTeXt-environment-stop-name)
-                       "\\)"
-                       ))
-       (level 1))
+                        "\\("
+                        (ConTeXt-environment-start-name)
+                        "\\|"
+                        (ConTeXt-environment-stop-name)
+                        "\\)"
+                        ))
+        (level 1))
     ;;jump over the \start... when at the beginning of it.
     (when (looking-at (concat (regexp-quote TeX-esc)
-                             (ConTeXt-environment-start-name)))
+                              (ConTeXt-environment-start-name)))
       (re-search-forward regexp nil t))
     (while (and (> level 0)
-               (re-search-forward regexp nil t)
-               (goto-char (1- (match-beginning 1)))
-               (cond ((looking-at (concat (regexp-quote TeX-esc)
-                                          (ConTeXt-environment-start-name)))
-                      (re-search-forward regexp nil t)
-                      (setq level (1+ level)))
-                     ((looking-at (concat (regexp-quote TeX-esc)
-                                          (ConTeXt-environment-stop-name)))
-                      (re-search-forward regexp nil t)
-                      (setq level (1- level))))))
+                (re-search-forward regexp nil t)
+                (goto-char (1- (match-beginning 1)))
+                (cond ((looking-at (concat (regexp-quote TeX-esc)
+                                           (ConTeXt-environment-start-name)))
+                       (re-search-forward regexp nil t)
+                       (setq level (1+ level)))
+                      ((looking-at (concat (regexp-quote TeX-esc)
+                                           (ConTeXt-environment-stop-name)))
+                       (re-search-forward regexp nil t)
+                       (setq level (1- level))))))
     ;; now we have to look if we want to start behind the \start... macro
     (if inner
-       (beginning-of-line)
+        (beginning-of-line)
       (skip-chars-forward "a-zA-Z"))))
 
 (defun ConTeXt-find-matching-start (&optional inner)
@@ -905,22 +905,22 @@ If INNER is non-nil, go to the point just past before
 If INNER is non-nil, go to the point just past the \\start... macro."
   (interactive)
   (let ((regexp (concat (regexp-quote TeX-esc)
-                       "\\("
-                       (ConTeXt-environment-start-name)
-                       "\\|"
-                       (ConTeXt-environment-stop-name)
-                       "\\)"
-                       ))
-       (level 1)
-       (pos))
+                        "\\("
+                        (ConTeXt-environment-start-name)
+                        "\\|"
+                        (ConTeXt-environment-stop-name)
+                        "\\)"
+                        ))
+        (level 1)
+        (pos))
     (while (and (> level 0)
-               (re-search-backward regexp nil t)
-               (cond ((looking-at (concat (regexp-quote TeX-esc)
-                                          (ConTeXt-environment-stop-name)))
-                      (setq level (1+ level)))
-                     ((looking-at (concat (regexp-quote TeX-esc)
-                                          (ConTeXt-environment-start-name)))
-                      (setq level (1- level))))))
+                (re-search-backward regexp nil t)
+                (cond ((looking-at (concat (regexp-quote TeX-esc)
+                                           (ConTeXt-environment-stop-name)))
+                       (setq level (1+ level)))
+                      ((looking-at (concat (regexp-quote TeX-esc)
+                                           (ConTeXt-environment-start-name)))
+                       (setq level (1- level))))))
     ;; now we have to look if we want to start behind the \start... macro
     (when inner
       ;; \startfoo can have 0 or more {} and [] pairs. I assume that
@@ -932,17 +932,17 @@ If INNER is non-nil, go to the point just past the 
\\start... macro."
       ;; environment
       (skip-chars-forward "\\\\a-zA-Z")
       (save-excursion
-       (while (progn
-                (skip-chars-forward "\t\n ")
-                (forward-comment 1)
-                (skip-chars-forward "\t\n ")
-                (looking-at "\\s\("))
-         (forward-list 1)
-         (setq pos (point))))
+        (while (progn
+                 (skip-chars-forward "\t\n ")
+                 (forward-comment 1)
+                 (skip-chars-forward "\t\n ")
+                 (looking-at "\\s\("))
+          (forward-list 1)
+          (setq pos (point))))
       (when pos
-       (goto-char pos))
+        (goto-char pos))
       (unless (bolp)
-       (forward-line)))))
+        (forward-line)))))
 
 ;;; items
 
@@ -975,16 +975,16 @@ If INNER is non-nil, go to the point just past the 
\\start... macro."
 If OPTIONAL, only insert it if not empty, and then use square brackets."
   (if optional
       (if
-         (not (string-equal arg ""))
-         (ConTeXt-optional-argument-insert arg prefix))
+          (not (string-equal arg ""))
+          (ConTeXt-optional-argument-insert arg prefix))
     (ConTeXt-required-argument-insert arg prefix)))
 
 (defun ConTeXt-arg-ref (optional &optional prompt definition)
   "Prompt for a reference completing with known references."
   (let ((ref (completing-read (TeX-argument-prompt optional prompt "ref")
-                             (LaTeX-label-list))))
+                              (LaTeX-label-list))))
     (if (and definition (not (string-equal "" ref)))
-       (LaTeX-add-labels ref))
+        (LaTeX-add-labels ref))
     (ConTeXt-argument-insert ref optional)))
 
 (defun ConTeXt-arg-define-ref (&optional prompt)
@@ -994,7 +994,7 @@ If OPTIONAL, only insert it if not empty, and then use 
square brackets."
 (defun ConTeXt-arg-setup (optional &optional prompt)
   "Prompt for setup arguments."
   (let ((setup (read-from-minibuffer
-               (TeX-argument-prompt optional prompt "Setup"))))
+                (TeX-argument-prompt optional prompt "Setup"))))
     (ConTeXt-argument-insert setup t)))
 
 
@@ -1077,33 +1077,33 @@ header is at the start of a line."
 (defun ConTeXt-outline-level ()
   "Find the level of current outline heading in an ConTeXt document."
   (cond ((looking-at (concat (ConTeXt-header-end) "\\b")) 1)
-       ((looking-at (concat (ConTeXt-trailer-start) "\\b")) 1)
-       ((TeX-look-at TeX-outline-extra)
-        (max 1 (+ (TeX-look-at TeX-outline-extra)
-                  (ConTeXt-outline-offset))))
-       (t
-        (save-excursion
-          (skip-chars-forward " \t")
-          (forward-char 1)
-          (cond ((looking-at (ConTeXt-start-environment-regexp
-                              ConTeXt-section-block-list)) 1)
-                ((TeX-look-at ConTeXt-section-list)
-                 (max 1 (+ (TeX-look-at ConTeXt-section-list)
-                           (ConTeXt-outline-offset))))
-                (t
-                 (error "Unrecognized header")))))))
+        ((looking-at (concat (ConTeXt-trailer-start) "\\b")) 1)
+        ((TeX-look-at TeX-outline-extra)
+         (max 1 (+ (TeX-look-at TeX-outline-extra)
+                   (ConTeXt-outline-offset))))
+        (t
+         (save-excursion
+           (skip-chars-forward " \t")
+           (forward-char 1)
+           (cond ((looking-at (ConTeXt-start-environment-regexp
+                               ConTeXt-section-block-list)) 1)
+                 ((TeX-look-at ConTeXt-section-list)
+                  (max 1 (+ (TeX-look-at ConTeXt-section-list)
+                            (ConTeXt-outline-offset))))
+                 (t
+                  (error "Unrecognized header")))))))
 
 
 ;;; Fonts
 
 (defcustom ConTeXt-font-list '((?\C-b "{\\bf " "}")
-                          (?\C-c "{\\sc " "}")
-                          (?\C-e "{\\em " "}")
-                          (?\C-i "{\\it " "}")
-                          (?\C-r "{\\rm " "}")
-                          (?\C-s "{\\sl " "}")
-                          (?\C-t "{\\tt " "}")
-                          (?\C-d "" "" t))
+                           (?\C-c "{\\sc " "}")
+                           (?\C-e "{\\em " "}")
+                           (?\C-i "{\\it " "}")
+                           (?\C-r "{\\rm " "}")
+                           (?\C-s "{\\sl " "}")
+                           (?\C-t "{\\tt " "}")
+                           (?\C-d "" "" t))
   "List of fonts used by `TeX-font'.
 
 Each entry is a list.
@@ -1115,16 +1115,16 @@ suffix to be used in math mode.
 An optional fourth (or sixth) element means always replace if t."
   :group 'TeX-macro
   :type '(repeat
-          (group
-           :value (?\C-a "" "")
-           (character :tag "Key")
-           (string :tag "Prefix")
-           (string :tag "Suffix")
-           (option (group
-                    :inline t
-                    (string :tag "Math Prefix")
-                    (string :tag "Math Suffix")))
-           (option (sexp :format "Replace\n" :value t)))))
+           (group
+            :value (?\C-a "" "")
+            (character :tag "Key")
+            (string :tag "Prefix")
+            (string :tag "Suffix")
+            (option (group
+                     :inline t
+                     (string :tag "Math Prefix")
+                     (string :tag "Math Suffix")))
+            (option (sexp :format "Replace\n" :value t)))))
 
 
 ;; Imenu support
@@ -1133,7 +1133,7 @@ An optional fourth (or sixth) element means always 
replace if t."
   "Guess a name for the current header line."
   (save-excursion
     (if (re-search-forward "{\\([^\}]*\\)}" (point-at-eol) t)
-       (match-string 1)
+        (match-string 1)
       (buffer-substring-no-properties (point) (point-at-eol)))))
 
 ;; This imenu also includes commented out chapters. Perhaps a feature
@@ -1147,12 +1147,12 @@ An optional fourth (or sixth) element means always 
replace if t."
     (goto-char (point-max))
     (while (re-search-backward regexp nil t)
       (let* ((name (ConTeXt-outline-name))
-            (level (make-string (1- (ConTeXt-outline-level)) ?\ ))
-            (label (concat level level name))
-            (mark (make-marker)))
-       (set-marker mark (point))
-       (set-text-properties 0 (length label) nil label)
-       (setq entries (cons (cons label mark) entries))))
+             (level (make-string (1- (ConTeXt-outline-level)) ?\ ))
+             (label (concat level level name))
+             (mark (make-marker)))
+        (set-marker mark (point))
+        (set-text-properties 0 (length label) nil label)
+        (setq entries (cons (cons label mark) entries))))
     entries))
 
 
@@ -1177,13 +1177,13 @@ An optional fourth (or sixth) element means always 
replace if t."
   (with-syntax-table ConTeXt-indent-syntax-table
     ;; TODO: Rather than ignore $, we should try to be more clever about it.
     (let ((indent
-          (save-excursion
-            (beginning-of-line)
-            (ConTeXt-find-indent))))
+           (save-excursion
+             (beginning-of-line)
+             (ConTeXt-find-indent))))
       (if (< indent 0) (setq indent 0))
       (if (<= (current-column) (current-indentation))
-         (indent-line-to indent)
-       (save-excursion (indent-line-to indent))))))
+          (indent-line-to indent)
+        (save-excursion (indent-line-to indent))))))
 
 (defun ConTeXt-find-indent (&optional virtual)
   "Find the proper indentation of text after point.
@@ -1195,81 +1195,81 @@ else.  There might be text before point."
     (or
      ;; Trust the current indentation, if such info is applicable.
      (and virtual (>= (current-indentation) (current-column))
-         (current-indentation))
+          (current-indentation))
      ;; Put leading close-paren where the matching open brace would be.
      (condition-case nil
-        (and (eq (char-syntax (char-after)) ?\))
-             (save-excursion
-               (skip-syntax-forward " )")
-               (backward-sexp 1)
-               (ConTeXt-find-indent 'virtual)))
+         (and (eq (char-syntax (char-after)) ?\))
+              (save-excursion
+                (skip-syntax-forward " )")
+                (backward-sexp 1)
+                (ConTeXt-find-indent 'virtual)))
        (error nil))
      ;; Default (maybe an argument)
      (let ((pos (point))
-          (char (char-after))
-          (indent 0)
-          up-list-pos)
+           (char (char-after))
+           (indent 0)
+           up-list-pos)
        ;; Look for macros to be outdented
        (cond ((looking-at (concat (regexp-quote TeX-esc)
-                                 (ConTeXt-environment-stop-name)))
-             (setq indent (- indent ConTeXt-indent-basic)))
-            ((looking-at ConTeXt-indent-item-re)
-             (setq indent (- indent ConTeXt-indent-item))))
+                                  (ConTeXt-environment-stop-name)))
+              (setq indent (- indent ConTeXt-indent-basic)))
+             ((looking-at ConTeXt-indent-item-re)
+              (setq indent (- indent ConTeXt-indent-item))))
        ;; Find the previous point which determines our current indentation.
        (condition-case err
-          (progn
-            (backward-sexp 1)
-            (while (or (> (current-column) (current-indentation))
-                       ;; Continue going back if we are
-                       ;; at a hanging optional group.
-                       (looking-at (regexp-quote ConTeXt-optop)))
-              (backward-sexp 1)))
-        (scan-error
-         (setq up-list-pos (nth 2 err))))
+           (progn
+             (backward-sexp 1)
+             (while (or (> (current-column) (current-indentation))
+                        ;; Continue going back if we are
+                        ;; at a hanging optional group.
+                        (looking-at (regexp-quote ConTeXt-optop)))
+               (backward-sexp 1)))
+         (scan-error
+          (setq up-list-pos (nth 2 err))))
        (cond
-       ((= (point-min) pos) 0)  ; We're really just indenting the first line.
-       ((integerp up-list-pos)
-        ;; Have to indent relative to the open-paren.
-        (goto-char up-list-pos)
-        (if (and (not ConTeXt-indent-allhanging)
-                 (> pos (progn (down-list 1)
-                               (forward-comment (point-max))
-                               (point))))
-            ;; Align with the first element after the open-paren.
-            (current-column)
-          ;; We're the first element after a hanging brace.
-          (goto-char up-list-pos)
-          (+ indent ConTeXt-indent-basic (ConTeXt-find-indent 'virtual))))
-       ;; We're now at the "beginning" of a line.
-       ((not (and (not virtual) (eq (char-after) ?\\)))
-        ;; Nothing particular here: just keep the same indentation.
-        (+ indent (current-column)))
-       ;; We're now looking at an item.
-       ((looking-at ConTeXt-indent-item-re)
-        ;; Indenting relative to an item, have to re-add the outdenting.
-        (+ indent (current-column) ConTeXt-indent-item))
-       ;; We're looking at an environment starter.
-       ((and (looking-at (concat (regexp-quote TeX-esc)
-                                 (ConTeXt-environment-start-name)))
-             (not (looking-at (concat (regexp-quote TeX-esc)
-                                      (ConTeXt-environment-start-name)
-                                      ConTeXt-text)))) ; other environments?
-        (+ indent (current-column) ConTeXt-indent-basic))
-       (t
-        (let ((col (current-column)))
-          (if (not (and char (eq (char-syntax char) ?\()))
-              ;; If the first char was not an open-paren, there's
-              ;; a risk that this is really not an argument to the
-              ;; macro at all.
-              (+ indent col)
-            (forward-sexp 1)
-            (if (< (line-end-position)
-                   (save-excursion (forward-comment (point-max))
-                                   (point)))
-                ;; we're indenting the first argument.
-                (min (current-column) (+ ConTeXt-indent-arg col))
-              (skip-syntax-forward " ")
-              (current-column))))))))))
+        ((= (point-min) pos) 0)  ; We're really just indenting the first line.
+        ((integerp up-list-pos)
+         ;; Have to indent relative to the open-paren.
+         (goto-char up-list-pos)
+         (if (and (not ConTeXt-indent-allhanging)
+                  (> pos (progn (down-list 1)
+                                (forward-comment (point-max))
+                                (point))))
+             ;; Align with the first element after the open-paren.
+             (current-column)
+           ;; We're the first element after a hanging brace.
+           (goto-char up-list-pos)
+           (+ indent ConTeXt-indent-basic (ConTeXt-find-indent 'virtual))))
+        ;; We're now at the "beginning" of a line.
+        ((not (and (not virtual) (eq (char-after) ?\\)))
+         ;; Nothing particular here: just keep the same indentation.
+         (+ indent (current-column)))
+        ;; We're now looking at an item.
+        ((looking-at ConTeXt-indent-item-re)
+         ;; Indenting relative to an item, have to re-add the outdenting.
+         (+ indent (current-column) ConTeXt-indent-item))
+        ;; We're looking at an environment starter.
+        ((and (looking-at (concat (regexp-quote TeX-esc)
+                                  (ConTeXt-environment-start-name)))
+              (not (looking-at (concat (regexp-quote TeX-esc)
+                                       (ConTeXt-environment-start-name)
+                                       ConTeXt-text)))) ; other environments?
+         (+ indent (current-column) ConTeXt-indent-basic))
+        (t
+         (let ((col (current-column)))
+           (if (not (and char (eq (char-syntax char) ?\()))
+               ;; If the first char was not an open-paren, there's
+               ;; a risk that this is really not an argument to the
+               ;; macro at all.
+               (+ indent col)
+             (forward-sexp 1)
+             (if (< (line-end-position)
+                    (save-excursion (forward-comment (point-max))
+                                    (point)))
+                 ;; we're indenting the first argument.
+                 (min (current-column) (+ ConTeXt-indent-arg col))
+               (skip-syntax-forward " ")
+               (current-column))))))))))
 
 
 ;; XML inside ConTeXt support
@@ -1277,7 +1277,7 @@ else.  There might be text before point."
 (defun ConTeXt-last-unended-start-xml ()
   "Leave point at the beginning of the last `tag' that is unstopped."
   (while (and (re-search-backward "<[_A-Za-z][-:._A-Za-z0-9]*\\([ 
\t\r\n]\\|[_A-Za-z][-:._A-Za-z0-9]*\=\"[^\"]*\"\\)*>\\|</[_A-Za-z][-:_A-Za-z0-9]*>")
-             (looking-at "</[_A-Za-z][-:._A-Za-z0-9]*>"))
+              (looking-at "</[_A-Za-z][-:._A-Za-z0-9]*>"))
     (ConTeXt-last-unended-start-xml)))
 
 (defun ConTeXt-close-xml-tag ()
@@ -1286,8 +1286,8 @@ else.  There might be text before point."
   (let ((new-line-needed (bolp)) text indentation)
     (save-excursion
       (condition-case nil
-         (ConTeXt-last-unended-start-xml)
-       (error (error "Couldn't find unended XML tag")))
+          (ConTeXt-last-unended-start-xml)
+        (error (error "Couldn't find unended XML tag")))
       (setq indentation (current-column))
       (re-search-forward "<\\([_A-Za-z][-:._A-Za-z0-9]*\\)")
       (setq text (buffer-substring (match-beginning 1) (match-end 1))))
@@ -1309,7 +1309,7 @@ else.  There might be text before point."
     (define-key map "\C-c\C-e" 'ConTeXt-environment)
     (define-key map "\C-c\n"   'ConTeXt-insert-item)
     (or (key-binding "\e\r")
-       (define-key map "\e\r"    'ConTeXt-insert-item)) ;*** Alias
+        (define-key map "\e\r"    'ConTeXt-insert-item)) ;*** Alias
     (define-key map "\C-c]" 'ConTeXt-close-environment)
     (define-key map "\C-c\C-s" 'ConTeXt-section)
     ;; XML in ConTeXt support
@@ -1429,20 +1429,20 @@ else.  There might be text before point."
   "Enable or disable section ENTRY from `ConTeXt-section-list'."
   (let ((level (nth 1 entry)))
     (set (ConTeXt-section-enable-symbol level)
-        (>= level ConTeXt-largest-level))))
+         (>= level ConTeXt-largest-level))))
 
 (defun ConTeXt-numbered-section-menu (level)
   "Insert numbered section from menu."
   (let ((ConTeXt-numbered-section-hook
          (delq 'ConTeXt-numbered-section-heading
-              (copy-sequence ConTeXt-numbered-section-hook))))
+               (copy-sequence ConTeXt-numbered-section-hook))))
     (ConTeXt-section level)))
 
 (defun ConTeXt-unnumbered-section-menu (level)
   "Insert unnumbered section from menu."
   (let ((ConTeXt-unnumbered-section-hook
          (delq 'ConTeXt-unnumbered-section-heading
-              (copy-sequence ConTeXt-unnumbered-section-hook))))
+               (copy-sequence ConTeXt-unnumbered-section-hook))))
     (ConTeXt-section level)))
 
 (defun ConTeXt-numbered-section-menu-entry (entry)
@@ -1465,8 +1465,8 @@ else.  There might be text before point."
   (interactive)
   (if (fboundp 'etexshow)
       (let ()
-       (require 'etexshow)
-       (funcall (symbol-function 'etexshow-cmd)))
+        (require 'etexshow)
+        (funcall (symbol-function 'etexshow-cmd)))
     (error "etexshow is not installed.  Get it from http://levana.de/emacs/";)))
 
 ;; menu itself
@@ -1541,71 +1541,71 @@ else.  There might be text before point."
       (null ConTeXt-menu-changed)
       (not (fboundp 'easy-menu-change))
       (progn
-       (TeX-update-style)
-       (setq ConTeXt-menu-changed nil)
-       (message "Updating section menu...")
-       (mapc #'ConTeXt-section-enable ConTeXt-section-list)
-       (message "Updating section menu...done")
-       (message "Updating environment menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-environment-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-environment-menu-entry
-                                  (ConTeXt-environment-list))))
-       (message "Updating environment menu...done")
-       (message "Updating modify environment menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-environment-modify-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-environment-modify-menu-entry
-                                  (ConTeXt-environment-list))))
-       (message "Updating modify environment menu...done")
-       (message "Updating define menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-define-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-define-menu-entry
-                                  ConTeXt-define-list)))
-       (message "Updating define menu...done")
-       (message "Updating setup menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-setup-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-setup-menu-entry
-                                  ConTeXt-setup-list)))
-       (message "Updating setup menu...done")
-       (message "Updating referencing menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-referencing-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-referencing-menu-entry
-                                  ConTeXt-referencing-list)))
-       (message "Updating referencing menu...done")
-       (message "Updating other macro's menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-other-macro-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-other-macro-menu-entry
-                                  ConTeXt-other-macro-list)))
-       (message "Updating other macro's menu...done")
-       (message "Updating project structure menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-project-structure-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-project-structure-menu-entry
-                                  ConTeXt-project-structure-list)))
-       (message "Updating project structure menu...done")
-       (message "Updating section block menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-section-block-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-section-block-menu-entry
-                                  ConTeXt-section-block-list)))
-       (message "Updating section block menu...done")
-       (message "Updating section menu...")
-       (easy-menu-change '("ConTeXt") ConTeXt-numbered-section-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-numbered-section-menu-entry
-                                  ConTeXt-numbered-section-list)))
-       (easy-menu-change '("ConTeXt") ConTeXt-unnumbered-section-menu-name
-                         (LaTeX-split-long-menu
-                          (mapcar #'ConTeXt-unnumbered-section-menu-entry
-                                  ConTeXt-unnumbered-section-list)))
-       (message "Updating section menu...done")
-       (and menu (easy-menu-return-item ConTeXt-mode-menu menu))
-       )))
+        (TeX-update-style)
+        (setq ConTeXt-menu-changed nil)
+        (message "Updating section menu...")
+        (mapc #'ConTeXt-section-enable ConTeXt-section-list)
+        (message "Updating section menu...done")
+        (message "Updating environment menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-environment-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-environment-menu-entry
+                                   (ConTeXt-environment-list))))
+        (message "Updating environment menu...done")
+        (message "Updating modify environment menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-environment-modify-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-environment-modify-menu-entry
+                                   (ConTeXt-environment-list))))
+        (message "Updating modify environment menu...done")
+        (message "Updating define menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-define-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-define-menu-entry
+                                   ConTeXt-define-list)))
+        (message "Updating define menu...done")
+        (message "Updating setup menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-setup-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-setup-menu-entry
+                                   ConTeXt-setup-list)))
+        (message "Updating setup menu...done")
+        (message "Updating referencing menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-referencing-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-referencing-menu-entry
+                                   ConTeXt-referencing-list)))
+        (message "Updating referencing menu...done")
+        (message "Updating other macro's menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-other-macro-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-other-macro-menu-entry
+                                   ConTeXt-other-macro-list)))
+        (message "Updating other macro's menu...done")
+        (message "Updating project structure menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-project-structure-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-project-structure-menu-entry
+                                   ConTeXt-project-structure-list)))
+        (message "Updating project structure menu...done")
+        (message "Updating section block menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-section-block-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-section-block-menu-entry
+                                   ConTeXt-section-block-list)))
+        (message "Updating section block menu...done")
+        (message "Updating section menu...")
+        (easy-menu-change '("ConTeXt") ConTeXt-numbered-section-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-numbered-section-menu-entry
+                                   ConTeXt-numbered-section-list)))
+        (easy-menu-change '("ConTeXt") ConTeXt-unnumbered-section-menu-name
+                          (LaTeX-split-long-menu
+                           (mapcar #'ConTeXt-unnumbered-section-menu-entry
+                                   ConTeXt-unnumbered-section-list)))
+        (message "Updating section menu...done")
+        (and menu (easy-menu-return-item ConTeXt-mode-menu menu))
+        )))
 
 ;;; Option expander
 
@@ -1629,7 +1629,7 @@ Use `ConTeXt-Mark-version' to choose the command."
    ((string= ConTeXt-Mark-version "IV")
     (concat
      (if TeX-source-correlate-mode
-        "--synctex=1 ")
+         "--synctex=1 ")
      (unless TeX-interactive-mode
        ConTeXt-texexec-option-nonstop)))
    ;; In any other case fall back on Mark II.
@@ -1637,14 +1637,14 @@ Use `ConTeXt-Mark-version' to choose the command."
     (concat
      (let ((engine (eval (nth 4 (TeX-engine-in-engine-alist TeX-engine)))))
        (when engine
-        (format "--engine=%s " engine)))
+         (format "--engine=%s " engine)))
      (unless (eq ConTeXt-current-interface "en")
        (format "--interface=%s " ConTeXt-current-interface))
      (when TeX-source-correlate-mode
        (format "--passon=\"%s\" "
-              (if (eq (TeX-source-correlate-method-active) 'synctex)
-                  TeX-synctex-tex-flags
-                TeX-source-specials-tex-flags)))
+               (if (eq (TeX-source-correlate-method-active) 'synctex)
+                   TeX-synctex-tex-flags
+                 TeX-source-specials-tex-flags)))
      (unless TeX-interactive-mode
        ConTeXt-texexec-option-nonstop)))))
 
@@ -1718,7 +1718,7 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
   (require (intern (concat "context-" ConTeXt-current-interface)))
   (dolist (symbol ConTeXt-language-variable-list)
     (set symbol (symbol-value (intern (concat (symbol-name symbol) "-"
-                                             ConTeXt-current-interface)))))
+                                              ConTeXt-current-interface)))))
 
   ;; Create certain regular expressions based on language
   (setq ConTeXt-indent-item-re (concat "\\\\\\(" (mapconcat #'identity 
ConTeXt-item-list "\\|") "\\)\\>"))
@@ -1744,16 +1744,16 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
   (set (make-local-variable 'fill-paragraph-function) 'LaTeX-fill-paragraph)
   (set (make-local-variable 'adaptive-fill-mode) nil)
   (setq paragraph-start
-       (concat
-        "[ \t]*\\("
-        (ConTeXt-paragraph-commands-regexp) "\\|"
-        "\\$\\$\\|" ; Plain TeX display math
-        "$\\)"))
+        (concat
+         "[ \t]*\\("
+         (ConTeXt-paragraph-commands-regexp) "\\|"
+         "\\$\\$\\|" ; Plain TeX display math
+         "$\\)"))
   (setq paragraph-separate
-       (concat
-        "[ \t]*\\("
-        "\\$\\$" ; Plain TeX display math
-        "\\|$\\)"))
+        (concat
+         "[ \t]*\\("
+         "\\$\\$" ; Plain TeX display math
+         "\\|$\\)"))
 
   ;; Keybindings and menu
   (use-local-map ConTeXt-mode-map)
@@ -1771,7 +1771,7 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
   (set (make-local-variable 'outline-regexp) (ConTeXt-outline-regexp t))
   ;;(make-local-variable 'outline-heading-end-regexp)
   (setq TeX-header-end (ConTeXt-header-end)
-       TeX-trailer-start (ConTeXt-trailer-start))
+        TeX-trailer-start (ConTeXt-trailer-start))
 
   ;; font switch support
   (set (make-local-variable 'TeX-font-list) ConTeXt-font-list)
@@ -1791,16 +1791,16 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
   (save-excursion
     (goto-char (point-min))
     (setq ConTeXt-current-interface
-         (cond ((re-search-forward "%.*?interface=en" (+ 512 (point)) t)
-                "en")
-               ((re-search-forward "%.*?interface=nl" (+ 512 (point)) t)
-                "nl")
-               ((re-search-forward "\\\\starttext" (+ 1024 (point)) t)
-                "en")
-               ((re-search-forward "\\\\starttekst" (+ 1024 (point)) t)
-                "nl")
-               (t
-                ConTeXt-default-interface)))))
+          (cond ((re-search-forward "%.*?interface=en" (+ 512 (point)) t)
+                 "en")
+                ((re-search-forward "%.*?interface=nl" (+ 512 (point)) t)
+                 "nl")
+                ((re-search-forward "\\\\starttext" (+ 1024 (point)) t)
+                 "en")
+                ((re-search-forward "\\\\starttekst" (+ 1024 (point)) t)
+                 "nl")
+                (t
+                 ConTeXt-default-interface)))))
 
 ;;;###autoload
 (defalias 'ConTeXt-mode 'context-mode)
diff --git a/font-latex.el b/font-latex.el
index 6c1110f..bf258f1 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -129,15 +129,15 @@ QUOTES has to be a list adhering to the format of an 
element of
 If `font-latex-quotes' is set to `auto', try to derive the
 correct value from document properties."
   (setq font-latex-quotes-internal
-       (if (eq font-latex-quotes 'auto)
-           (or (when (TeX-elt-of-list-member
-                      font-latex-quote-style-list-french TeX-active-styles)
-                 'french)
-               (when (TeX-elt-of-list-member
-                      font-latex-quote-style-list-german TeX-active-styles)
-                 'german)
-               font-latex-quotes-fallback)
-         font-latex-quotes)))
+        (if (eq font-latex-quotes 'auto)
+            (or (when (TeX-elt-of-list-member
+                       font-latex-quote-style-list-french TeX-active-styles)
+                  'french)
+                (when (TeX-elt-of-list-member
+                       font-latex-quote-style-list-german TeX-active-styles)
+                  'german)
+                font-latex-quotes-fallback)
+          font-latex-quotes)))
 ;; Update the value of `font-latex-quotes-internal' when the list of
 ;; styles changes.
 (add-hook 'TeX-update-style-hook 'font-latex-quotes-set-internal)
@@ -179,55 +179,55 @@ Switching from `color' to a number or vice versa does not 
take
 effect unless you call \\[font-lock-fontify-buffer] or restart
 Emacs."
   :type '(choice (number :tag "Scale factor")
-                (const color))
+                 (const color))
   :initialize 'custom-initialize-default
   :set (lambda (symbol value)
-        (set-default symbol value)
-        (unless (eq value 'color)
-          (font-latex-update-sectioning-faces font-latex-sectioning-max 
value)))
+         (set-default symbol value)
+         (unless (eq value 'color)
+           (font-latex-update-sectioning-faces font-latex-sectioning-max 
value)))
   :group 'font-latex)
 
 (defun font-latex-update-sectioning-faces (&optional max height-scale)
   "Update sectioning commands faces."
   (unless height-scale
     (setq height-scale (if (numberp font-latex-fontify-sectioning)
-                          ;; Make sure `height-scale' is a floating point
-                          ;; number because `set-face-attribute' treats
-                          ;; integers differently from floating points.
-                          (float font-latex-fontify-sectioning)
-                        1.1)))
+                           ;; Make sure `height-scale' is a floating point
+                           ;; number because `set-face-attribute' treats
+                           ;; integers differently from floating points.
+                           (float font-latex-fontify-sectioning)
+                         1.1)))
   (unless max
     (setq max font-latex-sectioning-max))
   (dotimes (num max)
     (let* (;; reverse for XEmacs:
-          (num (- max (1+ num)))
-          (face-name (intern (format "font-latex-sectioning-%s-face" num))))
+           (num (- max (1+ num)))
+           (face-name (intern (format "font-latex-sectioning-%s-face" num))))
       (unless (get face-name 'saved-face) ; Do not touch customized faces.
-       (set-face-attribute face-name nil :height  height-scale)))))
+        (set-face-attribute face-name nil :height  height-scale)))))
 
 (defun font-latex-make-sectioning-faces (max &optional height-scale)
   "Build the faces used to fontify sectioning commands."
   (unless max (setq max font-latex-sectioning-max))
   (unless height-scale
     (setq height-scale (if (numberp font-latex-fontify-sectioning)
-                          ;; Make sure `height-scale' is a floating point
-                          ;; number because the integer type is treated
-                          ;; differently.
-                          (float font-latex-fontify-sectioning)
-                        1.1)))
+                           ;; Make sure `height-scale' is a floating point
+                           ;; number because the integer type is treated
+                           ;; differently.
+                           (float font-latex-fontify-sectioning)
+                         1.1)))
   (dotimes (num max)
     (let* ((num (- max (1+ num)))
-          (face-name (intern (format "font-latex-sectioning-%s-face" num)))
-          (f-inherit (intern (format "font-latex-sectioning-%s-face" (1+ 
num)))))
+           (face-name (intern (format "font-latex-sectioning-%s-face" num)))
+           (f-inherit (intern (format "font-latex-sectioning-%s-face" (1+ 
num)))))
       (eval
        `(defface ,face-name
-         '((t (:height ,height-scale :inherit ,f-inherit)))
-         (format "Face for sectioning commands at level %s.
+          '((t (:height ,height-scale :inherit ,f-inherit)))
+          (format "Face for sectioning commands at level %s.
 
 Probably you don't want to customize this face directly.  Better
 change the base face `font-latex-sectioning-5-face' or customize the
 variable `font-latex-fontify-sectioning'." ',num)
-         :group 'font-latex-highlighting-faces)))))
+          :group 'font-latex-highlighting-faces)))))
 
 (font-latex-make-sectioning-faces font-latex-sectioning-max)
 
@@ -364,38 +364,38 @@ variable `font-latex-fontify-sectioning'." ',num)
     ("sectioning-0"
      (("part" "*[{"))
      (if (eq font-latex-fontify-sectioning 'color)
-        'font-lock-type-face
+         'font-lock-type-face
        'font-latex-sectioning-0-face)
      2 command)
     ("sectioning-1"
      (("chapter" "*[{"))
      (if (eq font-latex-fontify-sectioning 'color)
-        'font-lock-type-face
+         'font-lock-type-face
        'font-latex-sectioning-1-face)
      2 command)
     ("sectioning-2"
      (("section" "*[{"))
      (if (eq font-latex-fontify-sectioning 'color)
-        'font-lock-type-face
+         'font-lock-type-face
        'font-latex-sectioning-2-face)
      2 command)
     ("sectioning-3"
      (("subsection" "*[{"))
      (if (eq font-latex-fontify-sectioning 'color)
-        'font-lock-type-face
+         'font-lock-type-face
        'font-latex-sectioning-3-face)
      2 command)
     ("sectioning-4"
      (("subsubsection" "*[{"))
      (if (eq font-latex-fontify-sectioning 'color)
-        'font-lock-type-face
+         'font-lock-type-face
        'font-latex-sectioning-4-face)
      2 command)
     ("sectioning-5"
      (("paragraph" "*[{") ("subparagraph" "*[{")
       ("subsubparagraph" "*[{"))
      (if (eq font-latex-fontify-sectioning 'color)
-        'font-lock-type-face
+         'font-lock-type-face
        'font-latex-sectioning-5-face)
      2 command)
     ("slide-title" () font-latex-slide-title-face 2 command)
@@ -467,30 +467,30 @@ Valid entries are \"warning\", \"variable\", 
\"biblatexnoarg\",
 You have to restart Emacs for a change of this variable to take effect."
   :group 'font-latex-keywords
   :type `(set ,@(mapcar
-                (lambda (spec)
-                  `(const :tag ,(concat
-                                 ;; Name of the keyword class
-                                 (let ((name (split-string (car spec) "-")))
-                                   (setcar name (capitalize (car name)))
-                                   (mapconcat 'identity name " "))
-                                 " keywords in `"
-                                 ;; Name of the face
-                                 (symbol-name
-                                  (let ((face (nth 2 spec)))
-                                    (if (symbolp face) face (eval face))))
-                                 "'.\n"
-                                 ;; List of keywords
-                                 (with-temp-buffer
-                                   (insert "  Keywords: "
-                                           (mapconcat (lambda (x)
-                                                        (if (listp x)
-                                                            (car x)
-                                                          x))
-                                                      (nth 1 spec) ", "))
-                                   (fill-paragraph nil)
-                                   (buffer-string)))
-                          ,(car spec)))
-                font-latex-built-in-keyword-classes)))
+                 (lambda (spec)
+                   `(const :tag ,(concat
+                                  ;; Name of the keyword class
+                                  (let ((name (split-string (car spec) "-")))
+                                    (setcar name (capitalize (car name)))
+                                    (mapconcat 'identity name " "))
+                                  " keywords in `"
+                                  ;; Name of the face
+                                  (symbol-name
+                                   (let ((face (nth 2 spec)))
+                                     (if (symbolp face) face (eval face))))
+                                  "'.\n"
+                                  ;; List of keywords
+                                  (with-temp-buffer
+                                    (insert "  Keywords: "
+                                            (mapconcat (lambda (x)
+                                                         (if (listp x)
+                                                             (car x)
+                                                           x))
+                                                       (nth 1 spec) ", "))
+                                    (fill-paragraph nil)
+                                    (buffer-string)))
+                           ,(car spec)))
+                 font-latex-built-in-keyword-classes)))
 
 (defun font-latex-make-match-defun (prefix name face type)
   "Return a function definition for keyword matching.
@@ -508,40 +508,40 @@ use."
   ;; (command 1).  This indicated a macro with one argument.  Provide
   ;; a match function in this case but don't actually support it.
   (cond ((or (eq type 'command) (listp type))
-        (eval `(defun ,(intern (concat prefix name)) (limit)
-                 ,(concat "Fontify `" prefix name "' up to LIMIT.
+         (eval `(defun ,(intern (concat prefix name)) (limit)
+                  ,(concat "Fontify `" prefix name "' up to LIMIT.
 
 Generated by `font-latex-make-match-defun'.")
-                 (when ,(intern (concat prefix name))
-                   (font-latex-match-command-with-arguments
-                    ,(intern (concat prefix name))
-                    (append
-                     (when (boundp ',(intern (concat prefix name
-                                                     "-keywords-local")))
-                       ,(intern (concat prefix name "-keywords-local")))
-                     ,(intern (concat prefix name "-keywords")))
-                    ;; `face' can be a face symbol, a form returning
-                    ;; a face symbol, or a list of face attributes.
-                    ,(if (and (listp face) (fboundp (car face)))
-                        face
-                       `',face)
-                    limit)))))
-       ((eq type 'declaration)
-        (eval `(defun ,(intern (concat prefix name)) (limit)
-                 ,(concat "Fontify `" prefix name "' up to LIMIT.
+                  (when ,(intern (concat prefix name))
+                    (font-latex-match-command-with-arguments
+                     ,(intern (concat prefix name))
+                     (append
+                      (when (boundp ',(intern (concat prefix name
+                                                      "-keywords-local")))
+                        ,(intern (concat prefix name "-keywords-local")))
+                      ,(intern (concat prefix name "-keywords")))
+                     ;; `face' can be a face symbol, a form returning
+                     ;; a face symbol, or a list of face attributes.
+                     ,(if (and (listp face) (fboundp (car face)))
+                         face
+                        `',face)
+                     limit)))))
+        ((eq type 'declaration)
+         (eval `(defun ,(intern (concat prefix name)) (limit)
+                  ,(concat "Fontify `" prefix name "' up to LIMIT.
 
 Generated by `font-latex-make-match-defun'.")
-                 (when ,(intern (concat prefix name))
-                   (font-latex-match-command-in-braces
-                    ,(intern (concat prefix name)) limit)))))
-       ((eq type 'noarg)
-        (eval `(defun ,(intern (concat prefix name)) (limit)
-                 ,(concat "Fontify `" prefix name "' up to LIMIT.
+                  (when ,(intern (concat prefix name))
+                    (font-latex-match-command-in-braces
+                     ,(intern (concat prefix name)) limit)))))
+        ((eq type 'noarg)
+         (eval `(defun ,(intern (concat prefix name)) (limit)
+                  ,(concat "Fontify `" prefix name "' up to LIMIT.
 
 Generated by `font-latex-make-match-defun'.")
-                 (when ,(intern (concat prefix name))
-                   (re-search-forward
-                    ,(intern (concat prefix name)) limit t)))))))
+                  (when ,(intern (concat prefix name))
+                    (re-search-forward
+                     ,(intern (concat prefix name)) limit t)))))))
 
 (defun font-latex-keyword-matcher (prefix name face type)
   "Return a matcher and highlighter as required by `font-lock-keywords'.
@@ -565,54 +565,54 @@ use."
   ;; (command 1).  This indicated a macro with one argument.  Provide
   ;; a matcher in this case but don't actually support it.
   (cond ((or (eq type 'command) (listp type))
-        `(,(intern (concat prefix name))
-          (0 (font-latex-matched-face 0) append t)
-          (1 (font-latex-matched-face 1) append t)
-          (2 (font-latex-matched-face 2) append t)
-          (3 (font-latex-matched-face 3) append t)
-          (4 (font-latex-matched-face 4) append t)
-          (5 (font-latex-matched-face 5) append t)
-          (6 (font-latex-matched-face 6) append t)
-          (7 (font-latex-matched-face 7) append t)
-          (8 (font-latex-matched-face 8) append t)
-          (9 (font-latex-matched-face 9) append t)
-          (10 (font-latex-matched-face 10) append t)
-          (11 (font-latex-matched-face 11) append t)))
-       ((eq type 'noarg)
-        `(,(intern (concat prefix name))
-          (0 ,face)))
-       ((eq type 'declaration)
-        `(,(intern (concat prefix name))
-          (0 'font-latex-warning-face t t)
-          (1 'font-lock-keyword-face append t)
-          (2 ,face append t)))))
+         `(,(intern (concat prefix name))
+           (0 (font-latex-matched-face 0) append t)
+           (1 (font-latex-matched-face 1) append t)
+           (2 (font-latex-matched-face 2) append t)
+           (3 (font-latex-matched-face 3) append t)
+           (4 (font-latex-matched-face 4) append t)
+           (5 (font-latex-matched-face 5) append t)
+           (6 (font-latex-matched-face 6) append t)
+           (7 (font-latex-matched-face 7) append t)
+           (8 (font-latex-matched-face 8) append t)
+           (9 (font-latex-matched-face 9) append t)
+           (10 (font-latex-matched-face 10) append t)
+           (11 (font-latex-matched-face 11) append t)))
+        ((eq type 'noarg)
+         `(,(intern (concat prefix name))
+           (0 ,face)))
+        ((eq type 'declaration)
+         `(,(intern (concat prefix name))
+           (0 'font-latex-warning-face t t)
+           (1 'font-lock-keyword-face append t)
+           (2 ,face append t)))))
 
 (defun font-latex-make-built-in-keywords ()
   "Build defuns, defvars and defcustoms for built-in keyword fontification."
   (dolist (item font-latex-built-in-keyword-classes)
     (let ((prefix "font-latex-match-")
-         (name (nth 0 item))
-         (keywords (nth 1 item))
-         (face (nth 2 item))
-         (level (nth 3 item))
-         (type (nth 4 item)))
+          (name (nth 0 item))
+          (keywords (nth 1 item))
+          (face (nth 2 item))
+          (level (nth 3 item))
+          (type (nth 4 item)))
 
       ;; defvar font-latex-match-*-keywords-local
       (eval `(defvar ,(intern (concat prefix name "-keywords-local"))
-              ',keywords
-              ,(concat "Buffer-local keywords to add to `"
-                       prefix name "-keywords'.\n\n"
-                       (if (eq type 'command)
-                           "\
+               ',keywords
+               ,(concat "Buffer-local keywords to add to `"
+                        prefix name "-keywords'.\n\n"
+                        (if (eq type 'command)
+                            "\
 This must be a list where each element is a list consisting of a
 keyword string \(not a regular expression\) omitting the leading
 backslash and a format specifier as described in the doc string of
 `font-latex-user-keyword-classes'."
-                         "\
+                          "\
 This must be a list where each element is a keyword string \(not a
 regular expression\) omitting the leading backslash.")
 
-                       "\n\n\
+                        "\n\n\
 This is an internal variable which should not be set directly.
 Use `font-latex-add-keywords' instead.
 
@@ -623,65 +623,65 @@ Generated by `font-latex-make-built-in-keywords'.")))
       ;; defun font-latex-match-*-make
       ;; Note: The functions are byte-compiled at the end of font-latex.el.
       (eval `(defun ,(intern (concat prefix name "-make")) ()
-              ,(concat "Make or remake the variable `" prefix name "'.
+               ,(concat "Make or remake the variable `" prefix name "'.
 
 Generated by `font-latex-make-built-in-keywords'.")
-              (let ((keywords
-                     (append
-                      (unless (member ,name
-                                      font-latex-deactivated-keyword-classes)
-                        ,(intern (concat prefix name "-keywords-local")))
-                      ,(intern (concat prefix name "-keywords"))))
-                    multi-char-macros single-char-macros)
-                (dolist (elt keywords)
-                  (let ((keyword (if (listp elt) (car elt) elt)))
-                    (if (string-match "^[A-Za-z]" keyword)
-                        (push keyword multi-char-macros)
-                      (push keyword single-char-macros))))
-                (when (or multi-char-macros single-char-macros)
-                  (setq ,(intern (concat prefix name))
-                        (concat
-                         "\\\\\\("
-                         (when multi-char-macros
-                           (concat
-                            "\\(?:" (regexp-opt multi-char-macros) "\\)\\>"))
-                         (when single-char-macros
-                           (concat
-                            (when multi-char-macros "\\|")
-                            "\\(?:" (regexp-opt single-char-macros) "\\)"))
-                         "\\)"))))))
+               (let ((keywords
+                      (append
+                       (unless (member ,name
+                                       font-latex-deactivated-keyword-classes)
+                         ,(intern (concat prefix name "-keywords-local")))
+                       ,(intern (concat prefix name "-keywords"))))
+                     multi-char-macros single-char-macros)
+                 (dolist (elt keywords)
+                   (let ((keyword (if (listp elt) (car elt) elt)))
+                     (if (string-match "^[A-Za-z]" keyword)
+                         (push keyword multi-char-macros)
+                       (push keyword single-char-macros))))
+                 (when (or multi-char-macros single-char-macros)
+                   (setq ,(intern (concat prefix name))
+                         (concat
+                          "\\\\\\("
+                          (when multi-char-macros
+                            (concat
+                             "\\(?:" (regexp-opt multi-char-macros) "\\)\\>"))
+                          (when single-char-macros
+                            (concat
+                             (when multi-char-macros "\\|")
+                             "\\(?:" (regexp-opt single-char-macros) "\\)"))
+                          "\\)"))))))
 
       ;; defcustom font-latex-match-*-keywords
       (eval `(defcustom ,(intern (concat prefix name "-keywords")) nil
-              ,(concat "List of keywords "
-                       (when (eq type 'command) "and formats ")
-                       "for " name " face.\n"
-                       (if (eq type 'command)
-                           "\
+               ,(concat "List of keywords "
+                        (when (eq type 'command) "and formats ")
+                        "for " name " face.\n"
+                        (if (eq type 'command)
+                            "\
 Each element has to be a list consisting of the name of a macro
 omitting the leading backslash and a format specifier as
 described in the doc string of `font-latex-user-keyword-classes'."
-                         "\
+                          "\
 Each element has to be the name of a macro as a string, omitting
 the leading backslash.")
-                       "\n\n\
+                        "\n\n\
 Setting this variable directly does not take effect; restart
 Emacs.
 
 Generated by `font-latex-make-built-in-keywords'.")
-              :type '(repeat ,(if (eq type 'command)
-                                  '(list (string :tag "Keyword")
-                                         (string :tag "Format"))
-                                '(string :tag "Keyword")))
-              :set (lambda (symbol value)
-                     (set-default symbol value)
-                     (funcall ',(intern (concat prefix name "-make"))))
-              :group 'font-latex-keywords))
+               :type '(repeat ,(if (eq type 'command)
+                                   '(list (string :tag "Keyword")
+                                          (string :tag "Format"))
+                                 '(string :tag "Keyword")))
+               :set (lambda (symbol value)
+                      (set-default symbol value)
+                      (funcall ',(intern (concat prefix name "-make"))))
+               :group 'font-latex-keywords))
 
       ;; defvar font-latex-match-*
       (eval `(defvar ,(intern (concat prefix name)) nil
-              ,(concat "Regular expression to match " name
-                       " keywords.
+               ,(concat "Regular expression to match " name
+                        " keywords.
 
 Generated by `font-latex-make-built-in-keywords'")))
       (make-variable-buffer-local (intern (concat prefix name)))
@@ -691,13 +691,13 @@ Generated by `font-latex-make-built-in-keywords'")))
 
       ;; Add matchers and highlighters to `font-latex-keywords-{1,2}'.
       (let ((keywords-entry (font-latex-keyword-matcher
-                            prefix name face type)))
-       (add-to-list (intern (concat "font-latex-keywords-"
-                                    (number-to-string level)))
-                    keywords-entry t)
-       (when (= level 1)
-         (add-to-list 'font-latex-keywords-2
-                      keywords-entry t))))))
+                             prefix name face type)))
+        (add-to-list (intern (concat "font-latex-keywords-"
+                                     (number-to-string level)))
+                     keywords-entry t)
+        (when (= level 1)
+          (add-to-list 'font-latex-keywords-2
+                       keywords-entry t))))))
 (font-latex-make-built-in-keywords)
 
 (defcustom font-latex-user-keyword-classes nil
@@ -750,112 +750,112 @@ Setting this variable directly does not take effect;
 restart Emacs."
   :group 'font-latex-keywords
   :type `(repeat (list (string :tag "Name")
-                      (choice (repeat :tag "Keywords" (string :tag "Keyword"))
-                              (repeat
-                               :tag "Keywords with specs"
-                               (group (string :tag "Keyword")
-                                      (string :tag "Format specifier"))))
-                      ,'(choice (face :tag "Face name")
-                                (custom-face-edit :tag "Face attributes"))
-                      (choice :tag "Type"
-                              ;; Maps to
-                              ;;`font-latex-match-command-with-arguments'
-                              (const :tag "Command with arguments"
-                                     command)
-                              ;; Maps to
-                              ;;`font-latex-match-command-in-braces'
-                              (const :tag "Declaration inside TeX group"
-                                     declaration)
-                              ;; Maps to `re-search-forward'
-                              (const :tag "Command without arguments"
-                                     noarg))))
+                       (choice (repeat :tag "Keywords" (string :tag "Keyword"))
+                               (repeat
+                                :tag "Keywords with specs"
+                                (group (string :tag "Keyword")
+                                       (string :tag "Format specifier"))))
+                       ,'(choice (face :tag "Face name")
+                                 (custom-face-edit :tag "Face attributes"))
+                       (choice :tag "Type"
+                               ;; Maps to
+                               ;;`font-latex-match-command-with-arguments'
+                               (const :tag "Command with arguments"
+                                      command)
+                               ;; Maps to
+                               ;;`font-latex-match-command-in-braces'
+                               (const :tag "Declaration inside TeX group"
+                                      declaration)
+                               ;; Maps to `re-search-forward'
+                               (const :tag "Command without arguments"
+                                      noarg))))
   :set (lambda (symbol value)
-        (dolist (item value)
-          (when (string-match " " (car item))
-            (error "No spaces allowed in name")))
-        (let (names names-uniq)
-          (dolist (item (append font-latex-built-in-keyword-classes value))
-            (setq names (append names (list (car item)))))
-          (setq names (TeX-sort-strings names))
-          (setq names-uniq (TeX-delete-duplicate-strings names))
-          (dotimes (i (safe-length names-uniq))
-            (unless (string= (nth i names) (nth i names-uniq))
-              (error "Name %S already exists" (nth i names)))))
-        (set-default symbol value)
-        (let ((prefix "font-latex-match-"))
-          (dolist (elt value)
-            (unless (boundp (intern (concat prefix (car elt))))
-              ;; defvar font-latex-match-*
-              (eval `(defvar ,(intern (concat prefix (car elt))) nil
-                       ,(concat "Regular expression to match " (car elt)
-                                " keywords.
+         (dolist (item value)
+           (when (string-match " " (car item))
+             (error "No spaces allowed in name")))
+         (let (names names-uniq)
+           (dolist (item (append font-latex-built-in-keyword-classes value))
+             (setq names (append names (list (car item)))))
+           (setq names (TeX-sort-strings names))
+           (setq names-uniq (TeX-delete-duplicate-strings names))
+           (dotimes (i (safe-length names-uniq))
+             (unless (string= (nth i names) (nth i names-uniq))
+               (error "Name %S already exists" (nth i names)))))
+         (set-default symbol value)
+         (let ((prefix "font-latex-match-"))
+           (dolist (elt value)
+             (unless (boundp (intern (concat prefix (car elt))))
+               ;; defvar font-latex-match-*
+               (eval `(defvar ,(intern (concat prefix (car elt))) nil
+                        ,(concat "Regular expression to match " (car elt)
+                                 " keywords.
 
 Generated by `font-latex-user-keyword-classes'"))))
-            (let ((keywords (nth 1 elt))
-                  single-char-macro-flag)
-              (setq keywords (if (listp (car keywords))
-                                 (mapcar 'car keywords)
-                               keywords))
-              (catch 'single-char
-                (dolist (keyword keywords)
-                  (unless (string-match "^[A-Za-z]" keyword)
-                    (setq single-char-macro-flag t)
-                    (throw 'single-char nil))))
-              (set (intern (concat prefix (car elt)))
-                   (when (> (safe-length keywords) 0)
-                   (concat "\\\\" (let ((max-specpdl-size 1000))
-                                    (regexp-opt keywords t))
-                           (unless single-char-macro-flag "\\>")))))))))
+             (let ((keywords (nth 1 elt))
+                   single-char-macro-flag)
+               (setq keywords (if (listp (car keywords))
+                                  (mapcar 'car keywords)
+                                keywords))
+               (catch 'single-char
+                 (dolist (keyword keywords)
+                   (unless (string-match "^[A-Za-z]" keyword)
+                     (setq single-char-macro-flag t)
+                     (throw 'single-char nil))))
+               (set (intern (concat prefix (car elt)))
+                    (when (> (safe-length keywords) 0)
+                    (concat "\\\\" (let ((max-specpdl-size 1000))
+                                     (regexp-opt keywords t))
+                            (unless single-char-macro-flag "\\>")))))))))
 
 (defun font-latex-make-user-keywords ()
   "Build defuns and defvars for user keyword fontification."
   (let ((keyword-specs font-latex-user-keyword-classes))
     (dolist (item keyword-specs)
       (let ((prefix "font-latex-match-")
-           (name (nth 0 item))
-           (keywords (nth 1 item))
-           (face (nth 2 item))
-           (type (nth 3 item)))
+            (name (nth 0 item))
+            (keywords (nth 1 item))
+            (face (nth 2 item))
+            (type (nth 3 item)))
 
-       ;; defvar font-latex-match-*-keywords
-       (eval `(defvar ,(intern (concat prefix name "-keywords")) ',keywords
-                ,(concat "Font-latex keywords for " name " face.
+        ;; defvar font-latex-match-*-keywords
+        (eval `(defvar ,(intern (concat prefix name "-keywords")) ',keywords
+                 ,(concat "Font-latex keywords for " name " face.
 
 Generated by `font-latex-make-user-keywords'.")))
 
-       ;; defun font-latex-match-*
-       (font-latex-make-match-defun prefix name face type)
+        ;; defun font-latex-match-*
+        (font-latex-make-match-defun prefix name face type)
 
-       ;; Add the matcher to `font-latex-keywords-2'.
-       (add-to-list 'font-latex-keywords-2
-                    (font-latex-keyword-matcher prefix name face type) t))))
+        ;; Add the matcher to `font-latex-keywords-2'.
+        (add-to-list 'font-latex-keywords-2
+                     (font-latex-keyword-matcher prefix name face type) t))))
 
   ;; Add the "fixed" matchers and highlighters.
   (dolist (item
-          '(("\\(^\\|[^\\]\\)\\(&+\\)" 2 'font-latex-warning-face)
-            (font-latex-match-dollar-math 0 'font-latex-math-face keep)
-            (font-latex-match-quotation
-             (0 'font-latex-string-face append)
-             (1 'font-latex-warning-face))
-            ;; Hack to remove the verbatim face from the \ in
-            ;; \end{verbatim} and similar.  The same hack is used in
-            ;; tex-mode.el.
-            ("\\(\\\\\\)end"
-             (1 (get-text-property (match-end 1) 'face) t))))
+           '(("\\(^\\|[^\\]\\)\\(&+\\)" 2 'font-latex-warning-face)
+             (font-latex-match-dollar-math 0 'font-latex-math-face keep)
+             (font-latex-match-quotation
+              (0 'font-latex-string-face append)
+              (1 'font-latex-warning-face))
+             ;; Hack to remove the verbatim face from the \ in
+             ;; \end{verbatim} and similar.  The same hack is used in
+             ;; tex-mode.el.
+             ("\\(\\\\\\)end"
+              (1 (get-text-property (match-end 1) 'face) t))))
     (add-to-list 'font-latex-keywords-1 item)
     (add-to-list 'font-latex-keywords-2 item))
   (dolist (item
-          '((font-latex-match-math-env
-             (0 'font-latex-warning-face t t)
-             (1 'font-latex-math-face append t))
-            (font-latex-match-math-envII
-             (1 'font-latex-math-face append t))
-            (font-latex-match-simple-command
-             (0 'font-latex-sedate-face append))
-            (font-latex-match-script
-             (1 (font-latex-script (match-beginning 0)) append))
-            (font-latex-match-script-chars
-             (1 (font-latex-script-char (match-beginning 1)) prepend))))
+           '((font-latex-match-math-env
+              (0 'font-latex-warning-face t t)
+              (1 'font-latex-math-face append t))
+             (font-latex-match-math-envII
+              (1 'font-latex-math-face append t))
+             (font-latex-match-simple-command
+              (0 'font-latex-sedate-face append))
+             (font-latex-match-script
+              (1 (font-latex-script (match-beginning 0)) append))
+             (font-latex-match-script-chars
+              (1 (font-latex-script-char (match-beginning 1)) prepend))))
     (add-to-list 'font-latex-keywords-2 item t)))
 (font-latex-make-user-keywords)
 
@@ -874,7 +874,7 @@ The keywords will be added to the buffer-local list of 
keywords
 of the respective keyword class and necessary updates of the font
 locking machinery will be triggered."
   (let* ((class (symbol-name class))
-        (list (intern (format "font-latex-match-%s-keywords-local" class))))
+         (list (intern (format "font-latex-match-%s-keywords-local" class))))
     (dolist (elt keywords)
       (add-to-list list elt))
     (funcall (intern (format "font-latex-match-%s-make" class)))
@@ -908,13 +908,13 @@ If this variable is set to the symbol `invisible', then 
the
 effect is essentially like `multi-level' but additionally the
 script operators ^ and _ are not displayed."
   :type '(choice (boolean :tag "Enabled")
-                (const :tag "Multiple levels" multi-level)
-                (const :tag "Hide ^ and _" invisible))
+                 (const :tag "Multiple levels" multi-level)
+                 (const :tag "Hide ^ and _" invisible))
   :group 'font-latex)
 (put 'font-latex-fontify-script 'safe-local-variable
      (lambda (val)
        (or (booleanp val)
-          (memq val '(multi-level invisible)))))
+           (memq val '(multi-level invisible)))))
 
 (defcustom font-latex-fontify-script-max-level 3
   "Maximum scriptification level for which script faces are applied.
@@ -946,9 +946,9 @@ and y is smaller than x."
 The car is used for subscript, the cdr is used for superscripts."
   :group 'font-latex
   :type '(cons (choice (sexp :tag "Subscript form")
-                      (const :tag "No lowering" nil))
-              (choice (sexp :tag "Superscript form")
-                      (const :tag "No raising" nil))))
+                       (const :tag "No lowering" nil))
+               (choice (sexp :tag "Superscript form")
+                       (const :tag "No raising" nil))))
 
 
 ;;; Syntactic keywords
@@ -973,88 +973,88 @@ have changed."
   ;; Checks for non-emptiness of lists added in order to cater for
   ;; installations where `(regexp-opt-group nil)' would enter a loop.
   (let ((verb-envs (and (fboundp 'LaTeX-verbatim-environments)
-                       (LaTeX-verbatim-environments)))
-       (verb-macros-with-delims
-        (and (fboundp 'LaTeX-verbatim-macros-with-delims)
-             (LaTeX-verbatim-macros-with-delims)))
-       (verb-macros-with-braces
-        (and (fboundp 'LaTeX-verbatim-macros-with-braces)
-             (LaTeX-verbatim-macros-with-braces))))
+                        (LaTeX-verbatim-environments)))
+        (verb-macros-with-delims
+         (and (fboundp 'LaTeX-verbatim-macros-with-delims)
+              (LaTeX-verbatim-macros-with-delims)))
+        (verb-macros-with-braces
+         (and (fboundp 'LaTeX-verbatim-macros-with-braces)
+              (LaTeX-verbatim-macros-with-braces))))
     (setq verb-envs (and verb-envs (regexp-opt verb-envs))
-         verb-macros-with-delims (and verb-macros-with-delims
-                                      (regexp-opt verb-macros-with-delims))
-         verb-macros-with-braces (and verb-macros-with-braces
-                                      (regexp-opt verb-macros-with-braces))
-         font-latex-syntactic-keywords nil)
+          verb-macros-with-delims (and verb-macros-with-delims
+                                       (regexp-opt verb-macros-with-delims))
+          verb-macros-with-braces (and verb-macros-with-braces
+                                       (regexp-opt verb-macros-with-braces))
+          font-latex-syntactic-keywords nil)
     (unless (= (length verb-envs) 0)
       (add-to-list 'font-latex-syntactic-keywords
-                  `(,(concat
-                      "^[ \t]*\\\\begin *{\\(?:" verb-envs "\\)}"
-                      ;; Some environments accept an optional and/or mandatory
-                      ;; argument that can span over more lines.  Between
-                      ;; "\begin{<envname>}" and the optional argument there
-                      ;; can be whitespaces and the newline can be commented
-                      ;; by a "%" character.
-                      "[ \t]*\\(?:%.*\n[ \t]*\\)?"
-                      ;; The following line of the regexp matches the optional
-                      ;; argument and allows for up to one level of brackets
-                      ;; inside the argument (e.g., the dialect of a language
-                      ;; in the `lstlisting' environment by the `listings'
-                      ;; package).
-                      "\\(?:\\[[^\]\[]*\\(?:\\[[^\]\[]*\\][^\]\[]*\\)*\\]\\)?"
-                      ;; After the optional argument, there may also be
-                      ;; another mandatory argument(s) (e.g. with VerbatimOut 
or
-                      ;; the minted envs or defined with `lstnewenvironment').
-                      "\\(?:{[^}]*}\\)*"
-                      ;; Now match the final newline.  The "." alternative
-                      ;; catches the case where verbatim content is written
-                      ;; immediately after the \begin{verbatim}.
-                      "\\(\n\\|.\\)")
-                    (1 "|" t)))
+                   `(,(concat
+                       "^[ \t]*\\\\begin *{\\(?:" verb-envs "\\)}"
+                       ;; Some environments accept an optional and/or mandatory
+                       ;; argument that can span over more lines.  Between
+                       ;; "\begin{<envname>}" and the optional argument there
+                       ;; can be whitespaces and the newline can be commented
+                       ;; by a "%" character.
+                       "[ \t]*\\(?:%.*\n[ \t]*\\)?"
+                       ;; The following line of the regexp matches the optional
+                       ;; argument and allows for up to one level of brackets
+                       ;; inside the argument (e.g., the dialect of a language
+                       ;; in the `lstlisting' environment by the `listings'
+                       ;; package).
+                       "\\(?:\\[[^\]\[]*\\(?:\\[[^\]\[]*\\][^\]\[]*\\)*\\]\\)?"
+                       ;; After the optional argument, there may also be
+                       ;; another mandatory argument(s) (e.g. with VerbatimOut 
or
+                       ;; the minted envs or defined with `lstnewenvironment').
+                       "\\(?:{[^}]*}\\)*"
+                       ;; Now match the final newline.  The "." alternative
+                       ;; catches the case where verbatim content is written
+                       ;; immediately after the \begin{verbatim}.
+                       "\\(\n\\|.\\)")
+                     (1 "|" t)))
       (add-to-list 'font-latex-syntactic-keywords
-                  ;; Using the newline character for the syntax
-                  ;; property often resulted in fontification
-                  ;; problems when text was inserted at the end of
-                  ;; the verbatim environment.  That's why we now use
-                  ;; the starting backslash of \end.  There is a hack
-                  ;; in `font-latex-make-user-keywords' to remove the
-                  ;; spurious fontification of the backslash.
-                  `(,(concat "\\(\\\\\\)end *{\\(?:" verb-envs "\\)}")
-                    (1 "|" t))))
+                   ;; Using the newline character for the syntax
+                   ;; property often resulted in fontification
+                   ;; problems when text was inserted at the end of
+                   ;; the verbatim environment.  That's why we now use
+                   ;; the starting backslash of \end.  There is a hack
+                   ;; in `font-latex-make-user-keywords' to remove the
+                   ;; spurious fontification of the backslash.
+                   `(,(concat "\\(\\\\\\)end *{\\(?:" verb-envs "\\)}")
+                     (1 "|" t))))
     (unless (= (length verb-macros-with-delims) 0)
       (add-to-list 'font-latex-syntactic-keywords
-                  `(,(concat "\\\\\\(?:" verb-macros-with-delims "\\)"
-                             ;; Some macros take an optional
-                             ;; argument.  This is the same line as
-                             ;; above for environments.
-                             "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
-                             ;; An opening curly brace as delimiter
-                             ;; is valid, but allowing it might screw
-                             ;; up fontification of stuff like
-                             ;; "\url{...} foo \textbf{<--!...}".
-                             "\\([^a-z@*\n\f{]\\).*?"
-                             ;; Give an escape char at the end of the
-                             ;; verbatim construct punctuation syntax.
-                             ;; Prevents wrong fontification of stuff
-                             ;; like "\verb|foo\|".
-                             "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)")
-                    (1 "\"") (2 ".") (3 "\""))))
+                   `(,(concat "\\\\\\(?:" verb-macros-with-delims "\\)"
+                              ;; Some macros take an optional
+                              ;; argument.  This is the same line as
+                              ;; above for environments.
+                              
"\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
+                              ;; An opening curly brace as delimiter
+                              ;; is valid, but allowing it might screw
+                              ;; up fontification of stuff like
+                              ;; "\url{...} foo \textbf{<--!...}".
+                              "\\([^a-z@*\n\f{]\\).*?"
+                              ;; Give an escape char at the end of the
+                              ;; verbatim construct punctuation syntax.
+                              ;; Prevents wrong fontification of stuff
+                              ;; like "\verb|foo\|".
+                              "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)")
+                     (1 "\"") (2 ".") (3 "\""))))
     (unless (= (length verb-macros-with-braces) 0)
       (add-to-list 'font-latex-syntactic-keywords
-                  `(,(concat "\\\\\\(?:" verb-macros-with-braces "\\)"
-                             ;; Some macros take an optional
-                             ;; argument.  This is the same line as
-                             ;; above for environments.
-                             "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
-                             "\\({\\).*?[^\\]\\(?:\\\\\\\\\\)*\\(}\\)")
-                    (1 "|") (2 "|")))))
+                   `(,(concat "\\\\\\(?:" verb-macros-with-braces "\\)"
+                              ;; Some macros take an optional
+                              ;; argument.  This is the same line as
+                              ;; above for environments.
+                              
"\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
+                              "\\({\\).*?[^\\]\\(?:\\\\\\\\\\)*\\(}\\)")
+                     (1 "|") (2 "|")))))
   (when font-latex-syntactic-keywords-extra
     (nconc font-latex-syntactic-keywords font-latex-syntactic-keywords-extra))
   ;; Cater for docTeX mode.
   (setq font-latex-doctex-syntactic-keywords
-       (append font-latex-syntactic-keywords
-               ;; For docTeX comment-in-doc.
-               '(("\\(\\^\\)\\^A" (1 (font-latex-doctex-^^A)))))))
+        (append font-latex-syntactic-keywords
+                ;; For docTeX comment-in-doc.
+                '(("\\(\\^\\)\\^A" (1 (font-latex-doctex-^^A)))))))
 
 
 ;;; Syntactic fontification
@@ -1068,8 +1068,8 @@ have changed."
 
 (defface font-latex-bold-face
   (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit bold))
-                   ((assq :weight custom-face-attributes) '(:weight bold))
-                   (t '(:bold t)))))
+                    ((assq :weight custom-face-attributes) '(:weight bold))
+                    (t '(:bold t)))))
     `((((class grayscale) (background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale) (background dark))
@@ -1084,8 +1084,8 @@ have changed."
 
 (defface font-latex-italic-face
   (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit italic))
-                   ((assq :slant custom-face-attributes) '(:slant italic))
-                   (t '(:italic t)))))
+                    ((assq :slant custom-face-attributes) '(:slant italic))
+                    (t '(:italic t)))))
     `((((class grayscale) (background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale) (background dark))
@@ -1100,8 +1100,8 @@ have changed."
 
 (defface font-latex-math-face
   (let ((font (cond ((assq :inherit custom-face-attributes)
-                    '(:inherit underline))
-                   (t '(:underline t)))))
+                     '(:inherit underline))
+                    (t '(:underline t)))))
     `((((class grayscale) (background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale) (background dark))
@@ -1126,8 +1126,8 @@ have changed."
 
 (defface font-latex-string-face
   (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit italic))
-                   ((assq :slant custom-face-attributes) '(:slant italic))
-                   (t '(:italic t)))))
+                    ((assq :slant custom-face-attributes) '(:slant italic))
+                    (t '(:italic t)))))
     `((((type tty) (class color))
        (:foreground "green"))
       (((class grayscale) (background light))
@@ -1144,8 +1144,8 @@ have changed."
 
 (defface font-latex-warning-face
   (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit bold))
-                   ((assq :weight custom-face-attributes) '(:weight bold))
-                   (t '(:bold t)))))
+                    ((assq :weight custom-face-attributes) '(:weight bold))
+                    (t '(:bold t)))))
     `((((class grayscale)(background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale)(background dark))
@@ -1160,9 +1160,9 @@ have changed."
 
 (defface font-latex-verbatim-face
   (let ((font (if (and (assq :inherit custom-face-attributes)
-                      (facep 'fixed-pitch))
-                 '(:inherit fixed-pitch)
-               '(:family "courier"))))
+                       (facep 'fixed-pitch))
+                  '(:inherit fixed-pitch)
+                '(:family "courier"))))
     `((((class grayscale) (background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale) (background dark))
@@ -1187,8 +1187,8 @@ have changed."
 
 (defface font-latex-script-char-face
   (let ((font (cond ((assq :inherit custom-face-attributes)
-                    '(:inherit underline))
-                   (t '(:underline t)))))
+                     '(:inherit underline))
+                    (t '(:underline t)))))
     `((((class grayscale) (background light))
        (:foreground "DarkGray" ,@font))
       (((class grayscale) (background dark))
@@ -1204,7 +1204,7 @@ have changed."
 (defface font-latex-slide-title-face
   (let* ((scale 1.2))
     `((t (:inherit (variable-pitch font-lock-type-face)
-                  :weight bold :height ,scale))))
+                   :weight bold :height ,scale))))
   "Face for slide titles."
   :group 'font-latex-highlighting-faces)
 
@@ -1257,21 +1257,21 @@ triggers Font Lock to recognize the change."
   ;; `VirTeX-common-initialization' and place it in the different
   ;; `xxx-mode' calls instead, but _after_ `major-mode' is set.
   (let ((defaults
-         `((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2)
-           nil nil ,font-latex-syntax-alist nil))
-       (variables
-        '((font-lock-mark-block-function . mark-paragraph)
-          (font-lock-fontify-region-function
-           . font-latex-fontify-region)
-          (font-lock-unfontify-region-function
-           . font-latex-unfontify-region)
+          `((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2)
+            nil nil ,font-latex-syntax-alist nil))
+        (variables
+         '((font-lock-mark-block-function . mark-paragraph)
+           (font-lock-fontify-region-function
+            . font-latex-fontify-region)
+           (font-lock-unfontify-region-function
+            . font-latex-unfontify-region)
            (font-lock-extend-region-functions
             font-lock-extend-region-wholelines
             font-lock-extend-region-multiline
             font-latex-extend-region-backwards-command-with-args
-           font-latex-extend-region-backwards-command-in-braces
-           font-latex-extend-region-backwards-quotation
-           font-latex-extend-region-backwards-math)
+            font-latex-extend-region-backwards-command-in-braces
+            font-latex-extend-region-backwards-quotation
+            font-latex-extend-region-backwards-math)
            (syntax-propertize-function
             . font-latex-syntax-propertize-function)
            (syntax-propertize-extend-region-functions
@@ -1281,15 +1281,15 @@ triggers Font Lock to recognize the change."
     (if (eq major-mode 'doctex-mode)
         (progn
           (setcar defaults (append (car defaults)
-                                  '(font-latex-doctex-keywords)))
+                                   '(font-latex-doctex-keywords)))
           (setq variables
-               (append variables
-                       '((font-lock-syntactic-face-function
-                          . font-latex-doctex-syntactic-face-function)))))
+                (append variables
+                        '((font-lock-syntactic-face-function
+                           . font-latex-doctex-syntactic-face-function)))))
       (setq variables
             (append variables
-                   '((font-lock-syntactic-face-function
-                      . font-latex-syntactic-face-function)))))
+                    '((font-lock-syntactic-face-function
+                       . font-latex-syntactic-face-function)))))
     ;; Set the defaults.
     (setq font-lock-defaults (append defaults variables)))
 
@@ -1341,8 +1341,8 @@ Take care when the actually fonfified region was extended 
beyond END."
     ;; COMPATIBILITY for older emacsen. Return value for jit-lock
     ;; is meaningful for only newer emacsen.
     (if (eq (car-safe res) 'jit-lock-bounds)
-       `(jit-lock-bounds ,(cadr res) .
-                         ,(max (cddr res) font-latex--updated-region-end)))))
+        `(jit-lock-bounds ,(cadr res) .
+                          ,(max (cddr res) font-latex--updated-region-end)))))
 
 ;; Copy and adaption of `tex-font-lock-unfontify-region' from
 ;; tex-mode.el in GNU Emacs on 2004-08-04.
@@ -1353,10 +1353,10 @@ Take care when the actually fonfified region was 
extended beyond END."
   (remove-list-of-text-properties beg end '(script-level invisible))
   (while (< beg end)
     (let ((next (next-single-property-change beg 'display nil end))
-         (prop (get-text-property beg 'display)))
+          (prop (get-text-property beg 'display)))
       (if (and (eq (car-safe prop) 'raise)
-              (null (cddr prop)))
-         (put-text-property beg next 'display nil))
+               (null (cddr prop)))
+          (put-text-property beg next 'display nil))
       (setq beg next))))
 
 (defun font-latex-after-hacking-local-variables ()
@@ -1372,9 +1372,9 @@ modified.  Such variables include
       ;; locals.  Note to self: directory-local variables are also added
       ;; to file-local-variables-alist.
       (let ((hacked-local-vars (mapcar #'car file-local-variables-alist)))
-       (or (memq 'LaTeX-verbatim-environments-local hacked-local-vars)
-           (memq 'LaTeX-verbatim-macros-with-braces-local hacked-local-vars)
-           (memq 'LaTeX-verbatim-macros-with-delims-local hacked-local-vars)))
+        (or (memq 'LaTeX-verbatim-environments-local hacked-local-vars)
+            (memq 'LaTeX-verbatim-macros-with-braces-local hacked-local-vars)
+            (memq 'LaTeX-verbatim-macros-with-delims-local hacked-local-vars)))
     ;; Ok, we need to refresh syntactic fontification.
     (font-latex-set-syntactic-keywords)))
 
@@ -1386,46 +1386,46 @@ OPENCHAR is the opening character and CLOSECHAR is the 
closing
 character.  Character pairs are usually { } or [ ].  Comments are
 ignored during the search."
   (let ((parse-sexp-ignore-comments
-        (not (eq major-mode 'doctex-mode))) ; scan-sexps ignores comments
-       (init-point (point))
-       (mycount 1)
-       (esc-char (or (and (boundp 'TeX-esc) TeX-esc) "\\"))
-       ;; XXX: Do not look up syntax-table properties since they may
-       ;; be misleading, e.g. in the case of "{foo}^^A" where the
-       ;; closing brace gets a comment end syntax.
-       (parse-sexp-lookup-properties nil))
+         (not (eq major-mode 'doctex-mode))) ; scan-sexps ignores comments
+        (init-point (point))
+        (mycount 1)
+        (esc-char (or (and (boundp 'TeX-esc) TeX-esc) "\\"))
+        ;; XXX: Do not look up syntax-table properties since they may
+        ;; be misleading, e.g. in the case of "{foo}^^A" where the
+        ;; closing brace gets a comment end syntax.
+        (parse-sexp-lookup-properties nil))
     (or
      (condition-case nil
-        (progn
-          (goto-char (with-syntax-table
-                         (TeX-search-syntax-table openchar closechar)
-                       (scan-sexps (point) 1)))
-          ;; No error code.  See if closechar is unquoted
-          (save-excursion
-            (backward-char 1)
-            (zerop (mod (skip-chars-backward (regexp-quote esc-char)) 2))))
+         (progn
+           (goto-char (with-syntax-table
+                          (TeX-search-syntax-table openchar closechar)
+                        (scan-sexps (point) 1)))
+           ;; No error code.  See if closechar is unquoted
+           (save-excursion
+             (backward-char 1)
+             (zerop (mod (skip-chars-backward (regexp-quote esc-char)) 2))))
        (error nil))
      (save-match-data
        (goto-char (1+ init-point))
        (while (and (> mycount 0)
-                  (re-search-forward
-                   (string ?\[
-                           ;; closechar might be ]
-                           ;; and therefor must be first in regexp
-                           closechar openchar
-                           ?\])
-                   nil t))
-        (cond
-         ((font-latex-commented-outp)
-          (forward-line 1))
-         ((save-excursion
-            (backward-char 1)
-            (zerop (mod (skip-chars-backward (regexp-quote esc-char))
-                        2)))
-          (setq mycount (+ mycount
-                           (if (= (preceding-char) openchar) 1 -1)))))))
+                   (re-search-forward
+                    (string ?\[
+                            ;; closechar might be ]
+                            ;; and therefor must be first in regexp
+                            closechar openchar
+                            ?\])
+                    nil t))
+         (cond
+          ((font-latex-commented-outp)
+           (forward-line 1))
+          ((save-excursion
+             (backward-char 1)
+             (zerop (mod (skip-chars-backward (regexp-quote esc-char))
+                         2)))
+           (setq mycount (+ mycount
+                            (if (= (preceding-char) openchar) 1 -1)))))))
      (if (= mycount 0)
-        t
+         t
        (goto-char init-point)
        nil))))
 
@@ -1433,34 +1433,34 @@ ignored during the search."
   "Return t if comment character is found between bol and point."
   (save-excursion
     (let ((limit (point))
-         (esc-char (if (and (boundp 'TeX-esc) TeX-esc) TeX-esc "\\")))
+          (esc-char (if (and (boundp 'TeX-esc) TeX-esc) TeX-esc "\\")))
       (forward-line 0)
       (if (and (eq (char-after) ?\%)
-              (not (font-latex-faces-present-p 'font-latex-verbatim-face)))
-         (not (eq major-mode 'doctex-mode))
-       (catch 'found
-         (while (progn (skip-chars-forward "^%" limit)
-                       (< (point) limit))
-           (when (and (save-excursion
-                        (zerop (mod (skip-chars-backward
-                                     (regexp-quote esc-char)) 2)))
-                      (not (font-latex-faces-present-p
-                            'font-latex-verbatim-face)))
-             (throw 'found t))
-           (forward-char)))))))
+               (not (font-latex-faces-present-p 'font-latex-verbatim-face)))
+          (not (eq major-mode 'doctex-mode))
+        (catch 'found
+          (while (progn (skip-chars-forward "^%" limit)
+                        (< (point) limit))
+            (when (and (save-excursion
+                         (zerop (mod (skip-chars-backward
+                                      (regexp-quote esc-char)) 2)))
+                       (not (font-latex-faces-present-p
+                             'font-latex-verbatim-face)))
+              (throw 'found t))
+            (forward-char)))))))
 
 (defun font-latex-faces-present-p (faces &optional pos)
   "Return t if FACES are present at position POS.
 FACES may be a single face or a list of faces.
 If POS is omitted, the current position of point is used."
   (let* ((faces (if (listp faces) faces (list faces)))
-        (pos (or pos (point)))
-        (prop (get-text-property pos 'face))
-        (prop-list (if (listp prop) prop (list prop))))
+         (pos (or pos (point)))
+         (prop (get-text-property pos 'face))
+         (prop-list (if (listp prop) prop (list prop))))
     (catch 'member
       (dolist (item prop-list)
-       (when (memq item faces)
-         (throw 'member t))))))
+        (when (memq item faces)
+          (throw 'member t))))))
 
 (defun font-latex-forward-comment ()
   "Like `forward-comment' but with special provisions for docTeX mode.
@@ -1468,11 +1468,11 @@ In docTeX mode \"%\" at the start of a line will be 
treated as whitespace."
   (if (eq major-mode 'doctex-mode)
       ;; XXX: We should probably cater for ^^A as well.
       (progn
-       (while (progn (if (bolp) (skip-chars-forward "%"))
-                     (> (skip-chars-forward " \t\n") 0)))
-       (when (eq (char-after) ?%)
-         (beginning-of-line 2)
-         t))
+        (while (progn (if (bolp) (skip-chars-forward "%"))
+                      (> (skip-chars-forward " \t\n") 0)))
+        (when (eq (char-after) ?%)
+          (beginning-of-line 2)
+          t))
     (forward-comment 1)))
 
 ;;; Match functions
@@ -1502,100 +1502,100 @@ Returns nil if none of KEYWORDS is found."
   (catch 'match
     (while (re-search-forward regexp limit t)
       (unless (font-latex-faces-present-p '(font-lock-comment-face
-                                           font-latex-verbatim-face)
-                                         (match-beginning 0))
-       (let* ((beg (match-beginning 0))
-              end                 ; Used for multiline text property.
-              (match-data (list beg))
-              match-beg syntax-error alternative spec
-              error-indicator-pos
-              (spec-list (string-to-list
-                          (or (cadr (assoc (match-string 1) keywords))
-                              font-latex-command-with-args-default-spec)))
-              (parse-sexp-ignore-comments t)) ; scan-sexps ignores comments
-         (goto-char (match-end 0))
-         ;; Check for starred macro if first spec is an asterisk or a
-         ;; plus sign in case of \defaultfontfeatures+ provided by
-         ;; fontspec.sty
-         (when (or (eq (car spec-list) ?*)
-                   (eq (car spec-list) ?+))
-           (setq spec-list (cdr spec-list))
-           (skip-chars-forward "*+" (1+ (point))))
-         ;; Add current point to match data and use keyword face for
-         ;; region from start to point.
-         (nconc match-data (list (point)))
-         (add-to-list 'font-latex-matched-faces 'font-lock-keyword-face)
-         (setq end (point))
-         (catch 'break
-           ;; Walk the list of specs.
-           (while spec-list
-             (setq spec (pop spec-list)
-                   error-indicator-pos beg)
-             (while (and (not (eobp)) (font-latex-forward-comment)))
-             ;; Alternative
-             (when (eq spec ?|)
-               (setq alternative t)
-               (setq spec (pop spec-list)))
-             (cond
-              ;; Macros: \foo
-              ((eq spec ?\\)
-               (if (eq (char-after) spec)
-                   (progn
-                     (nconc match-data
-                            (list (point)
-                                  (progn
-                                    (forward-char)
-                                    (if (zerop (skip-syntax-forward "_w"))
-                                        (forward-char) ; Single-char macro.
-                                      (skip-chars-forward "*+"))
-                                    (point))))
-                     (nconc font-latex-matched-faces (list face))
-                     (setq end (max end (point)))
-                     (when alternative (pop spec-list)))
-                 (setq syntax-error t)
-                 (throw 'break nil)))
-              ;; Mandatory arguments: {...}
-              ((eq spec ?{)
-               (if (and (eq (char-after) spec)
-                        (setq match-beg (point))
-                        (font-latex-find-matching-close ?{ ?}))
-                   (progn
-                     (nconc match-data (list (1+ match-beg) (1- (point))))
-                     (nconc font-latex-matched-faces (list face))
-                     (setq end (max end (1- (point))))
-                     (when alternative (pop spec-list)))
-                 (unless alternative
-                   (setq syntax-error t)
-                   (when (and match-beg (= match-beg (point)))
-                     (setq error-indicator-pos match-beg))
-                   (throw 'break nil))))
-              ;; Optional arguments: [...] and others
-              ((eq (char-after) spec)
-               (setq match-beg (point))
-               (if (font-latex-find-matching-close
-                    spec (cdr (assq
-                               spec
-                               font-latex-command-with-args-opt-arg-delims)))
-                   (progn
-                     (nconc match-data (list (1+ match-beg) (1- (point))))
-                     (nconc font-latex-matched-faces
-                            (list 'font-lock-variable-name-face))
-                     (setq end (max end (1- (point)))))
-                 (setq syntax-error t
-                       error-indicator-pos match-beg)
-                 (throw 'break nil))))
-             (setq alternative nil)))
-         (when (and syntax-error (memq major-mode
-                                       font-latex-syntax-error-modes))
-           ;; Add the warning face at the front of the list because
-           ;; the matcher uses 'append and the face would otherwise
-           ;; be overridden by the keyword face.
-           (setq match-data (append (list error-indicator-pos
-                                          (1+ error-indicator-pos))
-                                    match-data))
-           (push 'font-latex-warning-face font-latex-matched-faces))
-         (store-match-data match-data)
-         (throw 'match t))))))
+                                            font-latex-verbatim-face)
+                                          (match-beginning 0))
+        (let* ((beg (match-beginning 0))
+               end                 ; Used for multiline text property.
+               (match-data (list beg))
+               match-beg syntax-error alternative spec
+               error-indicator-pos
+               (spec-list (string-to-list
+                           (or (cadr (assoc (match-string 1) keywords))
+                               font-latex-command-with-args-default-spec)))
+               (parse-sexp-ignore-comments t)) ; scan-sexps ignores comments
+          (goto-char (match-end 0))
+          ;; Check for starred macro if first spec is an asterisk or a
+          ;; plus sign in case of \defaultfontfeatures+ provided by
+          ;; fontspec.sty
+          (when (or (eq (car spec-list) ?*)
+                    (eq (car spec-list) ?+))
+            (setq spec-list (cdr spec-list))
+            (skip-chars-forward "*+" (1+ (point))))
+          ;; Add current point to match data and use keyword face for
+          ;; region from start to point.
+          (nconc match-data (list (point)))
+          (add-to-list 'font-latex-matched-faces 'font-lock-keyword-face)
+          (setq end (point))
+          (catch 'break
+            ;; Walk the list of specs.
+            (while spec-list
+              (setq spec (pop spec-list)
+                    error-indicator-pos beg)
+              (while (and (not (eobp)) (font-latex-forward-comment)))
+              ;; Alternative
+              (when (eq spec ?|)
+                (setq alternative t)
+                (setq spec (pop spec-list)))
+              (cond
+               ;; Macros: \foo
+               ((eq spec ?\\)
+                (if (eq (char-after) spec)
+                    (progn
+                      (nconc match-data
+                             (list (point)
+                                   (progn
+                                     (forward-char)
+                                     (if (zerop (skip-syntax-forward "_w"))
+                                         (forward-char) ; Single-char macro.
+                                       (skip-chars-forward "*+"))
+                                     (point))))
+                      (nconc font-latex-matched-faces (list face))
+                      (setq end (max end (point)))
+                      (when alternative (pop spec-list)))
+                  (setq syntax-error t)
+                  (throw 'break nil)))
+               ;; Mandatory arguments: {...}
+               ((eq spec ?{)
+                (if (and (eq (char-after) spec)
+                         (setq match-beg (point))
+                         (font-latex-find-matching-close ?{ ?}))
+                    (progn
+                      (nconc match-data (list (1+ match-beg) (1- (point))))
+                      (nconc font-latex-matched-faces (list face))
+                      (setq end (max end (1- (point))))
+                      (when alternative (pop spec-list)))
+                  (unless alternative
+                    (setq syntax-error t)
+                    (when (and match-beg (= match-beg (point)))
+                      (setq error-indicator-pos match-beg))
+                    (throw 'break nil))))
+               ;; Optional arguments: [...] and others
+               ((eq (char-after) spec)
+                (setq match-beg (point))
+                (if (font-latex-find-matching-close
+                     spec (cdr (assq
+                                spec
+                                font-latex-command-with-args-opt-arg-delims)))
+                    (progn
+                      (nconc match-data (list (1+ match-beg) (1- (point))))
+                      (nconc font-latex-matched-faces
+                             (list 'font-lock-variable-name-face))
+                      (setq end (max end (1- (point)))))
+                  (setq syntax-error t
+                        error-indicator-pos match-beg)
+                  (throw 'break nil))))
+              (setq alternative nil)))
+          (when (and syntax-error (memq major-mode
+                                        font-latex-syntax-error-modes))
+            ;; Add the warning face at the front of the list because
+            ;; the matcher uses 'append and the face would otherwise
+            ;; be overridden by the keyword face.
+            (setq match-data (append (list error-indicator-pos
+                                           (1+ error-indicator-pos))
+                                     match-data))
+            (push 'font-latex-warning-face font-latex-matched-faces))
+          (store-match-data match-data)
+          (throw 'match t))))))
 
 ;; Those are dynamically bound by font-lock.
 (defvar font-lock-beg)
@@ -1607,14 +1607,14 @@ Returns nil if none of KEYWORDS is found."
     (goto-char font-lock-end)
     (catch 'extend
       (while (TeX-search-backward-unescaped "}" font-lock-beg t)
-       (let ((macro-start
+        (let ((macro-start
                (TeX-find-macro-start
-               (max (point-min)
-                    (- font-lock-beg font-latex-multiline-boundary)))))
-         (when (and macro-start
-                    (< macro-start font-lock-beg))
+                (max (point-min)
+                     (- font-lock-beg font-latex-multiline-boundary)))))
+          (when (and macro-start
+                     (< macro-start font-lock-beg))
             (setq font-lock-beg macro-start)
-           (throw 'extend t)))))))
+            (throw 'extend t)))))))
 
 (defun font-latex-match-command-in-braces (keywords limit)
   "Search for command like {\\bfseries fubar} before LIMIT.
@@ -1626,36 +1626,36 @@ Returns nil if no command is found."
   (catch 'match
     (while (re-search-forward keywords limit t)
       (unless (font-latex-faces-present-p '(font-lock-comment-face
-                                           font-latex-verbatim-face)
-                                         (match-beginning 0))
-       (let ((kbeg (match-beginning 0)) (kend (match-end 1))
-             (beg  (match-end 0))
-             cbeg cend
-             (parse-sexp-ignore-comments t)) ; scan-sexps ignores comments
-         (goto-char kbeg)
-         (if (not (eq (preceding-char) ?\{))
-             ;; Fontify only the keyword (no argument found).
-             (progn
-               (setq cbeg kbeg cend kend)
-               (goto-char (match-end 0))
-               (store-match-data (list (point) (point)
-                                       (point) (point)
-                                       cbeg cend))
-               (throw 'match t))
-           ;; There's an opening bracket
-           (save-restriction
-             ;; Restrict to LIMIT.
-             (narrow-to-region (point-min) limit)
-             (forward-char -1)         ; Move on the opening bracket
-             (if (font-latex-find-matching-close ?\{ ?\})
-                 (store-match-data (list kbeg kbeg
-                                         kbeg kend
-                                         beg (1- (point))))
-               (goto-char kend)
-               (store-match-data (list (1- kbeg) kbeg
-                                       kbeg kend
-                                       kend kend)))
-             (throw 'match t))))))))
+                                            font-latex-verbatim-face)
+                                          (match-beginning 0))
+        (let ((kbeg (match-beginning 0)) (kend (match-end 1))
+              (beg  (match-end 0))
+              cbeg cend
+              (parse-sexp-ignore-comments t)) ; scan-sexps ignores comments
+          (goto-char kbeg)
+          (if (not (eq (preceding-char) ?\{))
+              ;; Fontify only the keyword (no argument found).
+              (progn
+                (setq cbeg kbeg cend kend)
+                (goto-char (match-end 0))
+                (store-match-data (list (point) (point)
+                                        (point) (point)
+                                        cbeg cend))
+                (throw 'match t))
+            ;; There's an opening bracket
+            (save-restriction
+              ;; Restrict to LIMIT.
+              (narrow-to-region (point-min) limit)
+              (forward-char -1)         ; Move on the opening bracket
+              (if (font-latex-find-matching-close ?\{ ?\})
+                  (store-match-data (list kbeg kbeg
+                                          kbeg kend
+                                          beg (1- (point))))
+                (goto-char kend)
+                (store-match-data (list (1- kbeg) kbeg
+                                        kbeg kend
+                                        kend kend)))
+              (throw 'match t))))))))
 
 (defun font-latex-extend-region-backwards-command-in-braces ()
   "Extend region backwards for commands in braces."
@@ -1663,22 +1663,22 @@ Returns nil if no command is found."
     (goto-char font-lock-end)
     (catch 'extend
       (while (TeX-search-backward-unescaped "}" font-lock-beg t)
-       (let ((group-start
+        (let ((group-start
                (TeX-find-opening-brace
-               nil (max (point-min)
-                        (- font-lock-beg font-latex-multiline-boundary)))))
-         (when group-start
-           ;; XXX: Actually we'd have to check if any of the
-           ;; declaration-type macros can be found right after the
-           ;; brace.  If we don't do this (like now) large regions
-           ;; may be refontified for no good reason.  For checking
-           ;; the built-in `font-latex-match-*' variables for
-           ;; declaration-type macros as well as the respective
-           ;; user-defined variables could be concatenated.
-           (goto-char group-start)
-           (when (< group-start font-lock-beg)
+                nil (max (point-min)
+                         (- font-lock-beg font-latex-multiline-boundary)))))
+          (when group-start
+            ;; XXX: Actually we'd have to check if any of the
+            ;; declaration-type macros can be found right after the
+            ;; brace.  If we don't do this (like now) large regions
+            ;; may be refontified for no good reason.  For checking
+            ;; the built-in `font-latex-match-*' variables for
+            ;; declaration-type macros as well as the respective
+            ;; user-defined variables could be concatenated.
+            (goto-char group-start)
+            (when (< group-start font-lock-beg)
               (setq font-lock-beg group-start)
-             (throw 'extend t))))))))
+              (throw 'extend t))))))))
 
 (defvar font-latex-match-simple-exclude-list
   '("-" "," "/" "&" "#" "_" "`" "'" "^" "~" "=" "." "\"")
@@ -1704,8 +1704,8 @@ cases.")
   ;; remove "_" from this list to get correct fontification for macros
   ;; like `\__module_foo:nnn'
   (let* ((search (lambda ()
-                  (TeX-re-search-forward-unescaped
-                   (concat
+                   (TeX-re-search-forward-unescaped
+                    (concat
                      ;; Chars directly after backslash
                      "\\\\\\(\\s_\\|\\sw\\|\\s.\\)"
                      ;; Start group of the following chars
@@ -1718,13 +1718,13 @@ cases.")
                                   "")
                      ;; End group
                      "]\\)*")
-                   limit t)))
-        (pos (funcall search)))
+                    limit t)))
+         (pos (funcall search)))
     (while (and pos
-               (member (match-string 1)
-                       (if (eq major-mode 'doctex-mode)
-                           (remove "_" font-latex-match-simple-exclude-list)
-                         font-latex-match-simple-exclude-list)))
+                (member (match-string 1)
+                        (if (eq major-mode 'doctex-mode)
+                            (remove "_" font-latex-match-simple-exclude-list)
+                          font-latex-match-simple-exclude-list)))
       (setq pos (funcall search)))
     pos))
 
@@ -1736,36 +1736,36 @@ Used for patterns like:
   (catch 'match
     (while (re-search-forward "\\(\\\\(\\)\\|\\(\\\\\\[\\)" limit t)
       (unless (save-excursion
-               (goto-char (match-beginning 0))
-               ;; \\[ does not start a math environment
-               (/= (mod (skip-chars-backward "\\\\") 2) 0))
-       (let ((beg (match-beginning 0))
-             (open-tag (if (match-beginning 1) "\\(" "\\["))
-             (close-tag (if (match-beginning 1) "\\)" "\\]")))
-         ;; Search for both opening and closing tags in order to be
-         ;; able to avoid erroneously matching stuff like "\(foo \(bar\)".
-         (if (and (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*\\("
-                                             (regexp-quote open-tag) "\\|"
-                                             (regexp-quote close-tag) "\\)")
-                                     (+ limit font-latex-multiline-boundary)
-                                     'move)
-                  (string= (match-string 1) close-tag))
-             ;; Found closing tag.
-             (let ((p (point)))
-               (if (< font-latex--updated-region-end limit)
-                   ;; *-extend-region-functions have extended the
-                   ;; limit already.
-                   (setq font-latex--updated-region-end limit))
-               ;; If the closing tag is beyond the current end of
-               ;; region, take care of it.
-               (when (< font-latex--updated-region-end p)
-                 (font-lock-unfontify-region font-latex--updated-region-end p)
-                 (setq font-latex--updated-region-end p))
-               (store-match-data (list beg beg beg p)))
-           ;; Did not find closing tag.
-           (goto-char (+ beg 2))
-           (store-match-data (list beg (point) (point) (point))))
-         (throw 'match t))))))
+                (goto-char (match-beginning 0))
+                ;; \\[ does not start a math environment
+                (/= (mod (skip-chars-backward "\\\\") 2) 0))
+        (let ((beg (match-beginning 0))
+              (open-tag (if (match-beginning 1) "\\(" "\\["))
+              (close-tag (if (match-beginning 1) "\\)" "\\]")))
+          ;; Search for both opening and closing tags in order to be
+          ;; able to avoid erroneously matching stuff like "\(foo \(bar\)".
+          (if (and (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*\\("
+                                              (regexp-quote open-tag) "\\|"
+                                              (regexp-quote close-tag) "\\)")
+                                      (+ limit font-latex-multiline-boundary)
+                                      'move)
+                   (string= (match-string 1) close-tag))
+              ;; Found closing tag.
+              (let ((p (point)))
+                (if (< font-latex--updated-region-end limit)
+                    ;; *-extend-region-functions have extended the
+                    ;; limit already.
+                    (setq font-latex--updated-region-end limit))
+                ;; If the closing tag is beyond the current end of
+                ;; region, take care of it.
+                (when (< font-latex--updated-region-end p)
+                  (font-lock-unfontify-region font-latex--updated-region-end p)
+                  (setq font-latex--updated-region-end p))
+                (store-match-data (list beg beg beg p)))
+            ;; Did not find closing tag.
+            (goto-char (+ beg 2))
+            (store-match-data (list beg (point) (point) (point))))
+          (throw 'match t))))))
 
 (require 'texmathp)
 (defcustom font-latex-math-environments nil
@@ -1797,21 +1797,21 @@ environments in `font-latex-math-environments'."
   (let (envs)
     (dolist (entry texmathp-tex-commands1)
       (if (and (eq 'env-on (cadr entry))
-              (not (string= "*" (substring (car entry) -1))))
-         (cl-pushnew (car entry) envs :test #'equal)))
+               (not (string= "*" (substring (car entry) -1))))
+          (cl-pushnew (car entry) envs :test #'equal)))
     (setq font-latex--match-math-envII-regexp
-         (concat "\\\\begin[ \t]*{"
-                 ;; Take user additions also into account.
-                 (regexp-opt (append font-latex-math-environments envs) t)
-                 ;; Subexpression 2 is used to build the \end{<env>}
-                 ;; construct later.
-                 "\\(\\*?}\\)"
-                 ;; Match an optional and possible mandatory
-                 ;; argument(s) as long as they are on the same line
-                 ;; with no spaces in-between. The content of optional
-                 ;; argument can span multiple lines.
-                 "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
-                 "\\(?:{[^}]*}\\)*"))))
+          (concat "\\\\begin[ \t]*{"
+                  ;; Take user additions also into account.
+                  (regexp-opt (append font-latex-math-environments envs) t)
+                  ;; Subexpression 2 is used to build the \end{<env>}
+                  ;; construct later.
+                  "\\(\\*?}\\)"
+                  ;; Match an optional and possible mandatory
+                  ;; argument(s) as long as they are on the same line
+                  ;; with no spaces in-between. The content of optional
+                  ;; argument can span multiple lines.
+                  "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
+                  "\\(?:{[^}]*}\\)*"))))
 
 ;; Initialize.
 (font-latex-update-math-env)
@@ -1829,23 +1829,23 @@ The \\begin{equation} incl. arguments in the same line 
and
 \\end{equation} are not fontified here."
   (when (re-search-forward font-latex--match-math-envII-regexp limit t)
     (let ((beg (match-end 0)) end
-         (beg-of-begin (match-beginning 0)))
+          (beg-of-begin (match-beginning 0)))
       (if (re-search-forward (concat "\\\\end[ \t]*{"
-                                    (regexp-quote
-                                     (buffer-substring-no-properties
-                                      (match-beginning 1)
-                                      (match-end 2))))
-                            (+ limit font-latex-multiline-boundary) 'move)
-         (progn
-           (setq end (match-beginning 0))
-           (if (< font-latex--updated-region-end limit)
-               (setq font-latex--updated-region-end limit))
-           (when (< font-latex--updated-region-end end)
-             (font-lock-unfontify-region font-latex--updated-region-end end)
-             (setq font-latex--updated-region-end end)))
-       (goto-char beg)
-       (setq end beg
-             beg-of-begin beg))
+                                     (regexp-quote
+                                      (buffer-substring-no-properties
+                                       (match-beginning 1)
+                                       (match-end 2))))
+                             (+ limit font-latex-multiline-boundary) 'move)
+          (progn
+            (setq end (match-beginning 0))
+            (if (< font-latex--updated-region-end limit)
+                (setq font-latex--updated-region-end limit))
+            (when (< font-latex--updated-region-end end)
+              (font-lock-unfontify-region font-latex--updated-region-end end)
+              (setq font-latex--updated-region-end end)))
+        (goto-char beg)
+        (setq end beg
+              beg-of-begin beg))
       ;; Store the position of "\begin{foo}" as (match-beginnig 0) so
       ;; that `font-lock-multiline' text property covers it. This keeps
       ;; editing inside multi-line optional argument sane.
@@ -1857,33 +1857,33 @@ The \\begin{equation} incl. arguments in the same line 
and
   (catch 'match
     (let (beg num)
       (while (font-latex-find-dollar-math limit)
-       ;; Found "$" which starts $...$ or $$...$$.
-       (setq beg (point)
-             ;; Go inside the math expression.
-             num (skip-chars-forward "$" limit))
-       ;; If those are three or more consecutive $, ignore them and
-       ;; search again.
-       (if (< num 3)
-           (if ;; Let's find the same number of live dollar signs.
-               (font-latex-find-dollar-math
-                ;; Hope that limit+font-latex-multiline-boundary
-                ;; doesn't fall just inside single "$$".
-                (+ limit font-latex-multiline-boundary) num)
-               ;; Found.
-               (progn
-                 (forward-char num)
-                 (let ((p (point)))
-                   (if (< font-latex--updated-region-end limit)
-                       (setq font-latex--updated-region-end limit))
-                   (when (< font-latex--updated-region-end p)
-                     (font-lock-unfontify-region
-                      font-latex--updated-region-end p)
-                     (setq font-latex--updated-region-end p))
-                   (set-match-data (list beg p)))
-                 (throw 'match t))
-             ;; Not found.
-             ;; That $ or $$ is probably unclosed in the buffer.
-             (throw 'match nil)))))))
+        ;; Found "$" which starts $...$ or $$...$$.
+        (setq beg (point)
+              ;; Go inside the math expression.
+              num (skip-chars-forward "$" limit))
+        ;; If those are three or more consecutive $, ignore them and
+        ;; search again.
+        (if (< num 3)
+            (if ;; Let's find the same number of live dollar signs.
+                (font-latex-find-dollar-math
+                 ;; Hope that limit+font-latex-multiline-boundary
+                 ;; doesn't fall just inside single "$$".
+                 (+ limit font-latex-multiline-boundary) num)
+                ;; Found.
+                (progn
+                  (forward-char num)
+                  (let ((p (point)))
+                    (if (< font-latex--updated-region-end limit)
+                        (setq font-latex--updated-region-end limit))
+                    (when (< font-latex--updated-region-end p)
+                      (font-lock-unfontify-region
+                       font-latex--updated-region-end p)
+                      (setq font-latex--updated-region-end p))
+                    (set-match-data (list beg p)))
+                  (throw 'match t))
+              ;; Not found.
+              ;; That $ or $$ is probably unclosed in the buffer.
+              (throw 'match nil)))))))
 
 (defun font-latex-find-dollar-math (limit &optional num)
   "Find dollar sign(s) before LIMIT.
@@ -1892,27 +1892,27 @@ Optional argument NUM, if non-nil, specifies the number 
of dollar
 signs to follow the point and must be 1 or 2."
   (catch 'found
     (while (progn
-            (skip-chars-forward "^$" limit)
-            (< (point) limit))
+             (skip-chars-forward "^$" limit)
+             (< (point) limit))
       ;; Found "$".
       ;; If that "$" is not our target, skip over it and search
       ;; again.
       (cond
        ;; check 1: Are we in a verbatim construct?
        ((nth 3 (syntax-ppss))
-       (skip-chars-forward "$" limit))
+        (skip-chars-forward "$" limit))
        ;; check 2: Else, is "$" escaped?
        ((TeX-escaped-p)
-       (forward-char 1))
+        (forward-char 1))
        ;; check 3: Else, is the number of the following "$" wrong?
        ;; This check cannot precede check 2 because "$1+2\$$" is
        ;; legal.
        ((and (eq num 2) (not (eq (char-after (1+ (point))) ?$)))
-       ;; If double dollars ($$) are followed by $, skip over that $.
-       ;; We need not care the case that single dollar ($) is
-       ;; followed by $$ because expressions like "$1+1$$2+2$" and
-       ;; "$1+2$$$3+3$$" are legal.
-       (forward-char 1))
+        ;; If double dollars ($$) are followed by $, skip over that $.
+        ;; We need not care the case that single dollar ($) is
+        ;; followed by $$ because expressions like "$1+1$$2+2$" and
+        ;; "$1+2$$$3+3$$" are legal.
+        (forward-char 1))
        ;; (Quote from bug#19589, with a bit of adaptation)
        ;;
        ;; > When I use environment variables (such as $HOME) in a .tex
@@ -1927,10 +1927,10 @@ signs to follow the point and must be 1 or 2."
        ;; state check.
        ;; ;; check 3: Else, is "$" in comments or verb-like construct?
        ;; ((nth 8 (syntax-ppss))
-       ;;      (skip-chars-forward "$" limit))
+       ;;       (skip-chars-forward "$" limit))
        (t
-       ;; That "$" is live one.
-       (throw 'found t))))))
+        ;; That "$" is live one.
+        (throw 'found t))))))
 
 (defun font-latex-extend-region-backwards-math ()
   "Extend region backwards for math environmets.
@@ -1965,19 +1965,19 @@ Take into account $...$, $$...$$, \\(...\\) and 
\\=\\[...\\], too."
         (goto-char end)
         (catch 'extend
           (while (re-search-backward
-                 (concat "\\\\end[ \t]*{" (regexp-opt envs t) "\\*?}") beg t)
-           (when (and (re-search-backward
-                       (concat  "\\\\begin[ \t]*{"
-                                (buffer-substring-no-properties
-                                 (match-beginning 1)
-                                 (match-end 0))
-                                ;; Match an optional and possible
-                                ;; mandatory argument(s)
-                                
"\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
-                                "\\(?:{[^}]*}\\)*")
-                       (- beg font-latex-multiline-boundary) t)
-                      (< (point) beg))
-             (throw 'extend (cons (point) end)))))))))
+                  (concat "\\\\end[ \t]*{" (regexp-opt envs t) "\\*?}") beg t)
+            (when (and (re-search-backward
+                        (concat  "\\\\begin[ \t]*{"
+                                 (buffer-substring-no-properties
+                                  (match-beginning 1)
+                                  (match-end 0))
+                                 ;; Match an optional and possible
+                                 ;; mandatory argument(s)
+                                 
"\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
+                                 "\\(?:{[^}]*}\\)*")
+                        (- beg font-latex-multiline-boundary) t)
+                       (< (point) beg))
+              (throw 'extend (cons (point) end)))))))))
 
 (defun font-latex-update-quote-list ()
   "Update quote list and regexp if value of `font-latex-quotes' changed."
@@ -1987,16 +1987,16 @@ Take into account $...$, $$...$$, \\(...\\) and 
\\=\\[...\\], too."
     ;; Set order of each entry in `font-latex-quote-list' according to
     ;; setting of `font-latex-quotes-internal'.
     (let ((tail font-latex-quote-list)
-         elt)
+          elt)
       (while tail
-       (setq elt (car tail))
-       (when (and (> (safe-length elt) 2)
-                  (not (eq (nth 2 elt) font-latex-quotes-internal)))
-         (setcar tail (list (nth 1 elt) (nth 0 elt)
-                            font-latex-quotes-internal)))
-       (setq tail (cdr tail))))
+        (setq elt (car tail))
+        (when (and (> (safe-length elt) 2)
+                   (not (eq (nth 2 elt) font-latex-quotes-internal)))
+          (setcar tail (list (nth 1 elt) (nth 0 elt)
+                             font-latex-quotes-internal)))
+        (setq tail (cdr tail))))
     (setq font-latex-quote-regexp-beg
-         (regexp-opt (mapcar 'car font-latex-quote-list) t))))
+          (regexp-opt (mapcar 'car font-latex-quote-list) t))))
 
 (defun font-latex-match-quotation (limit)
   "Match quote patterns up to LIMIT.
@@ -2010,45 +2010,45 @@ set to french, and >>german<< (and 8-bit) are used if 
set to german."
     ;; Search for matches.
     (catch 'match
       (while (TeX-re-search-forward-unescaped
-             font-latex-quote-regexp-beg limit t)
-       (unless (font-latex-faces-present-p '(font-lock-comment-face
-                                             font-latex-verbatim-face
-                                             font-latex-math-face)
-                                           (match-beginning 0))
-         (let* ((beg (match-beginning 0))
-                (after-beg (match-end 0))
-                (opening-quote (match-string-no-properties 0))
-                (closing-quote
-                 (nth 1 (assoc opening-quote font-latex-quote-list)))
-                (nest-count 0)
-                (point-of-surrender (+ beg font-latex-multiline-boundary)))
-           ;; Find closing quote taking nested quotes into account.
-           (while (progn
-                    (re-search-forward
-                     (concat opening-quote "\\|" closing-quote)
-                     point-of-surrender 'move)
-                    (when (and (< (point) point-of-surrender) (not (eobp)))
-                      (if (string= (match-string-no-properties 0)
-                                   opening-quote)
-                          (setq nest-count (1+ nest-count))
-                        (when (/= nest-count 0)
-                          (setq nest-count (1- nest-count)))))))
-           ;; If no closing quote was found, set the second match which
-           ;; will be marked with warning color, if one was found, set
-           ;; the first match which will be marked with string color.
-           (if (or (= (point) point-of-surrender) (eobp))
-               (progn
-                 (goto-char after-beg)
-                 (store-match-data (list after-beg after-beg beg after-beg)))
-             (let ((p (point)))
-               (if (< font-latex--updated-region-end limit)
-                   (setq font-latex--updated-region-end limit))
-               (when (< font-latex--updated-region-end p)
-                 (font-lock-unfontify-region
-                  font-latex--updated-region-end p)
-                 (setq font-latex--updated-region-end p))
-               (store-match-data (list beg p p p))))
-           (throw 'match t)))))))
+              font-latex-quote-regexp-beg limit t)
+        (unless (font-latex-faces-present-p '(font-lock-comment-face
+                                              font-latex-verbatim-face
+                                              font-latex-math-face)
+                                            (match-beginning 0))
+          (let* ((beg (match-beginning 0))
+                 (after-beg (match-end 0))
+                 (opening-quote (match-string-no-properties 0))
+                 (closing-quote
+                  (nth 1 (assoc opening-quote font-latex-quote-list)))
+                 (nest-count 0)
+                 (point-of-surrender (+ beg font-latex-multiline-boundary)))
+            ;; Find closing quote taking nested quotes into account.
+            (while (progn
+                     (re-search-forward
+                      (concat opening-quote "\\|" closing-quote)
+                      point-of-surrender 'move)
+                     (when (and (< (point) point-of-surrender) (not (eobp)))
+                       (if (string= (match-string-no-properties 0)
+                                    opening-quote)
+                           (setq nest-count (1+ nest-count))
+                         (when (/= nest-count 0)
+                           (setq nest-count (1- nest-count)))))))
+            ;; If no closing quote was found, set the second match which
+            ;; will be marked with warning color, if one was found, set
+            ;; the first match which will be marked with string color.
+            (if (or (= (point) point-of-surrender) (eobp))
+                (progn
+                  (goto-char after-beg)
+                  (store-match-data (list after-beg after-beg beg after-beg)))
+              (let ((p (point)))
+                (if (< font-latex--updated-region-end limit)
+                    (setq font-latex--updated-region-end limit))
+                (when (< font-latex--updated-region-end p)
+                  (font-lock-unfontify-region
+                   font-latex--updated-region-end p)
+                  (setq font-latex--updated-region-end p))
+                (store-match-data (list beg p p p))))
+            (throw 'match t)))))))
 
 (defun font-latex-extend-region-backwards-quotation ()
   "Extend region backwards for quotations."
@@ -2056,150 +2056,150 @@ set to french, and >>german<< (and 8-bit) are used if 
set to german."
     (font-latex-update-quote-list)
     (let ((regexp-end (regexp-opt (mapcar #'cadr font-latex-quote-list) t)))
       (save-excursion
-       (goto-char font-lock-end)
-       (catch 'extend
-         (while (re-search-backward regexp-end font-lock-beg t)
-           (let ((found-end (match-beginning 0))
-                 (closing-quote (match-string-no-properties 0))
-                 (nest-count 0)
-                 (point-of-surrender (- font-lock-beg
+        (goto-char font-lock-end)
+        (catch 'extend
+          (while (re-search-backward regexp-end font-lock-beg t)
+            (let ((found-end (match-beginning 0))
+                  (closing-quote (match-string-no-properties 0))
+                  (nest-count 0)
+                  (point-of-surrender (- font-lock-beg
                                          font-latex-multiline-boundary))
-                 opening-quote)
-             (catch 'found
-               (dolist (elt font-latex-quote-list)
-                 (when (string= (cadr elt) closing-quote)
-                   (setq opening-quote (car elt))
-                   (throw 'found nil))))
-             ;; Find opening quote taking nested quotes into account.
-             (while (if (re-search-backward (concat opening-quote "\\|"
-                                                    closing-quote)
-                                            point-of-surrender 'move)
-                        ;; Found quotes before point-of-surrender.
-                        (cond ((string= (match-string-no-properties 0)
-                                        closing-quote)
-                               ;; Encountered another closing quote.
-                               ;; Increase nest-count and continue
-                               ;; the inner loop.
-                               (setq nest-count (1+ nest-count)))
-                              ;; Found an opening quote.
-                              ((/= nest-count 0)
-                               ;; If in nest, decrease nest-count
-                               ;; and continue the inner loop.
-                               (setq nest-count (1- nest-count)))
-                              ;; Else we arrived at the opening quote
-                              ;; matching with the closing quote found
-                              ;; in the outer loop.
-                              ((< (point) font-lock-beg)
-                               ;; If that opening quote locates
-                               ;; before `font-lock-beg', break the
-                               ;; outer loop and extend the region.
-                               (setq font-lock-beg (point))
-                               (throw 'extend t))
-                              (t
-                               ;; Else terminate the inner loop and
-                               ;; continue the outer loop.
-                               nil))
-                      ;; Didn't find quotes before
-                      ;; point-of-surrender.
-                      ;; Go back just before the closing quote,
-                      ;; terminate the inner loop and
-                      ;; continue the outer loop.
-                      (goto-char found-end)
-                      nil)))))))))
+                  opening-quote)
+              (catch 'found
+                (dolist (elt font-latex-quote-list)
+                  (when (string= (cadr elt) closing-quote)
+                    (setq opening-quote (car elt))
+                    (throw 'found nil))))
+              ;; Find opening quote taking nested quotes into account.
+              (while (if (re-search-backward (concat opening-quote "\\|"
+                                                     closing-quote)
+                                             point-of-surrender 'move)
+                         ;; Found quotes before point-of-surrender.
+                         (cond ((string= (match-string-no-properties 0)
+                                         closing-quote)
+                                ;; Encountered another closing quote.
+                                ;; Increase nest-count and continue
+                                ;; the inner loop.
+                                (setq nest-count (1+ nest-count)))
+                               ;; Found an opening quote.
+                               ((/= nest-count 0)
+                                ;; If in nest, decrease nest-count
+                                ;; and continue the inner loop.
+                                (setq nest-count (1- nest-count)))
+                               ;; Else we arrived at the opening quote
+                               ;; matching with the closing quote found
+                               ;; in the outer loop.
+                               ((< (point) font-lock-beg)
+                                ;; If that opening quote locates
+                                ;; before `font-lock-beg', break the
+                                ;; outer loop and extend the region.
+                                (setq font-lock-beg (point))
+                                (throw 'extend t))
+                               (t
+                                ;; Else terminate the inner loop and
+                                ;; continue the outer loop.
+                                nil))
+                       ;; Didn't find quotes before
+                       ;; point-of-surrender.
+                       ;; Go back just before the closing quote,
+                       ;; terminate the inner loop and
+                       ;; continue the outer loop.
+                       (goto-char found-end)
+                       nil)))))))))
 
 (defun font-latex-match-script (limit)
   "Match subscript and superscript patterns up to LIMIT."
   (when (and font-latex-fontify-script
-            (re-search-forward "[_^] *\\([^\n\\{}]\\|\
+             (re-search-forward "[_^] *\\([^\n\\{}]\\|\
 \\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|\\({\\)\\)" limit t))
     (if (and (not (memq font-latex-fontify-script '(multi-level invisible)))
-            (font-latex-faces-present-p '(font-latex-subscript-face
-                                          font-latex-superscript-face)))
-       ;; Apply subscript and superscript highlighting only once (in case
-       ;; font-latex-fontify-script is not 'multi-level) in order to prevent
-       ;; the font size becoming too small.  We set an empty match to do that.
-       (let ((point (point)))
-         (store-match-data (list point point point point)))
+             (font-latex-faces-present-p '(font-latex-subscript-face
+                                           font-latex-superscript-face)))
+        ;; Apply subscript and superscript highlighting only once (in case
+        ;; font-latex-fontify-script is not 'multi-level) in order to prevent
+        ;; the font size becoming too small.  We set an empty match to do that.
+        (let ((point (point)))
+          (store-match-data (list point point point point)))
       (when (match-end 3)
-       (let ((beg (match-beginning 3))
-             (end (TeX-find-closing-brace
-                   ;; Don't match groups spanning more than one line
-                   ;; in order to avoid visually wrong indentation in
-                   ;; subsequent lines.
-                   nil (line-end-position))))
-         (store-match-data (if end
-                               (list (match-beginning 0) end beg end)
-                             (list beg beg beg beg))))))
+        (let ((beg (match-beginning 3))
+              (end (TeX-find-closing-brace
+                    ;; Don't match groups spanning more than one line
+                    ;; in order to avoid visually wrong indentation in
+                    ;; subsequent lines.
+                    nil (line-end-position))))
+          (store-match-data (if end
+                                (list (match-beginning 0) end beg end)
+                              (list beg beg beg beg))))))
     t))
 
 (defun font-latex-match-script-chars (limit)
   "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
-                                                font-lock-comment-face
-                                                font-latex-verbatim-face) pos))
-             ;; Check for backslash quoting
-             (not (let ((odd nil)
-                        (pos pos))
-                    (while (eq (char-before pos) ?\\)
-                      (setq pos (1- pos) odd (not odd)))
-                    odd))))))
+         (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
+                                                 font-lock-comment-face
+                                                 font-latex-verbatim-face) 
pos))
+              ;; Check for backslash quoting
+              (not (let ((odd nil)
+                         (pos pos))
+                     (while (eq (char-before pos) ?\\)
+                       (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 (cl-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))))
+         (new-level (1+ (or (get-text-property pos 'script-level) 0)))
+         (disp-props (copy-sequence (cl-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)
-               (cl-case script-type
-                 (:super 'font-latex-superscript-face)
-                 (:sub   'font-latex-subscript-face))
-             nil)
-          script-level ,new-level
-          display ,new-disp-props)))
+                (cl-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)
   "Return face and display spec for subscript and superscript content."
   (when (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
-                                               font-lock-comment-face
-                                               font-latex-verbatim-face) pos))
-            ;; Check for backslash quoting
-            (not (let ((odd nil)
-                       (pos pos))
-                   (while (eq (char-before pos) ?\\)
-                     (setq pos (1- pos) odd (not odd)))
-                   odd)))
+             (not (font-latex-faces-present-p '(font-lock-constant-face
+                                                font-lock-builtin-face
+                                                font-lock-comment-face
+                                                font-latex-verbatim-face) pos))
+             ;; Check for backslash quoting
+             (not (let ((odd nil)
+                        (pos pos))
+                    (while (eq (char-before pos) ?\\)
+                      (setq pos (1- pos) odd (not odd)))
+                    odd)))
     (if (eq (char-after pos) ?_)
-       (font-latex--get-script-props pos :sub)
+        (font-latex--get-script-props pos :sub)
       (font-latex--get-script-props pos :super))))
 
 (defun font-latex-script-char (_pos)
   "Return face and display spec for subscript and superscript character at 
POS."
   `(face font-latex-script-char-face
-        ,@(when (eq font-latex-fontify-script 'invisible)
-            '(invisible t))))
+         ,@(when (eq font-latex-fontify-script 'invisible)
+             '(invisible t))))
 
 ;;; docTeX
 
@@ -2209,9 +2209,9 @@ set to french, and >>german<< (and 8-bit) are used if set 
to german."
 
 (defface font-latex-doctex-preprocessor-face
   '((t (:inherit (font-latex-doctex-documentation-face
-                 font-lock-builtin-face ; Emacs 21 does not provide
-                                       ; the preprocessor face.
-                 font-lock-preprocessor-face))))
+                  font-lock-builtin-face ; Emacs 21 does not provide
+                                        ; the preprocessor face.
+                  font-lock-preprocessor-face))))
   "Face used to highlight preprocessor directives in docTeX mode."
   :group 'font-latex-highlighting-faces)
 
@@ -2229,28 +2229,28 @@ set to french, and >>german<< (and 8-bit) are used if 
set to german."
 
 (defvar font-latex-doctex-keywords
   (append font-latex-keywords-2
-         '(("^%<[^>]*>" (0 font-latex-doctex-preprocessor-face t)))))
+          '(("^%<[^>]*>" (0 font-latex-doctex-preprocessor-face t)))))
 
 ;; Copy and adaptation of `doctex-font-lock-^^A' in `tex-mode.el' of
 ;; CVS Emacs (March 2004)
 (defun font-latex-doctex-^^A ()
   (if (eq (char-after (line-beginning-position)) ?\%)
       (progn
-       (put-text-property
-        (1- (match-beginning 1)) (match-beginning 1) 'syntax-table
-        (if (= (1+ (line-beginning-position)) (match-beginning 1))
-            ;; The `%' is a single-char comment, which Emacs
-            ;; syntax-table can't deal with.  We could turn it
-            ;; into a non-comment, or use `\n%' or `%^' as the comment.
-            ;; Instead, we include it in the ^^A comment.
-            (eval-when-compile (string-to-syntax "< b"))
-          (eval-when-compile (string-to-syntax ">"))))
-       (let ((end (line-end-position)))
-         (if (< end (point-max))
-             (put-text-property end (1+ end) 'syntax-table
-                                   (eval-when-compile
-                                     (string-to-syntax "> b")))))
-       (eval-when-compile (string-to-syntax "< b")))))
+        (put-text-property
+         (1- (match-beginning 1)) (match-beginning 1) 'syntax-table
+         (if (= (1+ (line-beginning-position)) (match-beginning 1))
+             ;; The `%' is a single-char comment, which Emacs
+             ;; syntax-table can't deal with.  We could turn it
+             ;; into a non-comment, or use `\n%' or `%^' as the comment.
+             ;; Instead, we include it in the ^^A comment.
+             (eval-when-compile (string-to-syntax "< b"))
+           (eval-when-compile (string-to-syntax ">"))))
+        (let ((end (line-end-position)))
+          (if (< end (point-max))
+              (put-text-property end (1+ end) 'syntax-table
+                                 (eval-when-compile
+                                   (string-to-syntax "> b")))))
+        (eval-when-compile (string-to-syntax "< b")))))
 
 ;; Copy and adaptation of `doctex-font-lock-syntactic-face-function'
 ;; in `tex-mode.el' of CVS Emacs (March 2004)
@@ -2258,8 +2258,8 @@ set to french, and >>german<< (and 8-bit) are used if set 
to german."
   ;; Mark docTeX documentation, which is parsed as a style A comment
   ;; starting in column 0.
   (if (or (nth 3 state) (nth 7 state)
-         (not (memq (char-before (nth 8 state))
-                    '(?\n nil))))
+          (not (memq (char-before (nth 8 state))
+                     '(?\n nil))))
       ;; Anything else is just as for LaTeX.
       (font-latex-syntactic-face-function state)
     font-latex-doctex-documentation-face))
diff --git a/latex.el b/latex.el
index 29d8d0e..2a21802 100644
--- a/latex.el
+++ b/latex.el
@@ -39,11 +39,11 @@
 
 ;; Silence the compiler for functions:
 (declare-function outline-level "ext:outline"
-                 nil)
+                  nil)
 (declare-function outline-mark-subtree "ext:outline"
-                 nil)
+                  nil)
 (declare-function turn-off-filladapt-mode "ext:filladapt"
-                 nil)
+                  nil)
 
 ;; Silence the compiler for variables:
 (defvar outline-heading-alist)
@@ -86,28 +86,28 @@ This depends on `LaTeX-insert-into-comments'."
   (interactive)
   (if LaTeX-insert-into-comments
       (cond ((and (save-excursion (skip-chars-backward " \t") (bolp))
-                 (save-excursion
-                   (skip-chars-forward " \t")
-                   (looking-at (concat TeX-comment-start-regexp "+"))))
-            (beginning-of-line)
-            (insert (buffer-substring-no-properties
-                     (line-beginning-position) (match-end 0)))
-            (newline))
-           ((and (not (bolp))
-                 (save-excursion
-                   (skip-chars-forward " \t") (not (TeX-escaped-p)))
-                 (looking-at
-                  (concat "[ \t]*" TeX-comment-start-regexp "+[ \t]*")))
-            (delete-region (match-beginning 0) (match-end 0))
-            (indent-new-comment-line))
-           ;; `indent-new-comment-line' does nothing when
-           ;; `comment-auto-fill-only-comments' is non-il, so we must be sure
-           ;; to be in a comment before calling it.  In any other case
-           ;; `newline' is used.
-           ((TeX-in-comment)
-            (indent-new-comment-line))
-           (t
-            (newline)))
+                  (save-excursion
+                    (skip-chars-forward " \t")
+                    (looking-at (concat TeX-comment-start-regexp "+"))))
+             (beginning-of-line)
+             (insert (buffer-substring-no-properties
+                      (line-beginning-position) (match-end 0)))
+             (newline))
+            ((and (not (bolp))
+                  (save-excursion
+                    (skip-chars-forward " \t") (not (TeX-escaped-p)))
+                  (looking-at
+                   (concat "[ \t]*" TeX-comment-start-regexp "+[ \t]*")))
+             (delete-region (match-beginning 0) (match-end 0))
+             (indent-new-comment-line))
+            ;; `indent-new-comment-line' does nothing when
+            ;; `comment-auto-fill-only-comments' is non-il, so we must be sure
+            ;; to be in a comment before calling it.  In any other case
+            ;; `newline' is used.
+            ((TeX-in-comment)
+             (indent-new-comment-line))
+            (t
+             (newline)))
     (newline)))
 
 
@@ -118,11 +118,11 @@ This depends on `LaTeX-insert-into-comments'."
 
 (progn ; set [] to match for LaTeX.
   (modify-syntax-entry (string-to-char LaTeX-optop)
-                      (concat "(" LaTeX-optcl)
-                      LaTeX-mode-syntax-table)
+                       (concat "(" LaTeX-optcl)
+                       LaTeX-mode-syntax-table)
   (modify-syntax-entry (string-to-char LaTeX-optcl)
-                      (concat ")" LaTeX-optop)
-                      LaTeX-mode-syntax-table))
+                       (concat ")" LaTeX-optop)
+                       LaTeX-mode-syntax-table))
 
 ;;; Sections
 
@@ -152,29 +152,29 @@ If ARG is positive or zero, use absolute level:
 
 The following variables can be set to customize:
 
-`LaTeX-section-hook'   Hooks to run when inserting a section.
-`LaTeX-section-label'  Prefix to all section labels."
+`LaTeX-section-hook'    Hooks to run when inserting a section.
+`LaTeX-section-label'   Prefix to all section labels."
 
   (interactive "*P")
   (let* ((val (prefix-numeric-value arg))
-        (LaTeX-level (cond ((null arg)
-                            (LaTeX-current-section))
-                           ((listp arg)
-                            (LaTeX-down-section))
-                           ((< val 0)
-                            (LaTeX-up-section (- val)))
-                           (t val)))
-        (LaTeX-name (LaTeX-section-name LaTeX-level))
-        (LaTeX-toc nil)
-        (LaTeX-title (if (TeX-active-mark)
-                         (buffer-substring (region-beginning)
-                                           (region-end))
-                       ""))
-        (LaTeX-done-mark (make-marker)))
+         (LaTeX-level (cond ((null arg)
+                             (LaTeX-current-section))
+                            ((listp arg)
+                             (LaTeX-down-section))
+                            ((< val 0)
+                             (LaTeX-up-section (- val)))
+                            (t val)))
+         (LaTeX-name (LaTeX-section-name LaTeX-level))
+         (LaTeX-toc nil)
+         (LaTeX-title (if (TeX-active-mark)
+                          (buffer-substring (region-beginning)
+                                            (region-end))
+                        ""))
+         (LaTeX-done-mark (make-marker)))
     (run-hooks 'LaTeX-section-hook)
     (LaTeX-newline)
     (if (marker-position LaTeX-done-mark)
-       (goto-char (marker-position LaTeX-done-mark)))
+        (goto-char (marker-position LaTeX-done-mark)))
     (set-marker LaTeX-done-mark nil)))
 
 (defun LaTeX-current-section ()
@@ -182,9 +182,9 @@ The following variables can be set to customize:
 See also `LaTeX-section' for description of levels."
   (save-excursion
     (max (LaTeX-largest-level)
-        (if (re-search-backward (LaTeX-outline-regexp) nil t)
-            (- (LaTeX-outline-level) (LaTeX-outline-offset))
-          (LaTeX-largest-level)))))
+         (if (re-search-backward (LaTeX-outline-regexp) nil t)
+             (- (LaTeX-outline-level) (LaTeX-outline-offset))
+           (LaTeX-largest-level)))))
 
 (defun LaTeX-down-section ()
   "Return the value of a section one level under the current.
@@ -193,39 +193,39 @@ text, if this fail, it will just return one less than the 
current
 section."
   (save-excursion
     (let ((current (LaTeX-current-section))
-         (next nil)
-         (regexp (LaTeX-outline-regexp)))
+          (next nil)
+          (regexp (LaTeX-outline-regexp)))
       (if (not (re-search-backward regexp nil t))
-         (1+ current)
-       (while (not next)
-         (cond
-          ((eq (LaTeX-current-section) current)
-           (if (re-search-forward regexp nil t)
-               (if (<= (setq next (LaTeX-current-section)) current) ;Wow!
-                   (setq next (1+ current)))
-             (setq next (1+ current))))
-          ((not (re-search-backward regexp nil t))
-           (setq next (1+ current)))))
-       next))))
+          (1+ current)
+        (while (not next)
+          (cond
+           ((eq (LaTeX-current-section) current)
+            (if (re-search-forward regexp nil t)
+                (if (<= (setq next (LaTeX-current-section)) current) ;Wow!
+                    (setq next (1+ current)))
+              (setq next (1+ current))))
+           ((not (re-search-backward regexp nil t))
+            (setq next (1+ current)))))
+        next))))
 
 (defun LaTeX-up-section (arg)
   "Return the value of the section ARG levels above this one."
   (save-excursion
     (if (zerop arg)
-       (LaTeX-current-section)
+        (LaTeX-current-section)
       (let ((current (LaTeX-current-section)))
-       (while (and (>= (LaTeX-current-section) current)
-                   (re-search-backward (LaTeX-outline-regexp)
-                                       nil t)))
-       (LaTeX-up-section (1- arg))))))
+        (while (and (>= (LaTeX-current-section) current)
+                    (re-search-backward (LaTeX-outline-regexp)
+                                        nil t)))
+        (LaTeX-up-section (1- arg))))))
 
 (defvar LaTeX-section-list '(("part" 0)
-                            ("chapter" 1)
-                            ("section" 2)
-                            ("subsection" 3)
-                            ("subsubsection" 4)
-                            ("paragraph" 5)
-                            ("subparagraph" 6))
+                             ("chapter" 1)
+                             ("section" 2)
+                             ("subsection" 3)
+                             ("subsubsection" 4)
+                             ("paragraph" 5)
+                             ("subparagraph" 6))
   "List which elements is the names of the sections used by LaTeX.")
 
 (defvar LaTeX-section-menu nil)
@@ -249,25 +249,25 @@ used in style files."
   (when clean (setq LaTeX-section-list nil))
   (dolist (elt sections) (add-to-list 'LaTeX-section-list elt t))
   (setq LaTeX-section-list
-       (sort (copy-sequence LaTeX-section-list)
-             (lambda (a b) (< (nth 1 a) (nth 1 b)))))
+        (sort (copy-sequence LaTeX-section-list)
+              (lambda (a b) (< (nth 1 a) (nth 1 b)))))
   (setq LaTeX-section-menu nil))
 
 (defun LaTeX-section-name (level)
   "Return the name of the section corresponding to LEVEL."
   (let ((entry (TeX-member level LaTeX-section-list
-                          (lambda (a b) (equal a (nth 1 b))))))
+                           (lambda (a b) (equal a (nth 1 b))))))
     (if entry
-       (nth 0 entry)
+        (nth 0 entry)
       nil)))
 
 (defun LaTeX-section-level (name)
   "Return the level of the section NAME."
   (let ((entry (TeX-member name LaTeX-section-list
-                          (lambda (a b) (equal a (nth 0 b))))))
+                           (lambda (a b) (equal a (nth 0 b))))))
 
     (if entry
-       (nth 1 entry)
+        (nth 1 entry)
       nil)))
 
 (defcustom TeX-outline-extra nil
@@ -278,7 +278,7 @@ regular expression matching a header, and the second is the 
level of
 the header.  See `LaTeX-section-list' for existing header levels."
   :group 'LaTeX
   :type '(repeat (group (regexp :tag "Match")
-                       (integer :tag "Level"))))
+                        (integer :tag "Level"))))
 
 (defun LaTeX-outline-regexp (&optional anywhere)
   "Return regexp for LaTeX sections.
@@ -286,17 +286,17 @@ the header.  See `LaTeX-section-list' for existing header 
levels."
 If optional argument ANYWHERE is not nil, do not require that the
 header is at the start of a line."
   (concat (if anywhere "" "^")
-         "[ \t]*"
-         (regexp-quote TeX-esc)
-         "\\(appendix\\|documentstyle\\|documentclass\\|"
-         (mapconcat 'car LaTeX-section-list "\\|")
-         "\\)\\b"
-         (if TeX-outline-extra
-             "\\|"
-           "")
-         (mapconcat 'car TeX-outline-extra "\\|")
-         "\\|" TeX-header-end
-         "\\|" TeX-trailer-start))
+          "[ \t]*"
+          (regexp-quote TeX-esc)
+          "\\(appendix\\|documentstyle\\|documentclass\\|"
+          (mapconcat 'car LaTeX-section-list "\\|")
+          "\\)\\b"
+          (if TeX-outline-extra
+              "\\|"
+            "")
+          (mapconcat 'car TeX-outline-extra "\\|")
+          "\\|" TeX-header-end
+          "\\|" TeX-trailer-start))
 
 (defvar LaTeX-largest-level nil
   "Largest sectioning level with current document class.")
@@ -318,11 +318,11 @@ order to let the menu filter regenerate it."
   (let ((offset (LaTeX-outline-offset)))
     (when (> offset 0)
       (let (lst)
-       (dolist (tup outline-heading-alist)
-         (setq lst (cons (cons (car tup)
-                               (+ offset (cdr tup)))
-                         lst)))
-       (setq outline-heading-alist (nreverse lst)))))
+        (dolist (tup outline-heading-alist)
+          (setq lst (cons (cons (car tup)
+                                (+ offset (cdr tup)))
+                          lst)))
+        (setq outline-heading-alist (nreverse lst)))))
   (setq LaTeX-section-menu nil))
 
 (defun LaTeX-outline-offset ()
@@ -333,7 +333,7 @@ order to let the menu filter regenerate it."
   "Check if we are looking at the first element of a member of LIST.
 If so, return the second element, otherwise return nil."
   (while (and list
-             (not (looking-at (nth 0 (car list)))))
+              (not (looking-at (nth 0 (car list)))))
     (setq list (cdr list)))
   (if list
       (nth 1 (car list))
@@ -341,47 +341,47 @@ If so, return the second element, otherwise return nil."
 
 (defvar LaTeX-header-end
   (concat "^[^%\n]*" (regexp-quote TeX-esc) "begin *"
-         TeX-grop "document" TeX-grcl)
+          TeX-grop "document" TeX-grcl)
   "Default end of header marker for LaTeX documents.")
 
 (defvar LaTeX-trailer-start
   (concat "^[^%\n]*" (regexp-quote TeX-esc) "end *"
-         TeX-grop "document" TeX-grcl)
+          TeX-grop "document" TeX-grcl)
   "Default start of trailer marker for LaTeX documents.")
 
 (defun LaTeX-outline-level ()
   "Find the level of current outline heading in an LaTeX document."
   (cond ((looking-at LaTeX-header-end) 1)
-       ((looking-at LaTeX-trailer-start) 1)
-       ((TeX-look-at TeX-outline-extra)
-        (max 1 (+ (TeX-look-at TeX-outline-extra)
-                  (LaTeX-outline-offset))))
-       (t
-        (save-excursion
-          (skip-chars-forward " \t")
-          (forward-char 1)
-          (cond ((looking-at "appendix") 1)
-                ((looking-at "documentstyle") 1)
-                ((looking-at "documentclass") 1)
-                ((TeX-look-at LaTeX-section-list)
-                 (max 1 (+ (TeX-look-at LaTeX-section-list)
-                           (LaTeX-outline-offset))))
-                (t (outline-level)))))))
+        ((looking-at LaTeX-trailer-start) 1)
+        ((TeX-look-at TeX-outline-extra)
+         (max 1 (+ (TeX-look-at TeX-outline-extra)
+                   (LaTeX-outline-offset))))
+        (t
+         (save-excursion
+           (skip-chars-forward " \t")
+           (forward-char 1)
+           (cond ((looking-at "appendix") 1)
+                 ((looking-at "documentstyle") 1)
+                 ((looking-at "documentclass") 1)
+                 ((TeX-look-at LaTeX-section-list)
+                  (max 1 (+ (TeX-look-at LaTeX-section-list)
+                            (LaTeX-outline-offset))))
+                 (t (outline-level)))))))
 
 (defun LaTeX-outline-name ()
   "Guess a name for the current header line."
   (save-excursion
     (if (re-search-forward "{\\([^\}]*\\)}" (+ (point) fill-column 10) t)
-       (match-string 1)
+        (match-string 1)
       (buffer-substring (point) (min (point-max) (+ 20 (point)))))))
 
 (add-hook 'TeX-remove-style-hook
-         (lambda () (setq LaTeX-largest-level nil)))
+          (lambda () (setq LaTeX-largest-level nil)))
 
 (defcustom LaTeX-section-hook
   '(LaTeX-section-heading
     LaTeX-section-title
-    ;; LaTeX-section-toc               ; Most people won't want this
+    ;; LaTeX-section-toc                ; Most people won't want this
     LaTeX-section-section
     LaTeX-section-label)
   "List of hooks to run when a new section is inserted.
@@ -418,19 +418,19 @@ To get a full featured `LaTeX-section' command, insert
 
  (setq LaTeX-section-hook
        '(LaTeX-section-heading
-        LaTeX-section-title
-        LaTeX-section-toc
-        LaTeX-section-section
-        LaTeX-section-label))
+         LaTeX-section-title
+         LaTeX-section-toc
+         LaTeX-section-section
+         LaTeX-section-label))
 
 in your .emacs file."
   :group 'LaTeX-macro
   :type 'hook
   :options '(LaTeX-section-heading
-            LaTeX-section-title
-            LaTeX-section-toc
-            LaTeX-section-section
-            LaTeX-section-label))
+             LaTeX-section-title
+             LaTeX-section-toc
+             LaTeX-section-section
+             LaTeX-section-label))
 
 
 (defcustom LaTeX-section-label
@@ -453,14 +453,14 @@ used as the prefix.  If the name is not found, or if the 
cdr is nil,
 no label is inserted."
   :group 'LaTeX-label
   :type '(choice (const :tag "none" nil)
-                (string :format "%v" :tag "Common")
-                (repeat :menu-tag "Level specific"
-                        :format "\n%v%i"
-                        (cons :format "%v"
-                              (string :tag "Type")
-                              (choice :tag "Prefix"
-                                      (const :tag "none" nil)
-                                      (string  :format "%v"))))))
+                 (string :format "%v" :tag "Common")
+                 (repeat :menu-tag "Level specific"
+                         :format "\n%v%i"
+                         (cons :format "%v"
+                               (string :tag "Type")
+                               (choice :tag "Prefix"
+                                       (const :tag "none" nil)
+                                       (string  :format "%v"))))))
 
 ;;; Section Hooks.
 
@@ -469,12 +469,12 @@ no label is inserted."
 Insert this hook into `LaTeX-section-hook' to allow the user to change
 the name of the sectioning command inserted with `\\[LaTeX-section]'."
   (let ((string (completing-read
-                (concat "Level (default " LaTeX-name "): ")
-                LaTeX-section-list
-                nil nil nil nil LaTeX-name)))
+                 (concat "Level (default " LaTeX-name "): ")
+                 LaTeX-section-list
+                 nil nil nil nil LaTeX-name)))
     ;; Update LaTeX-name
     (if (not (zerop (length string)))
-       (setq LaTeX-name string))
+        (setq LaTeX-name string))
     ;; Update level
     (setq LaTeX-level (LaTeX-section-level LaTeX-name))))
 
@@ -484,7 +484,7 @@ Insert this hook into `LaTeX-section-hook' to allow the 
user to change
 the title of the section inserted with `\\[LaTeX-section]."
   (setq LaTeX-title (TeX-read-string "Title: " LaTeX-title))
   (let ((region (and (TeX-active-mark)
-                    (cons (region-beginning) (region-end)))))
+                     (cons (region-beginning) (region-end)))))
     (when region (delete-region (car region) (cdr region)))))
 
 (defun LaTeX-section-toc ()
@@ -506,19 +506,19 @@ inserted."
   ;; insert a new line if the previous (or current, sigh) line starts
   ;; an environment (i.e., starts with `[optional whitespace]\begin')
   (unless (save-excursion
-           (re-search-backward
-            (concat "^\\s-*\n\\s-*\\=\\|^\\s-*" (regexp-quote TeX-esc)
-                    "begin")
-            (line-beginning-position 0) t))
+            (re-search-backward
+             (concat "^\\s-*\n\\s-*\\=\\|^\\s-*" (regexp-quote TeX-esc)
+                     "begin")
+             (line-beginning-position 0) t))
     (LaTeX-newline))
   (insert TeX-esc LaTeX-name)
   (cond ((null LaTeX-toc))
-       ((zerop (length LaTeX-toc))
-        (insert LaTeX-optop)
-        (set-marker LaTeX-done-mark (point))
-        (insert LaTeX-optcl))
-       (t
-        (insert LaTeX-optop LaTeX-toc LaTeX-optcl)))
+        ((zerop (length LaTeX-toc))
+         (insert LaTeX-optop)
+         (set-marker LaTeX-done-mark (point))
+         (insert LaTeX-optcl))
+        (t
+         (insert LaTeX-optop LaTeX-toc LaTeX-optcl)))
   (insert TeX-grop)
   (if (zerop (length LaTeX-title))
       (set-marker LaTeX-done-mark (point)))
@@ -588,15 +588,15 @@ It may be customized with the following variables:
 
   (interactive "*P")
   (let* ((default (cond
-                  ((TeX-near-bobp) "document")
-                  ((and LaTeX-default-document-environment
-                        (string-equal (LaTeX-current-environment) "document"))
-                   LaTeX-default-document-environment)
-                  (t LaTeX-default-environment)))
-        (environment (completing-read (concat "Environment type (default "
-                                              default "): ")
-                                      (LaTeX-environment-list-filtered) nil nil
-                                      nil 'LaTeX-environment-history default)))
+                   ((TeX-near-bobp) "document")
+                   ((and LaTeX-default-document-environment
+                         (string-equal (LaTeX-current-environment) "document"))
+                    LaTeX-default-document-environment)
+                   (t LaTeX-default-environment)))
+         (environment (completing-read (concat "Environment type (default "
+                                               default "): ")
+                                       (LaTeX-environment-list-filtered) nil 
nil
+                                       nil 'LaTeX-environment-history 
default)))
     ;; Use `environment' as default for the next time only if it is different
     ;; from the current default.
     (unless (equal environment default)
@@ -604,76 +604,76 @@ It may be customized with the following variables:
 
     (let ((entry (assoc environment (LaTeX-environment-list))))
       (if (null entry)
-         (LaTeX-add-environments (list environment)))
+          (LaTeX-add-environments (list environment)))
 
       (if arg
-         (LaTeX-modify-environment environment)
-       (LaTeX-environment-menu environment)))))
+          (LaTeX-modify-environment environment)
+        (LaTeX-environment-menu environment)))))
 
 (defun LaTeX-environment-menu (environment)
   "Insert ENVIRONMENT around point or region."
   (let ((entry (assoc environment (LaTeX-environment-list))))
     (cond ((not (and entry (nth 1 entry)))
-          (LaTeX-insert-environment environment))
-         ((numberp (nth 1 entry))
-          (let ((count (nth 1 entry))
-                (args ""))
-            (while (> count 0)
-              (setq args (concat args TeX-grop TeX-grcl))
-              (setq count (- count 1)))
-            (LaTeX-insert-environment environment args)))
-         ((or (stringp (nth 1 entry)) (vectorp (nth 1 entry)))
-          (let ((prompts (cdr entry))
-                (args ""))
-            (dolist (elt prompts)
-              (let* ((optional (vectorp elt))
-                     (elt (if optional (elt elt 0) elt))
-                     (arg (TeX-read-string (concat (when optional "(Optional) 
")
-                                               elt ": "))))
-                (setq args (concat args
-                                   (cond ((and optional (> (length arg) 0))
-                                          (concat LaTeX-optop arg LaTeX-optcl))
-                                         ((not optional)
-                                          (concat TeX-grop arg TeX-grcl)))))))
-            (LaTeX-insert-environment environment args)))
-         (t
-          (apply (nth 1 entry) environment (nthcdr 2 entry))))))
+           (LaTeX-insert-environment environment))
+          ((numberp (nth 1 entry))
+           (let ((count (nth 1 entry))
+                 (args ""))
+             (while (> count 0)
+               (setq args (concat args TeX-grop TeX-grcl))
+               (setq count (- count 1)))
+             (LaTeX-insert-environment environment args)))
+          ((or (stringp (nth 1 entry)) (vectorp (nth 1 entry)))
+           (let ((prompts (cdr entry))
+                 (args ""))
+             (dolist (elt prompts)
+               (let* ((optional (vectorp elt))
+                      (elt (if optional (elt elt 0) elt))
+                      (arg (TeX-read-string (concat (when optional "(Optional) 
")
+                                                elt ": "))))
+                 (setq args (concat args
+                                    (cond ((and optional (> (length arg) 0))
+                                           (concat LaTeX-optop arg 
LaTeX-optcl))
+                                          ((not optional)
+                                           (concat TeX-grop arg TeX-grcl)))))))
+             (LaTeX-insert-environment environment args)))
+          (t
+           (apply (nth 1 entry) environment (nthcdr 2 entry))))))
 
 (defun LaTeX-close-environment (&optional reopen)
   "Create an \\end{...} to match the current environment.
 With prefix-argument, reopen environment afterwards."
   (interactive "*P")
   (if (> (point)
-        (save-excursion
-          (beginning-of-line)
-          (when LaTeX-insert-into-comments
-            (if (looking-at comment-start-skip)
-                (goto-char (match-end 0))))
-          (skip-chars-forward " \t")
-          (point)))
+         (save-excursion
+           (beginning-of-line)
+           (when LaTeX-insert-into-comments
+             (if (looking-at comment-start-skip)
+                 (goto-char (match-end 0))))
+           (skip-chars-forward " \t")
+           (point)))
       (LaTeX-newline))
   (let ((environment (LaTeX-current-environment 1)) marker)
     (insert "\\end{" environment "}")
     (indent-according-to-mode)
     (if (or (not (looking-at "[ \t]*$"))
-           (and (TeX-in-commented-line)
-                (save-excursion (beginning-of-line 2)
-                                (not (TeX-in-commented-line)))))
-       (LaTeX-newline)
+            (and (TeX-in-commented-line)
+                 (save-excursion (beginning-of-line 2)
+                                 (not (TeX-in-commented-line)))))
+        (LaTeX-newline)
       (unless (= (forward-line 1) 0)
-       (insert "\n")))
+        (insert "\n")))
     (indent-according-to-mode)
     (when reopen
       (save-excursion
-       (setq marker (point-marker))
-       (set-marker-insertion-type marker t)
-       (LaTeX-environment-menu environment)
-       (delete-region (point)
-                      (if (save-excursion (goto-char marker)
-                                          (bolp))
-                          (1- marker)
-                        marker))
-       (move-marker marker nil)))))
+        (setq marker (point-marker))
+        (set-marker-insertion-type marker t)
+        (LaTeX-environment-menu environment)
+        (delete-region (point)
+                       (if (save-excursion (goto-char marker)
+                                           (bolp))
+                           (1- marker)
+                         marker))
+        (move-marker marker nil)))))
 
 (define-obsolete-variable-alias 'LaTeX-after-insert-env-hooks 
'LaTeX-after-insert-env-hook "11.89")
 
@@ -688,15 +688,15 @@ environment just inserted, the buffer position just before
 (defun LaTeX-insert-environment (environment &optional extra)
   "Insert LaTeX ENVIRONMENT with optional argument EXTRA."
   (let ((active-mark (and (TeX-active-mark) (not (eq (mark) (point)))))
-       prefix content-start env-start env-end)
+        prefix content-start env-start env-end additional-indent)
     (when (and active-mark (< (mark) (point))) (exchange-point-and-mark))
     ;; Compute the prefix.
     (when (and LaTeX-insert-into-comments (TeX-in-commented-line))
       (save-excursion
-       (beginning-of-line)
-       (looking-at
-        (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)+[ \t]*"))
-       (setq prefix (match-string 0))))
+        (beginning-of-line)
+        (looking-at
+         (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)+[ \t]*"))
+        (setq prefix (match-string 0))))
     ;; What to do with the line containing point.
     ;; - Open a new empty line for later insertion of "\begin{foo}" and
     ;;   put the point there.
@@ -704,39 +704,47 @@ environment just inserted, the buffer position just before
     ;;   point and EOL, send them into their new own line with possible
     ;;   comment prefix.
     (cond (;; When the entire line consists of whitespaces except
-          ;; possible prefix...
-          (save-excursion (beginning-of-line)
-                          (looking-at (concat prefix "[ \t]*$")))
-          ;; ...make the line empty and put the point there.
-          (delete-region (match-beginning 0) (match-end 0)))
-         (;; When there are only whitespaces except possible prefix
-          ;; between the point and BOL (including the case the point
-          ;; is at BOL)...
-          (TeX-looking-at-backward (if prefix
-                                       (concat "^\\(" prefix "\\)?[ \t]*")
-                                     "^[ \t]*")
-                                   (line-beginning-position))
-          ;; ...in this case, we have non-whitespace texts between
-          ;; the point and EOL, so send the entire line into a new
-          ;; next line and put the point on the empty line just
-          ;; created.
-          (beginning-of-line)
-          (newline)
-          (beginning-of-line 0))
-         (;; In all other cases...
-          t
-          ;; ...insert a new empty line after deleting all
-          ;; whitespaces around the point, put the point there...
-          (delete-horizontal-space)
-          (if (eolp)
-              (newline)
-            ;; ...and if there were at first any non-whitespace texts
-            ;; between (the original position of) the point and EOL,
-            ;; send them into a new next line with possible comment
-            ;; prefix.
-            (newline 2)
-            (when prefix (insert prefix))
-            (beginning-of-line 0))))
+           ;; possible prefix...
+           (save-excursion (beginning-of-line)
+                           (looking-at (concat prefix "[ \t]*$")))
+           ;; ...make the line empty and put the point there.
+           (delete-region (match-beginning 0) (match-end 0)))
+          (;; When there are only whitespaces except possible prefix
+           ;; between the point and BOL (including the case the point
+           ;; is at BOL)...
+           (TeX-looking-at-backward (if prefix
+                                        (concat "^\\(" prefix "\\)?[ \t]*")
+                                      "^[ \t]*")
+                                    (line-beginning-position))
+           ;; ...in this case, we have non-whitespace texts between
+           ;; the point and EOL, so send the entire line into a new
+           ;; next line and put the point on the empty line just
+           ;; created.
+           (beginning-of-line)
+           (newline)
+           (beginning-of-line 0)
+           ;; Take note that there are texts to be indented later
+           ;; unless the region is activated.
+           (unless active-mark
+             (setq additional-indent t)))
+          (;; In all other cases...
+           t
+           ;; ...insert a new empty line after deleting all
+           ;; whitespaces around the point, put the point there...
+           (delete-horizontal-space)
+           (if (eolp)
+               (newline)
+             ;; ...and if there were at first any non-whitespace texts
+             ;; between (the original position of) the point and EOL,
+             ;; send them into a new next line with possible comment
+             ;; prefix.
+             (newline 2)
+             (when prefix (insert prefix))
+             (beginning-of-line 0)
+             ;; Take note that there are texts to be indented later
+             ;; unless the region is activated.
+             (unless active-mark
+               (setq additional-indent t)))))
     ;; What to do with the line containing mark.
     ;; If there is active region...
     (when active-mark
@@ -746,43 +754,48 @@ environment just inserted, the buffer position just before
       ;;   mark and EOL, pass them over the empty line and put them on
       ;;   their own line with possible comment prefix.
       (save-excursion
-       (goto-char (mark))
-       (cond (;; When the entire line consists of whitespaces except
-              ;; possible prefix...
-              (save-excursion (beginning-of-line)
-                              (looking-at
-                               (if prefix
-                                   (concat "\\(" prefix "\\)?[ \t]*$")
-                                 "[ \t]*$")))
-              ;; ...make the line empty and put the mark there.
-              (delete-region (match-beginning 0) (match-end 0)))
-             (;; When there are only whitespaces except possible prefix
-              ;; between the mark and BOL (including the case the mark
-              ;; is at BOL)...
-              (TeX-looking-at-backward (if prefix
-                                           (concat "^\\(" prefix "\\)?[ \t]*")
-                                         "^[ \t]*")
-                                       (line-beginning-position))
-              ;; ...in this case, we have non-whitespace texts
-              ;; between the mark and EOL, so send the entire line
-              ;; into a new next line and put the mark on the empty
-              ;; line just created.
-              (beginning-of-line)
-              (set-mark (point))
-              (newline))
-             (;; In all other cases...
-              t
-              ;; ...make a new empty line after deleting all
-              ;; whitespaces around the mark, put the mark there...
-              (delete-horizontal-space)
-              (insert-before-markers "\n")
-              ;; ...and if there were at first any non-whitespace
-              ;; texts between (the original position of) the mark
-              ;; and EOL, send them into a new next line with
-              ;; possible comment prefix.
-              (unless (eolp)
-                (newline)
-                (when prefix (insert prefix)))))))
+        (goto-char (mark))
+        (cond (;; When the entire line consists of whitespaces except
+               ;; possible prefix...
+               (save-excursion (beginning-of-line)
+                               (looking-at
+                                (if prefix
+                                    (concat "\\(" prefix "\\)?[ \t]*$")
+                                  "[ \t]*$")))
+               ;; ...make the line empty and put the mark there.
+               (delete-region (match-beginning 0) (match-end 0)))
+              (;; When there are only whitespaces except possible prefix
+               ;; between the mark and BOL (including the case the mark
+               ;; is at BOL)...
+               (TeX-looking-at-backward (if prefix
+                                            (concat "^\\(" prefix "\\)?[ \t]*")
+                                          "^[ \t]*")
+                                        (line-beginning-position))
+               ;; ...in this case, we have non-whitespace texts
+               ;; between the mark and EOL, so send the entire line
+               ;; into a new next line and put the mark on the empty
+               ;; line just created.
+               (beginning-of-line)
+               (set-mark (point))
+               (newline)
+               ;; Take note that there are texts to be indented later.
+               (setq additional-indent t))
+              (;; In all other cases...
+               t
+               ;; ...make a new empty line after deleting all
+               ;; whitespaces around the mark, put the mark there...
+               (delete-horizontal-space)
+               (insert-before-markers "\n")
+               ;; ...and if there were at first any non-whitespace
+               ;; texts between (the original position of) the mark
+               ;; and EOL, send them into a new next line with
+               ;; possible comment prefix.
+               (unless (eolp)
+                 (newline)
+                 (when prefix (insert prefix))
+                 ;; Take note that there are texts to be indented
+                 ;; later.
+                 (setq additional-indent t))))))
     ;; Now insert the environment.
     (when prefix (insert prefix))
     (setq env-start (point))
@@ -799,31 +812,36 @@ environment just inserted, the buffer position just before
     (insert TeX-esc "end" TeX-grop environment TeX-grcl)
     (end-of-line 0)
     (if active-mark
-       (progn
-         (or (assoc environment LaTeX-indent-environment-list)
-             (if auto-fill-function
-                 ;; Fill the region only when `auto-fill-mode' is active.
-                 (LaTeX-fill-region content-start (line-beginning-position 
2))))
-         (set-mark content-start))
+        (progn
+          (or (assoc environment LaTeX-indent-environment-list)
+              (if auto-fill-function
+                  ;; Fill the region only when `auto-fill-mode' is active.
+                  (LaTeX-fill-region content-start (line-beginning-position 
2))))
+          (set-mark content-start))
       (indent-according-to-mode))
-    (save-excursion (beginning-of-line 2) (indent-according-to-mode))
+    ;; Indent \end{foo}.
+    (save-excursion (beginning-of-line 2) (indent-according-to-mode)
+                    (when additional-indent
+                      ;; Indent texts sent after the inserted
+                      ;; environment.
+                      (forward-line 1) (indent-according-to-mode)))
     (TeX-math-input-method-off)
     (setq env-end (save-excursion
-                   (search-forward
-                    (concat TeX-esc "end" TeX-grop
-                            environment TeX-grcl))
-                   (match-beginning 0)))
+                    (search-forward
+                     (concat TeX-esc "end" TeX-grop
+                             environment TeX-grcl))
+                    (match-beginning 0)))
     (run-hook-with-args 'LaTeX-after-insert-env-hooks
-                       environment env-start env-end)))
+                        environment env-start env-end)))
 
 (defun LaTeX-environment-name-regexp ()
   "Return the regexp matching the name of a LaTeX environment.
 This matches everything different from a TeX closing brace but
 allowing one level of TeX group braces."
   (concat "\\([^" (regexp-quote TeX-grcl) (regexp-quote TeX-grop) "]*\\("
-         (regexp-quote TeX-grop) "[^" (regexp-quote TeX-grcl)
-         (regexp-quote TeX-grop) "]*" (regexp-quote TeX-grcl) "\\)*[^"
-         (regexp-quote TeX-grcl) (regexp-quote TeX-grop) "]*\\)"))
+          (regexp-quote TeX-grop) "[^" (regexp-quote TeX-grcl)
+          (regexp-quote TeX-grop) "]*" (regexp-quote TeX-grcl) "\\)*[^"
+          (regexp-quote TeX-grcl) (regexp-quote TeX-grop) "]*\\)"))
 
 (defvar LaTeX-after-modify-env-hook nil
   "List of functions to be run at the end of `LaTeX-modify-environment'.
@@ -835,38 +853,38 @@ position just before \\begin and the position just before
 (defun LaTeX-modify-environment (environment)
   "Modify current ENVIRONMENT."
   (let ((goto-end (lambda ()
-                   (LaTeX-find-matching-end)
-                   (re-search-backward (concat (regexp-quote TeX-esc)
-                                               "end"
-                                               (regexp-quote TeX-grop)
-                                               "\\("
-                                               (LaTeX-environment-name-regexp)
-                                               "\\)"
-                                               (regexp-quote TeX-grcl))
-                                       (save-excursion (beginning-of-line 1) 
(point)))))
-       (goto-begin (lambda ()
-                     (LaTeX-find-matching-begin)
-                     (prog1 (point)
-                       (re-search-forward (concat (regexp-quote TeX-esc)
-                                                  "begin"
-                                                  (regexp-quote TeX-grop)
-                                                  "\\("
-                                                  
(LaTeX-environment-name-regexp)
-                                                  "\\)"
-                                                  (regexp-quote TeX-grcl))
-                                          (save-excursion (end-of-line 1) 
(point)))))))
+                    (LaTeX-find-matching-end)
+                    (re-search-backward (concat (regexp-quote TeX-esc)
+                                                "end"
+                                                (regexp-quote TeX-grop)
+                                                "\\("
+                                                (LaTeX-environment-name-regexp)
+                                                "\\)"
+                                                (regexp-quote TeX-grcl))
+                                        (save-excursion (beginning-of-line 1) 
(point)))))
+        (goto-begin (lambda ()
+                      (LaTeX-find-matching-begin)
+                      (prog1 (point)
+                        (re-search-forward (concat (regexp-quote TeX-esc)
+                                                   "begin"
+                                                   (regexp-quote TeX-grop)
+                                                   "\\("
+                                                   
(LaTeX-environment-name-regexp)
+                                                   "\\)"
+                                                   (regexp-quote TeX-grcl))
+                                           (save-excursion (end-of-line 1) 
(point)))))))
     (save-excursion
       (funcall goto-end)
       (let ((old-env (match-string 1)))
-       (replace-match environment t t nil 1)
-       (beginning-of-line 1)
-       (funcall goto-begin)
-       (replace-match environment t t nil 1)
-       (end-of-line 1)
-       (run-hook-with-args 'LaTeX-after-modify-env-hook
-                           environment old-env
-                           (save-excursion (funcall goto-begin))
-                           (progn (funcall goto-end) (point)))))))
+        (replace-match environment t t nil 1)
+        (beginning-of-line 1)
+        (funcall goto-begin)
+        (replace-match environment t t nil 1)
+        (end-of-line 1)
+        (run-hook-with-args 'LaTeX-after-modify-env-hook
+                            environment old-env
+                            (save-excursion (funcall goto-begin))
+                            (progn (funcall goto-end) (point)))))))
 
 (defvar LaTeX-syntactic-comments) ;; Defined further below.
 
@@ -882,24 +900,24 @@ The functions `LaTeX-find-matching-begin' and 
`LaTeX-find-matching-end'
 work analogously."
   (setq arg (if arg (if (< arg 1) 1 arg) 1))
   (let* ((in-comment (TeX-in-commented-line))
-        (comment-prefix (and in-comment (TeX-comment-prefix)))
-        (case-fold-search nil))
+         (comment-prefix (and in-comment (TeX-comment-prefix)))
+         (case-fold-search nil))
     (save-excursion
       (while (and (/= arg 0)
-                 (re-search-backward
-                  "\\\\\\(begin\\|end\\) *{ *\\([A-Za-z*]+\\) *}" nil t))
-       (when (or (and LaTeX-syntactic-comments
-                      (eq in-comment (TeX-in-commented-line))
-                      (or (not in-comment)
-                          ;; Consider only matching prefixes in the
-                          ;; commented case.
-                          (string= comment-prefix (TeX-comment-prefix))))
-                 (and (not LaTeX-syntactic-comments)
-                      (not (TeX-in-commented-line))))
-         (setq arg (if (string= (match-string 1) "end") (1+ arg) (1- arg)))))
+                  (re-search-backward
+                   "\\\\\\(begin\\|end\\) *{ *\\([A-Za-z*]+\\) *}" nil t))
+        (when (or (and LaTeX-syntactic-comments
+                       (eq in-comment (TeX-in-commented-line))
+                       (or (not in-comment)
+                           ;; Consider only matching prefixes in the
+                           ;; commented case.
+                           (string= comment-prefix (TeX-comment-prefix))))
+                  (and (not LaTeX-syntactic-comments)
+                       (not (TeX-in-commented-line))))
+          (setq arg (if (string= (match-string 1) "end") (1+ arg) (1- arg)))))
       (if (/= arg 0)
-         "document"
-       (match-string-no-properties 2)))))
+          "document"
+        (match-string-no-properties 2)))))
 
 (defun docTeX-in-macrocode-p ()
   "Determine if point is inside a macrocode environment."
@@ -907,9 +925,9 @@ work analogously."
     (save-excursion
       (re-search-backward
        (concat "^%    " (regexp-quote TeX-esc)
-              "\\(begin\\|end\\)[ \t]*{macrocode\\*?}") nil 'move)
+               "\\(begin\\|end\\)[ \t]*{macrocode\\*?}") nil 'move)
       (not (or (bobp)
-              (= (char-after (match-beginning 1)) ?e))))))
+               (= (char-after (match-beginning 1)) ?e))))))
 
 
 ;;; Environment Hooks
@@ -930,18 +948,18 @@ The compatibility argument IGNORE is ignored."
   (let ((found nil))
     (save-excursion
       (while (and (not found)
-                 (re-search-backward
-                  "\\\\documentclass\\(\\[[^]\n\r]*\\]\\)?\\({[^}]+}\\)"
-                  nil t))
-       (and (not (TeX-in-commented-line))
-            (setq found t))))
+                  (re-search-backward
+                   "\\\\documentclass\\(\\[[^]\n\r]*\\]\\)?\\({[^}]+}\\)"
+                   nil t))
+        (and (not (TeX-in-commented-line))
+             (setq found t))))
     (when (not found)
       (TeX-insert-macro "documentclass")
       (LaTeX-newline)
       (LaTeX-newline)
       ;; Add a newline only if some `\usepackage' has been inserted.
       (if (LaTeX-insert-usepackages)
-         (LaTeX-newline))
+          (LaTeX-newline))
       (LaTeX-newline)
       (end-of-line 0)))
   (LaTeX-insert-environment "document")
@@ -955,8 +973,8 @@ If nil, act like the empty string is given, but do not 
prompt.
 optional argument is omitted.)"
   :group 'LaTeX-environment
   :type '(choice (const :tag "Do not prompt" nil)
-                (const :tag "Empty" "")
-                (string :format "%v")))
+                 (const :tag "Empty" "")
+                 (string :format "%v")))
 (make-variable-buffer-local 'LaTeX-float)
 
 (defcustom LaTeX-top-caption-list nil
@@ -1015,8 +1033,8 @@ code listings and take a caption and label."
 If nil, act like the empty string is given, but do not prompt."
   :group 'LaTeX-environment
   :type '(choice (const :tag "Do not prompt" nil)
-                (const :tag "Empty" "")
-                string))
+                 (const :tag "Empty" "")
+                 string))
 (make-variable-buffer-local 'LaTeX-default-position)
 
 (defcustom LaTeX-equation-label "eq:"
@@ -1034,12 +1052,12 @@ If nil, act like the empty string is given, but do not 
prompt."
   (LaTeX-insert-environment environment)
   (if (TeX-active-mark)
       (progn
-       (LaTeX-find-matching-begin)
-       (end-of-line 1))
+        (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]*$"))
+                            "^[ \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'
@@ -1050,9 +1068,9 @@ If nil, act like the empty string is given, but do not 
prompt."
   ;; 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)))
+             (not (assoc environment LaTeX-indent-environment-list))
+             (> (- (line-end-position) (line-beginning-position))
+                (current-fill-column)))
     (LaTeX-fill-paragraph nil)))
 
 (defcustom LaTeX-label-alist
@@ -1074,8 +1092,8 @@ with an empty prefix, use the empty string \"\" as the 
CDR of the
 corresponding entry."
   :group 'LaTeX-label
   :type '(repeat (cons (string :tag "Environment")
-                      (choice (string :tag "Label prefix")
-                              (symbol :tag "Label prefix symbol")))))
+                       (choice (string :tag "Label prefix")
+                               (symbol :tag "Label prefix symbol")))))
 
 (make-variable-buffer-local 'LaTeX-label-alist)
 
@@ -1097,39 +1115,39 @@ If the optional NO-INSERT is non-nil, only the label is 
returned
 and no insertion happens.  Otherwise the inserted label is
 returned, nil if it is empty."
   (let ((TeX-read-label-prefix
-        (cond
-         ((eq type 'environment)
-          (cdr (assoc name LaTeX-label-alist)))
-         ((eq type 'section)
-          (if (assoc name LaTeX-section-list)
-              (if (stringp LaTeX-section-label)
-                  LaTeX-section-label
-                (and (listp LaTeX-section-label)
-                     (cdr (assoc name LaTeX-section-label))))
-            ""))
-         ((null type)
-          "")
-         (t
-          nil)))
-       label)
+         (cond
+          ((eq type 'environment)
+           (cdr (assoc name LaTeX-label-alist)))
+          ((eq type 'section)
+           (if (assoc name LaTeX-section-list)
+               (if (stringp LaTeX-section-label)
+                   LaTeX-section-label
+                 (and (listp LaTeX-section-label)
+                      (cdr (assoc name LaTeX-section-label))))
+             ""))
+          ((null type)
+           "")
+          (t
+           nil)))
+        label)
     (when (symbolp TeX-read-label-prefix)
       (setq TeX-read-label-prefix (symbol-value TeX-read-label-prefix)))
     (when TeX-read-label-prefix
       (if (and (fboundp LaTeX-label-function))
-         (funcall LaTeX-label-function name no-insert)
-       ;; Use completing-read as we do with `C-c C-m \label RET'
-       (setq label (TeX-read-label t "What label" t))
-       ;; No label or empty string entered?
-       (if (or (string= TeX-read-label-prefix label)
-               (string= "" label))
-           (setq label nil)
-         ;; We have a label; when NO-INSERT is nil, insert
-         ;; \label{label} in the buffer, add new label to list of
-         ;; known labels and return it
-         (unless no-insert
-           (insert TeX-esc "label" TeX-grop label TeX-grcl))
-         (LaTeX-add-labels label)
-         label)))))
+          (funcall LaTeX-label-function name no-insert)
+        ;; Use completing-read as we do with `C-c C-m \label RET'
+        (setq label (TeX-read-label t "What label" t))
+        ;; No label or empty string entered?
+        (if (or (string= TeX-read-label-prefix label)
+                (string= "" label))
+            (setq label nil)
+          ;; We have a label; when NO-INSERT is nil, insert
+          ;; \label{label} in the buffer, add new label to list of
+          ;; known labels and return it
+          (unless no-insert
+            (insert TeX-esc "label" TeX-grop label TeX-grcl))
+          (LaTeX-add-labels label)
+          label)))))
 
 (defcustom LaTeX-short-caption-prompt-length 40
   "The length that the caption of a figure should be before
@@ -1150,8 +1168,8 @@ If SHORT-CAPTION is non-nil pass it as an optional 
argument to
 
 (defun LaTeX-env-figure (environment)
   "Create ENVIRONMENT with \\caption and \\label commands."
-  (let* ((float (and LaTeX-float               ; LaTeX-float can be nil, i.e.
-                                       ; do not prompt
+  (let* ((float (and LaTeX-float                ; LaTeX-float can be nil, i.e.
+                                        ; do not prompt
                      (TeX-read-string "(Optional) Float position: " 
LaTeX-float)))
          (caption (TeX-read-string "Caption: "))
          (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
@@ -1162,15 +1180,15 @@ If SHORT-CAPTION is non-nil pass it as an optional 
argument to
          start-marker end-marker)
     (when active-mark
       (if (< (mark) (point))
-         (exchange-point-and-mark))
+          (exchange-point-and-mark))
       (setq start-marker (point-marker))
       (set-marker-insertion-type start-marker t)
       (setq end-marker (copy-marker (mark))))
     (setq LaTeX-float float)
     (LaTeX-insert-environment environment
-                             (unless (zerop (length float))
-                               (concat LaTeX-optop float
-                                       LaTeX-optcl)))
+                              (unless (zerop (length float))
+                                (concat LaTeX-optop float
+                                        LaTeX-optcl)))
     (when active-mark (goto-char start-marker))
     (when center
       (insert TeX-esc "centering")
@@ -1180,57 +1198,57 @@ If SHORT-CAPTION is non-nil pass it as an optional 
argument to
     ;; Insert caption and ask for a label, do nothing if user skips caption
     (unless (zerop (length caption))
       (if (member environment LaTeX-top-caption-list)
-         ;; top caption
-         (progn
-           (insert (LaTeX-compose-caption-macro caption short-caption))
-           ;; If `auto-fill-mode' is active, fill the caption.
-           (if auto-fill-function (LaTeX-fill-paragraph))
-           (LaTeX-newline)
-           (indent-according-to-mode)
-           ;; ask for a label and insert a new line only if a label is
-           ;; actually inserted
-           (when (LaTeX-label environment 'environment)
-             (LaTeX-newline)
-             (indent-according-to-mode)))
-       ;; bottom caption (default)
-       (when active-mark (goto-char end-marker))
-       (save-excursion
-         (LaTeX-newline)
-         (indent-according-to-mode)
-         ;; If there is an active region point is before the backslash of
-         ;; "\end" macro, go one line upwards.
-         (when active-mark (forward-line -1) (indent-according-to-mode))
-         (insert (LaTeX-compose-caption-macro caption short-caption))
-         ;; If `auto-fill-mode' is active, fill the caption.
-         (if auto-fill-function (LaTeX-fill-paragraph))
-         ;; ask for a label and if necessary insert a new line between caption
-         ;; and label
-         (when (save-excursion (LaTeX-label environment 'environment))
-           (LaTeX-newline)
-           (indent-according-to-mode)))
-       ;; Insert an empty line between caption and marked region, if any.
-       (when active-mark (LaTeX-newline) (forward-line -1))
-       (indent-according-to-mode)))
+          ;; top caption
+          (progn
+            (insert (LaTeX-compose-caption-macro caption short-caption))
+            ;; If `auto-fill-mode' is active, fill the caption.
+            (if auto-fill-function (LaTeX-fill-paragraph))
+            (LaTeX-newline)
+            (indent-according-to-mode)
+            ;; ask for a label and insert a new line only if a label is
+            ;; actually inserted
+            (when (LaTeX-label environment 'environment)
+              (LaTeX-newline)
+              (indent-according-to-mode)))
+        ;; bottom caption (default)
+        (when active-mark (goto-char end-marker))
+        (save-excursion
+          (LaTeX-newline)
+          (indent-according-to-mode)
+          ;; If there is an active region point is before the backslash of
+          ;; "\end" macro, go one line upwards.
+          (when active-mark (forward-line -1) (indent-according-to-mode))
+          (insert (LaTeX-compose-caption-macro caption short-caption))
+          ;; If `auto-fill-mode' is active, fill the caption.
+          (if auto-fill-function (LaTeX-fill-paragraph))
+          ;; ask for a label and if necessary insert a new line between caption
+          ;; and label
+          (when (save-excursion (LaTeX-label environment 'environment))
+            (LaTeX-newline)
+            (indent-according-to-mode)))
+        ;; Insert an empty line between caption and marked region, if any.
+        (when active-mark (LaTeX-newline) (forward-line -1))
+        (indent-according-to-mode)))
     (when (and (member environment '("table" "table*"))
-              ;; Suppose an existing tabular environment should just
-              ;; be wrapped into a table if there is an active region.
-              (not active-mark))
+               ;; Suppose an existing tabular environment should just
+               ;; be wrapped into a table if there is an active region.
+               (not active-mark))
       (LaTeX-environment-menu LaTeX-default-tabular-environment))))
 
 (defun LaTeX-env-array (environment)
   "Insert ENVIRONMENT with position and column specifications.
 Just like array and tabular."
   (let ((pos (and LaTeX-default-position ; LaTeX-default-position can
-                                       ; be nil, i.e. do not prompt
-                 (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
-       (fmt (TeX-read-string "Format: " LaTeX-default-format)))
+                                        ; be nil, i.e. do not prompt
+                  (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
+        (fmt (TeX-read-string "Format: " LaTeX-default-format)))
     (setq LaTeX-default-position pos)
     (setq LaTeX-default-format fmt)
     (LaTeX-insert-environment environment
-                             (concat
-                              (unless (zerop (length pos))
-                                (concat LaTeX-optop pos LaTeX-optcl))
-                              (concat TeX-grop fmt TeX-grcl)))
+                              (concat
+                               (unless (zerop (length pos))
+                                 (concat LaTeX-optop pos LaTeX-optcl))
+                               (concat TeX-grop fmt TeX-grcl)))
     (LaTeX-item-array t)))
 
 (defun LaTeX-env-label (environment)
@@ -1244,7 +1262,7 @@ Just like array and tabular."
   "Insert ENVIRONMENT and the first item."
   (let ((label (TeX-read-string "Default Label: ")))
     (LaTeX-insert-environment environment
-                             (format "{%s}{}" label))
+                              (format "{%s}{}" label))
     (end-of-line 0)
     (delete-char 1)
     (delete-horizontal-space))
@@ -1253,58 +1271,58 @@ Just like array and tabular."
 (defun LaTeX-env-minipage (environment)
   "Create new LaTeX minipage or minipage-like ENVIRONMENT."
   (let ((pos (and LaTeX-default-position ; LaTeX-default-position can
-                                       ; be nil, i.e. do not prompt
-                 (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
-       (width (TeX-read-string "Width: " LaTeX-default-width)))
+                                        ; be nil, i.e. do not prompt
+                  (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
+        (width (TeX-read-string "Width: " LaTeX-default-width)))
     (setq LaTeX-default-position pos)
     (setq LaTeX-default-width width)
     (LaTeX-insert-environment environment
-                             (concat
-                              (unless (zerop (length pos))
-                                (concat LaTeX-optop pos LaTeX-optcl))
-                              (concat TeX-grop width TeX-grcl)))))
+                              (concat
+                               (unless (zerop (length pos))
+                                 (concat LaTeX-optop pos LaTeX-optcl))
+                               (concat TeX-grop width TeX-grcl)))))
 
 (defun LaTeX-env-tabular* (environment)
   "Insert ENVIRONMENT with width, position and column specifications."
   (let ((width (TeX-read-string "Width: " LaTeX-default-width))
-       (pos (and LaTeX-default-position ; LaTeX-default-position can
-                                       ; be nil, i.e. do not prompt
-                 (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
-       (fmt (TeX-read-string "Format: " LaTeX-default-format)))
+        (pos (and LaTeX-default-position ; LaTeX-default-position can
+                                        ; be nil, i.e. do not prompt
+                  (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
+        (fmt (TeX-read-string "Format: " LaTeX-default-format)))
     (setq LaTeX-default-width width)
     (setq LaTeX-default-position pos)
     (setq LaTeX-default-format fmt)
     (LaTeX-insert-environment environment
-                             (concat
-                              (concat TeX-grop width TeX-grcl) ;; not optional!
-                              (unless (zerop (length pos))
-                                (concat LaTeX-optop pos LaTeX-optcl))
-                              (concat TeX-grop fmt TeX-grcl)))
+                              (concat
+                               (concat TeX-grop width TeX-grcl) ;; not 
optional!
+                               (unless (zerop (length pos))
+                                 (concat LaTeX-optop pos LaTeX-optcl))
+                               (concat TeX-grop fmt TeX-grcl)))
     (LaTeX-item-tabular* t)))
 
 (defun LaTeX-env-picture (environment)
   "Insert ENVIRONMENT with width, height specifications."
   (let ((width (TeX-read-string "Width: "))
-       (height (TeX-read-string "Height: "))
-       (x-offset (TeX-read-string "X Offset: "))
-       (y-offset (TeX-read-string "Y Offset: ")))
+        (height (TeX-read-string "Height: "))
+        (x-offset (TeX-read-string "X Offset: "))
+        (y-offset (TeX-read-string "Y Offset: ")))
     (if (zerop (length x-offset))
-       (setq x-offset "0"))
+        (setq x-offset "0"))
     (if (zerop (length y-offset))
-       (setq y-offset "0"))
+        (setq y-offset "0"))
     (LaTeX-insert-environment environment
-                             (concat
-                              (format "(%s,%s)" width height)
-                              (if (not (and (string= x-offset "0")
-                                            (string= y-offset "0")))
-                                  (format "(%s,%s)" x-offset y-offset))))))
+                              (concat
+                               (format "(%s,%s)" width height)
+                               (if (not (and (string= x-offset "0")
+                                             (string= y-offset "0")))
+                                   (format "(%s,%s)" x-offset y-offset))))))
 
 (defun LaTeX-env-bib (environment)
   "Insert ENVIRONMENT with label for bibitem."
   (LaTeX-insert-environment environment
-                           (concat TeX-grop
-                                   (TeX-read-string "Label for BibItem: " "99")
-                                   TeX-grcl))
+                            (concat TeX-grop
+                                    (TeX-read-string "Label for BibItem: " 
"99")
+                                    TeX-grcl))
   (end-of-line 0)
   (delete-char 1)
   (delete-horizontal-space)
@@ -1313,20 +1331,20 @@ Just like array and tabular."
 (defun LaTeX-env-contents (environment)
   "Insert ENVIRONMENT with optional argument and filename for contents."
   (let* ((opt '("overwrite" "force" "nosearch"))
-        (arg (mapconcat #'identity
-                        (TeX-completing-read-multiple
-                         (TeX-argument-prompt t nil "Options")
-                         (if (string= environment "filecontents*")
-                             opt
-                           (cons "noheader" opt)))
-                        ",")))
+         (arg (mapconcat #'identity
+                         (TeX-completing-read-multiple
+                          (TeX-argument-prompt t nil "Options")
+                          (if (string= environment "filecontents*")
+                              opt
+                            (cons "noheader" opt)))
+                         ",")))
     (LaTeX-insert-environment environment
-                             (concat
-                              (when (and arg (not (string= arg "")))
-                                (concat LaTeX-optop arg LaTeX-optcl))
-                              TeX-grop
-                              (TeX-read-string "File: ")
-                              TeX-grcl)))
+                              (concat
+                               (when (and arg (not (string= arg "")))
+                                 (concat LaTeX-optop arg LaTeX-optcl))
+                               TeX-grop
+                               (TeX-read-string "File: ")
+                               TeX-grcl)))
   (delete-horizontal-space))
 
 (defun LaTeX-env-args (environment &rest args)
@@ -1336,7 +1354,7 @@ Just like array and tabular."
     (LaTeX-find-matching-begin)
     (end-of-line)
     (let ((TeX-exit-mark (or TeX-exit-mark
-                            (make-marker))))
+                             (make-marker))))
       (TeX-parse-arguments args))))
 
 (defun LaTeX-env-label-as-keyval (_optional &optional keyword keyvals 
environment)
@@ -1348,10 +1366,10 @@ function searchs for key=val's itself.  ENVIRONMENT is 
a string
 with the name of environment, if non-nil, don't bother to find
 out."
   (let ((env-start (make-marker))
-       (body-start (make-marker))
-       (opt-start (make-marker))
-       (opt-end   (make-marker))
-       (currenv (or environment (LaTeX-current-environment))))
+        (body-start (make-marker))
+        (opt-start (make-marker))
+        (opt-end   (make-marker))
+        (currenv (or environment (LaTeX-current-environment))))
     ;; Save the starting point as we will come back here
     (set-marker body-start (point))
     ;; Go to the start of the current environment and save the position
@@ -1360,7 +1378,7 @@ out."
     ;; Check if an opt. argument is there; assume that it starts in
     ;; the same line and save the points in markers
     (when (re-search-forward
-          (concat "\\\\begin{" currenv "}[ \t]*\\[") body-start t)
+           (concat "\\\\begin{" currenv "}[ \t]*\\[") body-start t)
       (set-marker opt-start (1- (point)))
       (goto-char opt-start)
       (forward-sexp)
@@ -1368,40 +1386,40 @@ out."
     ;; If keyword argument is given and keyvals argument is not given,
     ;; parse the optional argument and put it into keyvals
     (when (and keyword
-              (marker-position opt-start)
-              (not keyvals))
+               (marker-position opt-start)
+               (not keyvals))
       (setq keyvals (buffer-substring-no-properties
-                    (1+ opt-start) opt-end)))
+                     (1+ opt-start) opt-end)))
     ;; If keyword is given, only insert a label when keyword is found
     ;; inside the keyvals.  If keyword is nil, then insert a label
     ;; anyways
     (if (stringp keyword)
-       (when (and (stringp keyvals)
-                  (not (string= keyvals ""))
-                  (string-match (concat keyword "[ \t]*=") keyvals))
-         (goto-char opt-end)
-         (let ((opt-label (LaTeX-label currenv 'environment t)))
-           (when opt-label
-             (insert (if (equal (preceding-char) ?,)
-                         "label="
-                       ",label=")
-                     TeX-grop opt-label TeX-grcl))))
+        (when (and (stringp keyvals)
+                   (not (string= keyvals ""))
+                   (string-match (concat keyword "[ \t]*=") keyvals))
+          (goto-char opt-end)
+          (let ((opt-label (LaTeX-label currenv 'environment t)))
+            (when opt-label
+              (insert (if (equal (preceding-char) ?,)
+                          "label="
+                        ",label=")
+                      TeX-grop opt-label TeX-grcl))))
       (let ((opt-label (LaTeX-label currenv 'environment t)))
-       (when opt-label
-         ;; Check if an opt. argument is found and go to the end if
-         (if (marker-position opt-end)
-             (progn
-               (goto-char opt-end)
-               (insert (if (equal (preceding-char) ?,)
-                           "label="
-                         ",label=")
-                       TeX-grop opt-label TeX-grcl))
-           ;; Otherwise start at the beginning of environment in
-           ;; order to not mess with any other mandatory arguments
-           ;; which can be there
-           (goto-char env-start)
-           (re-search-forward (concat "\\\\begin{" currenv "}"))
-           (insert LaTeX-optop "label=" TeX-grop opt-label TeX-grcl 
LaTeX-optcl)))))
+        (when opt-label
+          ;; Check if an opt. argument is found and go to the end if
+          (if (marker-position opt-end)
+              (progn
+                (goto-char opt-end)
+                (insert (if (equal (preceding-char) ?,)
+                            "label="
+                          ",label=")
+                        TeX-grop opt-label TeX-grcl))
+            ;; Otherwise start at the beginning of environment in
+            ;; order to not mess with any other mandatory arguments
+            ;; which can be there
+            (goto-char env-start)
+            (re-search-forward (concat "\\\\begin{" currenv "}"))
+            (insert LaTeX-optop "label=" TeX-grop opt-label TeX-grcl 
LaTeX-optcl)))))
     ;; Go to where we started and clean up the markers
     (goto-char body-start)
     (set-marker env-start nil)
@@ -1421,11 +1439,11 @@ You may use `LaTeX-item-list' to change the routines 
used to insert the item."
   (interactive "*")
   (let ((environment (LaTeX-current-environment)))
     (when (and (TeX-active-mark)
-              (> (point) (mark)))
+               (> (point) (mark)))
       (exchange-point-and-mark))
     (unless (bolp) (LaTeX-newline))
     (if (assoc environment LaTeX-item-list)
-       (funcall (cdr (assoc environment LaTeX-item-list)))
+        (funcall (cdr (assoc environment LaTeX-item-list)))
       (TeX-insert-macro "item"))
     (indent-according-to-mode)))
 
@@ -1434,7 +1452,7 @@ You may use `LaTeX-item-list' to change the routines used 
to insert the item."
 (defun LaTeX-item-argument ()
   "Insert a new item with an optional argument."
   (let ((TeX-arg-item-label-p t)
-       (TeX-insert-macro-default-style 'show-optional-args))
+        (TeX-insert-macro-default-style 'show-optional-args))
     (TeX-insert-macro "item")))
 
 (defun LaTeX-item-bib ()
@@ -1502,28 +1520,28 @@ the text \"c@{,}p{5ex}\" between START and END 
specified two columns.
 
 FUNC should return nil if it cannot determine the number of ampersands."
   (let* ((cur (point))
-        (num
-         (save-excursion
-           (ignore-errors
-             (LaTeX-find-matching-begin)
-             ;; Skip over "\begin{xxx}" and possible whitespaces.
-             (forward-list 1)
-             (skip-chars-forward " \t")
-             ;; Skip over the text specified by REGEXP and whitespaces.
-             (when (let ((case-fold-search nil))
-                     (re-search-forward regexp cur))
-               (skip-chars-forward " \t")
-               (when (eq (following-char) ?{)
-                 ;; We have reached the target "{yyy}" part.
-                 (forward-char 1)
-                 ;; The next line doesn't move point, so point
-                 ;; is left just after the opening brace.
-                 (let ((pos (TeX-find-closing-brace)))
-                   (if pos
-                       ;; Calculate number of ampersands to be inserted.
-                       (funcall func (point) (1- pos))))))))))
+         (num
+          (save-excursion
+            (ignore-errors
+              (LaTeX-find-matching-begin)
+              ;; Skip over "\begin{xxx}" and possible whitespaces.
+              (forward-list 1)
+              (skip-chars-forward " \t")
+              ;; Skip over the text specified by REGEXP and whitespaces.
+              (when (let ((case-fold-search nil))
+                      (re-search-forward regexp cur))
+                (skip-chars-forward " \t")
+                (when (eq (following-char) ?{)
+                  ;; We have reached the target "{yyy}" part.
+                  (forward-char 1)
+                  ;; The next line doesn't move point, so point
+                  ;; is left just after the opening brace.
+                  (let ((pos (TeX-find-closing-brace)))
+                    (if pos
+                        ;; Calculate number of ampersands to be inserted.
+                        (funcall func (point) (1- pos))))))))))
     (if (natnump num)
-       (save-excursion (insert (make-string num ?&))))))
+        (save-excursion (insert (make-string num ?&))))))
 
 (defvar LaTeX-array-column-letters "clrp"
   "Column letters for array-like environments.
@@ -1544,39 +1562,39 @@ right number."
       (goto-char start)
       (while (< (setq p (point)) end)
 
-       ;; The below block accounts for one unit of move for
-       ;; one column.
-       (setq cols (+ cols
-                     ;; treat *-operator specially.
-                     (if (eq (following-char) ?*)
-                         ;; *-operator is there.
-                         (progn
-                           ;; pick up repetition number and count
-                           ;; how many columns are repeated.
-                           (re-search-forward
-                            "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ 
\t\r\n%]*}" end)
-                           (let ((n (string-to-number
-                                     (match-string-no-properties 1)))
-                                 ;; get start and end of repeated spec.
-                                 (s (progn (down-list 1) (point)))
-                                 (e (progn (up-list 1) (1- (point)))))
-                             (* n (1+ (LaTeX-array-count-columns s e)))))
-                       ;; not *-operator.
-                       (skip-chars-forward
-                        LaTeX-array-column-letters end))))
-       ;; Do not skip over `*' (see above) and `[' (siunitx has `S[key=val]':):
-       (skip-chars-forward (concat
-                            "^" LaTeX-array-column-letters "*"
-                            TeX-grop LaTeX-optop) end)
-       (when (or (eq (following-char) ?\{)
-                 (eq (following-char) ?\[))
-         (forward-list 1))
-
-       ;; Not sure whether this is really necessary or not, but
-       ;; prepare for possible infinite loop anyway.
-       (when (eq p (point))
-         (setq cols nil)
-         (goto-char end)))
+        ;; The below block accounts for one unit of move for
+        ;; one column.
+        (setq cols (+ cols
+                      ;; treat *-operator specially.
+                      (if (eq (following-char) ?*)
+                          ;; *-operator is there.
+                          (progn
+                            ;; pick up repetition number and count
+                            ;; how many columns are repeated.
+                            (re-search-forward
+                             "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ 
\t\r\n%]*}" end)
+                            (let ((n (string-to-number
+                                      (match-string-no-properties 1)))
+                                  ;; get start and end of repeated spec.
+                                  (s (progn (down-list 1) (point)))
+                                  (e (progn (up-list 1) (1- (point)))))
+                              (* n (1+ (LaTeX-array-count-columns s e)))))
+                        ;; not *-operator.
+                        (skip-chars-forward
+                         LaTeX-array-column-letters end))))
+        ;; Do not skip over `*' (see above) and `[' (siunitx has 
`S[key=val]':):
+        (skip-chars-forward (concat
+                             "^" LaTeX-array-column-letters "*"
+                             TeX-grop LaTeX-optop) end)
+        (when (or (eq (following-char) ?\{)
+                  (eq (following-char) ?\[))
+          (forward-list 1))
+
+        ;; Not sure whether this is really necessary or not, but
+        ;; prepare for possible infinite loop anyway.
+        (when (eq p (point))
+          (setq cols nil)
+          (goto-char end)))
       ;; The number of ampersands is one less than column.
       (if cols (1- cols)))))
 
@@ -1614,7 +1632,7 @@ right number."
 
 (defvar LaTeX-auto-index-regexp-list
    
'(("\\\\\\(index\\|glossary\\){\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
-       2 LaTeX-auto-index-entry))
+        2 LaTeX-auto-index-entry))
    "List of regular expression matching LaTeX index/glossary entries only.
 Regexp allows for up to 3 levels of parenthesis inside the index argument.
 This is necessary since index entries may contain commands and stuff.")
@@ -1674,29 +1692,29 @@ This is necessary since index entries may contain 
commands and stuff.")
   (append
    (let ((token TeX-token-char))
      `((,(concat "\\\\\\(?:new\\|provide\\)command\\*?{?\\\\\\(" token 
"+\\)}?\\[\\([0-9]+\\)\\]\\[\\([^\n\r]*\\)\\]")
-       (1 2 3) LaTeX-auto-optional)
+        (1 2 3) LaTeX-auto-optional)
        (,(concat "\\\\\\(?:new\\|provide\\)command\\*?{?\\\\\\(" token 
"+\\)}?\\[\\([0-9]+\\)\\]")
-       (1 2) LaTeX-auto-arguments)
+        (1 2) LaTeX-auto-arguments)
        (,(concat "\\\\\\(?:new\\|provide\\)command\\*?{?\\\\\\(" token 
"+\\)}?")
-       1 TeX-auto-symbol)
+        1 TeX-auto-symbol)
        (,(concat "\\\\newenvironment\\*?{?\\(" token 
"+\\)}?\\[\\([0-9]+\\)\\]\\[")
-       (1 2) LaTeX-auto-env-args-with-opt)
+        (1 2) LaTeX-auto-env-args-with-opt)
        (,(concat "\\\\newenvironment\\*?{?\\(" token 
"+\\)}?\\[\\([0-9]+\\)\\]")
-       (1 2) LaTeX-auto-env-args)
+        (1 2) LaTeX-auto-env-args)
        (,(concat "\\\\newenvironment\\*?{?\\(" token "+\\)}?")
-       1 LaTeX-auto-environment)
+        1 LaTeX-auto-environment)
        (,(concat "\\\\newtheorem{\\(" token "+\\)}") 1 LaTeX-auto-environment)
        ("\\\\input{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}"
-       1 TeX-auto-file)
+        1 TeX-auto-file)
        ("\\\\include{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}"
-       1 TeX-auto-file)
+        1 TeX-auto-file)
        (, (concat "\\\\bibitem{\\(" token "[^, \n\r\t%\"#'()={}]*\\)}")
-         1 LaTeX-auto-bibitem)
+          1 LaTeX-auto-bibitem)
        (, (concat "\\\\bibitem\\[[^][\n\r]+\\]{\\(" token "[^, 
\n\r\t%\"#'()={}]*\\)}")
-         1 LaTeX-auto-bibitem)
+          1 LaTeX-auto-bibitem)
        ("\\\\bibliography{\\([^#}\\\\\n\r]+\\)}" 1 LaTeX-auto-bibliography)
        ("\\\\addbibresource\\(?:\\[[^]]+\\]\\)?{\\([^#}\\\\\n\r]+\\)\\..+}"
-       1 LaTeX-auto-bibliography)
+        1 LaTeX-auto-bibliography)
        
("\\\\add\\(?:global\\|section\\)bib\\(?:\\[[^]]+\\]\\)?{\\([^#}\\\\\n\r\.]+\\)\\(?:\\..+\\)?}"
 1 LaTeX-auto-bibliography)
        ("\\\\newrefsection\\[\\([^]]+\\)\\]" 1 LaTeX-split-bibs)
        ("\\\\begin{refsection}\\[\\([^]]+\\)\\]" 1 LaTeX-split-bibs)))
@@ -1716,20 +1734,20 @@ Split the string at commas and remove Biber file 
extensions."
   (let ((bibs (TeX-split-string " *, *" (TeX-match-buffer match))))
     (dolist (bib bibs)
       (LaTeX-add-bibliographies (replace-regexp-in-string
-                                (concat "\\(?:\\."
-                                        (mapconcat #'identity
-                                                   TeX-Biber-file-extensions
-                                                   "\\|\\.")
-                                        "\\)")
-                                "" bib)))))
+                                 (concat "\\(?:\\."
+                                         (mapconcat #'identity
+                                                    TeX-Biber-file-extensions
+                                                    "\\|\\.")
+                                         "\\)")
+                                 "" bib)))))
 
 (defun LaTeX-auto-prepare ()
   "Prepare for LaTeX parsing."
   (setq LaTeX-auto-arguments nil
-       LaTeX-auto-optional nil
-       LaTeX-auto-env-args nil
-       LaTeX-auto-style nil
-       LaTeX-auto-end-symbol nil))
+        LaTeX-auto-optional nil
+        LaTeX-auto-env-args nil
+        LaTeX-auto-style nil
+        LaTeX-auto-end-symbol nil))
 
 (add-hook 'TeX-auto-prepare-hook 'LaTeX-auto-prepare)
 
@@ -1748,31 +1766,31 @@ The input string may include LaTeX comments and 
newlines."
       (goto-char (point-min))
       (setq start (point))
       (while (re-search-forward "[{ ,%\n\r]" nil t)
-       (setq match (match-string 0))
-       (cond
-        ;; Step over groups.  (Let's hope nobody uses escaped braces.)
-        ((string= match "{")
-         (up-list))
-        ;; Get rid of whitespace.
-        ((string= match " ")
-         (delete-region (1- (point))
-                        (save-excursion
-                          (skip-chars-forward " ")
-                          (point))))
-        ;; Add entry to output.
-        ((or (string= match ",") (= (point) (point-max)))
+        (setq match (match-string 0))
+        (cond
+         ;; Step over groups.  (Let's hope nobody uses escaped braces.)
+         ((string= match "{")
+          (up-list))
+         ;; Get rid of whitespace.
+         ((string= match " ")
+          (delete-region (1- (point))
+                         (save-excursion
+                           (skip-chars-forward " ")
+                           (point))))
+         ;; Add entry to output.
+         ((or (string= match ",") (= (point) (point-max)))
           (let ((entry (buffer-substring-no-properties
                         start (1- (point)))))
             (unless (member entry opts)
               (setq opts (append opts (list entry)))))
-         (setq start (point)))
-        ;; Get rid of comments.
-        ((string= match "%")
-         (delete-region (1- (point))
-                        (line-beginning-position 2)))
-        ;; Get rid of newlines.
-        ((or (string= match "\n") (string= match "\r"))
-         (delete-char -1)))))
+          (setq start (point)))
+         ;; Get rid of comments.
+         ((string= match "%")
+          (delete-region (1- (point))
+                         (line-beginning-position 2)))
+         ;; Get rid of newlines.
+         ((or (string= match "\n") (string= match "\r"))
+          (delete-char -1)))))
     opts))
 
 (defvar LaTeX-provided-class-options nil
@@ -1795,8 +1813,8 @@ The value is actually the tail of the list of options 
given to CLASS."
   "Check if a documentclass option matching REGEXP is active.
 Return first found class option matching REGEXP, or nil if not found."
   (TeX-member regexp (apply #'append
-                           (mapcar #'cdr LaTeX-provided-class-options))
-             'string-match))
+                            (mapcar #'cdr LaTeX-provided-class-options))
+              'string-match))
 
 (defvar LaTeX-provided-package-options nil
   "Alist of options provided to LaTeX packages.
@@ -1820,9 +1838,9 @@ The value is actually the tail of the list of options 
given to PACKAGE."
 
   ;; Cleanup BibTeX/Biber files
   (setq LaTeX-auto-bibliography
-       (apply 'append (mapcar (lambda (arg)
-                                (TeX-split-string "," arg))
-                              LaTeX-auto-bibliography)))
+        (apply 'append (mapcar (lambda (arg)
+                                 (TeX-split-string "," arg))
+                               LaTeX-auto-bibliography)))
 
   ;; Reset class and packages options for the current buffer
   (setq LaTeX-provided-class-options nil)
@@ -1832,118 +1850,118 @@ The value is actually the tail of the list of options 
given to PACKAGE."
   (unless (null LaTeX-auto-style)
     (while LaTeX-auto-style
       (let* ((entry (car LaTeX-auto-style))
-            (options (nth 0 entry))
-            (style (nth 1 entry))
-            (class (nth 2 entry)))
+             (options (nth 0 entry))
+             (style (nth 1 entry))
+             (class (nth 2 entry)))
 
-       ;; Next document style.
-       (setq LaTeX-auto-style (cdr LaTeX-auto-style))
+        ;; Next document style.
+        (setq LaTeX-auto-style (cdr LaTeX-auto-style))
 
-       ;; Get the options.
-       (setq options (LaTeX-listify-package-options options))
+        ;; Get the options.
+        (setq options (LaTeX-listify-package-options options))
 
         ;; Treat documentclass/documentstyle specially.
         (if (or (string-equal "package" class)
                 (string-equal "Package" class))
             (dolist (elt (TeX-split-string
                           "\\([ \t\r\n]\\|%[^\n\r]*[\n\r]\\|,\\)+" style))
-             ;; Append style to the style list.
-             (add-to-list 'TeX-auto-file elt t)
+              ;; Append style to the style list.
+              (add-to-list 'TeX-auto-file elt t)
               ;; Append to `LaTeX-provided-package-options' the name of the
               ;; package and the options provided to it at load time.
-             (unless (equal options '(""))
-               (TeX-add-to-alist 'LaTeX-provided-package-options
-                                 (list (cons elt options)))))
-         ;; And a special "art10" style file combining style and size.
-         (add-to-list 'TeX-auto-file style t)
-         (add-to-list 'TeX-auto-file
-                      (concat
-                       (cond ((string-equal "article" style)
-                              "art")
-                             ((string-equal "book" style)
-                              "bk")
-                             ((string-equal "report" style)
-                              "rep")
-                             ((string-equal "jarticle" style)
-                              "jart")
-                             ((string-equal "jbook" style)
-                              "jbk")
-                             ((string-equal "jreport" style)
-                              "jrep")
-                             ((string-equal "j-article" style)
-                              "j-art")
-                             ((string-equal "j-book" style)
-                              "j-bk")
-                             ((string-equal "j-report" style )
-                              "j-rep")
-                             (t style))
-                       (cond ((member "11pt" options)
-                              "11")
-                             ((member "12pt" options)
-                              "12")
-                             (t
-                              "10"))) t)
-         (unless (equal options '(""))
-           (TeX-add-to-alist 'LaTeX-provided-class-options
-                             (list (cons style options)))))
-
-       ;; The third argument if "class" indicates LaTeX2e features.
-       (cond ((or (string-equal class "class")
-                  (string-equal class "Class"))
-              (add-to-list 'TeX-auto-file "latex2e"))
-             ((string-equal class "style")
-              (add-to-list 'TeX-auto-file "latex2"))))))
+              (unless (equal options '(""))
+                (TeX-add-to-alist 'LaTeX-provided-package-options
+                                  (list (cons elt options)))))
+          ;; And a special "art10" style file combining style and size.
+          (add-to-list 'TeX-auto-file style t)
+          (add-to-list 'TeX-auto-file
+                       (concat
+                        (cond ((string-equal "article" style)
+                               "art")
+                              ((string-equal "book" style)
+                               "bk")
+                              ((string-equal "report" style)
+                               "rep")
+                              ((string-equal "jarticle" style)
+                               "jart")
+                              ((string-equal "jbook" style)
+                               "jbk")
+                              ((string-equal "jreport" style)
+                               "jrep")
+                              ((string-equal "j-article" style)
+                               "j-art")
+                              ((string-equal "j-book" style)
+                               "j-bk")
+                              ((string-equal "j-report" style )
+                               "j-rep")
+                              (t style))
+                        (cond ((member "11pt" options)
+                               "11")
+                              ((member "12pt" options)
+                               "12")
+                              (t
+                               "10"))) t)
+          (unless (equal options '(""))
+            (TeX-add-to-alist 'LaTeX-provided-class-options
+                              (list (cons style options)))))
+
+        ;; The third argument if "class" indicates LaTeX2e features.
+        (cond ((or (string-equal class "class")
+                   (string-equal class "Class"))
+               (add-to-list 'TeX-auto-file "latex2e"))
+              ((string-equal class "style")
+               (add-to-list 'TeX-auto-file "latex2"))))))
 
   ;; Cleanup optional arguments
   (mapc (lambda (entry)
-         (add-to-list 'TeX-auto-symbol
-                      (list (nth 0 entry)
-                            (string-to-number (nth 1 entry)))))
-       LaTeX-auto-arguments)
+          (add-to-list 'TeX-auto-symbol
+                       (list (nth 0 entry)
+                             (string-to-number (nth 1 entry)))))
+        LaTeX-auto-arguments)
 
   ;; Cleanup default optional arguments
   (mapc (lambda (entry)
-         (add-to-list 'TeX-auto-symbol
-                      (list (nth 0 entry)
-                            (vector "argument")
-                            (1- (string-to-number (nth 1 entry))))))
-       LaTeX-auto-optional)
+          (add-to-list 'TeX-auto-symbol
+                       (list (nth 0 entry)
+                             (vector "argument")
+                             (1- (string-to-number (nth 1 entry))))))
+        LaTeX-auto-optional)
 
   ;; Cleanup environments arguments
   (mapc (lambda (entry)
-         (add-to-list 'LaTeX-auto-environment
-                      (list (nth 0 entry)
-                            (string-to-number (nth 1 entry)))))
-       LaTeX-auto-env-args)
+          (add-to-list 'LaTeX-auto-environment
+                       (list (nth 0 entry)
+                             (string-to-number (nth 1 entry)))))
+        LaTeX-auto-env-args)
   ;; Ditto for environments with an optional arg
   (mapc (lambda (entry)
-         (add-to-list 'LaTeX-auto-environment
-                      (list (nth 0 entry) 'LaTeX-env-args (vector "argument")
-                            (1- (string-to-number (nth 1 entry))))))
-       LaTeX-auto-env-args-with-opt)
+          (add-to-list 'LaTeX-auto-environment
+                       (list (nth 0 entry) 'LaTeX-env-args (vector "argument")
+                             (1- (string-to-number (nth 1 entry))))))
+        LaTeX-auto-env-args-with-opt)
 
   ;; Cleanup use of def to add environments
   ;; NOTE: This uses an O(N^2) algorithm, while an O(N log N)
   ;; algorithm is possible.
   (mapc (lambda (symbol)
-         (if (not (TeX-member symbol TeX-auto-symbol 'equal))
-             ;; No matching symbol, insert in list
-             (add-to-list 'TeX-auto-symbol (concat "end" symbol))
-           ;; Matching symbol found, remove from list
-           (if (equal (car TeX-auto-symbol) symbol)
-               ;; Is it the first symbol?
-               (setq TeX-auto-symbol (cdr TeX-auto-symbol))
-             ;; Nope!  Travel the list
-             (let ((list TeX-auto-symbol))
-               (while (consp (cdr list))
-                 ;; Until we find it.
-                 (if (equal (car (cdr list)) symbol)
-                     ;; Then remove it.
-                     (setcdr list (cdr (cdr list))))
-                 (setq list (cdr list)))))
-           ;; and add the symbol as an environment.
-           (add-to-list 'LaTeX-auto-environment symbol)))
-       LaTeX-auto-end-symbol))
+          (if (not (TeX-member symbol TeX-auto-symbol 'equal))
+              ;; No matching symbol, insert in list
+              (add-to-list 'TeX-auto-symbol (concat "end" symbol))
+            ;; Matching symbol found, remove from list
+            (if (equal (car TeX-auto-symbol) symbol)
+                ;; Is it the first symbol?
+                (setq TeX-auto-symbol (cdr TeX-auto-symbol))
+              ;; Nope!  Travel the list
+              (let ((list TeX-auto-symbol))
+                (while (consp (cdr list))
+                  ;; Until we find it.
+                  (if (equal (car (cdr list)) symbol)
+                      ;; Then remove it.
+                      (setcdr list (cdr (cdr list))))
+                  (setq list (cdr list)))))
+            ;; and add the symbol as an environment.
+            (add-to-list 'LaTeX-auto-environment symbol)))
+        LaTeX-auto-end-symbol))
 
 (add-hook 'TeX-auto-cleanup-hook 'LaTeX-auto-cleanup)
 
@@ -2011,29 +2029,29 @@ defined and ask user for confirmation before 
proceeding."
   (let (label valid)
     (while (not valid)
       (setq label
-           (completing-read
-            (TeX-argument-prompt optional prompt "Key")
-            (LaTeX-label-list) nil nil TeX-read-label-prefix))
+            (completing-read
+             (TeX-argument-prompt optional prompt "Key")
+             (LaTeX-label-list) nil nil TeX-read-label-prefix))
       ;; If we're defining a label, check if it's already defined and
       ;; ask user for confirmation, otherwise ask again
       (cond ((and definition
-                 (assoc label (LaTeX-label-list)))
-            (ding)
-            (when (y-or-n-p
-                   ;; Emacs 24 compatibility
-                   (if (fboundp 'format-message)
-                       (format-message "Label `%s' exists. Use anyway? " label)
-                     (format "Label `%s' exists. Use anyway? " label)))
-              (setq valid t)))
-           (t
-            (setq valid t))))
+                  (assoc label (LaTeX-label-list)))
+             (ding)
+             (when (y-or-n-p
+                    ;; Emacs 24 compatibility
+                    (if (fboundp 'format-message)
+                        (format-message "Label `%s' exists. Use anyway? " 
label)
+                      (format "Label `%s' exists. Use anyway? " label)))
+               (setq valid t)))
+            (t
+             (setq valid t))))
     ;; Only add a newly defined label to list of known one if it is
     ;; not empty and not equal to `TeX-read-label-prefix', if given
     (when (and definition
-              (not (string-equal "" label))
-              (if TeX-read-label-prefix
-                  (not (string-equal TeX-read-label-prefix label))
-                t))
+               (not (string-equal "" label))
+               (if TeX-read-label-prefix
+                   (not (string-equal TeX-read-label-prefix label))
+                 t))
       (LaTeX-add-labels label))
     ;; Return label, can be empty string "", TeX-read-label-prefix
     ;; only "fig:" or the real thing like "fig:foo"
@@ -2076,10 +2094,10 @@ If OPTIONAL is non-nil, insert the resulting value as 
an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
 string.  ARGS is unused."
   (let ((entry (completing-read (TeX-argument-prompt optional prompt "Key")
-                               (LaTeX-index-entry-list))))
+                                (LaTeX-index-entry-list))))
     (if (and (not (string-equal "" entry))
-            (not (member (list entry) (LaTeX-index-entry-list))))
-       (LaTeX-add-index-entries entry))
+             (not (member (list entry) (LaTeX-index-entry-list))))
+        (LaTeX-add-index-entries entry))
     (TeX-argument-insert entry optional optional)))
 
 (defalias 'TeX-arg-define-index 'TeX-arg-index)
@@ -2091,12 +2109,12 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string.  If DEFINITION is non-nil, add the chosen macro to the
 list of defined macros."
   (let ((macro (completing-read (TeX-argument-prompt optional prompt
-                                                    (concat "Macro: "
-                                                            TeX-esc)
-                                                    t)
-                               (TeX-symbol-list))))
+                                                     (concat "Macro: "
+                                                             TeX-esc)
+                                                     t)
+                                (TeX-symbol-list))))
     (if (and definition (not (string-equal "" macro)))
-       (TeX-add-symbols macro))
+        (TeX-add-symbols macro))
     (TeX-argument-insert macro optional TeX-esc)))
 
 (defun TeX-arg-environment (optional &optional prompt definition)
@@ -2106,10 +2124,10 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string.  If DEFINITION is non-nil, add the chosen environment to
 the list of defined environments."
   (let ((environment (completing-read (TeX-argument-prompt optional prompt
-                                                          "Environment")
-                                     (LaTeX-environment-list))))
+                                                           "Environment")
+                                      (LaTeX-environment-list))))
     (if (and definition (not (string-equal "" environment)))
-       (LaTeX-add-environments environment))
+        (LaTeX-add-environments environment))
 
     (TeX-argument-insert environment optional)))
 
@@ -2120,7 +2138,7 @@ If OPTIONAL is non-nil, insert the resulting value as an 
optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
 string.  DEFINITION is unused."
   (let ((items (multi-prompt "," t (TeX-argument-prompt optional prompt "Key")
-                            (LaTeX-bibitem-list))))
+                             (LaTeX-bibitem-list))))
     (apply 'LaTeX-add-bibitems items)
     (TeX-argument-insert (mapconcat 'identity items ",") optional optional)))
 
@@ -2131,10 +2149,10 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string.  If DEFINITION is non-nil, add the chosen counter to
 the list of defined counters."
   (let ((counter (completing-read (TeX-argument-prompt optional prompt
-                                                      "Counter")
-                                 (LaTeX-counter-list))))
+                                                       "Counter")
+                                  (LaTeX-counter-list))))
     (if (and definition (not (string-equal "" counter)))
-       (LaTeX-add-counters counter))
+        (LaTeX-add-counters counter))
     (TeX-argument-insert counter optional)))
 
 (defun TeX-arg-savebox (optional &optional prompt definition)
@@ -2144,8 +2162,8 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string.  If definition is non-nil, the savebox is added to the
 list of defined saveboxes."
   (let ((savebox (completing-read (TeX-argument-prompt optional prompt
-                                                      (concat "Savebox: "
-                                                              TeX-esc) t)
+                                                       (concat "Savebox: "
+                                                               TeX-esc) t)
                                    (LaTeX-savebox-list))))
     (if (and definition (not (zerop (length savebox))))
         (LaTeX-add-saveboxes savebox))
@@ -2159,19 +2177,19 @@ string.  If INITIAL-INPUT is non-nil, insert it in the 
minibuffer
 initially, with point positioned at the end.  If DEFINITION is
 non-nil, the length is added to the list of defined length."
   (let ((length (completing-read (TeX-argument-prompt optional prompt "Length")
-                                ;; A valid length can be a macro or a length of
-                                ;; the form <value><dimension>.  Input starting
-                                ;; with a `\' can be completed with length
-                                ;; macros.
-                                (mapcar (lambda(elt) (concat TeX-esc (car 
elt)))
-                                        (LaTeX-length-list))
-                                ;; Some macros takes as argument only a length
-                                ;; macro (e.g., `\setlength' in its first
-                                ;; argument, and `\newlength'), in this case is
-                                ;; convenient to set `\\' as initial input.
-                                nil nil initial-input)))
+                                 ;; A valid length can be a macro or a length 
of
+                                 ;; the form <value><dimension>.  Input 
starting
+                                 ;; with a `\' can be completed with length
+                                 ;; macros.
+                                 (mapcar (lambda(elt) (concat TeX-esc (car 
elt)))
+                                         (LaTeX-length-list))
+                                 ;; Some macros takes as argument only a length
+                                 ;; macro (e.g., `\setlength' in its first
+                                 ;; argument, and `\newlength'), in this case 
is
+                                 ;; convenient to set `\\' as initial input.
+                                 nil nil initial-input)))
     (if (and definition (not (zerop (length length))))
-       ;; Strip leading TeX-esc from macro name
+        ;; Strip leading TeX-esc from macro name
         (LaTeX-add-lengths (substring length 1)))
     (TeX-argument-insert length optional)))
 
@@ -2181,9 +2199,9 @@ If OPTIONAL is non-nil, insert the resulting value as an 
optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
 string."
   (TeX-argument-insert (read-file-name (TeX-argument-prompt optional
-                                                           prompt "File")
-                                      "" "" nil)
-                      optional))
+                                                            prompt "File")
+                                       "" "" nil)
+                       optional))
 
 (defun TeX-arg-file-name (optional &optional prompt)
   "Prompt for a file name.
@@ -2288,22 +2306,22 @@ string."
   (TeX-arg-length optional prompt "\\" t))
 
 (defcustom LaTeX-style-list '(("amsart")
-                             ("amsbook")
-                             ("article")
-                             ("beamer")
-                             ("book")
-                             ("dinbrief")
-                             ("foils")
-                             ("letter")
-                             ("memoir")
-                             ("minimal")
-                             ("prosper")
-                             ("report")
-                             ("scrartcl")
-                             ("scrbook")
-                             ("scrlttr2")
-                             ("scrreprt")
-                             ("slides"))
+                              ("amsbook")
+                              ("article")
+                              ("beamer")
+                              ("book")
+                              ("dinbrief")
+                              ("foils")
+                              ("letter")
+                              ("memoir")
+                              ("minimal")
+                              ("prosper")
+                              ("report")
+                              ("scrartcl")
+                              ("scrbook")
+                              ("scrlttr2")
+                              ("scrreprt")
+                              ("slides"))
   "List of document classes offered when inserting a document environment.
 
 If `TeX-arg-input-file-search' is set to `t', you will get
@@ -2338,49 +2356,49 @@ To insert a hook here, you must insert it in the 
appropiate style file.")
   "Insert arguments to documentclass.
 OPTIONAL and IGNORE are ignored."
   (let* ((TeX-file-extensions '("cls"))
-        (crm-separator ",")
-        style var options defopt optprmpt)
+         (crm-separator ",")
+         style var options defopt optprmpt)
     (unless LaTeX-global-class-files
       (setq LaTeX-global-class-files
-           (if (if (eq TeX-arg-input-file-search 'ask)
-                   (not (y-or-n-p "Find class yourself? "))
-                 TeX-arg-input-file-search)
-               (prog2
-                   (message "Searching for LaTeX classes...")
-                   (TeX-search-files-by-type 'texinputs 'global t t)
-                 (message "Searching for LaTeX classes...done"))
-             LaTeX-style-list)))
+            (if (if (eq TeX-arg-input-file-search 'ask)
+                    (not (y-or-n-p "Find class yourself? "))
+                  TeX-arg-input-file-search)
+                (prog2
+                    (message "Searching for LaTeX classes...")
+                    (TeX-search-files-by-type 'texinputs 'global t t)
+                  (message "Searching for LaTeX classes...done"))
+              LaTeX-style-list)))
     (setq style (completing-read
-                (concat "Document class (default " LaTeX-default-style "): ")
-                LaTeX-global-class-files nil nil nil nil LaTeX-default-style))
+                 (concat "Document class (default " LaTeX-default-style "): ")
+                 LaTeX-global-class-files nil nil nil nil LaTeX-default-style))
     ;; Clean up hook before use.
     (setq TeX-after-document-hook nil)
     (TeX-load-style style)
     (setq var (intern (format "LaTeX-%s-class-options" style)))
     (setq defopt (if (stringp LaTeX-default-options)
-                    LaTeX-default-options
-                  (mapconcat #'identity LaTeX-default-options ",")))
+                     LaTeX-default-options
+                   (mapconcat #'identity LaTeX-default-options ",")))
     (setq optprmpt
-         (if (and defopt (not (string-equal defopt "")))
-             (format "Options (default %s): " defopt) "Options: "))
+          (if (and defopt (not (string-equal defopt "")))
+              (format "Options (default %s): " defopt) "Options: "))
     (if (or (and (boundp var)
-                (listp (symbol-value var)))
-           (fboundp var))
-       (if (functionp var)
-           (setq options (funcall var))
-         (when (symbol-value var)
-           (setq options
-                 (mapconcat 'identity
-                            (TeX-completing-read-multiple
-                             optprmpt (mapcar 'list (symbol-value var)) nil nil
-                             nil nil defopt)
-                            ","))))
+                 (listp (symbol-value var)))
+            (fboundp var))
+        (if (functionp var)
+            (setq options (funcall var))
+          (when (symbol-value var)
+            (setq options
+                  (mapconcat 'identity
+                             (TeX-completing-read-multiple
+                              optprmpt (mapcar 'list (symbol-value var)) nil 
nil
+                              nil nil defopt)
+                             ","))))
       (setq options (TeX-read-string optprmpt nil nil defopt)))
     (unless (zerop (length options))
       (insert LaTeX-optop options LaTeX-optcl)
       (let ((opts (LaTeX-listify-package-options options)))
-       (TeX-add-to-alist 'LaTeX-provided-class-options
-                         (list (cons style opts)))))
+        (TeX-add-to-alist 'LaTeX-provided-class-options
+                          (list (cons style opts)))))
     (insert TeX-grop style TeX-grcl))
 
   (TeX-update-style t)
@@ -2403,20 +2421,20 @@ If at least one package is provided, this function 
returns a cons
 cell, whose CAR is the list of packages and the CDR is the string
 of the options, nil otherwise."
   (let* ((TeX-file-extensions '("sty"))
-        (crm-separator ",")
-        packages var options)
+         (crm-separator ",")
+         packages var options)
     (unless TeX-global-input-files
       (if (if (eq TeX-arg-input-file-search 'ask)
-             (not (y-or-n-p "Find packages yourself? "))
-           TeX-arg-input-file-search)
-         (progn
-           (message "Searching for LaTeX packages...")
-           (setq TeX-global-input-files
-                 (mapcar 'list (TeX-search-files-by-type
-                                'texinputs 'global t t)))
-           (message "Searching for LaTeX packages...done"))))
+              (not (y-or-n-p "Find packages yourself? "))
+            TeX-arg-input-file-search)
+          (progn
+            (message "Searching for LaTeX packages...")
+            (setq TeX-global-input-files
+                  (mapcar 'list (TeX-search-files-by-type
+                                 'texinputs 'global t t)))
+            (message "Searching for LaTeX packages...done"))))
     (setq packages (TeX-completing-read-multiple
-                   "Packages: " TeX-global-input-files))
+                    "Packages: " TeX-global-input-files))
     ;; Clean up hook before use in `LaTeX-arg-usepackage-insert'.
     (setq LaTeX-after-usepackage-hook nil)
     (mapc #'TeX-load-style packages)
@@ -2424,24 +2442,24 @@ of the options, nil otherwise."
     ;; nil otherwise.
     (when packages
       (setq var (if (= 1 (length packages))
-                   (intern (format "LaTeX-%s-package-options" (car packages)))
-                 ;; Something like `\usepackage[options]{pkg1,pkg2,pkg3,...}' 
is
-                 ;; allowed (provided that pkg1, pkg2, pkg3, ... accept same
-                 ;; options).  When there is more than one package, set `var' 
to
-                 ;; a dummy value so next `if' enters else form.
-                 t))
+                    (intern (format "LaTeX-%s-package-options" (car packages)))
+                  ;; Something like `\usepackage[options]{pkg1,pkg2,pkg3,...}' 
is
+                  ;; allowed (provided that pkg1, pkg2, pkg3, ... accept same
+                  ;; options).  When there is more than one package, set `var' 
to
+                  ;; a dummy value so next `if' enters else form.
+                  t))
       (if (or (and (boundp var)
-                  (listp (symbol-value var)))
-             (fboundp var))
-         (if (functionp var)
-             (setq options (funcall var))
-           (when (symbol-value var)
-             (setq options
-                   (mapconcat 'identity
-                              (TeX-completing-read-multiple
-                               "Options: " (mapcar 'list (symbol-value var)))
-                              ","))))
-       (setq options (TeX-read-string "Options: ")))
+                   (listp (symbol-value var)))
+              (fboundp var))
+          (if (functionp var)
+              (setq options (funcall var))
+            (when (symbol-value var)
+              (setq options
+                    (mapconcat 'identity
+                               (TeX-completing-read-multiple
+                                "Options: " (mapcar 'list (symbol-value var)))
+                               ","))))
+        (setq options (TeX-read-string "Options: ")))
       (cons packages options))))
 
 (defun LaTeX-arg-usepackage-insert (packages options)
@@ -2449,9 +2467,9 @@ of the options, nil otherwise."
   (unless (zerop (length options))
     (let ((opts (LaTeX-listify-package-options options)))
       (mapc (lambda (elt)
-             (TeX-add-to-alist 'LaTeX-provided-package-options
-                               (list (cons elt opts))))
-           packages))
+              (TeX-add-to-alist 'LaTeX-provided-package-options
+                                (list (cons elt opts))))
+            packages))
     (insert LaTeX-optop options LaTeX-optcl))
   (insert TeX-grop (mapconcat 'identity packages ",") TeX-grcl)
   (run-hooks 'LaTeX-after-usepackage-hook)
@@ -2461,8 +2479,8 @@ of the options, nil otherwise."
   "Insert arguments to usepackage.
 OPTIONAL is ignored."
   (let* ((packages-options (LaTeX-arg-usepackage-read-packages-with-options))
-        (packages (car packages-options))
-        (options (cdr packages-options)))
+         (packages (car packages-options))
+         (options (cdr packages-options)))
     (LaTeX-arg-usepackage-insert packages options)))
 
 (defun LaTeX-insert-usepackages ()
@@ -2473,7 +2491,7 @@ Return t if at least one \\usepackage has been inserted, 
nil
 otherwise."
   (let (packages-options packages options (inserted nil))
     (while (setq packages-options
-                (LaTeX-arg-usepackage-read-packages-with-options))
+                 (LaTeX-arg-usepackage-read-packages-with-options))
       (setq packages (car packages-options))
       (setq options (cdr packages-options))
       (insert TeX-esc "usepackage")
@@ -2484,7 +2502,7 @@ otherwise."
 
 (defcustom LaTeX-search-files-type-alist
   '((texinputs "${TEXINPUTS.latex}" ("tex/generic/" "tex/latex/")
-              TeX-file-extensions)
+               TeX-file-extensions)
     (docs "${TEXDOCS}" ("doc/") TeX-doc-extensions)
     (graphics "${TEXINPUTS}" ("tex/") LaTeX-includegraphics-extensions)
     (bibinputs "${BIBINPUTS}" ("bibtex/bib/") BibTeX-file-extensions)
@@ -2505,14 +2523,14 @@ directory separator.
 Reset the mode for a change of this variable to take effect."
   :group 'TeX-file
   :type '(alist :key-type symbol
-               :value-type
-               (group (string :tag "Kpathsea variable")
-                      (choice :tag "Directories"
-                              (repeat :tag "TDS subdirectories" string)
-                              (repeat :tag "Absolute directories" directory)
-                              (repeat :tag "Variables" variable))
-                      (choice :tag "Extensions"
-                              variable (repeat string)))))
+                :value-type
+                (group (string :tag "Kpathsea variable")
+                       (choice :tag "Directories"
+                               (repeat :tag "TDS subdirectories" string)
+                               (repeat :tag "Absolute directories" directory)
+                               (repeat :tag "Variables" variable))
+                       (choice :tag "Extensions"
+                               variable (repeat string)))))
 
 (defun TeX-arg-input-file (optional &optional prompt local)
   "Prompt for a tex or sty file.
@@ -2521,29 +2539,29 @@ argument, otherwise as a mandatory one.  PROMPT is the 
prompt,
 LOCAL is a flag.  If the flag is set, only complete with local
 files."
   (let ((search (if (eq TeX-arg-input-file-search 'ask)
-                   (not (y-or-n-p "Find file yourself? "))
-                 TeX-arg-input-file-search))
-       file style)
+                    (not (y-or-n-p "Find file yourself? "))
+                  TeX-arg-input-file-search))
+        file style)
     (if search
-       (progn
-         (unless (or TeX-global-input-files local)
-           (message "Searching for files...")
-           (setq TeX-global-input-files
-                 (mapcar 'list (TeX-search-files-by-type
-                                'texinputs 'global t t)))
-           (message "Searching for files...done"))
-         (setq file (completing-read
-                     (TeX-argument-prompt optional prompt "File")
-                     (TeX-delete-dups-by-car
-                      (append (mapcar 'list (TeX-search-files-by-type
-                                             'texinputs 'local t t))
-                              (unless local
-                                TeX-global-input-files))))
-               style file))
+        (progn
+          (unless (or TeX-global-input-files local)
+            (message "Searching for files...")
+            (setq TeX-global-input-files
+                  (mapcar 'list (TeX-search-files-by-type
+                                 'texinputs 'global t t)))
+            (message "Searching for files...done"))
+          (setq file (completing-read
+                      (TeX-argument-prompt optional prompt "File")
+                      (TeX-delete-dups-by-car
+                       (append (mapcar 'list (TeX-search-files-by-type
+                                              'texinputs 'local t t))
+                               (unless local
+                                 TeX-global-input-files))))
+                style file))
       (setq file (read-file-name
-                 (TeX-argument-prompt optional prompt "File") nil ""))
+                  (TeX-argument-prompt optional prompt "File") nil ""))
       (unless (string-equal file "")
-       (setq file (file-relative-name file)))
+        (setq file (file-relative-name file)))
       (setq style (file-name-sans-extension (file-name-nondirectory file))))
     (unless (string-equal "" style)
       (TeX-run-style-hooks style))
@@ -2569,13 +2587,13 @@ string."
   (message "Searching for BibTeX styles...")
   (or BibTeX-global-style-files
       (setq BibTeX-global-style-files
-           (mapcar 'list (TeX-search-files-by-type 'bstinputs 'global t t))))
+            (mapcar 'list (TeX-search-files-by-type 'bstinputs 'global t t))))
   (message "Searching for BibTeX styles...done")
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "BibTeX style")
-                   (append (mapcar 'list (TeX-search-files-by-type
-                                          'bstinputs 'local t t))
-                           BibTeX-global-style-files))
+                    (append (mapcar 'list (TeX-search-files-by-type
+                                           'bstinputs 'local t t))
+                            BibTeX-global-style-files))
    optional))
 
 (defvar BibTeX-global-files nil
@@ -2598,14 +2616,14 @@ string."
   (message "Searching for BibTeX files...")
   (or BibTeX-global-files
       (setq BibTeX-global-files
-           (mapcar 'list (TeX-search-files-by-type 'bibinputs 'global t t))))
+            (mapcar 'list (TeX-search-files-by-type 'bibinputs 'global t t))))
   (message "Searching for BibTeX files...done")
   (let ((styles (multi-prompt
-                "," t
-                (TeX-argument-prompt optional prompt "BibTeX files")
-                (append (mapcar 'list (TeX-search-files-by-type
-                                       'bibinputs 'local t t))
-                        BibTeX-global-files))))
+                 "," t
+                 (TeX-argument-prompt optional prompt "BibTeX files")
+                 (append (mapcar 'list (TeX-search-files-by-type
+                                        'bibinputs 'local t t))
+                         BibTeX-global-files))))
     (apply 'LaTeX-add-bibliographies styles)
     ;; Run style files associated to the bibliography database files in order 
to
     ;; immediately fill `LaTeX-bibitem-list'.
@@ -2619,8 +2637,8 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string."
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "Position")
-                   '(("") ("l") ("r") ("t") ("b") ("tl") ("tr") ("bl") ("br"))
-                   nil t)
+                    '(("") ("l") ("r") ("t") ("b") ("tl") ("tr") ("bl") ("br"))
+                    nil t)
    optional))
 
 (defun TeX-arg-lr (optional &optional prompt)
@@ -2630,8 +2648,8 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string."
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "Position")
-                   '(("") ("l") ("r"))
-                   nil t)
+                    '(("") ("l") ("r"))
+                    nil t)
    optional))
 
 (defun TeX-arg-tb (optional &optional prompt)
@@ -2641,8 +2659,8 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string."
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "Position")
-                   '(("") ("t") ("b"))
-                   nil t)
+                    '(("") ("t") ("b"))
+                    nil t)
    optional))
 
 (defcustom TeX-date-format "%Y/%m/%d"
@@ -2658,8 +2676,8 @@ string."
   (let ((default (format-time-string TeX-date-format (current-time))))
     (TeX-argument-insert
      (TeX-read-string (TeX-argument-prompt
-                      optional prompt (format "Date (default %s)" default))
-                     nil nil default)
+                       optional prompt (format "Date (default %s)" default))
+                      nil nil default)
      optional)))
 
 (defun TeX-arg-version (optional &optional prompt)
@@ -2669,7 +2687,7 @@ insert the resulting value as an optional argument, 
otherwise as
 a mandatory one.  Use PROMPT as the prompt string."
   (TeX-argument-insert
    (TeX-read-string (TeX-argument-prompt optional prompt "Version")
-                   (format-time-string "%Y/%m/%d" (current-time)))
+                    (format-time-string "%Y/%m/%d" (current-time)))
    optional))
 
 (defun TeX-arg-pagestyle (optional &optional prompt definition)
@@ -2679,10 +2697,10 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string.  If DEFINITION is non-nil, add the chosen pagestyle to
 the list of defined pagestyles."
   (let ((pagestyle (completing-read (TeX-argument-prompt optional prompt
-                                                        "Pagestyle")
-                                   (LaTeX-pagestyle-list))))
+                                                         "Pagestyle")
+                                    (LaTeX-pagestyle-list))))
     (if (and definition (not (string-equal "" pagestyle)))
-       (LaTeX-add-pagestyles pagestyle))
+        (LaTeX-add-pagestyles pagestyle))
     (TeX-argument-insert pagestyle optional)))
 
 (defcustom LaTeX-default-verb-delimiter ?|
@@ -2694,14 +2712,14 @@ the list of defined pagestyles."
   "Prompt for delimiter and text.
 The compatibility argument OPTIONAL and IGNORE are ignored."
   (let ((del (read-quoted-char
-             (concat "Delimiter (default "
-                     (char-to-string LaTeX-default-verb-delimiter) "): "))))
+              (concat "Delimiter (default "
+                      (char-to-string LaTeX-default-verb-delimiter) "): "))))
     (when (<= del ?\ ) (setq del LaTeX-default-verb-delimiter))
     (if (TeX-active-mark)
-       (progn
-         (insert del)
-         (goto-char (mark))
-         (insert del))
+        (progn
+          (insert del)
+          (goto-char (mark))
+          (insert del))
       (insert del (read-from-minibuffer "Text: ") del))
     (setq LaTeX-default-verb-delimiter del)))
 
@@ -2712,25 +2730,25 @@ a string replacing the default one when asking the user 
for text.
 This function is intended for \\verb like macros which take their
 argument in delimiters like \"\| \|\" or braces \"\{ \}\"."
   (let ((del (read-quoted-char
-             (concat "Delimiter (default "
-                     (char-to-string LaTeX-default-verb-delimiter) "): "))))
+              (concat "Delimiter (default "
+                      (char-to-string LaTeX-default-verb-delimiter) "): "))))
     (when (<= del ?\ )
       (setq del LaTeX-default-verb-delimiter))
     (if (TeX-active-mark)
-       (progn
-         (insert del)
-         (goto-char (mark))
-         ;; If the delimiter was an opening brace, close it with a
-         ;; brace, otherwise use the delimiter again
-         (insert (if (= del ?\{)
-                     ?\}
-                   del)))
+        (progn
+          (insert del)
+          (goto-char (mark))
+          ;; If the delimiter was an opening brace, close it with a
+          ;; brace, otherwise use the delimiter again
+          (insert (if (= del ?\{)
+                      ?\}
+                    del)))
       ;; Same thing again
       (insert del (read-from-minibuffer
-                  (TeX-argument-prompt optional prompt "Text"))
-             (if (= del ?\{)
-                 ?\}
-               del)))
+                   (TeX-argument-prompt optional prompt "Text"))
+              (if (= del ?\{)
+                  ?\}
+                del)))
     ;; Do not set `LaTeX-default-verb-delimiter' if the user input was
     ;; an opening brace.  This would give funny results for the next
     ;; "C-c C-m \verb RET"
@@ -2743,7 +2761,7 @@ argument in delimiters like \"\| \|\" or braces \"\{ 
\}\"."
 The numbers are surounded by parenthesizes and separated with a
 comma.  The compatibility argument OPTIONAL is ignored."
   (insert "(" (TeX-read-string (concat first  ": ")) ","
-         (TeX-read-string (concat second ": ")) ")"))
+          (TeX-read-string (concat second ": ")) ")"))
 
 (defun TeX-arg-size (optional)
   "Insert width and height as a pair.
@@ -2778,12 +2796,12 @@ the cdr is the brace used with \\right."
   :group 'LaTeX-macro
   :group 'LaTeX-math
   :type '(repeat (cons :format "%v"
-                      (string :tag "Left")
-                      (string :tag "Right"))))
+                       (string :tag "Left")
+                       (string :tag "Right"))))
 
 (defvar TeX-braces-association
   (append TeX-braces-user-association
-         TeX-braces-default-association)
+          TeX-braces-default-association)
     "A list of association of brace symbols for \\left and \\right.
 The car of each entry is the brace used with \\left,
 the cdr is the brace used with \\right.")
@@ -2829,13 +2847,13 @@ string."
                  (delete-char 1))))
     (let ((left-brace (completing-read
                        (TeX-argument-prompt optional prompt
-                                           "Which brace")
+                                            "Which brace")
                        TeX-left-right-braces)))
       (insert left-brace)
       (LaTeX-newline)
       (save-excursion
-       (if (TeX-active-mark)
-           (goto-char (mark)))
+        (if (TeX-active-mark)
+            (goto-char (mark)))
         (LaTeX-newline)
         (LaTeX-insert-corresponding-right-macro-and-brace
          left-macro left-brace optional prompt)
@@ -2853,19 +2871,19 @@ supply the corresponding macro such as \\right before 
the right brace macro."
   (when TeX-arg-right-insert-p
     (let (left-brace left-macro)
       (save-excursion
-       ;; Obtain left brace macro name such as "\langle".
-       (setq left-brace (buffer-substring-no-properties
-                         (point)
-                         (progn (backward-word) (backward-char)
-                                (point)))
-             ;; Obtain the name of preceding left macro, if any,
-             ;; such as "left", "bigl" etc.
-             left-macro (LaTeX--find-preceding-left-macro-name)))
+        ;; Obtain left brace macro name such as "\langle".
+        (setq left-brace (buffer-substring-no-properties
+                          (point)
+                          (progn (backward-word) (backward-char)
+                                 (point)))
+              ;; Obtain the name of preceding left macro, if any,
+              ;; such as "left", "bigl" etc.
+              left-macro (LaTeX--find-preceding-left-macro-name)))
       (save-excursion
-       (if (TeX-active-mark)
-           (goto-char (mark)))
-       (LaTeX-insert-corresponding-right-macro-and-brace
-        left-macro left-brace optional)))))
+        (if (TeX-active-mark)
+            (goto-char (mark)))
+        (LaTeX-insert-corresponding-right-macro-and-brace
+         left-macro left-brace optional)))))
 
 (defun LaTeX-insert-left-brace (arg)
   "Insert typed left brace ARG times and possibly a correspondig right brace.
@@ -2877,68 +2895,68 @@ Normally bound to keys \(, { and [."
   ;; the `delete-selection' property, just below this defun, accordingly.
   (let ((auto-p (and LaTeX-electric-left-right-brace (not arg))))
     (if (and auto-p
-            (TeX-active-mark)
-            (> (point) (mark)))
-       (exchange-point-and-mark))
+             (TeX-active-mark)
+             (> (point) (mark)))
+        (exchange-point-and-mark))
     (self-insert-command (prefix-numeric-value arg))
     (if auto-p
         (let ((lbrace (char-to-string last-command-event)) lmacro skip-p)
           (save-excursion
             (backward-char)
-           ;; The brace "{" is exceptional in two aspects.
-           ;; 1. "\{" should be considered as a single brace
-           ;;    like "(" and "[".
-           ;; 2. "\left{" is nonsense while "\left\{" and
-           ;;    "\left(" are not.
-           (if (string= lbrace TeX-grop)
-               ;; If "{" follows "\", set lbrace to "\{".
-               (if (TeX-escaped-p)
-                   (progn
-                     (backward-char)
-                     (setq lbrace (concat TeX-esc TeX-grop)))
-                 ;; Otherwise, don't search for left macros.
-                 (setq skip-p t)))
-           (unless skip-p
-             ;; Obtain the name of preceding left macro, if any,
-             ;; such as "left", "bigl" etc.
-             (setq lmacro (LaTeX--find-preceding-left-macro-name))))
+            ;; The brace "{" is exceptional in two aspects.
+            ;; 1. "\{" should be considered as a single brace
+            ;;    like "(" and "[".
+            ;; 2. "\left{" is nonsense while "\left\{" and
+            ;;    "\left(" are not.
+            (if (string= lbrace TeX-grop)
+                ;; If "{" follows "\", set lbrace to "\{".
+                (if (TeX-escaped-p)
+                    (progn
+                      (backward-char)
+                      (setq lbrace (concat TeX-esc TeX-grop)))
+                  ;; Otherwise, don't search for left macros.
+                  (setq skip-p t)))
+            (unless skip-p
+              ;; Obtain the name of preceding left macro, if any,
+              ;; such as "left", "bigl" etc.
+              (setq lmacro (LaTeX--find-preceding-left-macro-name))))
           (let ((TeX-arg-right-insert-p t)
                 ;; "{" and "}" are paired temporally so that typing
-               ;; a single "{" should insert a pair "{}".
+                ;; a single "{" should insert a pair "{}".
                 (TeX-braces-association
                  (cons (cons TeX-grop TeX-grcl) TeX-braces-association)))
-           (save-excursion
-             (if (TeX-active-mark)
-                 (goto-char (mark)))
-             (LaTeX-insert-corresponding-right-macro-and-brace
-              lmacro lbrace)))))))
+            (save-excursion
+              (if (TeX-active-mark)
+                  (goto-char (mark)))
+              (LaTeX-insert-corresponding-right-macro-and-brace
+               lmacro lbrace)))))))
 ;; Cater for `delete-selection-mode' (bug#36385)
 ;; See the header comment of delsel.el for detail.
 (put #'LaTeX-insert-left-brace 'delete-selection
      ;; COMPATIBILITY for Emacs < 24.3
      (if (and (= emacs-major-version 24)
-             (< emacs-minor-version 3))
-        ;; Emacs < 24.3 doesn't support a function as value of
-        ;; `delete-selection' property.
-        nil
+              (< emacs-minor-version 3))
+         ;; Emacs < 24.3 doesn't support a function as value of
+         ;; `delete-selection' property.
+         nil
        (lambda ()
-        ;; Consult `delete-selection' property when
-        ;; `LaTeX-insert-left-brace' works just the same as
-        ;; `self-insert-command'.
-        (and (or (not LaTeX-electric-left-right-brace)
-                 current-prefix-arg)
-             (let ((f (get #'self-insert-command 'delete-selection)))
-               ;; If `delete-selection' property of
-               ;; `self-insert-command' is one of the predefined
-               ;; special symbols, just return itself.
-               (if (memq f '(yank supersede kill t nil))
-                   ;; FIXME: if this list of special symbols is
-                   ;; extended in future delsel.el, this discrimination
-                   ;; will become wrong.
-                   f
-                 ;; Otherwise, call it as a function and return
-                 ;; its value.
-                 (funcall f)))))))
+         ;; Consult `delete-selection' property when
+         ;; `LaTeX-insert-left-brace' works just the same as
+         ;; `self-insert-command'.
+         (and (or (not LaTeX-electric-left-right-brace)
+                  current-prefix-arg)
+              (let ((f (get #'self-insert-command 'delete-selection)))
+                ;; If `delete-selection' property of
+                ;; `self-insert-command' is one of the predefined
+                ;; special symbols, just return itself.
+                (if (memq f '(yank supersede kill t nil))
+                    ;; FIXME: if this list of special symbols is
+                    ;; extended in future delsel.el, this discrimination
+                    ;; will become wrong.
+                    f
+                  ;; Otherwise, call it as a function and return
+                  ;; its value.
+                  (funcall f)))))))
 
 (defun LaTeX-insert-corresponding-right-macro-and-brace
   (lmacro lbrace &optional optional prompt)
@@ -2955,26 +2973,26 @@ is nil, consult user which brace should be used."
   ;;      form "\(" or "\[".
   ;;  (3) a string in CARs of `LaTeX-left-right-macros-association'.
   (let ((rmacro (cdr (assoc lmacro LaTeX-left-right-macros-association)))
-       (rbrace (cdr (assoc lbrace TeX-braces-association))))
+        (rbrace (cdr (assoc lbrace TeX-braces-association))))
     ;; Since braces like "\(" and "\)" should be paired, RMACRO
     ;; should be considered as null string in the case (2).
     (if (string= lmacro "")
-       (setq rmacro ""))
+        (setq rmacro ""))
     ;; Insert right macros such as "\right", "\bigr" etc., if necessary.
     ;; Even single "\" will be inserted so that "\)" or "\]" is
     ;; inserted after "\(", "\[".
     (if rmacro
-       (insert TeX-esc rmacro))
+        (insert TeX-esc rmacro))
     (cond
      ((and TeX-arg-right-insert-p rbrace)
       (insert rbrace))
      (rmacro
       (insert (completing-read
-              (TeX-argument-prompt
-               optional prompt
-               (format "Which brace (default %s)"
-                       (or rbrace "."))) TeX-left-right-braces
-                       nil nil nil nil (or rbrace ".")))))))
+               (TeX-argument-prompt
+                optional prompt
+                (format "Which brace (default %s)"
+                        (or rbrace "."))) TeX-left-right-braces
+                        nil nil nil nil (or rbrace ".")))))))
 
 (defun LaTeX--find-preceding-left-macro-name ()
   "Return the left macro name just before the point, if any.
@@ -2989,17 +3007,17 @@ If the point is just after unescaped `TeX-esc', return 
the null string."
   ;; {blah blah blah}-!- => nil
   ;; \\-!- => nil
   (let ((name (buffer-substring-no-properties
-              (point)
-              ;; This is only a helper function, so we do not
-              ;; preserve point by save-excursion.
-              (progn
-                ;; Assume left macro names consist of only A-Z and a-z.
-                (skip-chars-backward "A-Za-z")
-                (point)))))
+               (point)
+               ;; This is only a helper function, so we do not
+               ;; preserve point by save-excursion.
+               (progn
+                 ;; Assume left macro names consist of only A-Z and a-z.
+                 (skip-chars-backward "A-Za-z")
+                 (point)))))
     (if (and (TeX-escaped-p)
-            (or (string= name "")
-                (assoc name LaTeX-left-right-macros-association)))
-       name)))
+             (or (string= name "")
+                 (assoc name LaTeX-left-right-macros-association)))
+        name)))
 (define-obsolete-function-alias
   'LaTeX-find-preceeding-left-macro-name
   #'LaTeX--find-preceding-left-macro-name "AUCTeX 12.2"
@@ -3010,8 +3028,8 @@ If the point is just after unescaped `TeX-esc', return 
the null string."
 If nil, do not prompt at all."
   :group 'LaTeX-macro
   :type '(choice (const :tag "User name in Emacs" user-full-name)
-                (const :tag "Do not prompt" nil)
-                string))
+                 (const :tag "Do not prompt" nil)
+                 string))
 
 (defun LaTeX-arg-author (optional &optional prompt)
   "Prompt for author name.
@@ -3019,12 +3037,12 @@ Insert the given value as a TeX macro argument.  If 
OPTIONAL is
 non-nil, insert it as an optional argument.  Use PROMPT as the
 prompt string.  `LaTeX-default-author' is the initial input."
   (let ((author (if LaTeX-default-author
-                   (TeX-read-string
-                    (TeX-argument-prompt optional prompt "Author(s)")
-                    (if (symbolp LaTeX-default-author)
-                        (symbol-value LaTeX-default-author)
-                      LaTeX-default-author))
-                 "")))
+                    (TeX-read-string
+                     (TeX-argument-prompt optional prompt "Author(s)")
+                     (if (symbolp LaTeX-default-author)
+                         (symbol-value LaTeX-default-author)
+                       LaTeX-default-author))
+                  "")))
     (TeX-argument-insert author optional nil)))
 
 (defun TeX-read-key-val (optional key-val-alist &optional prompt)
@@ -3130,17 +3148,17 @@ values of the variable `LaTeX-verbatim-environments' as 
well.")
 (defun LaTeX-verbatim-macros-with-delims ()
   "Return list of verbatim macros with delimiters."
   (append LaTeX-verbatim-macros-with-delims
-         LaTeX-verbatim-macros-with-delims-local))
+          LaTeX-verbatim-macros-with-delims-local))
 
 (defun LaTeX-verbatim-macros-with-braces ()
   "Return list of verbatim macros with braces."
   (append LaTeX-verbatim-macros-with-braces
-         LaTeX-verbatim-macros-with-braces-local))
+          LaTeX-verbatim-macros-with-braces-local))
 
 (defun LaTeX-verbatim-environments ()
   "Return list of verbatim environments."
   (append LaTeX-verbatim-environments
-         LaTeX-verbatim-environments-local))
+          LaTeX-verbatim-environments-local))
 
 (defun LaTeX-verbatim-macro-boundaries ()
   "Return boundaries of verbatim macro.
@@ -3151,57 +3169,57 @@ Only macros which enclose their arguments with special
 non-parenthetical delimiters, like \\verb+foo+, are recognized."
   (save-excursion
     (let ((orig (point))
-         (verbatim-regexp (regexp-opt (LaTeX-verbatim-macros-with-delims) t)))
+          (verbatim-regexp (regexp-opt (LaTeX-verbatim-macros-with-delims) t)))
       ;; Search backwards for the macro start, unless we are facing one
       (unless (looking-at (concat (regexp-quote TeX-esc) verbatim-regexp))
-       (catch 'found
-         (while (progn
-                  (skip-chars-backward (concat "^\n" (regexp-quote TeX-esc))
-                                       (line-beginning-position))
-                  (when (looking-at verbatim-regexp) (throw 'found nil))
-                  (or (bobp) (forward-char -1))
-                  (/= (point) (line-beginning-position))))))
+        (catch 'found
+          (while (progn
+                   (skip-chars-backward (concat "^\n" (regexp-quote TeX-esc))
+                                        (line-beginning-position))
+                   (when (looking-at verbatim-regexp) (throw 'found nil))
+                   (or (bobp) (forward-char -1))
+                   (/= (point) (line-beginning-position))))))
       ;; Search forward for the macro end, unless we failed to find a start
       (unless (bolp)
-       (let* ((beg (1- (point)))
-              (macro-end (match-end 0))
-              ;; XXX: Here we assume we are dealing with \verb which
-              ;; expects the delimiter right behind the command.
-              ;; However, \lstinline can also cope with whitespace as
-              ;; well as an optional argument after the command.
-              (delimiter (buffer-substring-no-properties
-                          macro-end (1+ macro-end))))
-         ;; Heuristic: If an opening brace is encountered, search for
-         ;; both the opening and the closing brace as an end marker.
-         ;; Like that the function should work for \verb|...| as well
-         ;; as for \url{...}.
-         (when (string= delimiter TeX-grop)
-           (setq delimiter (concat delimiter TeX-grcl)))
-         (goto-char (1+ macro-end))
-         (skip-chars-forward (concat "^" delimiter))
-         (when (<= orig (point))
-           (cons beg (1+ (point)))))))))
+        (let* ((beg (1- (point)))
+               (macro-end (match-end 0))
+               ;; XXX: Here we assume we are dealing with \verb which
+               ;; expects the delimiter right behind the command.
+               ;; However, \lstinline can also cope with whitespace as
+               ;; well as an optional argument after the command.
+               (delimiter (buffer-substring-no-properties
+                           macro-end (1+ macro-end))))
+          ;; Heuristic: If an opening brace is encountered, search for
+          ;; both the opening and the closing brace as an end marker.
+          ;; Like that the function should work for \verb|...| as well
+          ;; as for \url{...}.
+          (when (string= delimiter TeX-grop)
+            (setq delimiter (concat delimiter TeX-grcl)))
+          (goto-char (1+ macro-end))
+          (skip-chars-forward (concat "^" delimiter))
+          (when (<= orig (point))
+            (cons beg (1+ (point)))))))))
 
 (defun LaTeX-current-verbatim-macro ()
   "Return name of verbatim macro containing point, nil if none is present."
   (let ((macro-boundaries (LaTeX-verbatim-macro-boundaries)))
     (when macro-boundaries
       (save-excursion
-       (goto-char (car macro-boundaries))
-       (forward-char (length TeX-esc))
-       (buffer-substring-no-properties
-        (point) (progn (skip-chars-forward "@A-Za-z") (point)))))))
+        (goto-char (car macro-boundaries))
+        (forward-char (length TeX-esc))
+        (buffer-substring-no-properties
+         (point) (progn (skip-chars-forward "@A-Za-z") (point)))))))
 
 (defun LaTeX-verbatim-p (&optional pos)
   "Return non-nil if position POS is in a verbatim-like construct."
   (when pos (goto-char pos))
   (save-match-data
     (or (when (fboundp 'font-latex-faces-present-p)
-         (font-latex-faces-present-p 'font-latex-verbatim-face))
-       (member (LaTeX-current-verbatim-macro)
-               (LaTeX-verbatim-macros-with-delims))
-       (member (TeX-current-macro) (LaTeX-verbatim-macros-with-braces))
-       (member (LaTeX-current-environment) (LaTeX-verbatim-environments)))))
+          (font-latex-faces-present-p 'font-latex-verbatim-face))
+        (member (LaTeX-current-verbatim-macro)
+                (LaTeX-verbatim-macros-with-delims))
+        (member (TeX-current-macro) (LaTeX-verbatim-macros-with-braces))
+        (member (LaTeX-current-environment) (LaTeX-verbatim-environments)))))
 
 
 ;;; Formatting
@@ -3301,7 +3319,7 @@ Environments present in this list are not filled by 
filling
 functions, see `LaTeX-fill-region-as-paragraph'."
   :group 'LaTeX-indentation
   :type '(repeat (list (string :tag "Environment")
-                      (option function))))
+                       (option function))))
 
 (defcustom LaTeX-indent-environment-check t
   "If non-nil, check for any special environments."
@@ -3318,7 +3336,7 @@ functions, see `LaTeX-fill-region-as-paragraph'."
   :group 'LaTeX-indentation
   :type 'regexp)
 (make-obsolete-variable 'LaTeX-verbatim-regexp 
'LaTeX-verbatim-environments-local
-                       "2014-12-19")
+                        "2014-12-19")
 
 (defcustom LaTeX-begin-regexp "begin\\b\\|\\["
   "Regexp matching macros considered begins."
@@ -3349,9 +3367,9 @@ value."
 
 (defvar docTeX-indent-inner-fixed
   `((,(concat (regexp-quote TeX-esc)
-            "\\(begin\\|end\\)[ \t]*{macrocode\\*?}") 4 t)
+             "\\(begin\\|end\\)[ \t]*{macrocode\\*?}") 4 t)
     (,(concat (regexp-quote TeX-esc)
-            "\\(begin\\|end\\)[ \t]*{\\(macro\\|environment\\)\\*?}") 0 nil))
+             "\\(begin\\|end\\)[ \t]*{\\(macro\\|environment\\)\\*?}") 0 nil))
   "List of items which should have a fixed inner indentation.
 The items consist of three parts.  The first is a regular
 expression which should match the respective string.  The second
@@ -3367,45 +3385,45 @@ Lines starting with an item is given an extra 
indentation of
 `LaTeX-item-indent'."
   (interactive)
   (let* ((case-fold-search nil)
-        ;; Compute a fill prefix.  Whitespace after the comment
-        ;; characters will be disregarded and replaced by
-        ;; `comment-padding'.
-        (fill-prefix
-         (and (TeX-in-commented-line)
-              (save-excursion
-                (beginning-of-line)
-                (looking-at
-                 (concat "\\([ \t]*" TeX-comment-start-regexp "+\\)+"))
-                (concat (match-string 0) (TeX-comment-padding-string))))))
+         ;; Compute a fill prefix.  Whitespace after the comment
+         ;; characters will be disregarded and replaced by
+         ;; `comment-padding'.
+         (fill-prefix
+          (and (TeX-in-commented-line)
+               (save-excursion
+                 (beginning-of-line)
+                 (looking-at
+                  (concat "\\([ \t]*" TeX-comment-start-regexp "+\\)+"))
+                 (concat (match-string 0) (TeX-comment-padding-string))))))
     (save-excursion
       (cond ((and fill-prefix
-                 (TeX-in-line-comment)
-                 (eq major-mode 'doctex-mode))
-            ;; If point is in a line comment in `doctex-mode' we only
-            ;; consider the inner indentation.
-            (let ((inner-indent (LaTeX-indent-calculate 'inner)))
-              (when (/= (LaTeX-current-indentation 'inner) inner-indent)
-                (LaTeX-indent-inner-do inner-indent))))
-           ((and fill-prefix
-                 LaTeX-syntactic-comments)
-            ;; In any other case of a comment we have to consider
-            ;; outer and inner indentation if we do syntax-aware
-            ;; indentation.
-            (let ((inner-indent (LaTeX-indent-calculate 'inner))
-                  (outer-indent (LaTeX-indent-calculate 'outer)))
-              (when (/= (LaTeX-current-indentation 'inner) inner-indent)
-                  (LaTeX-indent-inner-do inner-indent))
-              (when (/= (LaTeX-current-indentation 'outer) outer-indent)
-                  (LaTeX-indent-outer-do outer-indent))))
-           (t
-            ;; The default is to adapt whitespace before any
-            ;; non-whitespace character, i.e. to do outer
-            ;; indentation.
-            (let ((outer-indent (LaTeX-indent-calculate 'outer)))
-              (when (/= (LaTeX-current-indentation 'outer) outer-indent)
-                  (LaTeX-indent-outer-do outer-indent))))))
+                  (TeX-in-line-comment)
+                  (eq major-mode 'doctex-mode))
+             ;; If point is in a line comment in `doctex-mode' we only
+             ;; consider the inner indentation.
+             (let ((inner-indent (LaTeX-indent-calculate 'inner)))
+               (when (/= (LaTeX-current-indentation 'inner) inner-indent)
+                 (LaTeX-indent-inner-do inner-indent))))
+            ((and fill-prefix
+                  LaTeX-syntactic-comments)
+             ;; In any other case of a comment we have to consider
+             ;; outer and inner indentation if we do syntax-aware
+             ;; indentation.
+             (let ((inner-indent (LaTeX-indent-calculate 'inner))
+                   (outer-indent (LaTeX-indent-calculate 'outer)))
+               (when (/= (LaTeX-current-indentation 'inner) inner-indent)
+                   (LaTeX-indent-inner-do inner-indent))
+               (when (/= (LaTeX-current-indentation 'outer) outer-indent)
+                   (LaTeX-indent-outer-do outer-indent))))
+            (t
+             ;; The default is to adapt whitespace before any
+             ;; non-whitespace character, i.e. to do outer
+             ;; indentation.
+             (let ((outer-indent (LaTeX-indent-calculate 'outer)))
+               (when (/= (LaTeX-current-indentation 'outer) outer-indent)
+                   (LaTeX-indent-outer-do outer-indent))))))
     (when (< (current-column) (save-excursion
-                               (LaTeX-back-to-indentation) (current-column)))
+                                (LaTeX-back-to-indentation) (current-column)))
       (LaTeX-back-to-indentation))))
 
 (defun LaTeX-indent-inner-do (inner-indent)
@@ -3442,63 +3460,63 @@ outer indentation in case of a commented line.  The 
symbols
   (save-excursion
     (LaTeX-back-to-indentation force-type)
     (let ((i 0)
-         (list-length (safe-length docTeX-indent-inner-fixed))
-         (case-fold-search nil)
-         entry
-         found)
+          (list-length (safe-length docTeX-indent-inner-fixed))
+          (case-fold-search nil)
+          entry
+          found)
       (cond ((save-excursion (beginning-of-line) (bobp)) 0)
-           ((and (eq major-mode 'doctex-mode)
-                 fill-prefix
-                 (TeX-in-line-comment)
-                 (progn
-                   (while (and (< i list-length)
-                               (not found))
-                     (setq entry (nth i docTeX-indent-inner-fixed))
-                     (when (looking-at (nth 0 entry))
-                       (setq found t))
-                     (setq i (1+ i)))
-                   found))
-            (if (nth 2 entry)
-                (- (nth 1 entry) (if (integerp comment-padding)
-                                     comment-padding
-                                   (length comment-padding)))
-              (nth 1 entry)))
-           ((looking-at (concat (regexp-quote TeX-esc)
-                                "\\(begin\\|end\\){\\("
-                                (LaTeX-verbatim-regexp)
-                                "\\)}"))
-            ;; \end{verbatim} must be flush left, otherwise an unwanted
-            ;; empty line appears in LaTeX's output.
-            0)
-           ((and LaTeX-indent-environment-check
-                 ;; Special environments.
-                 (let ((entry (assoc (or LaTeX-current-environment
-                                         (LaTeX-current-environment))
-                                     LaTeX-indent-environment-list)))
-                   (and entry
-                        (nth 1 entry)
-                        (funcall (nth 1 entry))))))
-           ((looking-at (concat (regexp-quote TeX-esc)
-                                "\\("
-                                LaTeX-end-regexp
-                                "\\)"))
-            ;; Backindent at \end.
-            (- (LaTeX-indent-calculate-last force-type) LaTeX-indent-level))
-           ((looking-at (concat (regexp-quote TeX-esc) "right\\b"))
-            ;; Backindent at \right.
-            (- (LaTeX-indent-calculate-last force-type)
-               LaTeX-left-right-indent-level))
-           ((looking-at (concat (regexp-quote TeX-esc)
-                                "\\("
-                                LaTeX-item-regexp
-                                "\\)"))
-            ;; Items.
-            (+ (LaTeX-indent-calculate-last force-type) LaTeX-item-indent))
-           ((looking-at "}")
-            ;; End brace in the start of the line.
-            (- (LaTeX-indent-calculate-last force-type)
-               TeX-brace-indent-level))
-           (t (LaTeX-indent-calculate-last force-type))))))
+            ((and (eq major-mode 'doctex-mode)
+                  fill-prefix
+                  (TeX-in-line-comment)
+                  (progn
+                    (while (and (< i list-length)
+                                (not found))
+                      (setq entry (nth i docTeX-indent-inner-fixed))
+                      (when (looking-at (nth 0 entry))
+                        (setq found t))
+                      (setq i (1+ i)))
+                    found))
+             (if (nth 2 entry)
+                 (- (nth 1 entry) (if (integerp comment-padding)
+                                      comment-padding
+                                    (length comment-padding)))
+               (nth 1 entry)))
+            ((looking-at (concat (regexp-quote TeX-esc)
+                                 "\\(begin\\|end\\){\\("
+                                 (LaTeX-verbatim-regexp)
+                                 "\\)}"))
+             ;; \end{verbatim} must be flush left, otherwise an unwanted
+             ;; empty line appears in LaTeX's output.
+             0)
+            ((and LaTeX-indent-environment-check
+                  ;; Special environments.
+                  (let ((entry (assoc (or LaTeX-current-environment
+                                          (LaTeX-current-environment))
+                                      LaTeX-indent-environment-list)))
+                    (and entry
+                         (nth 1 entry)
+                         (funcall (nth 1 entry))))))
+            ((looking-at (concat (regexp-quote TeX-esc)
+                                 "\\("
+                                 LaTeX-end-regexp
+                                 "\\)"))
+             ;; Backindent at \end.
+             (- (LaTeX-indent-calculate-last force-type) LaTeX-indent-level))
+            ((looking-at (concat (regexp-quote TeX-esc) "right\\b"))
+             ;; Backindent at \right.
+             (- (LaTeX-indent-calculate-last force-type)
+                LaTeX-left-right-indent-level))
+            ((looking-at (concat (regexp-quote TeX-esc)
+                                 "\\("
+                                 LaTeX-item-regexp
+                                 "\\)"))
+             ;; Items.
+             (+ (LaTeX-indent-calculate-last force-type) LaTeX-item-indent))
+            ((looking-at "}")
+             ;; End brace in the start of the line.
+             (- (LaTeX-indent-calculate-last force-type)
+                TeX-brace-indent-level))
+            (t (LaTeX-indent-calculate-last force-type))))))
 
 (defun LaTeX-indent-level-count ()
   "Count indentation change caused by all \\left, \\right, \\begin, and
@@ -3506,27 +3524,27 @@ outer indentation in case of a commented line.  The 
symbols
   (save-excursion
     (save-restriction
       (let ((count 0))
-       (narrow-to-region (point)
-                         (save-excursion
-                           (re-search-forward
-                            (concat "[^" TeX-esc "]"
-                                    "\\(" LaTeX-indent-comment-start-regexp
-                                    "\\)\\|\n\\|\\'"))
-                           (backward-char)
-                           (point)))
-       (while (search-forward TeX-esc nil t)
-         (cond
-          ((looking-at "left\\b")
-           (setq count (+ count LaTeX-left-right-indent-level)))
-          ((looking-at "right\\b")
-           (setq count (- count LaTeX-left-right-indent-level)))
-          ((looking-at LaTeX-begin-regexp)
-           (setq count (+ count LaTeX-indent-level)))
-          ((looking-at LaTeX-end-regexp)
-           (setq count (- count LaTeX-indent-level)))
-          ((looking-at (regexp-quote TeX-esc))
-           (forward-char 1))))
-       count))))
+        (narrow-to-region (point)
+                          (save-excursion
+                            (re-search-forward
+                             (concat "[^" TeX-esc "]"
+                                     "\\(" LaTeX-indent-comment-start-regexp
+                                     "\\)\\|\n\\|\\'"))
+                            (backward-char)
+                            (point)))
+        (while (search-forward TeX-esc nil t)
+          (cond
+           ((looking-at "left\\b")
+            (setq count (+ count LaTeX-left-right-indent-level)))
+           ((looking-at "right\\b")
+            (setq count (- count LaTeX-left-right-indent-level)))
+           ((looking-at LaTeX-begin-regexp)
+            (setq count (+ count LaTeX-indent-level)))
+           ((looking-at LaTeX-end-regexp)
+            (setq count (- count LaTeX-indent-level)))
+           ((looking-at (regexp-quote TeX-esc))
+            (forward-char 1))))
+        count))))
 
 (defun LaTeX-indent-calculate-last (&optional force-type)
   "Return the correct indentation of a normal line of text.
@@ -3535,14 +3553,14 @@ FORCE-TYPE can be used to force the calculation of an 
inner or
 outer indentation in case of a commented line.  The symbols
 'inner and 'outer are recognized."
   (let (line-comment-current-flag
-       line-comment-last-flag
-       comment-current-flag
-       comment-last-flag)
+        line-comment-last-flag
+        comment-current-flag
+        comment-last-flag)
     (beginning-of-line)
     (setq line-comment-current-flag (TeX-in-line-comment)
-         comment-current-flag (TeX-in-commented-line))
+          comment-current-flag (TeX-in-commented-line))
     (if comment-current-flag
-       (skip-chars-backward "%\n\t ")
+        (skip-chars-backward "%\n\t ")
       (skip-chars-backward "\n\t "))
     (beginning-of-line)
     ;; If we are called in a non-comment line, skip over comment
@@ -3554,88 +3572,88 @@ outer indentation in case of a commented line.  The 
symbols
     ;; and indentation should not be influenced by unrelated code in
     ;; other macrocode environments.
     (while (and (not (eq major-mode 'doctex-mode))
-               (not comment-current-flag)
-               (TeX-in-commented-line)
-               (not (bobp)))
+                (not comment-current-flag)
+                (TeX-in-commented-line)
+                (not (bobp)))
       (skip-chars-backward "\n\t ")
       (beginning-of-line))
     (setq line-comment-last-flag (TeX-in-line-comment)
-         comment-last-flag (TeX-in-commented-line))
+          comment-last-flag (TeX-in-commented-line))
     (LaTeX-back-to-indentation force-type)
     ;; Separate line comments and other stuff (normal text/code and
     ;; code comments).  Additionally we don't want to compute inner
     ;; indentation when a commented and a non-commented line are
     ;; compared.
     (cond ((or (and (eq major-mode 'doctex-mode)
-                   (or (and line-comment-current-flag
-                            (not line-comment-last-flag))
-                       (and (not line-comment-current-flag)
-                            line-comment-last-flag)))
-              (and force-type
-                   (eq force-type 'inner)
-                   (or (and comment-current-flag
-                            (not comment-last-flag))
-                       (and (not comment-current-flag)
-                            comment-last-flag))))
-          0)
-         ((looking-at (concat (regexp-quote TeX-esc)
-                              "begin *{\\("
-                              LaTeX-document-regexp
-                              "\\)}"))
-          ;; I dislike having all of the document indented...
-          (+ (LaTeX-current-indentation force-type)
-             ;; Some people have opening braces at the end of the
-             ;; line, e.g. in case of `\begin{letter}{%'.
-             (TeX-brace-count-line)))
-         ((and (eq major-mode 'doctex-mode)
-               (looking-at (concat (regexp-quote TeX-esc)
-                                   "end[ \t]*{macrocode\\*?}"))
-               fill-prefix
-               (TeX-in-line-comment))
-          ;; Reset indentation to zero after a macrocode
-          ;; environment.
-          0)
-         ((looking-at (concat (regexp-quote TeX-esc)
-                              "begin *{\\("
-                              (LaTeX-verbatim-regexp)
-                              "\\)}"))
-          0)
-         ((looking-at (concat (regexp-quote TeX-esc)
-                              "end *{\\("
-                              (LaTeX-verbatim-regexp)
-                              "\\)}"))
-          ;; If I see an \end{verbatim} in the previous line I skip
-          ;; back to the preceding \begin{verbatim}.
-          (save-excursion
-            (if (re-search-backward (concat (regexp-quote TeX-esc)
-                                            "begin *{\\("
-                                            (LaTeX-verbatim-regexp)
-                                            "\\)}") 0 t)
-                (LaTeX-indent-calculate-last force-type)
-              0)))
-         (t (+ (LaTeX-current-indentation force-type)
-               (if (not (and force-type
-                             (eq force-type 'outer)
-                             (TeX-in-commented-line)))
-                   (+ (LaTeX-indent-level-count)
-                      (TeX-brace-count-line))
-                 0)
-               (cond ((looking-at (concat (regexp-quote TeX-esc)
-                                          "\\("
-                                          LaTeX-end-regexp
-                                          "\\)"))
-                      LaTeX-indent-level)
-                     ((looking-at
-                       (concat (regexp-quote TeX-esc) "right\\b"))
-                      LaTeX-left-right-indent-level)
-                     ((looking-at (concat (regexp-quote TeX-esc)
-                                          "\\("
-                                          LaTeX-item-regexp
-                                          "\\)"))
-                      (- LaTeX-item-indent))
-                     ((looking-at "}")
-                      TeX-brace-indent-level)
-                     (t 0)))))))
+                    (or (and line-comment-current-flag
+                             (not line-comment-last-flag))
+                        (and (not line-comment-current-flag)
+                             line-comment-last-flag)))
+               (and force-type
+                    (eq force-type 'inner)
+                    (or (and comment-current-flag
+                             (not comment-last-flag))
+                        (and (not comment-current-flag)
+                             comment-last-flag))))
+           0)
+          ((looking-at (concat (regexp-quote TeX-esc)
+                               "begin *{\\("
+                               LaTeX-document-regexp
+                               "\\)}"))
+           ;; I dislike having all of the document indented...
+           (+ (LaTeX-current-indentation force-type)
+              ;; Some people have opening braces at the end of the
+              ;; line, e.g. in case of `\begin{letter}{%'.
+              (TeX-brace-count-line)))
+          ((and (eq major-mode 'doctex-mode)
+                (looking-at (concat (regexp-quote TeX-esc)
+                                    "end[ \t]*{macrocode\\*?}"))
+                fill-prefix
+                (TeX-in-line-comment))
+           ;; Reset indentation to zero after a macrocode
+           ;; environment.
+           0)
+          ((looking-at (concat (regexp-quote TeX-esc)
+                               "begin *{\\("
+                               (LaTeX-verbatim-regexp)
+                               "\\)}"))
+           0)
+          ((looking-at (concat (regexp-quote TeX-esc)
+                               "end *{\\("
+                               (LaTeX-verbatim-regexp)
+                               "\\)}"))
+           ;; If I see an \end{verbatim} in the previous line I skip
+           ;; back to the preceding \begin{verbatim}.
+           (save-excursion
+             (if (re-search-backward (concat (regexp-quote TeX-esc)
+                                             "begin *{\\("
+                                             (LaTeX-verbatim-regexp)
+                                             "\\)}") 0 t)
+                 (LaTeX-indent-calculate-last force-type)
+               0)))
+          (t (+ (LaTeX-current-indentation force-type)
+                (if (not (and force-type
+                              (eq force-type 'outer)
+                              (TeX-in-commented-line)))
+                    (+ (LaTeX-indent-level-count)
+                       (TeX-brace-count-line))
+                  0)
+                (cond ((looking-at (concat (regexp-quote TeX-esc)
+                                           "\\("
+                                           LaTeX-end-regexp
+                                           "\\)"))
+                       LaTeX-indent-level)
+                      ((looking-at
+                        (concat (regexp-quote TeX-esc) "right\\b"))
+                       LaTeX-left-right-indent-level)
+                      ((looking-at (concat (regexp-quote TeX-esc)
+                                           "\\("
+                                           LaTeX-item-regexp
+                                           "\\)"))
+                       (- LaTeX-item-indent))
+                      ((looking-at "}")
+                       TeX-brace-indent-level)
+                      (t 0)))))))
 
 (defun LaTeX-current-indentation (&optional force-type)
   "Return the indentation of a line.
@@ -3643,24 +3661,24 @@ FORCE-TYPE can be used to force the calculation of an 
inner or
 outer indentation in case of a commented line.  The symbols
 'inner and 'outer are recognized."
   (if (and fill-prefix
-          (or (and force-type
-                   (eq force-type 'inner))
-              (and (not force-type)
-                   (or
-                    ;; If `LaTeX-syntactic-comments' is not enabled,
-                    ;; do conventional indentation
-                    LaTeX-syntactic-comments
-                    ;; Line comments in `doctex-mode' are always
-                    ;; indented syntax-aware so we need their inner
-                    ;; indentation.
-                    (and (TeX-in-line-comment)
-                         (eq major-mode 'doctex-mode))))))
+           (or (and force-type
+                    (eq force-type 'inner))
+               (and (not force-type)
+                    (or
+                     ;; If `LaTeX-syntactic-comments' is not enabled,
+                     ;; do conventional indentation
+                     LaTeX-syntactic-comments
+                     ;; Line comments in `doctex-mode' are always
+                     ;; indented syntax-aware so we need their inner
+                     ;; indentation.
+                     (and (TeX-in-line-comment)
+                          (eq major-mode 'doctex-mode))))))
       ;; INNER indentation
       (save-excursion
-       (beginning-of-line)
-       (looking-at (concat "\\(?:[ \t]*" TeX-comment-start-regexp "+\\)+"
-                           "\\([ \t]*\\)"))
-       (- (length (match-string 1)) (length (TeX-comment-padding-string))))
+        (beginning-of-line)
+        (looking-at (concat "\\(?:[ \t]*" TeX-comment-start-regexp "+\\)+"
+                            "\\([ \t]*\\)"))
+        (- (length (match-string 1)) (length (TeX-comment-padding-string))))
     ;; OUTER indentation
     (current-indentation)))
 
@@ -3673,18 +3691,18 @@ force point being moved to the inner or outer 
indentation in case
 of a commented line.  The symbols 'inner and 'outer are
 recognized."
   (if (or (and force-type
-              (eq force-type 'inner))
-         (and (not force-type)
-              (or (and (TeX-in-line-comment)
-                       (eq major-mode 'doctex-mode))
-                  (and (TeX-in-commented-line)
-                       LaTeX-syntactic-comments))))
+               (eq force-type 'inner))
+          (and (not force-type)
+               (or (and (TeX-in-line-comment)
+                        (eq major-mode 'doctex-mode))
+                   (and (TeX-in-commented-line)
+                        LaTeX-syntactic-comments))))
       (progn
-       (beginning-of-line)
-       ;; Should this be anchored at the start of the line?
-       (TeX-re-search-forward-unescaped
-        (concat "\\(?:" TeX-comment-start-regexp "+[ \t]*\\)+")
-        (line-end-position) t))
+        (beginning-of-line)
+        ;; Should this be anchored at the start of the line?
+        (TeX-re-search-forward-unescaped
+         (concat "\\(?:" TeX-comment-start-regexp "+[ \t]*\\)+")
+         (line-end-position) t))
     (back-to-indentation)))
 
 
@@ -3697,13 +3715,13 @@ recognized."
 break will be inserted if they do not fit into one line."
   :group 'LaTeX
   :type '(set :tag "Contents"
-             (const :tag "Opening Brace" \{)
-             (const :tag "Closing Brace" \})
-             (const :tag "Opening Bracket" \[)
-             (const :tag "Opening Inline Math Switches" \\\()
-             (const :tag "Closing Inline Math Switches" \\\))
-             (const :tag "Opening Display Math Switch" \\\[)
-             (const :tag "Closing Display Math Switch" \\\])))
+              (const :tag "Opening Brace" \{)
+              (const :tag "Closing Brace" \})
+              (const :tag "Opening Bracket" \[)
+              (const :tag "Opening Inline Math Switches" \\\()
+              (const :tag "Closing Inline Math Switches" \\\))
+              (const :tag "Opening Display Math Switch" \\\[)
+              (const :tag "Closing Display Math Switch" \\\])))
 
 (defcustom LaTeX-fill-break-before-code-comments t
   "If non-nil, a line with some code followed by a comment will
@@ -3739,70 +3757,70 @@ performed in that case."
   (interactive "*r\nP")
   (let ((end-marker (save-excursion (goto-char to) (point-marker))))
     (if (or (assoc (LaTeX-current-environment) LaTeX-indent-environment-list)
-           (member (TeX-current-macro) LaTeX-fill-excluded-macros)
-           ;; This could be generalized, if there are more cases where
-           ;; a special string at the start of a region to fill should
-           ;; inhibit filling.
-           (progn (save-excursion (goto-char from)
-                                  (looking-at (concat TeX-comment-start-regexp
-                                                      "+[ \t]*"
-                                                      "Local Variables:")))))
-       ;; Filling disabled, only do indentation.
-       (indent-region from to nil)
+            (member (TeX-current-macro) LaTeX-fill-excluded-macros)
+            ;; This could be generalized, if there are more cases where
+            ;; a special string at the start of a region to fill should
+            ;; inhibit filling.
+            (progn (save-excursion (goto-char from)
+                                   (looking-at (concat TeX-comment-start-regexp
+                                                       "+[ \t]*"
+                                                       "Local Variables:")))))
+        ;; Filling disabled, only do indentation.
+        (indent-region from to nil)
       (save-restriction
-       (goto-char from)
-       (while (< (point) end-marker)
-         (if (re-search-forward
-              (concat "\\("
-                      ;; Code comments.
-                      "[^\r\n%\\]\\([ \t]\\|\\\\\\\\\\)*"
-                      TeX-comment-start-regexp
-                      "\\|"
-                      ;; Lines ending with `\par'.
-                      "\\(\\=\\|[^" TeX-esc "\n]\\)\\("
-                      (regexp-quote (concat TeX-esc TeX-esc))
-                      "\\)*"
-                      (regexp-quote TeX-esc) "par[ \t]*"
-                      "\\({[ \t]*}\\)?[ \t]*$"
-                      "\\)\\|\\("
-                      ;; Lines ending with `\\'.
-                      (regexp-quote TeX-esc)
-                      (regexp-quote TeX-esc)
-                      "\\(\\s-*\\*\\)?"
-                      "\\(\\s-*\\[[^]]*\\]\\)?"
-                      "\\s-*$\\)")
-              end-marker t)
-             (progn
-               (goto-char (line-end-position))
-               (delete-horizontal-space)
-               ;; I doubt very much if we want justify -
-               ;; this is a line with \\
-               ;; if you think otherwise - uncomment the next line
-               ;; (and justify-flag (justify-current-line))
-               (forward-char)
-               ;; keep our position in a buffer
-               (save-excursion
-                 ;; Code comments and lines ending with `\par' are
-                 ;; included in filling.  Lines ending with `\\' are
-                 ;; skipped.
-                 (if (match-string 1)
-                     (LaTeX-fill-region-as-para-do from (point) justify-flag)
-                   (LaTeX-fill-region-as-para-do
-                    from (line-beginning-position 0) justify-flag)
-                   ;; At least indent the line ending with `\\'.
-                   (indent-according-to-mode)))
-               (setq from (point)))
-           ;; ELSE part follows - loop termination relies on a fact
-           ;; that (LaTeX-fill-region-as-para-do) moves point past
-           ;; the filled region
-           (LaTeX-fill-region-as-para-do from end-marker justify-flag)))))))
+        (goto-char from)
+        (while (< (point) end-marker)
+          (if (re-search-forward
+               (concat "\\("
+                       ;; Code comments.
+                       "[^\r\n%\\]\\([ \t]\\|\\\\\\\\\\)*"
+                       TeX-comment-start-regexp
+                       "\\|"
+                       ;; Lines ending with `\par'.
+                       "\\(\\=\\|[^" TeX-esc "\n]\\)\\("
+                       (regexp-quote (concat TeX-esc TeX-esc))
+                       "\\)*"
+                       (regexp-quote TeX-esc) "par[ \t]*"
+                       "\\({[ \t]*}\\)?[ \t]*$"
+                       "\\)\\|\\("
+                       ;; Lines ending with `\\'.
+                       (regexp-quote TeX-esc)
+                       (regexp-quote TeX-esc)
+                       "\\(\\s-*\\*\\)?"
+                       "\\(\\s-*\\[[^]]*\\]\\)?"
+                       "\\s-*$\\)")
+               end-marker t)
+              (progn
+                (goto-char (line-end-position))
+                (delete-horizontal-space)
+                ;; I doubt very much if we want justify -
+                ;; this is a line with \\
+                ;; if you think otherwise - uncomment the next line
+                ;; (and justify-flag (justify-current-line))
+                (forward-char)
+                ;; keep our position in a buffer
+                (save-excursion
+                  ;; Code comments and lines ending with `\par' are
+                  ;; included in filling.  Lines ending with `\\' are
+                  ;; skipped.
+                  (if (match-string 1)
+                      (LaTeX-fill-region-as-para-do from (point) justify-flag)
+                    (LaTeX-fill-region-as-para-do
+                     from (line-beginning-position 0) justify-flag)
+                    ;; At least indent the line ending with `\\'.
+                    (indent-according-to-mode)))
+                (setq from (point)))
+            ;; ELSE part follows - loop termination relies on a fact
+            ;; that (LaTeX-fill-region-as-para-do) moves point past
+            ;; the filled region
+            (LaTeX-fill-region-as-para-do from end-marker justify-flag)))))))
 
 ;; The content of `LaTeX-fill-region-as-para-do' was copied from the
 ;; function `fill-region-as-paragraph' in `fill.el' (CVS Emacs,
 ;; January 2004) and adapted to the needs of AUCTeX.
 
 (defun LaTeX-fill-region-as-para-do (from to &optional justify
-                                         nosqueeze squeeze-after)
+                                          nosqueeze squeeze-after)
   "Fill the region defined by FROM and TO as one paragraph.
 It removes any paragraph breaks in the region and extra newlines at the end,
 indents and fills lines between the margins given by the
@@ -3823,9 +3841,9 @@ Return the `fill-prefix' used for filling.
 If `sentence-end-double-space' is non-nil, then period followed by one
 space does not end a sentence, so don't break a line there."
   (interactive (progn
-                (barf-if-buffer-read-only)
-                (list (region-beginning) (region-end)
-                      (if current-prefix-arg 'full))))
+                 (barf-if-buffer-read-only)
+                 (list (region-beginning) (region-end)
+                       (if current-prefix-arg 'full))))
   (unless (memq justify '(t nil none full center left right))
     (setq justify 'full))
 
@@ -3836,7 +3854,7 @@ space does not end a sentence, so don't break a line 
there."
   (skip-chars-forward " \t\n")
 
   (let ((from-plus-indent (point))
-       (oneleft nil))
+        (oneleft nil))
 
     (beginning-of-line)
     (setq from (point))
@@ -3846,11 +3864,11 @@ space does not end a sentence, so don't break a line 
there."
     (goto-char to)
     (while (and (> (point) from) (eq ?\n (char-after (1- (point)))))
       (if (and oneleft
-              (not (and use-hard-newlines
-                        (get-text-property (1- (point)) 'hard))))
-         (delete-char -1)
-       (backward-char 1)
-       (setq oneleft t)))
+               (not (and use-hard-newlines
+                         (get-text-property (1- (point)) 'hard))))
+          (delete-char -1)
+        (backward-char 1)
+        (setq oneleft t)))
     (setq to (copy-marker (point) t))
     (goto-char from-plus-indent))
 
@@ -3863,124 +3881,124 @@ space does not end a sentence, so don't break a line 
there."
     (let ((fill-prefix fill-prefix))
       ;; Figure out how this paragraph is indented, if desired.
       (when (and adaptive-fill-mode
-                (or (null fill-prefix) (string= fill-prefix "")))
-       (setq fill-prefix (fill-context-prefix from to))
-       ;; Ignore a white-space only fill-prefix
-       ;; if we indent-according-to-mode.
-       (when (and fill-prefix fill-indent-according-to-mode
-                  (string-match "\\`[ \t]*\\'" fill-prefix))
-         (setq fill-prefix nil)))
+                 (or (null fill-prefix) (string= fill-prefix "")))
+        (setq fill-prefix (fill-context-prefix from to))
+        ;; Ignore a white-space only fill-prefix
+        ;; if we indent-according-to-mode.
+        (when (and fill-prefix fill-indent-according-to-mode
+                   (string-match "\\`[ \t]*\\'" fill-prefix))
+          (setq fill-prefix nil)))
 
       (goto-char from)
       (beginning-of-line)
 
-      (if (not justify)          ; filling disabled: just check indentation
-         (progn
-           (goto-char from)
-           (while (< (point) to)
-             (if (and (not (eolp))
-                      (< (LaTeX-current-indentation) (current-left-margin)))
-                 (fill-indent-to-left-margin))
-             (forward-line 1)))
-
-       (when use-hard-newlines
-         (remove-text-properties from to '(hard nil)))
-       ;; Make sure first line is indented (at least) to left margin...
-       (indent-according-to-mode)
-       ;; Delete the fill-prefix from every line.
-       (fill-delete-prefix from to fill-prefix)
-
-       (setq from (point))
-
-       ;; FROM, and point, are now before the text to fill,
-       ;; but after any fill prefix on the first line.
-
-       (fill-delete-newlines from to justify nosqueeze squeeze-after)
-
-       ;; This is the actual FILLING LOOP.
-       (goto-char from)
-       (let* (linebeg
-              (code-comment-start (save-excursion
-                                    (LaTeX-back-to-indentation)
-                                    (TeX-search-forward-comment-start
-                                     (line-end-position))))
-              (end-marker (save-excursion
-                            (goto-char (or code-comment-start to))
-                            (point-marker)))
-              (LaTeX-current-environment (LaTeX-current-environment)))
-         ;; Fill until point is greater than the end point.  If there
-         ;; is a code comment, use the code comment's start as a
-         ;; limit.
-         (while (and (< (point) (marker-position end-marker))
-                     (or (not code-comment-start)
-                         (and code-comment-start
-                              (> (- (marker-position end-marker)
-                                    (line-beginning-position))
-                                 fill-column))))
-           (setq linebeg (point))
-           (move-to-column (current-fill-column))
-           (if (when (< (point) (marker-position end-marker))
-                 ;; Find the position where we'll break the line.
-                 (forward-char 1)      ; Use an immediately following
-                                       ; space, if any.
-                 (LaTeX-fill-move-to-break-point linebeg)
-
-                 ;; Check again to see if we got to the end of
-                 ;; the paragraph.
-                 (skip-chars-forward " \t")
-                 (< (point) (marker-position end-marker)))
-               ;; Found a place to cut.
-               (progn
-                 (LaTeX-fill-newline)
-                 (when justify
-                   ;; Justify the line just ended, if desired.
-                   (save-excursion
-                     (forward-line -1)
-                     (justify-current-line justify nil t))))
-
-             (goto-char end-marker)
-             ;; Justify this last line, if desired.
-             (if justify (justify-current-line justify t t))))
-
-         ;; Fill a code comment if necessary.  (Enable this code if
-         ;; you want the comment part in lines with code comments to
-         ;; be filled.  Originally it was disabled because the
-         ;; indentation code indented the lines following the line
-         ;; with the code comment to the column of the comment
-         ;; starters.  That means, it would have looked like this:
-         ;; | code code code % comment
-         ;; |                % comment
-         ;; |                code code code
-         ;; This now (2005-07-29) is not the case anymore.  But as
-         ;; filling code comments like this would split a single
-         ;; paragraph into two separate ones, we still leave it
-         ;; disabled.  I leave the code here in case it is useful for
-         ;; somebody.
-         ;; (when (and code-comment-start
-         ;;            (> (- (line-end-position) (line-beginning-position))
-         ;;                  fill-column))
-         ;;   (LaTeX-fill-code-comment justify))
-
-         ;; The following is an alternative strategy to minimize the
-         ;; occurence of overfull lines with code comments.  A line
-         ;; will be broken before the last non-comment word if the
-         ;; code comment does not fit into the line.
-         (when (and LaTeX-fill-break-before-code-comments
-                    code-comment-start
-                    (> (- (line-end-position) (line-beginning-position))
-                       fill-column))
-           (beginning-of-line)
-           (goto-char end-marker)
-           (while (not (looking-at TeX-comment-start-regexp)) (forward-char))
-           (skip-chars-backward " \t")
-           (skip-chars-backward "^ \t\n")
-           (unless (or (bolp)
-                       ;; Comment starters and whitespace.
-                       (TeX-looking-at-backward
-                        (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)*"
-                                "[ \t]*")
-                        (line-beginning-position)))
-             (LaTeX-fill-newline)))))
+      (if (not justify)   ; filling disabled: just check indentation
+          (progn
+            (goto-char from)
+            (while (< (point) to)
+              (if (and (not (eolp))
+                       (< (LaTeX-current-indentation) (current-left-margin)))
+                  (fill-indent-to-left-margin))
+              (forward-line 1)))
+
+        (when use-hard-newlines
+          (remove-text-properties from to '(hard nil)))
+        ;; Make sure first line is indented (at least) to left margin...
+        (indent-according-to-mode)
+        ;; Delete the fill-prefix from every line.
+        (fill-delete-prefix from to fill-prefix)
+
+        (setq from (point))
+
+        ;; FROM, and point, are now before the text to fill,
+        ;; but after any fill prefix on the first line.
+
+        (fill-delete-newlines from to justify nosqueeze squeeze-after)
+
+        ;; This is the actual FILLING LOOP.
+        (goto-char from)
+        (let* (linebeg
+               (code-comment-start (save-excursion
+                                     (LaTeX-back-to-indentation)
+                                     (TeX-search-forward-comment-start
+                                      (line-end-position))))
+               (end-marker (save-excursion
+                             (goto-char (or code-comment-start to))
+                             (point-marker)))
+               (LaTeX-current-environment (LaTeX-current-environment)))
+          ;; Fill until point is greater than the end point.  If there
+          ;; is a code comment, use the code comment's start as a
+          ;; limit.
+          (while (and (< (point) (marker-position end-marker))
+                      (or (not code-comment-start)
+                          (and code-comment-start
+                               (> (- (marker-position end-marker)
+                                     (line-beginning-position))
+                                  fill-column))))
+            (setq linebeg (point))
+            (move-to-column (current-fill-column))
+            (if (when (< (point) (marker-position end-marker))
+                  ;; Find the position where we'll break the line.
+                  (forward-char 1)      ; Use an immediately following
+                                        ; space, if any.
+                  (LaTeX-fill-move-to-break-point linebeg)
+
+                  ;; Check again to see if we got to the end of
+                  ;; the paragraph.
+                  (skip-chars-forward " \t")
+                  (< (point) (marker-position end-marker)))
+                ;; Found a place to cut.
+                (progn
+                  (LaTeX-fill-newline)
+                  (when justify
+                    ;; Justify the line just ended, if desired.
+                    (save-excursion
+                      (forward-line -1)
+                      (justify-current-line justify nil t))))
+
+              (goto-char end-marker)
+              ;; Justify this last line, if desired.
+              (if justify (justify-current-line justify t t))))
+
+          ;; Fill a code comment if necessary.  (Enable this code if
+          ;; you want the comment part in lines with code comments to
+          ;; be filled.  Originally it was disabled because the
+          ;; indentation code indented the lines following the line
+          ;; with the code comment to the column of the comment
+          ;; starters.  That means, it would have looked like this:
+          ;; | code code code % comment
+          ;; |                % comment
+          ;; |                code code code
+          ;; This now (2005-07-29) is not the case anymore.  But as
+          ;; filling code comments like this would split a single
+          ;; paragraph into two separate ones, we still leave it
+          ;; disabled.  I leave the code here in case it is useful for
+          ;; somebody.
+          ;; (when (and code-comment-start
+          ;;            (> (- (line-end-position) (line-beginning-position))
+          ;;                  fill-column))
+          ;;   (LaTeX-fill-code-comment justify))
+
+          ;; The following is an alternative strategy to minimize the
+          ;; occurence of overfull lines with code comments.  A line
+          ;; will be broken before the last non-comment word if the
+          ;; code comment does not fit into the line.
+          (when (and LaTeX-fill-break-before-code-comments
+                     code-comment-start
+                     (> (- (line-end-position) (line-beginning-position))
+                        fill-column))
+            (beginning-of-line)
+            (goto-char end-marker)
+            (while (not (looking-at TeX-comment-start-regexp)) (forward-char))
+            (skip-chars-backward " \t")
+            (skip-chars-backward "^ \t\n")
+            (unless (or (bolp)
+                        ;; Comment starters and whitespace.
+                        (TeX-looking-at-backward
+                         (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)*"
+                                 "[ \t]*")
+                         (line-beginning-position)))
+              (LaTeX-fill-newline)))))
       ;; Leave point after final newline.
       (goto-char to)
       (unless (eobp) (forward-char 1))
@@ -3992,28 +4010,28 @@ space does not end a sentence, so don't break a line 
there."
   (fill-move-to-break-point linebeg)
   ;; Prevent line break between 2-byte char and 1-byte char.
   (when (and (featurep 'mule)
-            enable-multibyte-characters
-            (or (and (not (looking-at LaTeX-nospace-between-char-regexp))
-                     (TeX-looking-at-backward
-                      LaTeX-nospace-between-char-regexp 1))
-                (and (not (TeX-looking-at-backward
-                           LaTeX-nospace-between-char-regexp 1))
-                     (looking-at LaTeX-nospace-between-char-regexp)))
-            (re-search-backward
-             (concat LaTeX-nospace-between-char-regexp
-                     LaTeX-nospace-between-char-regexp
-                     LaTeX-nospace-between-char-regexp
-                     "\\|"
-                     ".\\ca\\s +\\ca") linebeg t))
+             enable-multibyte-characters
+             (or (and (not (looking-at LaTeX-nospace-between-char-regexp))
+                      (TeX-looking-at-backward
+                       LaTeX-nospace-between-char-regexp 1))
+                 (and (not (TeX-looking-at-backward
+                            LaTeX-nospace-between-char-regexp 1))
+                      (looking-at LaTeX-nospace-between-char-regexp)))
+             (re-search-backward
+              (concat LaTeX-nospace-between-char-regexp
+                      LaTeX-nospace-between-char-regexp
+                      LaTeX-nospace-between-char-regexp
+                      "\\|"
+                      ".\\ca\\s +\\ca") linebeg t))
     (if (looking-at "..\\c>")
-       (forward-char 1)
+        (forward-char 1)
       (forward-char 2)))
   ;; Cater for Japanese Macro
   (when (and (boundp 'japanese-TeX-mode) japanese-TeX-mode
-            (aref (char-category-set (char-after)) ?j)
-            (TeX-looking-at-backward (concat (regexp-quote TeX-esc) 
TeX-token-char "*")
-                                     (1- (- (point) linebeg)))
-            (not (TeX-escaped-p (match-beginning 0))))
+             (aref (char-category-set (char-after)) ?j)
+             (TeX-looking-at-backward (concat (regexp-quote TeX-esc) 
TeX-token-char "*")
+                                      (1- (- (point) linebeg)))
+             (not (TeX-escaped-p (match-beginning 0))))
       (goto-char (match-beginning 0)))
   ;; Cater for \verb|...| (and similar) contructs which should not be
   ;; broken. (FIXME: Make it work with shortvrb.sty (also loaded by
@@ -4022,152 +4040,152 @@ space does not end a sentence, so don't break a line 
there."
   ;; handled with `fill-nobreak-predicate', but this is not available
   ;; in XEmacs.
   (let ((final-breakpoint (point))
-       (verb-macros (regexp-opt (append (LaTeX-verbatim-macros-with-delims)
-                                        (LaTeX-verbatim-macros-with-braces)))))
+        (verb-macros (regexp-opt (append (LaTeX-verbatim-macros-with-delims)
+                                         
(LaTeX-verbatim-macros-with-braces)))))
     (save-excursion
       ;; Look for the start of a verbatim macro in the current line.
       (when (re-search-backward (concat (regexp-quote TeX-esc)
-                                       "\\(?:" verb-macros "\\)\\([^a-z@*]\\)")
-                               (line-beginning-position) t)
-       ;; Determine start and end of verbatim macro.
-       (let ((beg (point))
-             (end (if (not (string-match "[ [{]" (match-string 1)))
-                      (cdr (LaTeX-verbatim-macro-boundaries))
-                    (TeX-find-macro-end))))
-         ;; Determine if macro end is behind fill column.
-         (when (and end
-                    (> (- end (line-beginning-position))
-                       (current-fill-column))
-                    (> end final-breakpoint))
-           ;; Search backwards for place to break before the macro.
-           (goto-char beg)
-           (skip-chars-backward "^ \n")
-           ;; Determine if point ended up at the beginning of the line.
-           (when (save-excursion (skip-chars-backward " \t%") (bolp))
-             ;; Search forward for a place to break after the macro.
-             (goto-char end)
-             (skip-chars-forward "^ \n" (point-max)))
-           (setq final-breakpoint (point))))))
+                                        "\\(?:" verb-macros 
"\\)\\([^a-z@*]\\)")
+                                (line-beginning-position) t)
+        ;; Determine start and end of verbatim macro.
+        (let ((beg (point))
+              (end (if (not (string-match "[ [{]" (match-string 1)))
+                       (cdr (LaTeX-verbatim-macro-boundaries))
+                     (TeX-find-macro-end))))
+          ;; Determine if macro end is behind fill column.
+          (when (and end
+                     (> (- end (line-beginning-position))
+                        (current-fill-column))
+                     (> end final-breakpoint))
+            ;; Search backwards for place to break before the macro.
+            (goto-char beg)
+            (skip-chars-backward "^ \n")
+            ;; Determine if point ended up at the beginning of the line.
+            (when (save-excursion (skip-chars-backward " \t%") (bolp))
+              ;; Search forward for a place to break after the macro.
+              (goto-char end)
+              (skip-chars-forward "^ \n" (point-max)))
+            (setq final-breakpoint (point))))))
     (goto-char final-breakpoint))
   (when LaTeX-fill-break-at-separators
     (let ((orig-breakpoint (point))
-         (final-breakpoint (point))
-         start-point)
+          (final-breakpoint (point))
+          start-point)
       (save-excursion
-       (beginning-of-line)
-       (LaTeX-back-to-indentation)
-       (setq start-point (point))
-       ;; Find occurences of [, $, {, }, \(, \), \[, \] or $$.
-       (while (and (= final-breakpoint orig-breakpoint)
-                   (TeX-re-search-forward-unescaped
-                    (concat "[[{}]\\|\\$\\$?\\|"
-                            (regexp-quote TeX-esc) "[][()]")
-                    orig-breakpoint t))
-         (let ((match-string (match-string 0)))
-           (cond
-            ;; [ (opening bracket) (The closing bracket should
-            ;; already be handled implicitely by the code for the
-            ;; opening brace.)
-            ((save-excursion
-               (and (memq '\[ LaTeX-fill-break-at-separators)
-                    (string= match-string "[")
-                    (TeX-re-search-forward-unescaped (concat "\\][ \t]*{")
-                                                     (line-end-position) t)
-                    (> (- (or (TeX-find-closing-brace)
-                              (line-end-position))
-                          (line-beginning-position))
-                       fill-column)))
-             (save-excursion
-               (skip-chars-backward "^ \n")
-               (when (> (point) start-point)
-                 (setq final-breakpoint (point)))))
-            ;; { (opening brace)
-            ((save-excursion
-               (and (memq '\{ LaTeX-fill-break-at-separators)
-                    (string= match-string "{")
-                    (> (- (save-excursion
-                            ;; `TeX-find-closing-brace' is not enough
-                            ;; if there is no breakpoint in form of
-                            ;; whitespace after the brace.
-                            (goto-char (or (TeX-find-closing-brace)
-                                           (line-end-position)))
-                            (skip-chars-forward "^ \t\n")
-                            (point))
-                          (line-beginning-position))
-                       fill-column)))
-             (save-excursion
-               (skip-chars-backward "^ \n")
-               ;; The following is a primitive and error-prone method
-               ;; to cope with point probably being inside square
-               ;; brackets.  A better way would be to use functions
-               ;; to determine if point is inside an optional
-               ;; argument and to jump to the start and end brackets.
-               (when (save-excursion
-                       (TeX-re-search-forward-unescaped
-                        (concat "\\][ \t]*{") orig-breakpoint t))
-                 (TeX-search-backward-unescaped "["
-                                                (line-beginning-position) t)
-                 (skip-chars-backward "^ \n"))
-               (when (> (point) start-point)
-                 (setq final-breakpoint (point)))))
-            ;; } (closing brace)
-            ((save-excursion
-               (and (memq '\} LaTeX-fill-break-at-separators)
-                    (string= match-string "}")
-                    (save-excursion
-                      (backward-char 2)
-                      (not (TeX-find-opening-brace
-                            nil (line-beginning-position))))))
-             (save-excursion
-               (skip-chars-forward "^ \n")
-               (when (> (point) start-point)
-                 (setq final-breakpoint (point)))))
-            ;; $ or \( or \[ or $$ (opening math)
-            ((save-excursion
-               (and (or (and (memq '\\\( LaTeX-fill-break-at-separators)
-                             (or (and (string= match-string "$")
-                                      (texmathp))
-                                 (string= match-string "\\(")))
-                        (and (memq '\\\[ LaTeX-fill-break-at-separators)
-                             (or (string= match-string "\\[")
-                                 (and (string= match-string "$$")
-                                      (texmathp)))))
-                    (> (- (save-excursion
-                            (TeX-search-forward-unescaped
-                             (cond ((string= match-string "\\(")
-                                    (concat TeX-esc ")"))
-                                   ((string= match-string "$") "$")
-                                   ((string= match-string "$$") "$$")
-                                   (t (concat TeX-esc "]")))
-                             (point-max) t)
-                            (skip-chars-forward "^ \n")
-                            (point))
-                          (line-beginning-position))
-                       fill-column)))
-             (save-excursion
-               (skip-chars-backward "^ \n")
-               (when (> (point) start-point)
-                 (setq final-breakpoint (point)))))
-            ;; $ or \) or \] or $$ (closing math)
-            ((save-excursion
-               (and (or (and (memq '\\\) LaTeX-fill-break-at-separators)
-                             (or (and (string= match-string "$")
-                                      (not (texmathp)))
-                                 (string= match-string "\\)")))
-                        (and (memq '\\\] LaTeX-fill-break-at-separators)
-                             (or (string= match-string "\\]")
-                                 (and (string= match-string "$$")
-                                      (not (texmathp))))))
-                    (if (member match-string '("$" "$$"))
-                        (save-excursion
-                          (skip-chars-backward "$")
-                          (TeX-search-backward-unescaped
-                           match-string (line-beginning-position) t))
-                      (texmathp-match-switch (line-beginning-position)))))
-             (save-excursion
-               (skip-chars-forward "^ \n")
-               (when (> (point) start-point)
-                 (setq final-breakpoint (point)))))))))
+        (beginning-of-line)
+        (LaTeX-back-to-indentation)
+        (setq start-point (point))
+        ;; Find occurences of [, $, {, }, \(, \), \[, \] or $$.
+        (while (and (= final-breakpoint orig-breakpoint)
+                    (TeX-re-search-forward-unescaped
+                     (concat "[[{}]\\|\\$\\$?\\|"
+                             (regexp-quote TeX-esc) "[][()]")
+                     orig-breakpoint t))
+          (let ((match-string (match-string 0)))
+            (cond
+             ;; [ (opening bracket) (The closing bracket should
+             ;; already be handled implicitely by the code for the
+             ;; opening brace.)
+             ((save-excursion
+                (and (memq '\[ LaTeX-fill-break-at-separators)
+                     (string= match-string "[")
+                     (TeX-re-search-forward-unescaped (concat "\\][ \t]*{")
+                                                      (line-end-position) t)
+                     (> (- (or (TeX-find-closing-brace)
+                               (line-end-position))
+                           (line-beginning-position))
+                        fill-column)))
+              (save-excursion
+                (skip-chars-backward "^ \n")
+                (when (> (point) start-point)
+                  (setq final-breakpoint (point)))))
+             ;; { (opening brace)
+             ((save-excursion
+                (and (memq '\{ LaTeX-fill-break-at-separators)
+                     (string= match-string "{")
+                     (> (- (save-excursion
+                             ;; `TeX-find-closing-brace' is not enough
+                             ;; if there is no breakpoint in form of
+                             ;; whitespace after the brace.
+                             (goto-char (or (TeX-find-closing-brace)
+                                            (line-end-position)))
+                             (skip-chars-forward "^ \t\n")
+                             (point))
+                           (line-beginning-position))
+                        fill-column)))
+              (save-excursion
+                (skip-chars-backward "^ \n")
+                ;; The following is a primitive and error-prone method
+                ;; to cope with point probably being inside square
+                ;; brackets.  A better way would be to use functions
+                ;; to determine if point is inside an optional
+                ;; argument and to jump to the start and end brackets.
+                (when (save-excursion
+                        (TeX-re-search-forward-unescaped
+                         (concat "\\][ \t]*{") orig-breakpoint t))
+                  (TeX-search-backward-unescaped "["
+                                                 (line-beginning-position) t)
+                  (skip-chars-backward "^ \n"))
+                (when (> (point) start-point)
+                  (setq final-breakpoint (point)))))
+             ;; } (closing brace)
+             ((save-excursion
+                (and (memq '\} LaTeX-fill-break-at-separators)
+                     (string= match-string "}")
+                     (save-excursion
+                       (backward-char 2)
+                       (not (TeX-find-opening-brace
+                             nil (line-beginning-position))))))
+              (save-excursion
+                (skip-chars-forward "^ \n")
+                (when (> (point) start-point)
+                  (setq final-breakpoint (point)))))
+             ;; $ or \( or \[ or $$ (opening math)
+             ((save-excursion
+                (and (or (and (memq '\\\( LaTeX-fill-break-at-separators)
+                              (or (and (string= match-string "$")
+                                       (texmathp))
+                                  (string= match-string "\\(")))
+                         (and (memq '\\\[ LaTeX-fill-break-at-separators)
+                              (or (string= match-string "\\[")
+                                  (and (string= match-string "$$")
+                                       (texmathp)))))
+                     (> (- (save-excursion
+                             (TeX-search-forward-unescaped
+                              (cond ((string= match-string "\\(")
+                                     (concat TeX-esc ")"))
+                                    ((string= match-string "$") "$")
+                                    ((string= match-string "$$") "$$")
+                                    (t (concat TeX-esc "]")))
+                              (point-max) t)
+                             (skip-chars-forward "^ \n")
+                             (point))
+                           (line-beginning-position))
+                        fill-column)))
+              (save-excursion
+                (skip-chars-backward "^ \n")
+                (when (> (point) start-point)
+                  (setq final-breakpoint (point)))))
+             ;; $ or \) or \] or $$ (closing math)
+             ((save-excursion
+                (and (or (and (memq '\\\) LaTeX-fill-break-at-separators)
+                              (or (and (string= match-string "$")
+                                       (not (texmathp)))
+                                  (string= match-string "\\)")))
+                         (and (memq '\\\] LaTeX-fill-break-at-separators)
+                              (or (string= match-string "\\]")
+                                  (and (string= match-string "$$")
+                                       (not (texmathp))))))
+                     (if (member match-string '("$" "$$"))
+                         (save-excursion
+                           (skip-chars-backward "$")
+                           (TeX-search-backward-unescaped
+                            match-string (line-beginning-position) t))
+                       (texmathp-match-switch (line-beginning-position)))))
+              (save-excursion
+                (skip-chars-forward "^ \n")
+                (when (> (point) start-point)
+                  (setq final-breakpoint (point)))))))))
       (goto-char final-breakpoint))))
 
 ;; The content of `LaTeX-fill-newline' was copied from the function
@@ -4179,10 +4197,10 @@ space does not end a sentence, so don't break a line 
there."
   (newline 1)
   ;; Give newline the properties of the space(s) it replaces
   (set-text-properties (1- (point)) (point)
-                      (text-properties-at (point)))
+                       (text-properties-at (point)))
   (and (looking-at "\\( [ \t]*\\)\\(\\c|\\)?")
        (or (aref (char-category-set (or (char-before (1- (point))) ?\000)) ?|)
-          (match-end 2))
+           (match-end 2))
        ;; When refilling later on, this newline would normally not
        ;; be replaced by a space, so we need to mark it specially to
        ;; re-install the space when we unfill.
@@ -4191,7 +4209,7 @@ space does not end a sentence, so don't break a line 
there."
   ;; an invisible newline.
   (if fill-nobreak-invisible
       (remove-text-properties (1- (point)) (point)
-                             '(invisible t)))
+                              '(invisible t)))
   ;; Insert the fill prefix.
   (and fill-prefix (not (equal fill-prefix ""))
        ;; Markers that were after the whitespace are now at point: insert
@@ -4212,168 +4230,168 @@ If LaTeX syntax is taken into consideration during 
filling
 depends on the value of `LaTeX-syntactic-comments'."
   (interactive "P")
   (if (save-excursion
-       (beginning-of-line)
-       (looking-at (concat TeX-comment-start-regexp "*[ \t]*$")))
+        (beginning-of-line)
+        (looking-at (concat TeX-comment-start-regexp "*[ \t]*$")))
       ;; Don't do anything if we look at an empty line and let
       ;; `fill-paragraph' think we successfully filled the paragraph.
       t
     (let (;; Non-nil if the current line contains a comment.
-         has-comment
-         ;; Non-nil if the current line contains code and a comment.
-         has-code-and-comment
-         code-comment-start
-         ;; If has-comment, the appropriate fill-prefix for the comment.
-         comment-fill-prefix)
+          has-comment
+          ;; Non-nil if the current line contains code and a comment.
+          has-code-and-comment
+          code-comment-start
+          ;; If has-comment, the appropriate fill-prefix for the comment.
+          comment-fill-prefix)
 
       ;; Figure out what kind of comment we are looking at.
       (cond
        ;; A line only with potential whitespace followed by a
        ;; comment on it?
        ((save-excursion
-         (beginning-of-line)
-         (looking-at (concat "^[ \t]*" TeX-comment-start-regexp
-                             "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*")))
-       (setq has-comment t
-             comment-fill-prefix (TeX-match-buffer 0)))
+          (beginning-of-line)
+          (looking-at (concat "^[ \t]*" TeX-comment-start-regexp
+                              "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*")))
+        (setq has-comment t
+              comment-fill-prefix (TeX-match-buffer 0)))
        ;; A line with some code, followed by a comment?
        ((and (setq code-comment-start (save-excursion
-                                       (beginning-of-line)
-                                       (TeX-search-forward-comment-start
-                                        (line-end-position))))
-            (> (point) code-comment-start)
-            (not (TeX-in-commented-line))
-            (save-excursion
-              (goto-char code-comment-start)
-              ;; See if there is at least one non-whitespace character
-              ;; before the comment starts.
-              (re-search-backward "[^ \t\n]" (line-beginning-position) t)))
-       (setq has-comment t
-             has-code-and-comment t)))
+                                        (beginning-of-line)
+                                        (TeX-search-forward-comment-start
+                                         (line-end-position))))
+             (> (point) code-comment-start)
+             (not (TeX-in-commented-line))
+             (save-excursion
+               (goto-char code-comment-start)
+               ;; See if there is at least one non-whitespace character
+               ;; before the comment starts.
+               (re-search-backward "[^ \t\n]" (line-beginning-position) t)))
+        (setq has-comment t
+              has-code-and-comment t)))
 
       (cond
        ;; Code comments.
        (has-code-and-comment
-       (save-excursion
-         (when (>= (- code-comment-start (line-beginning-position))
-                   fill-column)
-           ;; If start of code comment is beyond fill column, fill it as a
-           ;; regular paragraph before it is filled as a code comment.
-           (let ((end-marker (save-excursion (end-of-line) (point-marker))))
-             (LaTeX-fill-region-as-paragraph (line-beginning-position)
-                                             (line-beginning-position 2)
-                                             justify)
-             (goto-char end-marker)
-             (beginning-of-line)))
-         (LaTeX-fill-code-comment justify)))
+        (save-excursion
+          (when (>= (- code-comment-start (line-beginning-position))
+                    fill-column)
+            ;; If start of code comment is beyond fill column, fill it as a
+            ;; regular paragraph before it is filled as a code comment.
+            (let ((end-marker (save-excursion (end-of-line) (point-marker))))
+              (LaTeX-fill-region-as-paragraph (line-beginning-position)
+                                              (line-beginning-position 2)
+                                              justify)
+              (goto-char end-marker)
+              (beginning-of-line)))
+          (LaTeX-fill-code-comment justify)))
        ;; Syntax-aware filling:
        ;; * `LaTeX-syntactic-comments' enabled: Everything.
        ;; * `LaTeX-syntactic-comments' disabled: Uncommented code and
        ;;   line comments in `doctex-mode'.
        ((or (or LaTeX-syntactic-comments
-               (and (not LaTeX-syntactic-comments)
-                    (not has-comment)))
-           (and (eq major-mode 'doctex-mode)
-                (TeX-in-line-comment)))
-       (let ((fill-prefix comment-fill-prefix))
-         (save-excursion
-           (let* ((end (progn (LaTeX-forward-paragraph)
-                              (or (bolp) (newline 1))
-                              (and (eobp) (not (bolp)) (open-line 1))
-                              (point)))
-                  (start
-                   (progn
-                     (LaTeX-backward-paragraph)
-                     (while (and (looking-at
-                                  (concat "$\\|[ \t]+$\\|"
-                                          "[ \t]*" TeX-comment-start-regexp
-                                          "+[ \t]*$"))
-                                 (< (point) end))
-                       (forward-line))
-                     (point))))
-             (LaTeX-fill-region-as-paragraph start end justify)))))
-       ;; Non-syntax-aware filling.
+                (and (not LaTeX-syntactic-comments)
+                     (not has-comment)))
+            (and (eq major-mode 'doctex-mode)
+                 (TeX-in-line-comment)))
+        (let ((fill-prefix comment-fill-prefix))
+          (save-excursion
+            (let* ((end (progn (LaTeX-forward-paragraph)
+                               (or (bolp) (newline 1))
+                               (and (eobp) (not (bolp)) (open-line 1))
+                               (point)))
+                   (start
+                    (progn
+                      (LaTeX-backward-paragraph)
+                      (while (and (looking-at
+                                   (concat "$\\|[ \t]+$\\|"
+                                           "[ \t]*" TeX-comment-start-regexp
+                                           "+[ \t]*$"))
+                                  (< (point) end))
+                        (forward-line))
+                      (point))))
+              (LaTeX-fill-region-as-paragraph start end justify)))))
+        ;; Non-syntax-aware filling.
        (t
-       (save-excursion
-         (save-restriction
-           (beginning-of-line)
-           (narrow-to-region
-            ;; Find the first line we should include in the region to fill.
-            (save-excursion
-              (while (and (zerop (forward-line -1))
-                          (looking-at (concat "^[ \t]*"
-                                              TeX-comment-start-regexp))))
-              ;; We may have gone too far.  Go forward again.
-              (or (looking-at (concat ".*" TeX-comment-start-regexp))
-                  (forward-line 1))
-              (point))
-            ;; Find the beginning of the first line past the region to fill.
-            (save-excursion
-              (while (progn (forward-line 1)
-                            (looking-at (concat "^[ \t]*"
-                                                TeX-comment-start-regexp))))
-              (point)))
-           ;; The definitions of `paragraph-start' and
-           ;; `paragraph-separate' will still make
-           ;; `forward-paragraph' and `backward-paragraph' stop at
-           ;; the respective (La)TeX commands.  If these should be
-           ;; disregarded, the definitions would have to be changed
-           ;; accordingly.  (Lines with only `%' characters on them
-           ;; can be paragraph boundaries.)
-           (let* ((paragraph-start
-                   (concat paragraph-start "\\|"
-                           "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*$"))
-                  (paragraph-separate
-                   (concat paragraph-separate "\\|"
-                           "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*$"))
-                  (fill-prefix comment-fill-prefix)
-                  (end (progn (forward-paragraph)
-                              (or (bolp) (newline 1))
-                              (point)))
-                  (beg (progn (backward-paragraph)
-                              (point))))
-             (fill-region-as-paragraph
-              beg end
-              justify nil
-              (save-excursion
-                (goto-char beg)
-                (if (looking-at fill-prefix)
-                    nil
-                  (re-search-forward comment-start-skip nil t)
-                  (point)))))))))
+        (save-excursion
+          (save-restriction
+            (beginning-of-line)
+            (narrow-to-region
+             ;; Find the first line we should include in the region to fill.
+             (save-excursion
+               (while (and (zerop (forward-line -1))
+                           (looking-at (concat "^[ \t]*"
+                                               TeX-comment-start-regexp))))
+               ;; We may have gone too far.  Go forward again.
+               (or (looking-at (concat ".*" TeX-comment-start-regexp))
+                   (forward-line 1))
+               (point))
+             ;; Find the beginning of the first line past the region to fill.
+             (save-excursion
+               (while (progn (forward-line 1)
+                             (looking-at (concat "^[ \t]*"
+                                                 TeX-comment-start-regexp))))
+               (point)))
+            ;; The definitions of `paragraph-start' and
+            ;; `paragraph-separate' will still make
+            ;; `forward-paragraph' and `backward-paragraph' stop at
+            ;; the respective (La)TeX commands.  If these should be
+            ;; disregarded, the definitions would have to be changed
+            ;; accordingly.  (Lines with only `%' characters on them
+            ;; can be paragraph boundaries.)
+            (let* ((paragraph-start
+                    (concat paragraph-start "\\|"
+                            "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*$"))
+                   (paragraph-separate
+                    (concat paragraph-separate "\\|"
+                            "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*$"))
+                   (fill-prefix comment-fill-prefix)
+                   (end (progn (forward-paragraph)
+                               (or (bolp) (newline 1))
+                               (point)))
+                   (beg (progn (backward-paragraph)
+                               (point))))
+              (fill-region-as-paragraph
+               beg end
+               justify nil
+               (save-excursion
+                 (goto-char beg)
+                 (if (looking-at fill-prefix)
+                     nil
+                   (re-search-forward comment-start-skip nil t)
+                   (point)))))))))
       t)))
 
 (defun LaTeX-fill-code-comment (&optional justify-flag)
   "Fill a line including code followed by a comment."
   (let ((beg (line-beginning-position))
-       fill-prefix code-comment-start)
+        fill-prefix code-comment-start)
     (indent-according-to-mode)
     (when (when (setq code-comment-start (save-excursion
-                                          (goto-char beg)
-                                          (TeX-search-forward-comment-start
-                                           (line-end-position))))
-           (goto-char code-comment-start)
-           (while (not (looking-at TeX-comment-start-regexp)) (forward-char))
-           ;; See if there is at least one non-whitespace character
-           ;; before the comment starts.
-           (save-excursion
-             (re-search-backward "[^ \t\n]" (line-beginning-position) t)))
+                                           (goto-char beg)
+                                           (TeX-search-forward-comment-start
+                                            (line-end-position))))
+            (goto-char code-comment-start)
+            (while (not (looking-at TeX-comment-start-regexp)) (forward-char))
+            ;; See if there is at least one non-whitespace character
+            ;; before the comment starts.
+            (save-excursion
+              (re-search-backward "[^ \t\n]" (line-beginning-position) t)))
       (setq fill-prefix
-           (concat
-            (if indent-tabs-mode
-                (concat (make-string (/ (current-column) tab-width) ?\t)
-                        (make-string (% (current-column) tab-width) ?\ ))
-              (make-string (current-column) ?\ ))
-            (progn
-              (looking-at (concat TeX-comment-start-regexp "+[ \t]*"))
-              (TeX-match-buffer 0))))
+            (concat
+             (if indent-tabs-mode
+                 (concat (make-string (/ (current-column) tab-width) ?\t)
+                         (make-string (% (current-column) tab-width) ?\ ))
+               (make-string (current-column) ?\ ))
+             (progn
+               (looking-at (concat TeX-comment-start-regexp "+[ \t]*"))
+               (TeX-match-buffer 0))))
       (fill-region-as-paragraph beg (line-beginning-position 2)
-                               justify-flag  nil
-                               (save-excursion
-                                 (goto-char beg)
-                                 (if (looking-at fill-prefix)
-                                     nil
-                                   (re-search-forward comment-start-skip nil t)
-                                   (point)))))))
+                                justify-flag  nil
+                                (save-excursion
+                                  (goto-char beg)
+                                  (if (looking-at fill-prefix)
+                                      nil
+                                    (re-search-forward comment-start-skip nil 
t)
+                                    (point)))))))
 
 (defun LaTeX-fill-region (from to &optional justify what)
   "Fill and indent the text in region from FROM to TO as LaTeX text.
@@ -4383,28 +4401,28 @@ formatting."
   (interactive "*r\nP")
   (save-excursion
     (let ((to (set-marker (make-marker) to))
-         (next-par (make-marker)))
+          (next-par (make-marker)))
       (goto-char from)
       (beginning-of-line)
       (setq from (point))
       (catch 'end-of-buffer
-       (while (and (< (point) to))
-         (message "Formatting%s...%d%%"
-                  (or what "")
-                  (/ (* 100 (- (point) from)) (- to from)))
-         (save-excursion (LaTeX-fill-paragraph justify))
-         (if (marker-position next-par)
-             (goto-char (marker-position next-par))
-           (LaTeX-forward-paragraph))
-         (when (eobp) (throw 'end-of-buffer t))
-         (LaTeX-forward-paragraph)
-         (set-marker next-par (point))
-         (LaTeX-backward-paragraph)
-         (while (and (not (eobp))
-                     (looking-at
-                      (concat "^\\($\\|[ \t]+$\\|[ \t]*"
-                              TeX-comment-start-regexp "+[ \t]*$\\)")))
-           (forward-line 1))))
+        (while (and (< (point) to))
+          (message "Formatting%s...%d%%"
+                   (or what "")
+                   (/ (* 100 (- (point) from)) (- to from)))
+          (save-excursion (LaTeX-fill-paragraph justify))
+          (if (marker-position next-par)
+              (goto-char (marker-position next-par))
+            (LaTeX-forward-paragraph))
+          (when (eobp) (throw 'end-of-buffer t))
+          (LaTeX-forward-paragraph)
+          (set-marker next-par (point))
+          (LaTeX-backward-paragraph)
+          (while (and (not (eobp))
+                      (looking-at
+                       (concat "^\\($\\|[ \t]+$\\|[ \t]*"
+                               TeX-comment-start-regexp "+[ \t]*$\\)")))
+            (forward-line 1))))
       (set-marker to nil)))
   (message "Formatting%s...done" (or what "")))
 
@@ -4416,33 +4434,33 @@ If function is called inside a comment and
 environment in commented regions with the same comment prefix."
   (interactive)
   (let* ((regexp (concat (regexp-quote TeX-esc) "\\(begin\\|end\\)\\b"))
-        (level 1)
-        (in-comment (TeX-in-commented-line))
-        (comment-prefix (and in-comment (TeX-comment-prefix)))
-        (case-fold-search nil))
+         (level 1)
+         (in-comment (TeX-in-commented-line))
+         (comment-prefix (and in-comment (TeX-comment-prefix)))
+         (case-fold-search nil))
     (let ((pt (point)))
       (skip-chars-backward (concat "a-zA-Z \t" (regexp-quote TeX-grop)))
       (unless (bolp)
-       (backward-char 1)
-       (if (and (looking-at regexp)
-                (char-equal (char-after (1+ (match-beginning 0))) ?e))
-           (setq level 0)
-         (goto-char pt))))
+        (backward-char 1)
+        (if (and (looking-at regexp)
+                 (char-equal (char-after (1+ (match-beginning 0))) ?e))
+            (setq level 0)
+          (goto-char pt))))
     (while (and (> level 0) (re-search-forward regexp nil t))
       (when (or (and LaTeX-syntactic-comments
-                    (eq in-comment (TeX-in-commented-line))
-                    ;; If we are in a commented line, check if the
-                    ;; prefix matches the one we started out with.
-                    (or (not in-comment)
-                        (string= comment-prefix (TeX-comment-prefix))))
-               (and (not LaTeX-syntactic-comments)
-                    (not (TeX-in-commented-line))))
-       (if (= (char-after (1+ (match-beginning 0))) ?b) ;;begin
-           (setq level (1+ level))
-         (setq level (1- level)))))
+                     (eq in-comment (TeX-in-commented-line))
+                     ;; If we are in a commented line, check if the
+                     ;; prefix matches the one we started out with.
+                     (or (not in-comment)
+                         (string= comment-prefix (TeX-comment-prefix))))
+                (and (not LaTeX-syntactic-comments)
+                     (not (TeX-in-commented-line))))
+        (if (= (char-after (1+ (match-beginning 0))) ?b) ;;begin
+            (setq level (1+ level))
+          (setq level (1- level)))))
     (if (= level 0)
-       (re-search-forward
-        (concat TeX-grop (LaTeX-environment-name-regexp) TeX-grcl))
+        (re-search-forward
+         (concat TeX-grop (LaTeX-environment-name-regexp) TeX-grcl))
       (error "Can't locate end of current environment"))))
 
 (defun LaTeX-find-matching-begin ()
@@ -4453,30 +4471,30 @@ If function is called inside a comment and
 environment in commented regions with the same comment prefix."
   (interactive)
   (let* ((regexp (concat (regexp-quote TeX-esc) "\\(begin\\|end\\)\\b"))
-        (level 1)
-        (in-comment (TeX-in-commented-line))
-        (comment-prefix (and in-comment (TeX-comment-prefix)))
-        (case-fold-search nil))
+         (level 1)
+         (in-comment (TeX-in-commented-line))
+         (comment-prefix (and in-comment (TeX-comment-prefix)))
+         (case-fold-search nil))
     (skip-chars-backward (concat "a-zA-Z \t" (regexp-quote TeX-grop)))
     (unless (bolp)
       (backward-char 1)
       (and (looking-at regexp)
-          (char-equal (char-after (1+ (match-beginning 0))) ?b)
-          (setq level 0)))
+           (char-equal (char-after (1+ (match-beginning 0))) ?b)
+           (setq level 0)))
     (while (and (> level 0) (re-search-backward regexp nil t))
       (when (or (and LaTeX-syntactic-comments
-                    (eq in-comment (TeX-in-commented-line))
-                    ;; If we are in a commented line, check if the
-                    ;; prefix matches the one we started out with.
-                    (or (not in-comment)
-                        (string= comment-prefix (TeX-comment-prefix))))
-               (and (not LaTeX-syntactic-comments)
-                    (not (TeX-in-commented-line))))
-       (if (= (char-after (1+ (match-beginning 0))) ?e) ;;end
-           (setq level (1+ level))
-         (setq level (1- level)))))
+                     (eq in-comment (TeX-in-commented-line))
+                     ;; If we are in a commented line, check if the
+                     ;; prefix matches the one we started out with.
+                     (or (not in-comment)
+                         (string= comment-prefix (TeX-comment-prefix))))
+                (and (not LaTeX-syntactic-comments)
+                     (not (TeX-in-commented-line))))
+        (if (= (char-after (1+ (match-beginning 0))) ?e) ;;end
+            (setq level (1+ level))
+          (setq level (1- level)))))
     (or (= level 0)
-       (error "Can't locate beginning of current environment"))))
+        (error "Can't locate beginning of current environment"))))
 
 (defun LaTeX-mark-environment (&optional count)
   "Set mark to end of current environment and point to the matching begin.
@@ -4506,7 +4524,7 @@ environments."
     (LaTeX-mark-environment)
     (re-search-forward "{\\([^}]+\\)}")
     (LaTeX-fill-region (region-beginning) (region-end) justify
-                      (concat " environment " (TeX-match-buffer 1)))))
+                       (concat " environment " (TeX-match-buffer 1)))))
 
 (defun LaTeX-fill-section (justify)
   "Fill and indent current logical section as LaTeX text."
@@ -4515,7 +4533,7 @@ environments."
     (LaTeX-mark-section)
     (re-search-forward "{\\([^}]+\\)}")
     (LaTeX-fill-region (region-beginning) (region-end) justify
-                      (concat " section " (TeX-match-buffer 1)))))
+                       (concat " section " (TeX-match-buffer 1)))))
 
 (defun LaTeX-mark-section (&optional no-subsections)
   "Set mark at end of current logical section, and point at top.
@@ -4528,19 +4546,19 @@ If the function `outline-mark-subtree' is not available,
 value of NO-SUBSECTIONS."
   (interactive "P")
   (if (or no-subsections
-         (not (fboundp 'outline-mark-subtree)))
+          (not (fboundp 'outline-mark-subtree)))
       (progn
-       (re-search-forward (concat  "\\(" (LaTeX-outline-regexp)
-                                   "\\|\\'\\)"))
-       (beginning-of-line)
-       (push-mark (point) nil t)
-       (re-search-backward (concat "\\(" (LaTeX-outline-regexp)
-                                   "\\|\\`\\)")))
+        (re-search-forward (concat  "\\(" (LaTeX-outline-regexp)
+                                    "\\|\\'\\)"))
+        (beginning-of-line)
+        (push-mark (point) nil t)
+        (re-search-backward (concat "\\(" (LaTeX-outline-regexp)
+                                    "\\|\\`\\)")))
     (outline-mark-subtree)
     (when (and (boundp 'transient-mark-mode)
-              transient-mark-mode
-              (boundp 'mark-active)
-              (not mark-active))
+               transient-mark-mode
+               (boundp 'mark-active)
+               (not mark-active))
       (setq mark-active t)
       (run-hooks 'activate-mark-hook)))
   (TeX-activate-region))
@@ -4574,16 +4592,16 @@ Regexp part containing TeX control words is postfixed 
with `\\b'
 to avoid ambiguities (e.g. \\par vs. \\parencite)."
   (let (cmds symbs)
     (dolist (mac (append LaTeX-paragraph-commands
-                        LaTeX-paragraph-commands-internal))
+                         LaTeX-paragraph-commands-internal))
       (if (string-match "[^a-zA-Z]" mac)
-         (push mac symbs)
-       (push mac cmds)))
+          (push mac symbs)
+        (push mac cmds)))
     (concat (regexp-quote TeX-esc) "\\(?:"
-           (regexp-opt cmds "\\(?:")
-           "\\b"
-           "\\|"
-           (regexp-opt symbs)
-           "\\)")))
+            (regexp-opt cmds "\\(?:")
+            "\\b"
+            "\\|"
+            (regexp-opt symbs)
+            "\\)")))
 
 (defvar LaTeX-paragraph-commands-regexp)
 
@@ -4594,8 +4612,8 @@ The list should contain macro names without the leading 
backslash."
   :type '(repeat (string))
   :set (lambda (symbol value)
          (set-default symbol value)
-        (setq LaTeX-paragraph-commands-regexp
-              (LaTeX-paragraph-commands-regexp-make))))
+         (setq LaTeX-paragraph-commands-regexp
+               (LaTeX-paragraph-commands-regexp-make))))
 
 (defvar LaTeX-paragraph-commands-regexp (LaTeX-paragraph-commands-regexp-make)
   "Regular expression matching LaTeX macros that should have their own line.")
@@ -4603,13 +4621,13 @@ The list should contain macro names without the leading 
backslash."
 (defun LaTeX-set-paragraph-start ()
   "Set `paragraph-start'."
   (setq paragraph-start
-       (concat
-        "[ \t]*%*[ \t]*\\("
-        LaTeX-paragraph-commands-regexp "\\|"
-        (regexp-quote TeX-esc) "\\(" LaTeX-item-regexp "\\)\\|"
-        "\\$\\$\\|"    ; Plain TeX display math (Some people actually use this
+        (concat
+         "[ \t]*%*[ \t]*\\("
+         LaTeX-paragraph-commands-regexp "\\|"
+         (regexp-quote TeX-esc) "\\(" LaTeX-item-regexp "\\)\\|"
+         "\\$\\$\\|"    ; Plain TeX display math (Some people actually use this
                                         ; with LaTeX.  Yuck.)
-        "$\\)")))
+         "$\\)")))
 
 (defun LaTeX-paragraph-commands-add-locally (commands)
   "Make COMMANDS be recognized as paragraph commands.
@@ -4632,21 +4650,21 @@ If COUNT is non-nil, do it COUNT times."
   (or count (setq count 1))
   (dotimes (_ count)
     (let* ((macro-start (TeX-find-macro-start))
-          (paragraph-command-start
-           (cond
-            ;; Point is inside of a paragraph command.
-            ((and macro-start
-                  (save-excursion
-                    (goto-char macro-start)
-                    (looking-at LaTeX-paragraph-commands-regexp)))
-             (match-beginning 0))
-            ;; Point is before a paragraph command in the same line.
-            ((looking-at
-              (concat "[ \t]*\\(?:" TeX-comment-start-regexp
-                      "\\(?:" TeX-comment-start-regexp "\\|[ \t]\\)*\\)?"
-                      "\\(" LaTeX-paragraph-commands-regexp "\\)"))
-             (match-beginning 1))))
-          macro-end)
+           (paragraph-command-start
+            (cond
+             ;; Point is inside of a paragraph command.
+             ((and macro-start
+                   (save-excursion
+                     (goto-char macro-start)
+                     (looking-at LaTeX-paragraph-commands-regexp)))
+              (match-beginning 0))
+             ;; Point is before a paragraph command in the same line.
+             ((looking-at
+               (concat "[ \t]*\\(?:" TeX-comment-start-regexp
+                       "\\(?:" TeX-comment-start-regexp "\\|[ \t]\\)*\\)?"
+                       "\\(" LaTeX-paragraph-commands-regexp "\\)"))
+              (match-beginning 1))))
+           macro-end)
       ;; If a paragraph command is encountered there are two cases to be
       ;; distinguished:
       ;; 1) If the end of the paragraph command coincides (apart from
@@ -4657,27 +4675,27 @@ If COUNT is non-nil, do it COUNT times."
       ;;    code, it is assumed that it should be included with the rest
       ;;    of the paragraph.
       (if (and paragraph-command-start
-              (save-excursion
-                (goto-char paragraph-command-start)
-                (setq macro-end (goto-char (TeX-find-macro-end)))
-                (looking-at (concat (regexp-quote TeX-esc) "[@A-Za-z]+\\|"
-                                    "[ \t]*\\($\\|"
-                                    TeX-comment-start-regexp "\\)"))))
-         (progn
-           (goto-char macro-end)
-           ;; If the paragraph command is followed directly by
-           ;; another macro, regard the latter as part of the
-           ;; paragraph command's paragraph.
-           (when (looking-at (concat (regexp-quote TeX-esc) "[@A-Za-z]+"))
-             (goto-char (TeX-find-macro-end)))
-           (forward-line))
-       (let (limit)
-         (goto-char (min (save-excursion
-                           (forward-paragraph)
-                           (setq limit (point)))
-                         (save-excursion
-                           (TeX-forward-comment-skip 1 limit)
-                           (point)))))))))
+               (save-excursion
+                 (goto-char paragraph-command-start)
+                 (setq macro-end (goto-char (TeX-find-macro-end)))
+                 (looking-at (concat (regexp-quote TeX-esc) "[@A-Za-z]+\\|"
+                                     "[ \t]*\\($\\|"
+                                     TeX-comment-start-regexp "\\)"))))
+          (progn
+            (goto-char macro-end)
+            ;; If the paragraph command is followed directly by
+            ;; another macro, regard the latter as part of the
+            ;; paragraph command's paragraph.
+            (when (looking-at (concat (regexp-quote TeX-esc) "[@A-Za-z]+"))
+              (goto-char (TeX-find-macro-end)))
+            (forward-line))
+        (let (limit)
+          (goto-char (min (save-excursion
+                            (forward-paragraph)
+                            (setq limit (point)))
+                          (save-excursion
+                            (TeX-forward-comment-skip 1 limit)
+                            (point)))))))))
 
 (defun LaTeX-backward-paragraph (&optional count)
   "Move backward to beginning of paragraph.
@@ -4686,65 +4704,65 @@ If COUNT is non-nil, do it COUNT times."
   (dotimes (_ count)
     (let* ((macro-start (TeX-find-macro-start)))
       (if (and macro-start
-              ;; Point really has to be inside of the macro, not before it.
-              (not (= macro-start (point)))
-              (save-excursion
-                (goto-char macro-start)
-                (looking-at LaTeX-paragraph-commands-regexp)))
-         ;; Point is inside of a paragraph command.
-         (progn
-           (goto-char macro-start)
-           (beginning-of-line))
-       (let (limit
-             (start (line-beginning-position)))
-         (goto-char
-          (max (save-excursion
-                 (backward-paragraph)
-                 (setq limit (point)))
-               ;; Search for possible transitions from commented to
-               ;; uncommented regions and vice versa.
-               (save-excursion
-                 (TeX-backward-comment-skip 1 limit)
-                 (point))
-               ;; Search for paragraph commands.
-               (save-excursion
-                 (let ((end-point 0) macro-bol)
-                   (when (setq macro-bol
-                               (re-search-backward
-                                (format "^[ \t]*%s*[ \t]*\\(%s\\)"
-                                        TeX-comment-start-regexp
-                                        LaTeX-paragraph-commands-regexp)
-                                limit t))
-                     (if (and (string= (match-string 1) "\\begin")
-                              (progn
-                                (goto-char (match-end 1))
-                                (skip-chars-forward "{ \t")
-                                (member (buffer-substring-no-properties
-                                         (point) (progn (skip-chars-forward
-                                                         "A-Za-z*") (point)))
-                                        LaTeX-verbatim-environments)))
-                         ;; If inside a verbatim environment, just
-                         ;; use the next line.  In such environments
-                         ;; `TeX-find-macro-end' could otherwise
-                         ;; think brackets or braces belong to the
-                         ;; \begin macro.
-                         (setq end-point (line-beginning-position 2))
-                       ;; Jump to the macro end otherwise.
-                       (goto-char (match-beginning 1))
-                       (goto-char (TeX-find-macro-end))
-                       ;; For an explanation of this distinction see
-                       ;; `LaTeX-forward-paragraph'.
-                       (if (looking-at (concat (regexp-quote TeX-esc)
-                                               "[@A-Za-z]+\\|[ \t]*\\($\\|"
-                                               TeX-comment-start-regexp "\\)"))
-                           (progn
-                             (when (looking-at (regexp-quote TeX-esc))
-                               (goto-char (TeX-find-macro-end)))
-                             (forward-line 1)
-                             (when (< (point) start)
-                               (setq end-point (point))))
-                         (setq end-point macro-bol))))
-                   end-point)))))))))
+               ;; Point really has to be inside of the macro, not before it.
+               (not (= macro-start (point)))
+               (save-excursion
+                 (goto-char macro-start)
+                 (looking-at LaTeX-paragraph-commands-regexp)))
+          ;; Point is inside of a paragraph command.
+          (progn
+            (goto-char macro-start)
+            (beginning-of-line))
+        (let (limit
+              (start (line-beginning-position)))
+          (goto-char
+           (max (save-excursion
+                  (backward-paragraph)
+                  (setq limit (point)))
+                ;; Search for possible transitions from commented to
+                ;; uncommented regions and vice versa.
+                (save-excursion
+                  (TeX-backward-comment-skip 1 limit)
+                  (point))
+                ;; Search for paragraph commands.
+                (save-excursion
+                  (let ((end-point 0) macro-bol)
+                    (when (setq macro-bol
+                                (re-search-backward
+                                 (format "^[ \t]*%s*[ \t]*\\(%s\\)"
+                                         TeX-comment-start-regexp
+                                         LaTeX-paragraph-commands-regexp)
+                                 limit t))
+                      (if (and (string= (match-string 1) "\\begin")
+                               (progn
+                                 (goto-char (match-end 1))
+                                 (skip-chars-forward "{ \t")
+                                 (member (buffer-substring-no-properties
+                                          (point) (progn (skip-chars-forward
+                                                          "A-Za-z*") (point)))
+                                         LaTeX-verbatim-environments)))
+                          ;; If inside a verbatim environment, just
+                          ;; use the next line.  In such environments
+                          ;; `TeX-find-macro-end' could otherwise
+                          ;; think brackets or braces belong to the
+                          ;; \begin macro.
+                          (setq end-point (line-beginning-position 2))
+                        ;; Jump to the macro end otherwise.
+                        (goto-char (match-beginning 1))
+                        (goto-char (TeX-find-macro-end))
+                        ;; For an explanation of this distinction see
+                        ;; `LaTeX-forward-paragraph'.
+                        (if (looking-at (concat (regexp-quote TeX-esc)
+                                                "[@A-Za-z]+\\|[ \t]*\\($\\|"
+                                                TeX-comment-start-regexp 
"\\)"))
+                            (progn
+                              (when (looking-at (regexp-quote TeX-esc))
+                                (goto-char (TeX-find-macro-end)))
+                              (forward-line 1)
+                              (when (< (point) start)
+                                (setq end-point (point))))
+                          (setq end-point macro-bol))))
+                    end-point)))))))))
 
 (defun LaTeX-search-forward-comment-start (&optional limit)
   "Search forward for a comment start from current position till LIMIT.
@@ -4756,13 +4774,13 @@ of verbatim constructs are not considered."
   (save-excursion
     (let (start)
       (catch 'found
-       (while (progn
-                (when (and (TeX-re-search-forward-unescaped
-                            TeX-comment-start-regexp limit 'move)
-                           (not (LaTeX-verbatim-p)))
-                  (setq start (match-beginning 0))
-                  (throw 'found t))
-                (< (point) limit))))
+        (while (progn
+                 (when (and (TeX-re-search-forward-unescaped
+                             TeX-comment-start-regexp limit 'move)
+                            (not (LaTeX-verbatim-p)))
+                   (setq start (match-beginning 0))
+                   (throw 'found t))
+                 (< (point) limit))))
       start)))
 
 
@@ -4786,10 +4804,10 @@ use \\[customize]."
   :group 'LaTeX-math
   :initialize 'custom-initialize-default
   :set '(lambda (symbol value)
-         (define-key LaTeX-math-mode-map (LaTeX-math-abbrev-prefix) t)
-         (set-default symbol value)
-         (define-key LaTeX-math-mode-map
-           (LaTeX-math-abbrev-prefix) LaTeX-math-keymap))
+          (define-key LaTeX-math-mode-map (LaTeX-math-abbrev-prefix) t)
+          (set-default symbol value)
+          (define-key LaTeX-math-mode-map
+            (LaTeX-math-abbrev-prefix) LaTeX-math-keymap))
   :type '(string :tag "Key sequence"))
 
 (defun LaTeX-math-abbrev-prefix ()
@@ -5346,61 +5364,61 @@ MENU and CHARACTER, see `LaTeX-math-list' for details.")
 
 (defun LaTeX-math-initialize ()
   (let ((math (reverse (append LaTeX-math-list LaTeX-math-default)))
-       (map LaTeX-math-keymap)
-       (unicode (and LaTeX-math-menu-unicode (fboundp 'decode-char))))
+        (map LaTeX-math-keymap)
+        (unicode (and LaTeX-math-menu-unicode (fboundp 'decode-char))))
     (while math
       (let* ((entry (car math))
-            (key (nth 0 entry))
-            (prefix
-             (and unicode
-                  (nth 3 entry)))
-            value menu name)
-       (setq math (cdr math))
-       (if (and prefix
-                (setq prefix (decode-char 'ucs (nth 3 entry))))
-           (setq prefix (concat (string prefix) " \\"))
-         (setq prefix "\\"))
-       (if (listp (cdr entry))
-           (setq value (nth 1 entry)
-                 menu (nth 2 entry))
-         (setq value (cdr entry)
-               menu nil))
-       (if (stringp value)
-           (progn
-             (setq name (intern (concat "LaTeX-math-" value)))
-             (fset name (list 'lambda (list 'arg) (list 'interactive "*P")
-                              (list 'LaTeX-math-insert value 'arg))))
-         (setq name value))
-       (if key
-           (progn
-             (setq key (cond ((numberp key) (char-to-string key))
-                             ((stringp key) (read-kbd-macro key))
-                             (t (vector key))))
-             (define-key map key name)))
-       (if menu
-           (let ((parent LaTeX-math-menu))
-             (if (listp menu)
-                 (progn
-                   (while (cdr menu)
-                     (let ((sub (assoc (car menu) LaTeX-math-menu)))
-                       (if sub
-                           (setq parent sub)
-                         (setcdr parent (cons (list (car menu)) (cdr parent))))
-                       (setq menu (cdr menu))))
-                   (setq menu (car menu))))
-             (let ((sub (assoc menu parent)))
-               (if sub
-                   (if (stringp value)
-                       (setcdr sub (cons (vector (concat prefix value)
-                                                 name t)
-                                         (cdr sub)))
-                     (error "Cannot have multiple special math menu items"))
-                 (setcdr parent
-                         (cons (if (stringp value)
-                                   (list menu (vector (concat prefix value)
-                                                      name t))
-                                 (vector menu name t))
-                               (cdr parent)))))))))
+             (key (nth 0 entry))
+             (prefix
+              (and unicode
+                   (nth 3 entry)))
+             value menu name)
+        (setq math (cdr math))
+        (if (and prefix
+                 (setq prefix (decode-char 'ucs (nth 3 entry))))
+            (setq prefix (concat (string prefix) " \\"))
+          (setq prefix "\\"))
+        (if (listp (cdr entry))
+            (setq value (nth 1 entry)
+                  menu (nth 2 entry))
+          (setq value (cdr entry)
+                menu nil))
+        (if (stringp value)
+            (progn
+              (setq name (intern (concat "LaTeX-math-" value)))
+              (fset name (list 'lambda (list 'arg) (list 'interactive "*P")
+                               (list 'LaTeX-math-insert value 'arg))))
+          (setq name value))
+        (if key
+            (progn
+              (setq key (cond ((numberp key) (char-to-string key))
+                              ((stringp key) (read-kbd-macro key))
+                              (t (vector key))))
+              (define-key map key name)))
+        (if menu
+            (let ((parent LaTeX-math-menu))
+              (if (listp menu)
+                  (progn
+                    (while (cdr menu)
+                      (let ((sub (assoc (car menu) LaTeX-math-menu)))
+                        (if sub
+                            (setq parent sub)
+                          (setcdr parent (cons (list (car menu)) (cdr 
parent))))
+                        (setq menu (cdr menu))))
+                    (setq menu (car menu))))
+              (let ((sub (assoc menu parent)))
+                (if sub
+                    (if (stringp value)
+                        (setcdr sub (cons (vector (concat prefix value)
+                                                  name t)
+                                          (cdr sub)))
+                      (error "Cannot have multiple special math menu items"))
+                  (setcdr parent
+                          (cons (if (stringp value)
+                                    (list menu (vector (concat prefix value)
+                                                       name t))
+                                  (vector menu name t))
+                                (cdr parent)))))))))
     ;; Make the math prefix char available if it has not been used as a prefix.
     (unless (lookup-key map (LaTeX-math-abbrev-prefix))
       (define-key map (LaTeX-math-abbrev-prefix) 'self-insert-command))))
@@ -5430,22 +5448,22 @@ menu display.  When nil, no character is shown.
 See also `LaTeX-math-menu'."
   :group 'LaTeX-math
   :set (lambda (symbol value)
-        (set-default symbol value)
-        (LaTeX-math-initialize))
+         (set-default symbol value)
+         (LaTeX-math-initialize))
   :type '(repeat (group (choice :tag "Key"
-                               (const :tag "none" nil)
-                               (choice (character)
-                                       (string :tag "Key sequence")))
-                       (choice :tag "Value"
-                               (string :tag "Macro")
-                               (function))
-                       (choice :tag "Menu"
-                               (string :tag "Top level menu" )
-                               (repeat :tag "Submenu"
-                                       (string :tag "Menu")))
-                       (choice :tag "Unicode character"
-                               (const :tag "none" nil)
-                               (integer :tag "Number")))))
+                                (const :tag "none" nil)
+                                (choice (character)
+                                        (string :tag "Key sequence")))
+                        (choice :tag "Value"
+                                (string :tag "Macro")
+                                (function))
+                        (choice :tag "Menu"
+                                (string :tag "Top level menu" )
+                                (repeat :tag "Submenu"
+                                        (string :tag "Menu")))
+                        (choice :tag "Unicode character"
+                                (const :tag "none" nil)
+                                (integer :tag "Number")))))
 
 (defvar LaTeX-math-mode-menu)
 (defvar LaTeX-math-mode-map)
@@ -5479,19 +5497,19 @@ commands are defined:
 If `TeX-electric-math' is non-nil wrap that symbols around the
 string."
   (let ((active (TeX-active-mark))
-       m closer)
+        m closer)
     (if (and active (> (point) (mark)))
-       (exchange-point-and-mark))
+        (exchange-point-and-mark))
     (when dollar
       (insert (or (car TeX-electric-math) "$"))
       (save-excursion
-       (if active (goto-char (mark)))
-       ;; Store closer string for later reference.
-       (setq closer (or (cdr TeX-electric-math) "$"))
-       (insert closer)
-       ;; Set temporal marker to decide whether to put the point
-       ;; after the math mode closer or not.
-       (setq m (point-marker))))
+        (if active (goto-char (mark)))
+        ;; Store closer string for later reference.
+        (setq closer (or (cdr TeX-electric-math) "$"))
+        (insert closer)
+        ;; Set temporal marker to decide whether to put the point
+        ;; after the math mode closer or not.
+        (setq m (point-marker))))
     (funcall LaTeX-math-insert-function string)
     (when dollar
       ;; If the above `LaTeX-math-insert-function' resulted in
@@ -5499,7 +5517,7 @@ string."
       ;; typing "`(", keep the point between them.  Otherwise
       ;; move the point after the math mode closer.
       (if (= m (+ (point) (length closer)))
-         (goto-char m))
+          (goto-char m))
       ;; Make temporal marker point nowhere not to slow down the
       ;; subsequent editing in the buffer.
       (set-marker m nil))))
@@ -5521,41 +5539,41 @@ char."
 (defcustom LaTeX-fold-macro-spec-list nil
   "List of display strings and macros to fold in LaTeX mode."
   :type '(repeat (group (choice (string :tag "Display String")
-                               (integer :tag "Number of argument" :value 1))
-                       (repeat :tag "Macros" (string))))
+                                (integer :tag "Number of argument" :value 1))
+                        (repeat :tag "Macros" (string))))
   :group 'TeX-fold)
 
 (defcustom LaTeX-fold-env-spec-list nil
   "List of display strings and environments to fold in LaTeX mode."
   :type '(repeat (group (choice (string :tag "Display String")
-                               (integer :tag "Number of argument" :value 1))
-                       (repeat :tag "Environments" (string))))
+                                (integer :tag "Number of argument" :value 1))
+                        (repeat :tag "Environments" (string))))
   :group 'TeX-fold)
 
 (defcustom LaTeX-fold-math-spec-list
   (delete nil
-         (mapcar (lambda (elt)
-                   (let ((tex-token (nth 1 elt))
-                         (submenu   (nth 2 elt))
-                         (unicode   (nth 3 elt))
-                         uchar noargp)
-                     (when (and (fboundp 'decode-char) (integerp unicode))
-                       (setq uchar (decode-char 'ucs unicode)))
-                     (when (listp submenu) (setq submenu (nth 1 submenu)))
-                     (setq noargp
-                           (not (string-match
-                                 (concat "^" (regexp-opt '("Constructs"
-                                                           "Accents")))
-                                 submenu)))
-                     (when (and (stringp tex-token) (integerp uchar) noargp)
-                       `(,(char-to-string uchar) (,tex-token)))))
-                 `((nil "to" "" 8594)
-                   (nil "gets" "" 8592)
-                   ,@LaTeX-math-default)))
+          (mapcar (lambda (elt)
+                    (let ((tex-token (nth 1 elt))
+                          (submenu   (nth 2 elt))
+                          (unicode   (nth 3 elt))
+                          uchar noargp)
+                      (when (and (fboundp 'decode-char) (integerp unicode))
+                        (setq uchar (decode-char 'ucs unicode)))
+                      (when (listp submenu) (setq submenu (nth 1 submenu)))
+                      (setq noargp
+                            (not (string-match
+                                  (concat "^" (regexp-opt '("Constructs"
+                                                            "Accents")))
+                                  submenu)))
+                      (when (and (stringp tex-token) (integerp uchar) noargp)
+                        `(,(char-to-string uchar) (,tex-token)))))
+                  `((nil "to" "" 8594)
+                    (nil "gets" "" 8592)
+                    ,@LaTeX-math-default)))
   "List of display strings and math macros to fold in LaTeX mode."
   :type '(repeat (group (choice (string :tag "Display String")
-                               (integer :tag "Number of argument" :value 1))
-                       (repeat :tag "Math Macros" (string))))
+                                (integer :tag "Number of argument" :value 1))
+                        (repeat :tag "Math Macros" (string))))
   :group 'TeX-fold)
 
 ;;; Narrowing
@@ -5569,7 +5587,7 @@ environments."
   (save-excursion
     (widen)
     (let ((opoint (point))
-         beg end)
+          beg end)
       (dotimes (_ count) (LaTeX-find-matching-end))
       (setq end (point))
       (goto-char opoint)
@@ -5609,7 +5627,7 @@ environments."
     (define-key map "\C-c\C-e" 'LaTeX-environment)
     (define-key map "\C-c\n"   'LaTeX-insert-item)
     (or (key-binding "\e\r")
-       (define-key map "\e\r"    'LaTeX-insert-item)) ;*** Alias
+        (define-key map "\e\r"    'LaTeX-insert-item)) ;*** Alias
     (define-key map "\C-c]" 'LaTeX-close-environment)
     (define-key map "\C-c\C-s" 'LaTeX-section)
 
@@ -5641,14 +5659,14 @@ environments."
 (defun LaTeX-section-enable (entry)
   "Enable or disable section ENTRY from `LaTeX-section-list'."
   (let* ((level (nth 1 entry))
-        (symbol (LaTeX-section-enable-symbol level)))
+         (symbol (LaTeX-section-enable-symbol level)))
     (set symbol (or (= level 0) (>= level LaTeX-largest-level)))
     (make-variable-buffer-local symbol)))
 
 (defun LaTeX-section-menu (level)
   "Insert section from menu."
   (let ((LaTeX-section-hook (delq 'LaTeX-section-heading
-                                 (copy-sequence LaTeX-section-hook))))
+                                  (copy-sequence LaTeX-section-hook))))
     (LaTeX-section level)))
 
 (defun LaTeX-section-menu-entry (entry)
@@ -5663,7 +5681,7 @@ into submenus of nearly equal length.  If nil, never 
split menu into
 submenus."
   :group 'LaTeX-environment
   :type '(choice (const :tag "no submenus" nil)
-                (integer)))
+                 (integer)))
 
 (defcustom LaTeX-submenu-name-format "%-12.12s ... %.12s"
   "Format specification of the submenu name.
@@ -5676,41 +5694,41 @@ function is called with two arguments, the names of the 
first and
 the last entry in the menu."
   :group 'LaTeX-environment
   :type '(choice (string :tag "Format string")
-                (function)))
+                 (function)))
 
 (defun LaTeX-split-long-menu (menu)
   "Split MENU according to `LaTeX-menu-max-items'."
   (let ((len (length menu)))
     (if (or (null LaTeX-menu-max-items)
-           (null (featurep 'lisp-float-type))
-           (<= len LaTeX-menu-max-items))
-       menu
+            (null (featurep 'lisp-float-type))
+            (<= len LaTeX-menu-max-items))
+        menu
       ;; Submenu is max 2 entries longer than menu, never shorter, number of
       ;; entries in submenus differ by at most one (with longer submenus first)
       (let* ((outer (floor (sqrt len)))
-            (inner (/ len outer))
-            (rest (% len outer))
-            (result nil))
-       (setq menu (reverse menu))
-       (while menu
-         (let ((in inner)
-               (sub nil)
-               (to (car menu)))
-           (while (> in 0)
-             (setq in   (1- in)
-                   sub  (cons (car menu) sub)
-                   menu (cdr menu)))
-           (setq result
-                 (cons (cons (if (stringp LaTeX-submenu-name-format)
-                                 (format LaTeX-submenu-name-format
-                                         (aref (car sub) 0) (aref to 0))
-                               (funcall LaTeX-submenu-name-format
-                                        (aref (car sub) 0) (aref to 0)))
-                             sub)
-                       result)
-                 rest  (1+ rest))
-           (if (= rest outer) (setq inner (1+ inner)))))
-       result))))
+             (inner (/ len outer))
+             (rest (% len outer))
+             (result nil))
+        (setq menu (reverse menu))
+        (while menu
+          (let ((in inner)
+                (sub nil)
+                (to (car menu)))
+            (while (> in 0)
+              (setq in   (1- in)
+                    sub  (cons (car menu) sub)
+                    menu (cdr menu)))
+            (setq result
+                  (cons (cons (if (stringp LaTeX-submenu-name-format)
+                                  (format LaTeX-submenu-name-format
+                                          (aref (car sub) 0) (aref to 0))
+                                (funcall LaTeX-submenu-name-format
+                                         (aref (car sub) 0) (aref to 0)))
+                              sub)
+                        result)
+                  rest  (1+ rest))
+            (if (= rest outer) (setq inner (1+ inner)))))
+        result))))
 
 (defun LaTeX-section-menu-filter (ignored)
   "Filter function for the section submenu in the mode menu.
@@ -5718,10 +5736,10 @@ The argument IGNORED is not used in any way."
   (TeX-update-style)
   (or LaTeX-section-menu
       (progn
-       (setq LaTeX-section-list-changed nil)
-       (mapc 'LaTeX-section-enable LaTeX-section-list)
-       (setq LaTeX-section-menu
-             (mapcar 'LaTeX-section-menu-entry LaTeX-section-list)))))
+        (setq LaTeX-section-list-changed nil)
+        (mapc 'LaTeX-section-enable LaTeX-section-list)
+        (setq LaTeX-section-menu
+              (mapcar 'LaTeX-section-menu-entry LaTeX-section-list)))))
 
 (defvar LaTeX-environment-menu nil)
 (make-variable-buffer-local 'LaTeX-environment-menu)
@@ -5736,16 +5754,16 @@ corresponds to the variables 
`LaTeX-environment-menu-name' and
   (cond
    ((string= menu LaTeX-environment-menu-name)
     (or LaTeX-environment-menu
-       (setq LaTeX-environment-menu
-             (LaTeX-split-long-menu
-              (mapcar 'LaTeX-environment-menu-entry
-                      (LaTeX-environment-list))))))
+        (setq LaTeX-environment-menu
+              (LaTeX-split-long-menu
+               (mapcar 'LaTeX-environment-menu-entry
+                       (LaTeX-environment-list))))))
    ((string= menu LaTeX-environment-modify-menu-name)
     (or LaTeX-environment-modify-menu
-       (setq LaTeX-environment-modify-menu
-             (LaTeX-split-long-menu
-              (mapcar 'LaTeX-environment-modify-menu-entry
-                      (LaTeX-environment-list))))))))
+        (setq LaTeX-environment-modify-menu
+              (LaTeX-split-long-menu
+               (mapcar 'LaTeX-environment-modify-menu-entry
+                       (LaTeX-environment-list))))))))
 
 (defadvice LaTeX-add-environments (after LaTeX-invalidate-environment-menu 
(&rest environments) activate)
   "Add ENVIRONMENTS to the list of known environments.
@@ -5769,11 +5787,11 @@ regenerated by the respective menu filter."
     ["Complete Macro" TeX-complete-symbol
      :help "Complete the current macro or environment name"]
     ,(list LaTeX-environment-menu-name
-          :filter (lambda (ignored) (LaTeX-environment-menu-filter
-                                     LaTeX-environment-menu-name)))
+           :filter (lambda (ignored) (LaTeX-environment-menu-filter
+                                      LaTeX-environment-menu-name)))
     ,(list LaTeX-environment-modify-menu-name
-          :filter (lambda (ignored) (LaTeX-environment-menu-filter
-                                     LaTeX-environment-modify-menu-name)))
+           :filter (lambda (ignored) (LaTeX-environment-menu-filter
+                                      LaTeX-environment-modify-menu-name)))
     ["Close Environment" LaTeX-close-environment
      :help "Insert the \\end part of the current environment"]
     ["Item" LaTeX-insert-item
@@ -5870,16 +5888,16 @@ regenerated by the respective menu filter."
   "Font commands used with LaTeX2e.  See `TeX-font-list'."
   :group 'LaTeX-macro
   :type '(repeat
-         (group
-          :value (?\C-a "" "")
-          (character :tag "Key")
-          (string :tag "Prefix")
-          (string :tag "Suffix")
-          (option (group
-                   :inline t
-                   (string :tag "Math Prefix")
-                   (string :tag "Math Suffix")))
-          (option (sexp :format "Replace\n" :value t)))))
+          (group
+           :value (?\C-a "" "")
+           (character :tag "Key")
+           (string :tag "Prefix")
+           (string :tag "Suffix")
+           (option (group
+                    :inline t
+                    (string :tag "Math Prefix")
+                    (string :tag "Math Suffix")))
+           (option (sexp :format "Replace\n" :value t)))))
 
 
 ;;; Simple Commands
@@ -5915,9 +5933,9 @@ used instead of `LaTeX-babel-hyphen'.  The third element 
is the
 value overriding `LaTeX-babel-hyphen-after-hyphen'."
   :group 'LaTeX-macro
   :type '(alist :key-type (string :tag "Language")
-               :value-type (group (string :tag "Hyphen string")
-                                  (boolean :tag "Insert plain hyphen first"
-                                           :value t))))
+                :value-type (group (string :tag "Hyphen string")
+                                   (boolean :tag "Insert plain hyphen first"
+                                            :value t))))
 
 (defvar LaTeX-babel-hyphen-language nil
   "String determining language-specific behavior of hyphen insertion.
@@ -5936,46 +5954,46 @@ the buffer context.
 If prefix argument FORCE is non-nil, always insert a regular hyphen."
   (interactive "*P")
   (if (or force
-         (zerop (length LaTeX-babel-hyphen))
-         (not LaTeX-babel-hyphen-language)
-         ;; FIXME: It would be nice to check for verbatim constructs in the
-         ;; non-font-locking case, but things like `LaTeX-current-environment'
-         ;; are rather expensive in large buffers.
-         (and (fboundp 'font-latex-faces-present-p)
-              (font-latex-faces-present-p '(font-latex-verbatim-face
-                                            font-latex-math-face
-                                            font-lock-comment-face)))
-         (texmathp)
-         (TeX-in-comment))
+          (zerop (length LaTeX-babel-hyphen))
+          (not LaTeX-babel-hyphen-language)
+          ;; FIXME: It would be nice to check for verbatim constructs in the
+          ;; non-font-locking case, but things like `LaTeX-current-environment'
+          ;; are rather expensive in large buffers.
+          (and (fboundp 'font-latex-faces-present-p)
+               (font-latex-faces-present-p '(font-latex-verbatim-face
+                                             font-latex-math-face
+                                             font-lock-comment-face)))
+          (texmathp)
+          (TeX-in-comment))
       (call-interactively 'self-insert-command)
     (let* ((lang (assoc LaTeX-babel-hyphen-language
-                       LaTeX-babel-hyphen-language-alist))
-          (hyphen (if lang (nth 1 lang) LaTeX-babel-hyphen))
-          (h-after-h (if lang (nth 2 lang) LaTeX-babel-hyphen-after-hyphen))
-          (hyphen-length (length hyphen)))
+                        LaTeX-babel-hyphen-language-alist))
+           (hyphen (if lang (nth 1 lang) LaTeX-babel-hyphen))
+           (h-after-h (if lang (nth 2 lang) LaTeX-babel-hyphen-after-hyphen))
+           (hyphen-length (length hyphen)))
       (cond
        ;; "= --> -- / -
        ((string= (buffer-substring (max (- (point) hyphen-length) (point-min))
-                                  (point))
-                hyphen)
-       (if h-after-h
-           (progn (delete-char (- hyphen-length))
-                  (insert "--"))
-         (delete-char (- hyphen-length))
-         (call-interactively 'self-insert-command)))
+                                   (point))
+                 hyphen)
+        (if h-after-h
+            (progn (delete-char (- hyphen-length))
+                   (insert "--"))
+          (delete-char (- hyphen-length))
+          (call-interactively 'self-insert-command)))
        ;; -- --> [+]-
        ((string= (buffer-substring (max (- (point) 2) (point-min))
-                                  (point))
-                "--")
-       (call-interactively 'self-insert-command))
+                                   (point))
+                 "--")
+        (call-interactively 'self-insert-command))
        ;; - --> "= / [+]-
        ((eq (char-before) ?-)
-       (if h-after-h
-           (progn (delete-char -1)
-                  (insert hyphen))
-         (call-interactively 'self-insert-command)))
+        (if h-after-h
+            (progn (delete-char -1)
+                   (insert hyphen))
+          (call-interactively 'self-insert-command)))
        (h-after-h
-       (call-interactively 'self-insert-command))
+        (call-interactively 'self-insert-command))
        (t (insert hyphen))))))
 ;; Cater for Delete Selection mode
 (put 'LaTeX-babel-insert-hyphen 'delete-selection t)
@@ -6065,28 +6083,28 @@ of `LaTeX-mode-hook'."
   ;; `TeX-update-style-hook' before toolbarx-refresh, otherwise the 
bibliography
   ;; button could be wrongly set.
   (add-hook 'TeX-update-style-hook
-           (lambda ()
-             (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
-                 (setq LaTeX-using-Biber LaTeX-biblatex-use-Biber))) nil t)
+            (lambda ()
+              (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
+                  (setq LaTeX-using-Biber LaTeX-biblatex-use-Biber))) nil t)
 
   ;; Run style hooks associated with class options.
   (add-hook 'TeX-update-style-hook
-           (lambda ()
-             (let ((TeX-style-hook-dialect :classopt)
-                   ;; Don't record class option names in
-                   ;; `TeX-active-styles'.
-                   (TeX-active-styles nil))
-               (apply #'TeX-run-style-hooks
-                      (apply #'append
-                             (mapcar #'cdr LaTeX-provided-class-options)))))
-           nil t)
+            (lambda ()
+              (let ((TeX-style-hook-dialect :classopt)
+                    ;; Don't record class option names in
+                    ;; `TeX-active-styles'.
+                    (TeX-active-styles nil))
+                (apply #'TeX-run-style-hooks
+                       (apply #'append
+                              (mapcar #'cdr LaTeX-provided-class-options)))))
+            nil t)
   (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
   (when (fboundp 'LaTeX-preview-setup)
     (LaTeX-preview-setup))
   (TeX-set-mode-name)
   ;; Defeat filladapt
   (if (and (boundp 'filladapt-mode)
-          filladapt-mode)
+           filladapt-mode)
       (turn-off-filladapt-mode))
   (when (< 25 emacs-major-version)
     ;; Set up flymake backend, see latex-flymake.el
@@ -6109,8 +6127,8 @@ runs the hooks in `docTeX-mode-hook'."
   (setq TeX-default-extension docTeX-default-extension)
   ;; Make filling and indentation aware of DocStrip guards.
   (setq paragraph-start (concat paragraph-start "\\|%<")
-       paragraph-separate (concat paragraph-separate "\\|%<")
-       TeX-comment-start-regexp "\\(?:%\\(?:<[^>]+>\\)?\\)")
+        paragraph-separate (concat paragraph-separate "\\|%<")
+        TeX-comment-start-regexp "\\(?:%\\(?:<[^>]+>\\)?\\)")
   (setq TeX-base-mode-name "docTeX")
   (TeX-set-mode-name)
   (funcall TeX-install-font-lock))
@@ -6144,8 +6162,8 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
 
 (defcustom LaTeX-clean-intermediate-suffixes
   (append TeX-clean-default-intermediate-suffixes
-         ;; These are extensions of files created by makeglossaries.
-         '("\\.acn" "\\.acr" "\\.alg" "\\.glg" "\\.ist"))
+          ;; These are extensions of files created by makeglossaries.
+          '("\\.acn" "\\.acr" "\\.alg" "\\.glg" "\\.ist"))
   "List of regexps matching suffixes of files to be deleted.
 The regexps will be anchored at the end of the file name to be matched,
 i.e. you do _not_ have to cater for this yourself by adding \\\\' or $."
@@ -6187,7 +6205,7 @@ function would return non-nil and `(match-string 1)' 
would return
       (setq LaTeX-largest-level (LaTeX-section-level "section")))
 
   (setq TeX-header-end LaTeX-header-end
-       TeX-trailer-start LaTeX-trailer-start)
+        TeX-trailer-start LaTeX-trailer-start)
   (set (make-local-variable 'TeX-style-hook-dialect) TeX-dialect)
 
   (require 'outline)
@@ -6195,60 +6213,60 @@ function would return non-nil and `(match-string 1)' 
would return
   (set (make-local-variable 'outline-regexp) (LaTeX-outline-regexp t))
   (when (boundp 'outline-heading-alist)
     (setq outline-heading-alist
-         (mapcar (lambda (x)
-                   (cons (concat "\\" (nth 0 x)) (nth 1 x)))
-                 LaTeX-section-list)))
+          (mapcar (lambda (x)
+                    (cons (concat "\\" (nth 0 x)) (nth 1 x)))
+                  LaTeX-section-list)))
 
   (set (make-local-variable 'TeX-auto-full-regexp-list)
        (append LaTeX-auto-regexp-list plain-TeX-auto-regexp-list))
 
   (LaTeX-set-paragraph-start)
   (setq paragraph-separate
-       (concat
-        "[ \t]*%*[ \t]*\\("
-        "\\$\\$"                       ; Plain TeX display math
-        "\\|$\\)"))
+        (concat
+         "[ \t]*%*[ \t]*\\("
+         "\\$\\$"                       ; Plain TeX display math
+         "\\|$\\)"))
 
   (setq TeX-verbatim-p-function 'LaTeX-verbatim-p)
   (setq TeX-search-forward-comment-start-function
-       'LaTeX-search-forward-comment-start)
+        'LaTeX-search-forward-comment-start)
   (set (make-local-variable 'TeX-search-files-type-alist)
        LaTeX-search-files-type-alist)
 
   (set (make-local-variable 'LaTeX-item-list) '(("description" . 
LaTeX-item-argument)
-                                               ("thebibliography" . 
LaTeX-item-bib)
-                                               ("array" . LaTeX-item-array)
-                                               ("tabular" . LaTeX-item-array)
-                                               ("tabular*" . 
LaTeX-item-tabular*)))
+                                                ("thebibliography" . 
LaTeX-item-bib)
+                                                ("array" . LaTeX-item-array)
+                                                ("tabular" . LaTeX-item-array)
+                                                ("tabular*" . 
LaTeX-item-tabular*)))
 
   (setq TeX-complete-list
-       (append '(("\\\\cite\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
-                  1 LaTeX-bibitem-list "}")
-                 ("\\\\cite{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-bibitem-list "}")
-                 ("\\\\cite{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
-                  2 LaTeX-bibitem-list)
-                 ("\\\\nocite{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-bibitem-list "}")
-                 ("\\\\nocite{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
-                  2 LaTeX-bibitem-list)
-                 ("\\\\[Rr]ef{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
-                 ("\\\\eqref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
-                 ("\\\\pageref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
-                 ("\\\\\\(index\\|glossary\\){\\([^{}\n\r\\%]*\\)"
-                  2 LaTeX-index-entry-list "}")
-                 ("\\\\begin{\\([A-Za-z]*\\)" 1 
LaTeX-environment-list-filtered "}")
-                 ("\\\\end{\\([A-Za-z]*\\)" 1 LaTeX-environment-list-filtered 
"}")
-                 ("\\\\renewcommand\\*?{\\\\\\([A-Za-z]*\\)"
-                  1 TeX-symbol-list-filtered "}")
-                 ("\\\\renewenvironment\\*?{\\([A-Za-z]*\\)"
-                  1 LaTeX-environment-list-filtered "}")
+        (append '(("\\\\cite\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
+                   1 LaTeX-bibitem-list "}")
+                  ("\\\\cite{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-bibitem-list "}")
+                  ("\\\\cite{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
+                   2 LaTeX-bibitem-list)
+                  ("\\\\nocite{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-bibitem-list "}")
+                  ("\\\\nocite{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
+                   2 LaTeX-bibitem-list)
+                  ("\\\\[Rr]ef{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
+                  ("\\\\eqref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
+                  ("\\\\pageref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
+                  ("\\\\\\(index\\|glossary\\){\\([^{}\n\r\\%]*\\)"
+                   2 LaTeX-index-entry-list "}")
+                  ("\\\\begin{\\([A-Za-z]*\\)" 1 
LaTeX-environment-list-filtered "}")
+                  ("\\\\end{\\([A-Za-z]*\\)" 1 LaTeX-environment-list-filtered 
"}")
+                  ("\\\\renewcommand\\*?{\\\\\\([A-Za-z]*\\)"
+                   1 TeX-symbol-list-filtered "}")
+                  ("\\\\renewenvironment\\*?{\\([A-Za-z]*\\)"
+                   1 LaTeX-environment-list-filtered "}")
                   ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)"
-                  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))
+                   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
    '("document" LaTeX-env-document)
@@ -6292,13 +6310,13 @@ function would return non-nil and `(match-string 1)' 
would return
 
   ;; `latex.ltx' defines the following counters
   (LaTeX-add-counters "page" "equation" "enumi" "enumii" "enumiii"
-                     "enumiv" "footnote" "mpfootnote")
+                      "enumiv" "footnote" "mpfootnote")
 
   (LaTeX-add-lengths "arraycolsep" "arrayrulewidth" "baselineskip" 
"baselinestretch"
-                    "bibindent" "columnsep" "columnwidth" "doublerulesep"
-                    "evensidemargin" "linewidth" "oddsidemargin" "paperwidth"
-                    "paperheight" "parindent" "parskip" "tabcolsep"
-                    "textheight" "textwidth" "topmargin" "unitlength")
+                     "bibindent" "columnsep" "columnwidth" "doublerulesep"
+                     "evensidemargin" "linewidth" "oddsidemargin" "paperwidth"
+                     "paperheight" "parindent" "parskip" "tabcolsep"
+                     "textheight" "textwidth" "topmargin" "unitlength")
 
   (TeX-add-symbols
    '("addtocounter" TeX-arg-counter "Value")
@@ -6336,11 +6354,11 @@ function would return non-nil and `(match-string 1)' 
would return
    '("newtheorem" TeX-arg-define-environment
      [ 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"))
-                      "") ])
+                                       (backward-char 2)
+                                       (preceding-char)) ?\])
+                                 ()
+                               (TeX-arg-counter t "Within counter"))
+                       "") ])
    '("newfont" TeX-arg-define-macro t)
    '("circle" "Diameter")
    '("circle*" "Diameter")
@@ -6348,15 +6366,15 @@ function would return non-nil and `(match-string 1)' 
would return
      [ TeX-arg-corner ] t)
    '("frame" t)
    '("framebox" (TeX-arg-conditional
-                (string-equal (LaTeX-current-environment) "picture")
-                (TeX-arg-size [ TeX-arg-corner ] t)
-                ([ "Length" ] [ TeX-arg-lr ] t)))
+                 (string-equal (LaTeX-current-environment) "picture")
+                 (TeX-arg-size [ TeX-arg-corner ] t)
+                 ([ "Length" ] [ TeX-arg-lr ] t)))
    '("line" (TeX-arg-pair "X slope" "Y slope") "Length")
    '("linethickness" "Dimension")
    '("makebox" (TeX-arg-conditional
-               (string-equal (LaTeX-current-environment) "picture")
-               (TeX-arg-size [ TeX-arg-corner ] t)
-               ([ "Length" ] [ TeX-arg-lr ] t)))
+                (string-equal (LaTeX-current-environment) "picture")
+                (TeX-arg-size [ TeX-arg-corner ] t)
+                ([ "Length" ] [ TeX-arg-lr ] t)))
    '("multiput"
      TeX-arg-coordinate
      (TeX-arg-pair "X delta" "Y delta")
@@ -6375,10 +6393,10 @@ function would return non-nil and `(match-string 1)' 
would return
    '("multicolumn" "Columns" "Format" t)
    '("item"
      (TeX-arg-conditional (or TeX-arg-item-label-p
-                             (string-equal (LaTeX-current-environment)
-                                           "description"))
-                         ([ "Item label" ])
-                         ())
+                              (string-equal (LaTeX-current-environment)
+                                            "description"))
+                          ([ "Item label" ])
+                          ())
      (TeX-arg-literal " "))
    '("bibitem" [ "Bibitem label" ] TeX-arg-define-cite)
    '("cite"
@@ -6429,8 +6447,8 @@ function would return non-nil and `(match-string 1)' 
would return
    '("thanks" t)
    '("title" t)
    '("pagenumbering" (TeX-arg-eval
-                     completing-read "Numbering style: "
-                     '(("arabic") ("roman") ("Roman") ("alph") ("Alph"))))
+                      completing-read "Numbering style: "
+                      '(("arabic") ("roman") ("Roman") ("alph") ("Alph"))))
    '("pagestyle" TeX-arg-pagestyle)
    '("markboth" t nil)
    '("markright" t)
@@ -6707,31 +6725,31 @@ function would return non-nil and `(match-string 1)' 
would return
      '("RequirePackage" LaTeX-arg-usepackage)
      '("ProvidesPackage" (TeX-arg-file-name-sans-extension "Package name")
        [ TeX-arg-conditional (y-or-n-p "Insert version? ")
-        ([ TeX-arg-version ]) nil])
+         ([ TeX-arg-version ]) nil])
      '("ProvidesClass" (TeX-arg-file-name-sans-extension "Class name")
        [ TeX-arg-conditional (y-or-n-p "Insert version? ")
-        ([ TeX-arg-version ]) nil])
+         ([ TeX-arg-version ]) nil])
      '("ProvidesFile" (TeX-arg-file-name "File name")
        [ TeX-arg-conditional (y-or-n-p "Insert version? ")
-        ([ TeX-arg-version ]) nil ])
+         ([ TeX-arg-version ]) nil ])
      '("documentclass" TeX-arg-document)))
 
   (TeX-add-style-hook "latex2e"
-                     ;; Use new fonts for `\documentclass' documents.
-                     (lambda ()
-                       (setq TeX-font-list LaTeX-font-list)
-                       (setq TeX-font-replace-function 'TeX-font-replace-macro)
-                       (run-hooks 'LaTeX2e-hook))
-                     TeX-dialect)
+                      ;; Use new fonts for `\documentclass' documents.
+                      (lambda ()
+                        (setq TeX-font-list LaTeX-font-list)
+                        (setq TeX-font-replace-function 
'TeX-font-replace-macro)
+                        (run-hooks 'LaTeX2e-hook))
+                      TeX-dialect)
 
   (TeX-add-style-hook "latex2"
-                     ;; Use old fonts for `\documentstyle' documents.
-                     (lambda ()
-                       (setq TeX-font-list (default-value 'TeX-font-list))
-                       (setq TeX-font-replace-function
-                             (default-value 'TeX-font-replace-function))
-                       (run-hooks 'LaTeX2-hook))
-                     TeX-dialect)
+                      ;; Use old fonts for `\documentstyle' documents.
+                      (lambda ()
+                        (setq TeX-font-list (default-value 'TeX-font-list))
+                        (setq TeX-font-replace-function
+                              (default-value 'TeX-font-replace-function))
+                        (run-hooks 'LaTeX2-hook))
+                      TeX-dialect)
 
   ;; There must be something better-suited, but I don't understand the
   ;; parsing properly.  -- dak
@@ -6739,11 +6757,11 @@ function would return non-nil and `(match-string 1)' 
would return
   (TeX-add-style-hook "pdftricks" #'TeX-PDF-mode-on :classopt)
   (TeX-add-style-hook "pst-pdf" #'TeX-PDF-mode-on :classopt)
   (TeX-add-style-hook "dvips"
-                     (lambda ()
-                       ;; Leave at user's choice whether to disable
-                       ;; `TeX-PDF-mode' or not.
-                       (setq TeX-PDF-from-DVI "Dvips"))
-                     :classopt)
+                      (lambda ()
+                        ;; Leave at user's choice whether to disable
+                        ;; `TeX-PDF-mode' or not.
+                        (setq TeX-PDF-from-DVI "Dvips"))
+                      :classopt)
   ;; This is now done in style/pstricks.el because it prevents other
   ;; pstricks style files from being loaded.
   ;;   (TeX-add-style-hook "pstricks" 'TeX-PDF-mode-off)
@@ -6751,20 +6769,20 @@ function would return non-nil and `(match-string 1)' 
would return
   (TeX-add-style-hook "dvipdf" #'TeX-PDF-mode-off :classopt)
   (TeX-add-style-hook "dvipdfm" #'TeX-PDF-mode-off :classopt)
   (TeX-add-style-hook "dvipdfmx"
-                     (lambda ()
-                       (TeX-PDF-mode-on)
-                       ;; XeLaTeX normally don't use dvipdfmx
-                       ;; explicitly.
-                       (unless (eq TeX-engine 'xetex)
-                         (setq TeX-PDF-from-DVI "Dvipdfmx")))
-                     :classopt)
+                      (lambda ()
+                        (TeX-PDF-mode-on)
+                        ;; XeLaTeX normally don't use dvipdfmx
+                        ;; explicitly.
+                        (unless (eq TeX-engine 'xetex)
+                          (setq TeX-PDF-from-DVI "Dvipdfmx")))
+                      :classopt)
   ;;  (TeX-add-style-hook "DVIoutput" 'TeX-PDF-mode-off)
   ;;
   ;;  Well, DVIoutput indicates that we want to run PDFTeX and expect to
   ;;  get DVI output.  Ugh.
   (TeX-add-style-hook "ifpdf" (lambda ()
-                               (TeX-PDF-mode-on)
-                               (TeX-PDF-mode-off)) :classopt)
+                                (TeX-PDF-mode-on)
+                                (TeX-PDF-mode-off)) :classopt)
   ;; ifpdf indicates that we cater for either.  So calling both
   ;; functions will make sure that the default will get used unless the
   ;; user overrode it.
@@ -6787,7 +6805,7 @@ function would return non-nil and `(match-string 1)' 
would return
   ;; play nice with `electric-pair-mode' which is a global minor mode as of
   ;; emacs 24.4.
   (when (and LaTeX-electric-left-right-brace
-            (boundp 'electric-pair-mode))
+             (boundp 'electric-pair-mode))
     (set (make-local-variable 'electric-pair-mode) nil))
 
   ;; Initialization of `add-log-current-defun-function':
@@ -6798,16 +6816,16 @@ function would return non-nil and `(match-string 1)' 
would return
   "Imenu support function for LaTeX."
   (TeX-update-style)
   (let (entries
-       (regexp (LaTeX-outline-regexp)))
+        (regexp (LaTeX-outline-regexp)))
     (goto-char (point-max))
     (while (re-search-backward regexp nil t)
       (let* ((name (LaTeX-outline-name))
-            (level (make-string (1- (LaTeX-outline-level)) ?\ ))
-            (label (concat level level name))
-            (mark (make-marker)))
-       (set-marker mark (point))
-       (set-text-properties 0 (length label) nil label)
-       (setq entries (cons (cons label mark) entries))))
+             (level (make-string (1- (LaTeX-outline-level)) ?\ ))
+             (label (concat level level name))
+             (mark (make-marker)))
+        (set-marker mark (point))
+        (set-text-properties 0 (length label) nil label)
+        (setq entries (cons (cons label mark) entries))))
     entries))
 
 (defvar LaTeX-builtin-opts
@@ -6821,42 +6839,42 @@ function would return non-nil and `(match-string 1)' 
would return
   (let (optstr optlist 2eoptlist 2epackages docline docstyle)
     (goto-char (point-min))
     (if
-       (search-forward-regexp
-        "\\\\documentstyle\\[\\([^]]*\\)\\]{\\([^}]*\\)}"
-        (point-max) t)
-       (setq optstr (TeX-match-buffer 1)
-             docstyle (TeX-match-buffer 2)
-             optlist (TeX-split-string "," optstr))
+        (search-forward-regexp
+         "\\\\documentstyle\\[\\([^]]*\\)\\]{\\([^}]*\\)}"
+         (point-max) t)
+        (setq optstr (TeX-match-buffer 1)
+              docstyle (TeX-match-buffer 2)
+              optlist (TeX-split-string "," optstr))
       (if (search-forward-regexp
-          "\\\\documentstyle{\\([^}]*\\)}"
-          (point-max) t)
-         (setq docstyle (TeX-match-buffer 1))
-       (error "No documentstyle defined")))
+           "\\\\documentstyle{\\([^}]*\\)}"
+           (point-max) t)
+          (setq docstyle (TeX-match-buffer 1))
+        (error "No documentstyle defined")))
     (beginning-of-line 1)
     (setq docline (point))
     (insert "%%%")
     (while optlist
       (if (member (car optlist) LaTeX-builtin-opts)
-         (setq 2eoptlist (cons (car optlist) 2eoptlist))
-       (setq 2epackages (cons (car optlist) 2epackages)))
+          (setq 2eoptlist (cons (car optlist) 2eoptlist))
+        (setq 2epackages (cons (car optlist) 2epackages)))
       (setq optlist (cdr optlist)))
     ;;(message (format "%S %S" 2eoptlist 2epackages))
     (goto-char docline)
     (forward-line 1)
     (insert "\\documentclass")
     (if 2eoptlist
-       (insert "["
-               (mapconcat (lambda (x) x)
-                          (nreverse 2eoptlist) ",") "]"))
+        (insert "["
+                (mapconcat (lambda (x) x)
+                           (nreverse 2eoptlist) ",") "]"))
     (insert "{" docstyle "}\n")
     (if 2epackages
-       (insert "\\usepackage{"
-               (mapconcat (lambda (x) x)
-                          (nreverse 2epackages) "}\n\\usepackage{") "}\n"))
+        (insert "\\usepackage{"
+                (mapconcat (lambda (x) x)
+                           (nreverse 2epackages) "}\n\\usepackage{") "}\n"))
     (if (equal docstyle "slides")
         (progn
-         (goto-char (point-min))
-         (while (re-search-forward "\\\\blackandwhite{" nil t)
+          (goto-char (point-min))
+          (while (re-search-forward "\\\\blackandwhite{" nil t)
             (replace-match "\\\\input{" nil nil)))))
   (TeX-normal-mode nil))
 
@@ -6873,16 +6891,16 @@ function would return non-nil and `(match-string 1)' 
would return
       (LaTeX-env-beginning-pos-col)
     (let* ((cur-pos (point)))
       (save-excursion
-       (if (re-search-backward "\\\\\\\\" beg-pos t)
-           (let ((cur-idx (how-many "[^\\]&" (point) cur-pos)))
-             (goto-char beg-pos)
-             (re-search-forward "[^\\]&" cur-pos t (+ 1 cur-idx))
-             ;; If the above searchs fails, i.e. no "&" found,
-             ;; (- (current-column) 1) returns -1, which is wrong.  So
-             ;; we use a fallback (+ 2 beg-col) whenever this happens:
-             (max (- (current-column) 1)
-                  (+ 2 beg-col)))
-         (+ 2 beg-col))))))
+        (if (re-search-backward "\\\\\\\\" beg-pos t)
+            (let ((cur-idx (how-many "[^\\]&" (point) cur-pos)))
+              (goto-char beg-pos)
+              (re-search-forward "[^\\]&" cur-pos t (+ 1 cur-idx))
+              ;; If the above searchs fails, i.e. no "&" found,
+              ;; (- (current-column) 1) returns -1, which is wrong.  So
+              ;; we use a fallback (+ 2 beg-col) whenever this happens:
+              (max (- (current-column) 1)
+                   (+ 2 beg-col)))
+          (+ 2 beg-col))))))
 
 (defun LaTeX-indent-tabular ()
   "Return indent column for the current tabular-like line."
@@ -6890,31 +6908,31 @@ function would return non-nil and `(match-string 1)' 
would return
       (beg-pos . beg-col)
       (LaTeX-env-beginning-pos-col)
     (let ((tabular-like-end-regex
-          (format "\\\\end{%s}"
-                  (regexp-opt
-                   (let (out)
-                     (mapc (lambda (x)
+           (format "\\\\end{%s}"
+                   (regexp-opt
+                    (let (out)
+                      (mapc (lambda (x)
                               (when (eq (cadr x) 'LaTeX-indent-tabular)
                                 (push (car x) out)))
                             LaTeX-indent-environment-list)
-                     out)))))
+                      out)))))
       (cond ((looking-at tabular-like-end-regex)
-            beg-col)
+             beg-col)
 
-           ((looking-at "\\\\\\\\")
-            (+ 2 beg-col))
+            ((looking-at "\\\\\\\\")
+             (+ 2 beg-col))
 
-           ((looking-at "&")
-            (LaTeX-hanging-ampersand-position))
+            ((looking-at "&")
+             (LaTeX-hanging-ampersand-position))
 
-           (t
-            (+ 2
-               (let ((any-col (save-excursion
-                                (when (re-search-backward "\\\\\\\\\\|[^\\]&" 
beg-pos t)
-                                  (current-column)))))
-                 (if (and any-col (= ?& (char-before (match-end 0))))
-                     (1+ any-col)
-                   beg-col))))))))
+            (t
+             (+ 2
+                (let ((any-col (save-excursion
+                                 (when (re-search-backward "\\\\\\\\\\|[^\\]&" 
beg-pos t)
+                                   (current-column)))))
+                  (if (and any-col (= ?& (char-before (match-end 0))))
+                      (1+ any-col)
+                    beg-col))))))))
 
 ;; Utilities:
 
@@ -6927,13 +6945,13 @@ arguments are queried and inserted.  For examples, 
check the
 functions `TeX-arg-color' (style/color.el) or
 `LaTeX-arg-bicaption-bicaption' (style/bicaption.el)."
   `(unless (if (eq TeX-insert-macro-default-style 'show-all-optional-args)
-              (equal current-prefix-arg '(4))
-            (or
-             (and (eq TeX-insert-macro-default-style 'show-optional-args)
-                  (equal current-prefix-arg '(4)))
-             (and (eq TeX-insert-macro-default-style 'mandatory-args-only)
-                  (null (equal current-prefix-arg '(4))))
-             TeX-last-optional-rejected))
+               (equal current-prefix-arg '(4))
+             (or
+              (and (eq TeX-insert-macro-default-style 'show-optional-args)
+                   (equal current-prefix-arg '(4)))
+              (and (eq TeX-insert-macro-default-style 'mandatory-args-only)
+                   (null (equal current-prefix-arg '(4))))
+              TeX-last-optional-rejected))
      ,@body))
 
 (defun LaTeX-extract-key-value-label (&optional key num)
@@ -6961,19 +6979,19 @@ wrapped in \\(?:...\\)? then."
    ;; If KEY is the symbol none, don't look for any key=val:
    (unless (eq key 'none)
      (concat "\\<"
-            ;; Match the key, default is label
-            (or key "label")
-            ;; Optional spaces
-            "[[:space:]]*=[[:space:]]*"
-            ;; Match the value; braces around the value are optional
-            "{?\\("
-            ;; Cater for NUM which sets the regexp group
-            (when (and num (integerp num))
-              (concat "?" (number-to-string num) ":"))
-            ;; One of these chars terminates the value
-            "[^] ,}\r\n\t%]+"
-            ;; Close the group
-            "\\)}?"))
+             ;; Match the key, default is label
+             (or key "label")
+             ;; Optional spaces
+             "[[:space:]]*=[[:space:]]*"
+             ;; Match the value; braces around the value are optional
+             "{?\\("
+             ;; Cater for NUM which sets the regexp group
+             (when (and num (integerp num))
+               (concat "?" (number-to-string num) ":"))
+             ;; One of these chars terminates the value
+             "[^] ,}\r\n\t%]+"
+             ;; Close the group
+             "\\)}?"))
    ;; We are done.  Just search until the next closing bracket
    "[^]]*\\]"))
 
diff --git a/multi-prompt.el b/multi-prompt.el
index 98c6dab..9f5729e 100644
--- a/multi-prompt.el
+++ b/multi-prompt.el
@@ -41,59 +41,59 @@
 
 ;;;###autoload
 (defun multi-prompt (separator
-                    unique prompt table
-                    &optional mp-predicate require-match initial history)
+                     unique prompt table
+                     &optional mp-predicate require-match initial history)
   "Completing prompt for a list of strings.  
 The first argument SEPARATOR should be the string (of length 1) to
 separate the elements in the list.  The second argument UNIQUE should
 be non-nil, if each element must be unique.  The remaining elements
 are the arguments to `completing-read'.  See that."
   (let ((old-map (if require-match
-                    minibuffer-local-must-match-map
-                  minibuffer-local-completion-map))
-       (new-map (make-sparse-keymap)))
+                     minibuffer-local-must-match-map
+                   minibuffer-local-completion-map))
+        (new-map (make-sparse-keymap)))
     (set-keymap-parent new-map old-map)
     (define-key new-map separator (if require-match
-                                     'multi-prompt-next-must-match
-                                   'multi-prompt-next))
+                                      'multi-prompt-next-must-match
+                                    'multi-prompt-next))
     (define-key new-map "\C-?" 'multi-prompt-delete)
     (let* ((minibuffer-local-completion-map new-map)
-          (minibuffer-local-must-match-map new-map)
-          (multi-prompt-found nil)
-          (filter (cond (unique
-                         (lambda (x)
-                           (and (not (member (car x) multi-prompt-found))
-                                (or (null mp-predicate)
-                                    (funcall mp-predicate x)))))
-                        (mp-predicate)))
-          (answer (catch 'multi-prompt-exit
-                    (while t
-                      (let ((extra (catch 'multi-prompt-next
-                                     (throw 'multi-prompt-exit
-                                            (completing-read prompt 
-                                                             table
-                                                             filter
-                                                             require-match
-                                                             initial
-                                                             history)))))
-                        (cond ((eq extra 'back)
-                               (when multi-prompt-found
-                                 (setq prompt (substring 
-                                               prompt 0 
-                                               (- 0 (length separator)
-                                                  (length
-                                                   (car multi-prompt-found))))
-                                       initial (car multi-prompt-found))
-                                 (setq multi-prompt-found 
-                                       (cdr multi-prompt-found))))
-                              (t
-                               (setq prompt (concat prompt extra separator)
-                                     initial nil)
-                               (setq multi-prompt-found
-                                     (cons extra multi-prompt-found)))))))))
+           (minibuffer-local-must-match-map new-map)
+           (multi-prompt-found nil)
+           (filter (cond (unique
+                          (lambda (x)
+                            (and (not (member (car x) multi-prompt-found))
+                                 (or (null mp-predicate)
+                                     (funcall mp-predicate x)))))
+                         (mp-predicate)))
+           (answer (catch 'multi-prompt-exit
+                     (while t
+                       (let ((extra (catch 'multi-prompt-next
+                                      (throw 'multi-prompt-exit
+                                             (completing-read prompt 
+                                                              table
+                                                              filter
+                                                              require-match
+                                                              initial
+                                                              history)))))
+                         (cond ((eq extra 'back)
+                                (when multi-prompt-found
+                                  (setq prompt (substring 
+                                                prompt 0 
+                                                (- 0 (length separator)
+                                                   (length
+                                                    (car multi-prompt-found))))
+                                        initial (car multi-prompt-found))
+                                  (setq multi-prompt-found 
+                                        (cdr multi-prompt-found))))
+                               (t
+                                (setq prompt (concat prompt extra separator)
+                                      initial nil)
+                                (setq multi-prompt-found
+                                      (cons extra multi-prompt-found)))))))))
       (if (string= answer "")
-         multi-prompt-found
-       (nreverse (cons answer multi-prompt-found))))))
+          multi-prompt-found
+        (nreverse (cons answer multi-prompt-found))))))
 
 (defun multi-prompt-delete ()
   (interactive)
@@ -118,7 +118,7 @@ are the arguments to `completing-read'.  See that."
     (let ((content (buffer-substring-no-properties (point-min) (point-max))))
       (when (or ;; (not require-match)
                 (assoc content minibuffer-completion-table))
-       (throw 'multi-prompt-next content)))))
+        (throw 'multi-prompt-next content)))))
 
 
 ;;; Support for key=value completion
@@ -156,14 +156,14 @@ Functions'."
   (let ((beg 0) (last 0) matched)
     (while (string-match multi-prompt-key-value-sep string beg)
       (setq matched t
-           last beg
-           beg (match-end 0)))
+            last beg
+            beg (match-end 0)))
     (completion-table-with-context
      (substring string 0 beg)
      (if (not matched)
-        multi-prompt-completion-table
+         multi-prompt-completion-table
        (cadr (assoc (substring string last (1- beg))
-                   multi-prompt-completion-table)))
+                    multi-prompt-completion-table)))
      (substring string beg)
      predicate
      flag)))
@@ -173,10 +173,10 @@ Functions'."
 This is achieved by eval'ing all variables in the value parts of
 the alist elements."
   (mapcar (lambda (x)
-           (if (and (cadr x) (symbolp (cadr x)) (not (functionp (cadr x))))
-               (cons (car x) (list (eval (cadr x))))
-             x))
-         table))
+            (if (and (cadr x) (symbolp (cadr x)) (not (functionp (cadr x))))
+                (cons (car x) (list (eval (cadr x))))
+              x))
+          table))
 
 ;; Silence the byte compiler.
 (defvar crm-local-must-match-map)
@@ -184,8 +184,8 @@ the alist elements."
 
 ;;;###autoload
 (defun multi-prompt-key-value
-  (prompt table &optional predicate require-match initial-input
-         hist def inherit-input-method)
+    (prompt table &optional predicate require-match initial-input
+            hist def inherit-input-method)
   "Read multiple strings, with completion and key=value support.
 PROMPT is a string to prompt with, usually ending with a colon
 and a space.  TABLE is an alist.  The car of each element should
@@ -198,22 +198,22 @@ DEF, and INHERIT-INPUT-METHOD.
 
 The return value is the string as entered in the minibuffer."
   (let* ((minibuffer-completion-table #'multi-prompt-key-value-collection-fn)
-        (minibuffer-completion-predicate predicate)
-        (minibuffer-completion-confirm
-         (unless (eq require-match t) require-match))
-        (multi-prompt-completion-table
-         ;; Expand the table here because completion would otherwise
-         ;; interpret symbols in the table as functions.  However, it
-         ;; would be nicer if this could be done during the actual
-         ;; completion in order to avoid walking through the whole
-         ;; table.
-         (multi-prompt-expand-completion-table table))
-        (map (if require-match
-                 crm-local-must-match-map
-               crm-local-completion-map))
-        (input (read-from-minibuffer
-                prompt initial-input map
-                nil hist def inherit-input-method)))
+         (minibuffer-completion-predicate predicate)
+         (minibuffer-completion-confirm
+          (unless (eq require-match t) require-match))
+         (multi-prompt-completion-table
+          ;; Expand the table here because completion would otherwise
+          ;; interpret symbols in the table as functions.  However, it
+          ;; would be nicer if this could be done during the actual
+          ;; completion in order to avoid walking through the whole
+          ;; table.
+          (multi-prompt-expand-completion-table table))
+         (map (if require-match
+                  crm-local-must-match-map
+                crm-local-completion-map))
+         (input (read-from-minibuffer
+                 prompt initial-input map
+                 nil hist def inherit-input-method)))
     (and def (string-equal input "") (setq input def))
     input))
 
diff --git a/plain-tex.el b/plain-tex.el
index af1a74d..f2eaea8 100644
--- a/plain-tex.el
+++ b/plain-tex.el
@@ -148,36 +148,36 @@ of `plain-TeX-mode-hook'."
   (setq local-abbrev-table plain-tex-mode-abbrev-table)
   (set (make-local-variable 'TeX-style-hook-dialect) plain-TeX-dialect)
   (setq paragraph-start
-       (concat
-        "\\(?:[ \t]*$"
-        "\\|" (regexp-quote TeX-esc) "par\\|"
-        "[ \t]*"
-        (regexp-quote TeX-esc)
-        "\\(?:"
-        "begin\\|end\\|part\\|chapter\\|"
-        "section\\|subsection\\|subsubsection\\|"
-        "paragraph\\|include\\|includeonly\\|"
-        "tableofcontents\\|appendix\\|label\\|caption\\|\\(?:item\\)?item"
-        "\\)"
-        "\\|"
-        "[ \t]*\\$\\$"         ; display math delimitor
-        "\\)" ))
+        (concat
+         "\\(?:[ \t]*$"
+         "\\|" (regexp-quote TeX-esc) "par\\|"
+         "[ \t]*"
+         (regexp-quote TeX-esc)
+         "\\(?:"
+         "begin\\|end\\|part\\|chapter\\|"
+         "section\\|subsection\\|subsubsection\\|"
+         "paragraph\\|include\\|includeonly\\|"
+         "tableofcontents\\|appendix\\|label\\|caption\\|\\(?:item\\)?item"
+         "\\)"
+         "\\|"
+         "[ \t]*\\$\\$"         ; display math delimitor
+         "\\)" ))
   (setq paragraph-separate
-       (concat
-        "[ \t]*"
-        "\\(?:"
-        (regexp-quote TeX-esc) "par\\|"
-        "%\\|"
-        "$\\|"
-        "\\$\\$\\|"
-        (regexp-quote TeX-esc)
-        "\\(?:"
-        "begin\\|end\\|label\\|caption\\|part\\|chapter\\|"
-        "section\\|subsection\\|subsubsection\\|"
-        "paragraph\\|include\\|includeonly\\|"
-        "tableofcontents\\|appendix\\|" (regexp-quote TeX-esc)
-        "\\)"
-        "\\)"))
+        (concat
+         "[ \t]*"
+         "\\(?:"
+         (regexp-quote TeX-esc) "par\\|"
+         "%\\|"
+         "$\\|"
+         "\\$\\$\\|"
+         (regexp-quote TeX-esc)
+         "\\(?:"
+         "begin\\|end\\|label\\|caption\\|part\\|chapter\\|"
+         "section\\|subsection\\|subsubsection\\|"
+         "paragraph\\|include\\|includeonly\\|"
+         "tableofcontents\\|appendix\\|" (regexp-quote TeX-esc)
+         "\\)"
+         "\\)"))
   (setq TeX-header-end (regexp-quote "%**end of header"))
   (setq TeX-trailer-start (regexp-quote (concat TeX-esc "bye")))
   (TeX-add-symbols
diff --git a/preview.el b/preview.el
index a24bd91..2150a44 100644
--- a/preview.el
+++ b/preview.el
@@ -73,24 +73,24 @@ preview-latex's bug reporting commands will probably not 
work.")))
 (defconst preview-specs-type
   '(repeat
     (list :tag "Image spec"
-         ;; Use an extra :value keyword to avoid a bug in
-         ;; `widget-convert' of XEmacs 21.4 and Emacs 21.
-         ;; Analogously for the following `const' statements.
-         (const :format "" :value :type)
-         (choice :tag "Image type"
-                 (const xpm)
-                 (const xbm)
-                 (symbol :tag "Other"))
-         (set :inline t :tag "Minimum font size"
-              (list :inline t :tag ""
-                    (const :format "" :value :min)
-                    (integer :tag "pixels")))
-         (const :format "" :value :file) (string :tag "Filename")
-         (set :inline t :tag "Ascent ratio"
-              (list :inline t :tag ""
-                    (const :format "" :value :ascent)
-                    (integer :tag "percent of image"
-                             :value 50))))))
+          ;; Use an extra :value keyword to avoid a bug in
+          ;; `widget-convert' of XEmacs 21.4 and Emacs 21.
+          ;; Analogously for the following `const' statements.
+          (const :format "" :value :type)
+          (choice :tag "Image type"
+                  (const xpm)
+                  (const xbm)
+                  (symbol :tag "Other"))
+          (set :inline t :tag "Minimum font size"
+               (list :inline t :tag ""
+                     (const :format "" :value :min)
+                     (integer :tag "pixels")))
+          (const :format "" :value :file) (string :tag "Filename")
+          (set :inline t :tag "Ascent ratio"
+               (list :inline t :tag ""
+                     (const :format "" :value :ascent)
+                     (integer :tag "percent of image"
+                              :value 50))))))
 
 (defun preview-specs-setter (symbol value)
   "Set SYMBOL to VALUE and clear `preview-min-alist' property.
@@ -169,17 +169,17 @@ spec to avoid unnecessary evaluation time."
      (place preview-gs-place)
      (close preview-dvipng-close))
     (png (open preview-gs-open)
-        (place preview-gs-place)
-        (close preview-gs-close))
+         (place preview-gs-place)
+         (close preview-gs-close))
     (jpeg (open preview-gs-open)
-         (place preview-gs-place)
-         (close preview-gs-close))
+          (place preview-gs-place)
+          (close preview-gs-close))
     (pnm (open preview-gs-open)
-         (place preview-gs-place)
-         (close preview-gs-close))
+          (place preview-gs-place)
+          (close preview-gs-close))
     (tiff (open preview-gs-open)
-         (place preview-gs-place)
-         (close preview-gs-close)))
+          (place preview-gs-place)
+          (close preview-gs-close)))
   "Define functions for generating images.
 These functions get called in the process of generating inline
 images of the specified type.  The open function is called
@@ -196,13 +196,13 @@ Not all of these image types may be supported by your copy
 of Ghostscript, or by your copy of Emacs."
   :group 'preview-gs
   :type '(alist :key-type (symbol :tag "Preview's image type")
-               :value-type
-               (alist :tag "Handler" :key-type (symbol :tag "Operation:")
-                      :value-type (list :tag "Handler"
-                                        (function :tag "Handler function")
-                                        (repeat :tag "Additional \
+                :value-type
+                (alist :tag "Handler" :key-type (symbol :tag "Operation:")
+                       :value-type (list :tag "Handler"
+                                         (function :tag "Handler function")
+                                         (repeat :tag "Additional \
 function args" :inline t sexp))
-                      :options (open place close))))
+                       :options (open place close))))
 
 (defcustom preview-gs-image-type-alist
   '((png png "-sDEVICE=png16m")
@@ -216,16 +216,16 @@ a fallback device when images can't be processed by the 
requested
 method, like when PDFTeX was used."
   :group 'preview-gs
   :type '(repeat (list :tag nil (symbol :tag "preview image-type")
-                      (symbol :tag "Emacs image-type")
-                      (repeat :inline t :tag "Ghostscript options" string))))
+                       (symbol :tag "Emacs image-type")
+                       (repeat :inline t :tag "Ghostscript options" string))))
 
 (defcustom preview-image-type 'png
   "Image type to be used in images."
   :group 'preview-gs
   :type (append '(choice)
-               (mapcar (lambda (symbol) (list 'const (car symbol)))
-                       preview-image-creators)
-               '((symbol :tag "Other"))))
+                (mapcar (lambda (symbol) (list 'const (car symbol)))
+                        preview-image-creators)
+                '((symbol :tag "Other"))))
 
 (defun preview-call-hook (symbol &rest rest)
   "Call a function from `preview-image-creators'.
@@ -235,8 +235,8 @@ hook function given there with the arguments specified there
 followed by REST.  If such a function is specified in there,
 that is."
   (let ((hook (cdr (assq symbol
-                   (cdr (assq preview-image-type
-                              preview-image-creators))))))
+                    (cdr (assq preview-image-type
+                               preview-image-creators))))))
     (when hook
       (apply (car hook) (append (cdr hook) rest)))))
 
@@ -257,7 +257,7 @@ that is."
   "Extract EPS bounding box vector from FILENAME."
   (with-temp-buffer
     (insert-file-contents-literally filename nil 0 preview-bb-filesize
-                                   t)
+                                    t)
     (goto-char (point-min))
     (when (search-forward-regexp "%%BoundingBox:\
  +\\([-+]?[0-9.]+\\)\
@@ -266,8 +266,8 @@ that is."
  +\\([-+]?[0-9.]+\\)" nil t)
       (vector
        (if preview-preserve-indentation
-          (min 72 (string-to-number (match-string 1)))
-        (string-to-number (match-string 1)))
+           (min 72 (string-to-number (match-string 1)))
+         (string-to-number (match-string 1)))
        (string-to-number (match-string 2))
        (string-to-number (match-string 3))
        (string-to-number (match-string 4))
@@ -312,24 +312,24 @@ LIST consists of TeX dimensions in sp (1/65536 TeX 
point)."
   (and
    (consp list)
    (let* ((dims (vconcat (mapcar
-                         #'(lambda (x)
-                             (/ x 65781.76))
+                          #'(lambda (x)
+                              (/ x 65781.76))
                           list)))
-         (box
-          (vector
-           (+ 72 (min 0 (aref dims 2)))
-           (+ 720 (min (aref dims 0) (- (aref dims 1)) 0))
-           (+ 72 (max 0 (aref dims 2)))
-           (+ 720 (max (aref dims 0) (- (aref dims 1)) 0))))
-         (border (if preview-parsed-tightpage
-                     (vconcat (mapcar
-                               #'(lambda(x)
-                                   (/ x 65781.76))
+          (box
+           (vector
+            (+ 72 (min 0 (aref dims 2)))
+            (+ 720 (min (aref dims 0) (- (aref dims 1)) 0))
+            (+ 72 (max 0 (aref dims 2)))
+            (+ 720 (max (aref dims 0) (- (aref dims 1)) 0))))
+          (border (if preview-parsed-tightpage
+                      (vconcat (mapcar
+                                #'(lambda(x)
+                                    (/ x 65781.76))
                                 preview-parsed-tightpage))
-                   (vector (- preview-TeX-bb-border)
-                           (- preview-TeX-bb-border)
-                           preview-TeX-bb-border
-                           preview-TeX-bb-border))))
+                    (vector (- preview-TeX-bb-border)
+                            (- preview-TeX-bb-border)
+                            preview-TeX-bb-border
+                            preview-TeX-bb-border))))
      (dotimes (i 4)
        (aset box i (+ (aref box i) (aref border i))))
      box)))
@@ -339,10 +339,10 @@ LIST consists of TeX dimensions in sp (1/65536 TeX 
point)."
       (executable-find "rungs")
       ;; The MikTeX builtin GS
       (let ((gs (executable-find "mgs")))
-       ;; Check if mgs is functional for external non-MikTeX apps.
-       ;; See 
http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
-       (when (and gs (= 0 (shell-command (concat (shell-quote-argument gs) " 
-q -dNODISPLAY -c quit"))))
-         gs))
+        ;; Check if mgs is functional for external non-MikTeX apps.
+        ;; See 
http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
+        (when (and gs (= 0 (shell-command (concat (shell-quote-argument gs) " 
-q -dNODISPLAY -c quit"))))
+          gs))
       ;; Windows ghostscript
       (executable-find "GSWIN32C.EXE")
       ;; standard GhostScript
@@ -352,9 +352,9 @@ LIST consists of TeX dimensions in sp (1/65536 TeX point)."
   :type 'string)
 
 (defcustom preview-gs-options '("-q" "-dDELAYSAFER" "-dNOPAUSE"
-                               "-DNOPLATFONTS" "-dPrinted"
-                               "-dTextAlphaBits=4"
-                               "-dGraphicsAlphaBits=4")
+                                "-DNOPLATFONTS" "-dPrinted"
+                                "-dTextAlphaBits=4"
+                                "-dGraphicsAlphaBits=4")
   "Options with which to call gs for conversion from EPS.
 See also `preview-gs-command'."
   :group 'preview-gs
@@ -379,12 +379,12 @@ busy.  If this number is smaller, redisplay will
 follow changes in the displayed buffer area faster."
   :group 'preview-gs
   :type '(restricted-sexp
-         :match-alternatives
-         ((lambda (value) (and
-                           (integerp value)
-                           (> value 0)
-                           (< value 10))))
-         :tag "small number"))
+          :match-alternatives
+          ((lambda (value) (and
+                            (integerp value)
+                            (> value 0)
+                            (< value 10))))
+          :tag "small number"))
 
 (defvar preview-gs-answer nil
   "Accumulated answer of Ghostscript process.")
@@ -435,8 +435,8 @@ dots per inch.  Buffer-local to rendering buffer.")
 Calculated from real-life factor SCALE and XRES and
 YRES, the screen resolution in dpi."
   (format "-r%gx%g"
-         (/ (* scale xres) (preview-get-magnification))
-         (/ (* scale yres) (preview-get-magnification))))
+          (/ (* scale xres) (preview-get-magnification))
+          (/ (* scale yres) (preview-get-magnification))))
 
 (defun preview-gs-behead-outstanding (err)
   "Remove leading element of outstanding queue after error.
@@ -477,19 +477,19 @@ of a cell used for string concatenation."
     (mapconcat
      #'identity
      (delq nil
-          (mapcar
-           (lambda(x)
-             (if (consp x)
-                 (let ((sep (car x)))
-                   (while (and (symbolp sep)
-                               (not (memq sep '(t nil))))
-                     (setq sep (symbol-value sep)))
-                   (if (stringp sep)
-                       (preview-string-expand (cdr x) sep)
-                     (and sep
-                          (preview-string-expand (cdr x)))))
-               (preview-string-expand x)))
-           arg))
+           (mapcar
+            (lambda(x)
+              (if (consp x)
+                  (let ((sep (car x)))
+                    (while (and (symbolp sep)
+                                (not (memq sep '(t nil))))
+                      (setq sep (symbol-value sep)))
+                    (if (stringp sep)
+                        (preview-string-expand (cdr x) sep)
+                      (and sep
+                           (preview-string-expand (cdr x)))))
+                (preview-string-expand x)))
+            arg))
      (or separator "")))
    ((and (symbolp arg) (not (memq arg '(t nil))))
     (preview-string-expand (symbol-value arg) separator))
@@ -536,8 +536,8 @@ You'll need to change `preview-dvipng-command' too,
 if you customize this."
   :group 'preview-latex
   :type '(choice (const png)
-                (const gif)
-                (symbol :tag "Other" :value png)))
+                 (const gif)
+                 (symbol :tag "Other" :value png)))
 
 (defcustom preview-dvips-command
   "dvips -Pwww -i -E %d -o %m/preview.000"
@@ -562,7 +562,7 @@ if you customize this."
   (mapc #'preview-delete preview-gs-outstanding)
   (dolist (ov preview-gs-queue)
     (if (overlay-get ov 'queued)
-       (preview-delete ov)))
+        (preview-delete ov)))
   (setq preview-gs-outstanding nil)
   (setq preview-gs-queue nil))
 
@@ -576,18 +576,18 @@ occured, PROCESS is the process for which the run-buffer
 is to be used."
   (when (or (null process) (buffer-name (process-buffer process)))
     (with-current-buffer (or (and process
-                                 (process-buffer process))
-                            (current-buffer))
+                                  (process-buffer process))
+                             (current-buffer))
       (save-excursion
-       (goto-char (or (and process
-                           (process-buffer process)
-                           (marker-buffer (process-mark process))
-                           (process-mark process))
-                      (point-max)))
-       (insert-before-markers
-        (format "%s: %s\n"
-                context (error-message-string err)))
-       (display-buffer (current-buffer)))))
+        (goto-char (or (and process
+                            (process-buffer process)
+                            (marker-buffer (process-mark process))
+                            (process-mark process))
+                       (point-max)))
+        (insert-before-markers
+         (format "%s: %s\n"
+                 context (error-message-string err)))
+        (display-buffer (current-buffer)))))
   (setq preview-error-condition err))
 
 (defun preview-reraise-error (&optional process)
@@ -596,9 +596,9 @@ Makes sure that PROCESS is removed from the \"Compilation\"
 tag in the mode line."
   (when preview-error-condition
     (unwind-protect
-       (signal (car preview-error-condition) (cdr preview-error-condition))
+        (signal (car preview-error-condition) (cdr preview-error-condition))
       (setq preview-error-condition nil
-           compilation-in-progress (delq process compilation-in-progress)))))
+            compilation-in-progress (delq process compilation-in-progress)))))
 
 (defcustom preview-pdf-color-adjust-method t
   "Method to adjust colors of images generated from PDF.
@@ -639,9 +639,9 @@ are written in the image although they may not match with 
your
 Emacs color well."
   :group 'preview-appearance
   :type '(choice
-         (const :tag "Adjust to Emacs color (gs > 9.27)" t)
-         (const :tag "Compatibility for gs =< 9.27" compatible)
-         (const :tag "No adjustment (B/W, for gs 9.27)" nil)))
+          (const :tag "Adjust to Emacs color (gs > 9.27)" t)
+          (const :tag "Compatibility for gs =< 9.27" compatible)
+          (const :tag "No adjustment (B/W, for gs 9.27)" nil)))
 
 (defun preview-gs-sentinel (process string)
   "Sentinel function for rendering process.
@@ -649,53 +649,53 @@ Gets the default PROCESS and STRING arguments
 and tries to restart Ghostscript if necessary."
   (condition-case err
       (let ((status (process-status process)))
-       (when (memq status '(exit signal))
-         (setq compilation-in-progress (delq process compilation-in-progress)))
-       (when (buffer-name (process-buffer process))
-         (with-current-buffer (process-buffer process)
-           (goto-char (point-max))
-           (insert-before-markers "\n" mode-name " " string)
-           (forward-char -1)
-           (insert " at "
-                   (substring (current-time-string) 0 -5))
-           (forward-char 1)
-           (TeX-command-mode-line process)
-           (when (memq status '(exit signal))
-             ;; process died.
-             ;;  Throw away culprit, go on.
-             (let* ((err (concat preview-gs-answer "\n"
-                                 (process-name process) " " string))
-                    (ov (preview-gs-behead-outstanding err)))
-               (when (and (null ov) preview-gs-queue)
-                 (save-excursion
-                   (goto-char (if (marker-buffer (process-mark process))
-                                  (process-mark process)
-                                (point-max)))
-                   (insert-before-markers err)))
-               (delete-process process)
-               (if (or (null ov)
-                       (eq status 'signal))
-                   ;; if process was killed explicitly by signal, or if nothing
-                   ;; was processed, we give up on the matter altogether.
-                   (progn
-                     (when preview-ps-file
-                       (condition-case nil
-                           (preview-delete-file preview-ps-file)
-                         (file-error nil)))
-                     (preview-gs-queue-empty))
-
-                 ;; restart only if we made progress since last call
-                 (let (filenames)
-                   (dolist (ov preview-gs-outstanding)
-                     (setq filenames (overlay-get ov 'filenames))
-                     (condition-case nil
-                         (preview-delete-file (nth 1 filenames))
-                       (file-error nil))
-                     (setcdr filenames nil)))
-                 (setq preview-gs-queue (nconc preview-gs-outstanding
-                                               preview-gs-queue))
-                 (setq preview-gs-outstanding nil)
-                 (preview-gs-restart)))))))
+        (when (memq status '(exit signal))
+          (setq compilation-in-progress (delq process 
compilation-in-progress)))
+        (when (buffer-name (process-buffer process))
+          (with-current-buffer (process-buffer process)
+            (goto-char (point-max))
+            (insert-before-markers "\n" mode-name " " string)
+            (forward-char -1)
+            (insert " at "
+                    (substring (current-time-string) 0 -5))
+            (forward-char 1)
+            (TeX-command-mode-line process)
+            (when (memq status '(exit signal))
+              ;; process died.
+              ;;  Throw away culprit, go on.
+              (let* ((err (concat preview-gs-answer "\n"
+                                  (process-name process) " " string))
+                     (ov (preview-gs-behead-outstanding err)))
+                (when (and (null ov) preview-gs-queue)
+                  (save-excursion
+                    (goto-char (if (marker-buffer (process-mark process))
+                                   (process-mark process)
+                                 (point-max)))
+                    (insert-before-markers err)))
+                (delete-process process)
+                (if (or (null ov)
+                        (eq status 'signal))
+                    ;; if process was killed explicitly by signal, or if 
nothing
+                    ;; was processed, we give up on the matter altogether.
+                    (progn
+                      (when preview-ps-file
+                        (condition-case nil
+                            (preview-delete-file preview-ps-file)
+                          (file-error nil)))
+                      (preview-gs-queue-empty))
+
+                  ;; restart only if we made progress since last call
+                  (let (filenames)
+                    (dolist (ov preview-gs-outstanding)
+                      (setq filenames (overlay-get ov 'filenames))
+                      (condition-case nil
+                          (preview-delete-file (nth 1 filenames))
+                        (file-error nil))
+                      (setcdr filenames nil)))
+                  (setq preview-gs-queue (nconc preview-gs-outstanding
+                                                preview-gs-queue))
+                  (setq preview-gs-outstanding nil)
+                  (preview-gs-restart)))))))
     (error (preview-log-error err "Ghostscript" process)))
   (preview-reraise-error process))
 
@@ -707,42 +707,42 @@ Gets the usual PROCESS and STRING parameters, see
     (setq preview-gs-answer (concat preview-gs-answer string))
     (while (string-match "GS\\(<[0-9]+\\)?>" preview-gs-answer)
       (let* ((pos (match-end 0))
-            (answer (substring preview-gs-answer 0 pos)))
-       (setq preview-gs-answer (substring preview-gs-answer pos))
-       (condition-case err
-           (preview-gs-transact process answer)
-         (error (preview-log-error err "Ghostscript filter" process))))))
+             (answer (substring preview-gs-answer 0 pos)))
+        (setq preview-gs-answer (substring preview-gs-answer pos))
+        (condition-case err
+            (preview-gs-transact process answer)
+          (error (preview-log-error err "Ghostscript filter" process))))))
   (preview-reraise-error))
 
 (defun preview-gs-restart ()
   "Start a new Ghostscript conversion process."
   (when preview-gs-queue
     (if preview-gs-sequence
-       (setcar preview-gs-sequence (1+ (car preview-gs-sequence)))
+        (setcar preview-gs-sequence (1+ (car preview-gs-sequence)))
       (setq preview-gs-sequence (list 1)))
     (setcdr preview-gs-sequence 1)
     (let* ((process-connection-type nil)
-          (outfile (format "-sOutputFile=%s"
-                           (file-relative-name
-                            (format "%s/pr%d-%%d.%s"
-                                    (car TeX-active-tempdir)
-                                    (car preview-gs-sequence)
-                                    preview-gs-image-type))))
-          (process
-           (apply #'start-process
-                  "Preview-Ghostscript"
-                  (current-buffer)
-                  preview-gs-command
-                  outfile
-                  preview-gs-command-line)))
+           (outfile (format "-sOutputFile=%s"
+                            (file-relative-name
+                             (format "%s/pr%d-%%d.%s"
+                                     (car TeX-active-tempdir)
+                                     (car preview-gs-sequence)
+                                     preview-gs-image-type))))
+           (process
+            (apply #'start-process
+                   "Preview-Ghostscript"
+                   (current-buffer)
+                   preview-gs-command
+                   outfile
+                   preview-gs-command-line)))
       (goto-char (point-max))
       (insert-before-markers "Running `Preview-Ghostscript' with ``"
-                            (mapconcat #'shell-quote-argument
-                                       (append
-                                        (list preview-gs-command
-                                              outfile)
-                                        preview-gs-command-line)
-                                       " ") "''\n")
+                             (mapconcat #'shell-quote-argument
+                                        (append
+                                         (list preview-gs-command
+                                               outfile)
+                                         preview-gs-command-line)
+                                        " ") "''\n")
       (setq preview-gs-answer "")
       (set-process-query-on-exit-flag process nil)
       (set-process-sentinel process #'preview-gs-sentinel)
@@ -761,10 +761,10 @@ SETUP may contain a parser setup function."
     (setq preview-gs-image-type (nth 1 image-info))
     (setq preview-gs-sequence nil)
     (setq preview-gs-command-line (append
-                                  preview-gs-options
-                                  (nthcdr 2 image-info))
-         preview-gs-init-string
-         (format "{DELAYSAFER{.setsafe}if}stopped pop\
+                                   preview-gs-options
+                                   (nthcdr 2 image-info))
+          preview-gs-init-string
+          (format "{DELAYSAFER{.setsafe}if}stopped pop\
 /.preview-BP currentpagedevice/BeginPage get dup \
 null eq{pop{pop}bind}if def\
 <</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne or\
@@ -773,19 +773,19 @@ null eq{pop{pop}bind}if def\
 {pop}{setpagedevice}{ifelse exec}\
 stopped{handleerror quit}if \
 .preview-ST aload pop restore}bind def "
-                 (preview-gs-color-string
-                  preview-colors
-                  ;; Compatibility for gs 9.27 with non-trivial
-                  ;; foreground color and dark background.
-                  ;; Suppress color adjustment with PDF backend
-                  ;; when `preview-pdf-color-adjust-method' is nil.
-                  (and (not preview-pdf-color-adjust-method)
-                       ;; The switch `preview-parsed-pdfoutput' isn't
-                       ;; set before parsing the latex output, so use
-                       ;; heuristic here.
-                       (with-current-buffer TeX-command-buffer
-                         (and TeX-PDF-mode
-                              (not (TeX-PDF-from-DVI))))))))
+                  (preview-gs-color-string
+                   preview-colors
+                   ;; Compatibility for gs 9.27 with non-trivial
+                   ;; foreground color and dark background.
+                   ;; Suppress color adjustment with PDF backend
+                   ;; when `preview-pdf-color-adjust-method' is nil.
+                   (and (not preview-pdf-color-adjust-method)
+                        ;; The switch `preview-parsed-pdfoutput' isn't
+                        ;; set before parsing the latex output, so use
+                        ;; heuristic here.
+                        (with-current-buffer TeX-command-buffer
+                          (and TeX-PDF-mode
+                               (not (TeX-PDF-from-DVI))))))))
     (preview-gs-queue-empty)
     (preview-parse-messages (or setup #'preview-gs-dvips-process-setup))))
 
@@ -799,69 +799,69 @@ to Ghostscript floats."
   "Return a string that patches PDF foreground color to work properly."
   (let ((fg (aref colors 1)))
     (if fg
-       (cond ((eq preview-pdf-color-adjust-method t)
-              ;; New code for gs > 9.27.
-              ;; This assumes DELAYBIND feature, which is known to be
-              ;; broken in gs 9.27 (and possibly, < 9.27).
-              ;; 
<URL:https://lists.gnu.org/archive/html/auctex-devel/2019-07/msg00000.html>
-              ;; DELAYBIND is sometimes mentioned in association with
-              ;; security holes in the changelog of Ghostscript:
-              ;; <URL:https://www.ghostscript.com/doc/9.27/History9.htm>
-              ;; Thus we might have to be prepared for removal of this
-              ;; feature in future Ghostscript.
-              (concat
-               "/initgraphics {
+        (cond ((eq preview-pdf-color-adjust-method t)
+               ;; New code for gs > 9.27.
+               ;; This assumes DELAYBIND feature, which is known to be
+               ;; broken in gs 9.27 (and possibly, < 9.27).
+               ;; 
<URL:https://lists.gnu.org/archive/html/auctex-devel/2019-07/msg00000.html>
+               ;; DELAYBIND is sometimes mentioned in association with
+               ;; security holes in the changelog of Ghostscript:
+               ;; <URL:https://www.ghostscript.com/doc/9.27/History9.htm>
+               ;; Thus we might have to be prepared for removal of this
+               ;; feature in future Ghostscript.
+               (concat
+                "/initgraphics {
   //initgraphics
   /RG where {
     pop "
-               (mapconcat #'preview-gs-color-value fg " ")
-               " 3 copy rg RG
+                (mapconcat #'preview-gs-color-value fg " ")
+                " 3 copy rg RG
   } if
 } bind def .bindnow "))
-             ((eq preview-pdf-color-adjust-method 'compatible)
-              ;; Traditional code for gs < 9.27.
-              (concat
-               "/GS_PDF_ProcSet GS_PDF_ProcSet dup maxlength dict copy dup 
begin\
+              ((eq preview-pdf-color-adjust-method 'compatible)
+               ;; Traditional code for gs < 9.27.
+               (concat
+                "/GS_PDF_ProcSet GS_PDF_ProcSet dup maxlength dict copy dup 
begin\
 /graphicsbeginpage{//graphicsbeginpage exec "
-               (mapconcat #'preview-gs-color-value fg " ")
-               " 3 copy rg RG}bind store end readonly store "))
-             (;; Do nothing otherwise.
-              t
-              "")))))
+                (mapconcat #'preview-gs-color-value fg " ")
+                " 3 copy rg RG}bind store end readonly store "))
+              (;; Do nothing otherwise.
+               t
+               "")))))
 
 (defun preview-gs-color-string (colors &optional suppress-fgbg)
   "Return a string setting up COLORS.
 If optional argument SUPPRESS-FGBG is non-nil, behave as if FG/BG
 colors were just the default value."
   (let ((bg (and (not suppress-fgbg)
-                (aref colors 0)))
-       (fg (and (not suppress-fgbg)
-                (aref colors 1)))
-       (mask (aref colors 2))
-       (border (aref colors 3)))
+                 (aref colors 0)))
+        (fg (and (not suppress-fgbg)
+                 (aref colors 1)))
+        (mask (aref colors 2))
+        (border (aref colors 3)))
     (concat
      (and (or (and mask border) (and bg (not fg)))
-         "gsave ")
+          "gsave ")
      (and bg
-        (concat
-         (mapconcat #'preview-gs-color-value bg " ")
-         " setrgbcolor clippath fill "))
+         (concat
+          (mapconcat #'preview-gs-color-value bg " ")
+          " setrgbcolor clippath fill "))
      (and mask border
-        (format "%s setrgbcolor false setstrokeadjust %g \
+         (format "%s setrgbcolor false setstrokeadjust %g \
 setlinewidth clippath strokepath \
 matrix setmatrix true \
 {2 index{newpath}if round exch round exch moveto pop false}\
 {round exch round exch lineto}{curveto}{closepath}\
 pathforall pop fill "
-                (mapconcat #'preview-gs-color-value mask " ")
-                (* 2 border)))
-         ;; I hate antialiasing.  Warp border to integral coordinates.
+                 (mapconcat #'preview-gs-color-value mask " ")
+                 (* 2 border)))
+          ;; I hate antialiasing.  Warp border to integral coordinates.
      (and (or (and mask border) (and bg (not fg)))
-         "grestore ")
+          "grestore ")
      (and fg
-         (concat
-          (mapconcat #'preview-gs-color-value fg " ")
-          " setrgbcolor")))))
+          (concat
+           (mapconcat #'preview-gs-color-value fg " ")
+           " setrgbcolor")))))
 
 (defun preview-dvipng-color-string (colors res)
   "Return color setup tokens for dvipng.
@@ -874,16 +874,16 @@ Pure borderless black-on-white will return an empty 
string."
        (border (aref colors 3)))
     (concat
      (and bg
-         (format "--bg \"rgb %s\" "
-                 (mapconcat #'preview-gs-color-value bg " ")))
+          (format "--bg \"rgb %s\" "
+                  (mapconcat #'preview-gs-color-value bg " ")))
      (and fg
-         (format "--fg \"rgb %s\" "
-                 (mapconcat #'preview-gs-color-value fg " ")))
+          (format "--fg \"rgb %s\" "
+                  (mapconcat #'preview-gs-color-value fg " ")))
      (and mask border
-         (format "--bd \"rgb %s\" "
-                 (mapconcat #'preview-gs-color-value mask " ")))
+          (format "--bd \"rgb %s\" "
+                  (mapconcat #'preview-gs-color-value mask " ")))
      (and border
-         (format "--bd %d" (max 1 (round (/ (* res border) 72.0))))))))
+          (format "--bd %d" (max 1 (round (/ (* res border) 72.0))))))))
 
 (defsubst preview-supports-image-type (imagetype)
   "Check if IMAGETYPE is supported."
@@ -893,47 +893,47 @@ Pure borderless black-on-white will return an empty 
string."
   "Set up Dvips process for conversions via gs."
   (unless (preview-supports-image-type preview-gs-image-type)
     (error "preview-image-type setting '%s unsupported by this Emacs"
-          preview-gs-image-type))
+           preview-gs-image-type))
   (setq preview-gs-command-line (append
-                                preview-gs-command-line
-                                (list (preview-gs-resolution
-                                       (preview-hook-enquiry preview-scale)
-                                       (car preview-resolution)
-                                       (cdr preview-resolution)))))
+                                 preview-gs-command-line
+                                 (list (preview-gs-resolution
+                                        (preview-hook-enquiry preview-scale)
+                                        (car preview-resolution)
+                                        (cdr preview-resolution)))))
   (if preview-parsed-pdfoutput
       (preview-pdf2dsc-process-setup)
     (let ((process (preview-start-dvips preview-fast-conversion)))
       (setq TeX-sentinel-function #'preview-gs-dvips-sentinel)
       (list process (current-buffer) TeX-active-tempdir preview-ps-file
-           preview-gs-image-type))))
+            preview-gs-image-type))))
 
 (defun preview-dvipng-process-setup ()
   "Set up dvipng process for conversion."
   (setq preview-gs-command-line (append
-                                preview-gs-command-line
-                                (list (preview-gs-resolution
-                                       (preview-hook-enquiry preview-scale)
-                                       (car preview-resolution)
-                                       (cdr preview-resolution)))))
+                                 preview-gs-command-line
+                                 (list (preview-gs-resolution
+                                        (preview-hook-enquiry preview-scale)
+                                        (car preview-resolution)
+                                        (cdr preview-resolution)))))
   (if preview-parsed-pdfoutput
       (if (preview-supports-image-type preview-gs-image-type)
-         (preview-pdf2dsc-process-setup)
-       (error "preview-image-type setting '%s unsupported by this Emacs"
-              preview-gs-image-type))
+          (preview-pdf2dsc-process-setup)
+        (error "preview-image-type setting '%s unsupported by this Emacs"
+               preview-gs-image-type))
     (unless (preview-supports-image-type preview-dvipng-image-type)
       (error "preview-dvipng-image-type setting '%s unsupported by this Emacs"
-            preview-dvipng-image-type))
+             preview-dvipng-image-type))
     (let ((process (preview-start-dvipng)))
       (setq TeX-sentinel-function #'preview-dvipng-sentinel)
       (list process (current-buffer) TeX-active-tempdir t
-         preview-dvipng-image-type))))
+          preview-dvipng-image-type))))
 
 
 (defun preview-pdf2dsc-process-setup ()
   (let ((process (preview-start-pdf2dsc)))
     (setq TeX-sentinel-function #'preview-pdf2dsc-sentinel)
     (list process (current-buffer) TeX-active-tempdir preview-ps-file
-         preview-gs-image-type)))
+          preview-gs-image-type)))
 
 (defun preview-dvips-abort ()
   "Abort a Dvips run."
@@ -941,12 +941,12 @@ Pure borderless black-on-white will return an empty 
string."
   (condition-case nil
       (delete-file
        (let ((gsfile preview-gs-file))
-        (with-current-buffer TeX-command-buffer
-          (funcall (car gsfile) "dvi" t))))
+         (with-current-buffer TeX-command-buffer
+           (funcall (car gsfile) "dvi" t))))
     (file-error nil))
   (when preview-ps-file
     (condition-case nil
-       (preview-delete-file preview-ps-file)
+        (preview-delete-file preview-ps-file)
       (file-error nil)))
   (setq TeX-sentinel-function nil))
 
@@ -959,27 +959,27 @@ The usual PROCESS and COMMAND arguments for
 `TeX-sentinel-function' apply.  Starts gs if GSSTART is set."
   (condition-case err
       (let ((status (process-status process))
-           (gsfile preview-gs-file))
-       (cond ((eq status 'exit)
-              (delete-process process)
-              (setq TeX-sentinel-function nil)
-              (condition-case nil
-                  (delete-file
-                   (with-current-buffer TeX-command-buffer
-                     (funcall (car gsfile) "dvi" t)))
-                (file-error nil))
-              (if preview-ps-file
-                  (preview-prepare-fast-conversion))
-              (when gsstart
-                (if preview-gs-queue
-                    (preview-gs-restart)
-                  (when preview-ps-file
-                    (condition-case nil
-                        (preview-delete-file preview-ps-file)
-                      (file-error nil))))))
-             ((eq status 'signal)
-              (delete-process process)
-              (preview-dvips-abort))))
+            (gsfile preview-gs-file))
+        (cond ((eq status 'exit)
+               (delete-process process)
+               (setq TeX-sentinel-function nil)
+               (condition-case nil
+                   (delete-file
+                    (with-current-buffer TeX-command-buffer
+                      (funcall (car gsfile) "dvi" t)))
+                 (file-error nil))
+               (if preview-ps-file
+                   (preview-prepare-fast-conversion))
+               (when gsstart
+                 (if preview-gs-queue
+                     (preview-gs-restart)
+                   (when preview-ps-file
+                     (condition-case nil
+                         (preview-delete-file preview-ps-file)
+                       (file-error nil))))))
+              ((eq status 'signal)
+               (delete-process process)
+               (preview-dvips-abort))))
     (error (preview-log-error err "DviPS sentinel" process)))
   (preview-reraise-error process))
 
@@ -989,29 +989,29 @@ The usual PROCESS and COMMAND arguments for
 `TeX-sentinel-function' apply.  Starts gs if GSSTART is set."
   (condition-case err
       (let ((status (process-status process)))
-       (cond ((eq status 'exit)
-              (delete-process process)
-              (setq TeX-sentinel-function nil)
-              ;; Add DELAYBIND option for adjustment of foreground
-              ;; color to work.
-              (if (eq preview-pdf-color-adjust-method t)
-                  (setq preview-gs-command-line (append
-                                                 preview-gs-command-line
-                                                 '("-dDELAYBIND"))))
-              (setq preview-gs-init-string
-                    (concat preview-gs-init-string
-                            (preview-pdf-color-string preview-colors)))
-              (preview-prepare-fast-conversion)
-              (when gsstart
-                (if preview-gs-queue
-                    (preview-gs-restart)
-                  (when preview-ps-file
-                    (condition-case nil
-                        (preview-delete-file preview-ps-file)
-                      (file-error nil))))))
-             ((eq status 'signal)
-              (delete-process process)
-              (preview-dvips-abort))))
+        (cond ((eq status 'exit)
+               (delete-process process)
+               (setq TeX-sentinel-function nil)
+               ;; Add DELAYBIND option for adjustment of foreground
+               ;; color to work.
+               (if (eq preview-pdf-color-adjust-method t)
+                   (setq preview-gs-command-line (append
+                                                  preview-gs-command-line
+                                                  '("-dDELAYBIND"))))
+               (setq preview-gs-init-string
+                     (concat preview-gs-init-string
+                             (preview-pdf-color-string preview-colors)))
+               (preview-prepare-fast-conversion)
+               (when gsstart
+                 (if preview-gs-queue
+                     (preview-gs-restart)
+                   (when preview-ps-file
+                     (condition-case nil
+                         (preview-delete-file preview-ps-file)
+                       (file-error nil))))))
+              ((eq status 'signal)
+               (delete-process process)
+               (preview-dvips-abort))))
     (error (preview-log-error err "PDF2DSC sentinel" process)))
   (preview-reraise-error process))
 
@@ -1020,30 +1020,30 @@ The usual PROCESS and COMMAND arguments for
   (setq preview-gs-queue (nconc preview-gs-queue closedata))
   (if process
       (if preview-gs-queue
-         (if TeX-process-asynchronous
-             (if (and (eq (process-status process) 'exit)
-                      (null TeX-sentinel-function))
-                 ;; Process has already finished and run sentinel
-                 (progn
-                   (when preview-ps-file
-                     (condition-case nil
-                         (preview-delete-file preview-ps-file)
-                       (file-error nil)))
-                   (preview-gs-restart))
-               (setq TeX-sentinel-function
-                     `(lambda (process command)
-                        (,(if preview-parsed-pdfoutput
-                              'preview-pdf2dsc-sentinel
-                            'preview-gs-dvips-sentinel)
-                         process
-                         command
-                         t))))
-           (TeX-synchronous-sentinel "Preview-DviPS" (cdr preview-gs-file)
-                                     process))
+          (if TeX-process-asynchronous
+              (if (and (eq (process-status process) 'exit)
+                       (null TeX-sentinel-function))
+                  ;; Process has already finished and run sentinel
+                  (progn
+                    (when preview-ps-file
+                      (condition-case nil
+                          (preview-delete-file preview-ps-file)
+                        (file-error nil)))
+                    (preview-gs-restart))
+                (setq TeX-sentinel-function
+                      `(lambda (process command)
+                         (,(if preview-parsed-pdfoutput
+                               'preview-pdf2dsc-sentinel
+                             'preview-gs-dvips-sentinel)
+                          process
+                          command
+                          t))))
+            (TeX-synchronous-sentinel "Preview-DviPS" (cdr preview-gs-file)
+                                      process))
     ;; pathological case: no previews although we sure thought so.
-       (delete-process process)
-       (unless (eq (process-status process) 'signal)
-         (preview-dvips-abort)))))
+        (delete-process process)
+        (unless (eq (process-status process) 'signal)
+          (preview-dvips-abort)))))
 
 (defun preview-dvipng-sentinel (process _command &optional placeall)
   "Sentinel function for indirect rendering DviPNG process.
@@ -1051,14 +1051,14 @@ The usual PROCESS and COMMAND arguments for
 `TeX-sentinel-function' apply.  Places all snippets if PLACEALL is set."
   (condition-case err
       (let ((status (process-status process)))
-       (cond ((eq status 'exit)
-              (delete-process process)
-              (setq TeX-sentinel-function nil)
-              (when placeall
-                (preview-dvipng-place-all)))
-             ((eq status 'signal)
-              (delete-process process)
-              (preview-dvipng-abort))))
+        (cond ((eq status 'exit)
+               (delete-process process)
+               (setq TeX-sentinel-function nil)
+               (when placeall
+                 (preview-dvipng-place-all)))
+              ((eq status 'signal)
+               (delete-process process)
+               (preview-dvipng-abort))))
     (error (preview-log-error err "DviPNG sentinel" process)))
   (preview-reraise-error process))
 
@@ -1068,23 +1068,23 @@ The usual PROCESS and COMMAND arguments for
       (preview-gs-close process closedata)
     (setq preview-gs-queue (nconc preview-gs-queue closedata))
     (if process
-       (if preview-gs-queue
-           (if TeX-process-asynchronous
-               (if (and (eq (process-status process) 'exit)
-                        (null TeX-sentinel-function))
-                   ;; Process has already finished and run sentinel
-                   (preview-dvipng-place-all)
-                 (setq TeX-sentinel-function (lambda (process command)
-                                               (preview-dvipng-sentinel
-                                                process
-                                                command
-                                                t))))
-             (TeX-synchronous-sentinel "Preview-DviPNG" (cdr preview-gs-file)
-                                       process))
-         ;; pathological case: no previews although we sure thought so.
-         (delete-process process)
-         (unless (eq (process-status process) 'signal)
-           (preview-dvipng-abort))))))
+        (if preview-gs-queue
+            (if TeX-process-asynchronous
+                (if (and (eq (process-status process) 'exit)
+                         (null TeX-sentinel-function))
+                    ;; Process has already finished and run sentinel
+                    (preview-dvipng-place-all)
+                  (setq TeX-sentinel-function (lambda (process command)
+                                                (preview-dvipng-sentinel
+                                                 process
+                                                 command
+                                                 t))))
+              (TeX-synchronous-sentinel "Preview-DviPNG" (cdr preview-gs-file)
+                                        process))
+          ;; pathological case: no previews although we sure thought so.
+          (delete-process process)
+          (unless (eq (process-status process) 'signal)
+            (preview-dvipng-abort))))))
 
 (defun preview-dsc-parse (file)
   "Parse DSC comments of FILE.
@@ -1094,41 +1094,41 @@ the pages.  Page 0 corresponds to the initialization 
section."
     (set-buffer-multibyte nil)
     (insert-file-contents-literally file)
     (let ((last-pt (point-min))
-         trailer
-         pagelist
-         lastbegin
-         pt
-         case-fold-search
-         (level 0))
+          trailer
+          pagelist
+          lastbegin
+          pt
+          case-fold-search
+          (level 0))
       (while (search-forward-regexp "\
 %%\\(?:\\(BeginDocument:\\)\\|\
 \\(EndDocument[\n\r]\\)\\|\
 \\(Page:\\)\\|\
 \\(Trailer[\n\r]\\)\\)" nil t)
-       (setq pt (match-beginning 0))
-       (cond ((null (memq (char-before pt) '(?\C-j ?\C-m nil))))
-             (trailer (error "Premature %%%%Trailer in `%s' at offsets %d/%d"
-                             file trailer pt))
-             ((match-beginning 1)
-              (if (zerop level)
-                  (setq lastbegin pt))
-              (setq level (1+ level)))
-             ((match-beginning 2)
-              (if (zerop level)
-                  (error "Unmatched %%%%EndDocument in `%s' at offset %d"
-                         file pt)
-                (setq level (1- level))))
-             ((> level 0))
-             ((match-beginning 3)
-              (push (list last-pt (- pt last-pt)) pagelist)
-              (setq last-pt pt))
-             ((match-beginning 4)
-              (setq trailer pt))))
+        (setq pt (match-beginning 0))
+        (cond ((null (memq (char-before pt) '(?\C-j ?\C-m nil))))
+              (trailer (error "Premature %%%%Trailer in `%s' at offsets %d/%d"
+                              file trailer pt))
+              ((match-beginning 1)
+               (if (zerop level)
+                   (setq lastbegin pt))
+               (setq level (1+ level)))
+              ((match-beginning 2)
+               (if (zerop level)
+                   (error "Unmatched %%%%EndDocument in `%s' at offset %d"
+                          file pt)
+                 (setq level (1- level))))
+              ((> level 0))
+              ((match-beginning 3)
+               (push (list last-pt (- pt last-pt)) pagelist)
+               (setq last-pt pt))
+              ((match-beginning 4)
+               (setq trailer pt))))
       (unless (zerop level)
-       (error "Unmatched %%%%BeginDocument in `%s' at offset %d"
-              file lastbegin))
+        (error "Unmatched %%%%BeginDocument in `%s' at offset %d"
+               file lastbegin))
       (push (list last-pt
-                 (- (or trailer (point-max)) last-pt)) pagelist)
+                  (- (or trailer (point-max)) last-pt)) pagelist)
       (vconcat (nreverse pagelist)))))
 
 (defun preview-gs-dsc-cvx (page dsc)
@@ -1138,7 +1138,7 @@ top of the stack, and will replace it with an executable
 object corresponding to the wanted page."
   (let ((curpage (aref dsc page)))
     (format "dup %d setfileposition %d()/SubFileDecode filter cvx"
-           (1- (car curpage)) (nth 1 curpage))))
+            (1- (car curpage)) (nth 1 curpage))))
 
 (defun preview-ps-quote-filename (str &optional nonrel)
   "Make a PostScript string from filename STR.
@@ -1148,36 +1148,36 @@ NONREL is not NIL."
   (let ((index 0))
     (while (setq index (string-match "[\\()]" str index))
       (setq str (replace-match "\\\\\\&" t nil str)
-           index (+ 2 index)))
+            index (+ 2 index)))
     (concat "(" str ")")))
 
 (defun preview-prepare-fast-conversion ()
   "This fixes up all parameters for fast conversion."
   (let* ((file (if (consp (car preview-ps-file))
-                  (if (consp (caar preview-ps-file))
-                      (car (last (caar preview-ps-file)))
-                    (caar preview-ps-file))
-                (car preview-ps-file)))
-        (all-files (if (and (consp (car preview-ps-file))
-                            (consp (caar preview-ps-file)))
-                       (caar preview-ps-file)
-                     (list file))))
+                   (if (consp (caar preview-ps-file))
+                       (car (last (caar preview-ps-file)))
+                     (caar preview-ps-file))
+                 (car preview-ps-file)))
+         (all-files (if (and (consp (car preview-ps-file))
+                             (consp (caar preview-ps-file)))
+                        (caar preview-ps-file)
+                      (list file))))
     (setq preview-gs-dsc (preview-dsc-parse file))
     (setq preview-gs-init-string
-         ;; Add commands for revised file access controls introduced
-         ;; after gs 9.27 (bug#37719)
-         (concat (format "systemdict /.addcontrolpath known {%s} if\n"
-                         (mapconcat (lambda (f)
-                                      (format "/PermitFileReading %s 
.addcontrolpath"
-                                              (preview-ps-quote-filename f)))
-                                    all-files "\n"))
-                 (format "{<</PermitFileReading[%s]>> setuserparams \
+          ;; Add commands for revised file access controls introduced
+          ;; after gs 9.27 (bug#37719)
+          (concat (format "systemdict /.addcontrolpath known {%s} if\n"
+                          (mapconcat (lambda (f)
+                                       (format "/PermitFileReading %s 
.addcontrolpath"
+                                               (preview-ps-quote-filename f)))
+                                     all-files "\n"))
+                  (format "{<</PermitFileReading[%s]>> setuserparams \
 .locksafe} stopped pop "
-                         (mapconcat #'preview-ps-quote-filename all-files ""))
-                 preview-gs-init-string
-                 (format " %s(r)file /.preview-ST 1 index def %s exec 
.preview-ST "
-                         (preview-ps-quote-filename file)
-                         (preview-gs-dsc-cvx 0 preview-gs-dsc))))))
+                          (mapconcat #'preview-ps-quote-filename all-files ""))
+                  preview-gs-init-string
+                  (format " %s(r)file /.preview-ST 1 index def %s exec 
.preview-ST "
+                          (preview-ps-quote-filename file)
+                          (preview-gs-dsc-cvx 0 preview-gs-dsc))))))
 
 (defun preview-gs-urgentize (ov buff)
   "Make a displayed overlay render with higher priority.
@@ -1195,7 +1195,7 @@ is located."
   ;; We must return t.
   (preview-remove-urgentization ov)
   (when (and (overlay-get ov 'queued)
-            (overlay-buffer ov))
+             (overlay-buffer ov))
     (with-current-buffer buff
       (push ov preview-gs-queue)))
   t)
@@ -1233,16 +1233,16 @@ TEMPDIR is the correct copy of `TeX-active-tempdir',
 PS-FILE is a copy of `preview-ps-file', IMAGETYPE is the image type
 for the file extension."
   (overlay-put ov 'filenames
-              (unless (eq ps-file t)
-                (list
-                 (preview-make-filename
-                  (or ps-file
-                      (format "preview.%03d" snippet))
-                  tempdir))))
+               (unless (eq ps-file t)
+                 (list
+                  (preview-make-filename
+                   (or ps-file
+                       (format "preview.%03d" snippet))
+                   tempdir))))
   (overlay-put ov 'queued
-              (vector box nil snippet))
+               (vector box nil snippet))
   (overlay-put ov 'preview-image
-              (list (preview-icon-copy preview-nonready-icon)))
+               (list (preview-icon-copy preview-nonready-icon)))
   (preview-add-urgentization #'preview-gs-urgentize ov run-buffer)
   (list ov))
 
@@ -1266,21 +1266,21 @@ are functions to call on preview's clicks."
      ,@(if click2
            `((define-key resmap preview-button-2 ,click2)))
      ,(if glyph
-         `(propertize
-           "x"
-           'display ,glyph
-           'mouse-face 'highlight
-           'help-echo
-           ,(if (stringp helpstring)
-                (format helpstring preview-button-1 preview-button-2)
-              `(format ,helpstring preview-button-1 preview-button-2))
-           'keymap resmap)
-       'resmap)))
+          `(propertize
+            "x"
+            'display ,glyph
+            'mouse-face 'highlight
+            'help-echo
+            ,(if (stringp helpstring)
+                 (format helpstring preview-button-1 preview-button-2)
+               `(format ,helpstring preview-button-1 preview-button-2))
+            'keymap resmap)
+        'resmap)))
 
 (defun preview-mouse-open-error (string)
   "Display STRING in a new view buffer on click."
   (let ((buff (get-buffer-create
-              "*Preview-Ghostscript-Error*")))
+               "*Preview-Ghostscript-Error*")))
     (with-current-buffer buff
       (kill-all-local-variables)
       (set (make-local-variable 'view-exit-action) #'kill-buffer)
@@ -1296,15 +1296,15 @@ Place point at POSITION, else beginning of file."
   (let ((default-mode
           ;; FIXME: Yuck!  Just arrange for the file name to have the right
           ;; extension instead!
-         (assoc-default "x.ps" auto-mode-alist #'string-match))
-       (buff (get-file-buffer file)))
+          (assoc-default "x.ps" auto-mode-alist #'string-match))
+        (buff (get-file-buffer file)))
     (save-excursion
       (if buff
-         (pop-to-buffer buff)
-       (view-file-other-window file))
+          (pop-to-buffer buff)
+        (view-file-other-window file))
       (if (and (eq major-mode (default-value 'major-mode))
-              default-mode)
-         (funcall default-mode))
+               default-mode)
+          (funcall default-mode))
       (goto-char (or position (point-min)))
       (message "%s" (substitute-command-keys "\
 Try \\[ps-run-start] \\[ps-run-buffer] and \
@@ -1318,48 +1318,48 @@ Try \\[ps-run-start] \\[ps-run-buffer] and \
   ;; line is for "[...].prv/tmpXXXXXX/pr1-2.png" while the error is
   ;; raised for "[...].prv/tmpXXXXXX/pr1-1.png".  (c.f. bug#37719)
   (let* ((filenames (overlay-get ov 'filenames))
-        (file (car (nth 0 filenames)))
-        ;; FIXME: This format isn't equal to actual invocation of gs
-        ;; command constructed in `preview-gs-restart', which
-        ;; contains "%d".
-        (outfile (format "-sOutputFile=%s"
-                         (file-relative-name
-                          (car (nth 1 filenames)))))
-        (ps-open
-         `(lambda() (interactive "@")
-            (preview-mouse-open-error
-             ,(concat
-               (mapconcat #'shell-quote-argument
-                           (append (list
-                                    preview-gs-command
-                                    outfile)
-                                   preview-gs-command-line)
-                           " ")
-                "\nGS>"
-                preview-gs-init-string
-                (aref (overlay-get ov 'queued) 1)
-                err))))
-        (str
-         (preview-make-clickable
-          nil
-          preview-error-icon
-          "%s views error message
+         (file (car (nth 0 filenames)))
+         ;; FIXME: This format isn't equal to actual invocation of gs
+         ;; command constructed in `preview-gs-restart', which
+         ;; contains "%d".
+         (outfile (format "-sOutputFile=%s"
+                          (file-relative-name
+                           (car (nth 1 filenames)))))
+         (ps-open
+          `(lambda() (interactive "@")
+             (preview-mouse-open-error
+              ,(concat
+                (mapconcat #'shell-quote-argument
+                            (append (list
+                                     preview-gs-command
+                                     outfile)
+                                    preview-gs-command-line)
+                            " ")
+                 "\nGS>"
+                 preview-gs-init-string
+                 (aref (overlay-get ov 'queued) 1)
+                 err))))
+         (str
+          (preview-make-clickable
+           nil
+           preview-error-icon
+           "%s views error message
 %s more options"
-          ps-open
-          `(lambda() (interactive)
-             (popup-menu
-              '("PostScript error"
-                ["View error" ,ps-open]
-                ["View source"
-                 (lambda () (interactive "@")
-                   ,(if preview-ps-file
-                        `(preview-mouse-open-eps
-                          ,(if (consp (car file))
-                               (nth 1 (car file))
-                             (car file))
-                          ,(nth 0 (aref preview-gs-dsc
-                                        (aref (overlay-get ov 'queued) 2))))
-                      `(preview-mouse-open-eps ,file)))]))))))
+           ps-open
+           `(lambda() (interactive)
+              (popup-menu
+               '("PostScript error"
+                 ["View error" ,ps-open]
+                 ["View source"
+                  (lambda () (interactive "@")
+                    ,(if preview-ps-file
+                         `(preview-mouse-open-eps
+                           ,(if (consp (car file))
+                                (nth 1 (car file))
+                              (car file))
+                           ,(nth 0 (aref preview-gs-dsc
+                                         (aref (overlay-get ov 'queued) 2))))
+                       `(preview-mouse-open-eps ,file)))]))))))
     (overlay-put ov 'strings (cons str str))
     (preview-toggle ov)))
 
@@ -1370,91 +1370,91 @@ The Ghostscript process buffer of PROCESS will already 
be selected, and
 and the standard output of Ghostscript up to the next prompt will be
 given as ANSWER."
   (let ((ov (pop preview-gs-outstanding))
-       (have-error (not
-                    (string-match "\\`GS\\(<[0-9]+\\)?>\\'" answer ))))
+        (have-error (not
+                     (string-match "\\`GS\\(<[0-9]+\\)?>\\'" answer ))))
     (when (and ov (overlay-buffer ov))
       (let ((queued (overlay-get ov 'queued)))
-       (when queued
-         (let* ((bbox (aref queued 0))
-                (filenames (overlay-get ov 'filenames))
-                (oldfile (nth 0 filenames))
-                (newfile (nth 1 filenames)))
-           (if have-error
-               (preview-gs-flag-error ov answer)
-             (condition-case nil
-                 (preview-delete-file oldfile)
-               (file-error nil))
-             (overlay-put ov 'filenames (cdr filenames))
-             (preview-replace-active-icon
-              ov
-              (preview-create-icon (car newfile)
-                                   preview-gs-image-type
-                                   (preview-ascent-from-bb
-                                    bbox)
-                                   (aref preview-colors 2))))
-           (overlay-put ov 'queued nil)))))
+        (when queued
+          (let* ((bbox (aref queued 0))
+                 (filenames (overlay-get ov 'filenames))
+                 (oldfile (nth 0 filenames))
+                 (newfile (nth 1 filenames)))
+            (if have-error
+                (preview-gs-flag-error ov answer)
+              (condition-case nil
+                  (preview-delete-file oldfile)
+                (file-error nil))
+              (overlay-put ov 'filenames (cdr filenames))
+              (preview-replace-active-icon
+               ov
+               (preview-create-icon (car newfile)
+                                    preview-gs-image-type
+                                    (preview-ascent-from-bb
+                                     bbox)
+                                    (aref preview-colors 2))))
+            (overlay-put ov 'queued nil)))))
     (while (and (< (length preview-gs-outstanding)
-                  preview-gs-outstanding-limit)
-               (setq ov (pop preview-gs-queue)))
+                   preview-gs-outstanding-limit)
+                (setq ov (pop preview-gs-queue)))
       (let ((queued (overlay-get ov 'queued)))
-       (when (and queued
-                  (not (memq ov preview-gs-outstanding))
-                  (overlay-buffer ov))
-         (let* ((filenames (overlay-get ov 'filenames))
-                (oldfile (car (nth 0
-                                   (nconc filenames
-                                          (list
-                                           (preview-make-filename
-                                            (format "pr%d-%d.%s"
-                                                    (car preview-gs-sequence)
-                                                    (cdr preview-gs-sequence)
-                                                    preview-gs-image-type)
-                                            TeX-active-tempdir))))))
-                (bbox (aset queued 0
-                            (or (and preview-prefer-TeX-bb
-                                     (aref queued 0))
-                                (and (stringp oldfile)
-                                     (preview-extract-bb
-                                      oldfile))
-                                (aref queued 0)
-                                (error "No bounding box"))))
-                (snippet (aref queued 2))
-                (gs-line
-                 (format
-                  "%s<<%s>>preview-do\n"
-                  (if preview-ps-file
-                      (concat "dup "
-                              (preview-gs-dsc-cvx
-                               snippet
-                               preview-gs-dsc))
-                    (format "%s(r)file cvx"
-                            (preview-ps-quote-filename
-                             (if (listp oldfile)
-                                 (car (last oldfile))
-                               oldfile))))
-                  (if preview-parsed-tightpage
-                      ""
-                    (format "/PageSize[%g %g]/PageOffset[%g \
+        (when (and queued
+                   (not (memq ov preview-gs-outstanding))
+                   (overlay-buffer ov))
+          (let* ((filenames (overlay-get ov 'filenames))
+                 (oldfile (car (nth 0
+                                    (nconc filenames
+                                           (list
+                                            (preview-make-filename
+                                             (format "pr%d-%d.%s"
+                                                     (car preview-gs-sequence)
+                                                     (cdr preview-gs-sequence)
+                                                     preview-gs-image-type)
+                                             TeX-active-tempdir))))))
+                 (bbox (aset queued 0
+                             (or (and preview-prefer-TeX-bb
+                                      (aref queued 0))
+                                 (and (stringp oldfile)
+                                      (preview-extract-bb
+                                       oldfile))
+                                 (aref queued 0)
+                                 (error "No bounding box"))))
+                 (snippet (aref queued 2))
+                 (gs-line
+                  (format
+                   "%s<<%s>>preview-do\n"
+                   (if preview-ps-file
+                       (concat "dup "
+                               (preview-gs-dsc-cvx
+                                snippet
+                                preview-gs-dsc))
+                     (format "%s(r)file cvx"
+                             (preview-ps-quote-filename
+                              (if (listp oldfile)
+                                  (car (last oldfile))
+                                oldfile))))
+                   (if preview-parsed-tightpage
+                       ""
+                     (format "/PageSize[%g %g]/PageOffset[%g \
 %g[1 1 dtransform exch]{0 ge{neg}if exch}forall]"
-                            (- (aref bbox 2) (aref bbox 0))
-                            (- (aref bbox 3) (aref bbox 1))
-                            (aref bbox 0) (aref bbox 1))))))
-           (setcdr preview-gs-sequence (1+ (cdr preview-gs-sequence)))
-           (setq preview-gs-outstanding
-                 (nconc preview-gs-outstanding
-                        (list ov)))
-           (aset queued 1 gs-line)
-           ;; ignore errors because of dying processes: they will get
-           ;; caught by the sentinel, anyway.
-           (condition-case nil
-               (process-send-string
-                process
-                gs-line)
-             (error nil))))))
+                             (- (aref bbox 2) (aref bbox 0))
+                             (- (aref bbox 3) (aref bbox 1))
+                             (aref bbox 0) (aref bbox 1))))))
+            (setcdr preview-gs-sequence (1+ (cdr preview-gs-sequence)))
+            (setq preview-gs-outstanding
+                  (nconc preview-gs-outstanding
+                         (list ov)))
+            (aset queued 1 gs-line)
+            ;; ignore errors because of dying processes: they will get
+            ;; caught by the sentinel, anyway.
+            (condition-case nil
+                (process-send-string
+                 process
+                 gs-line)
+              (error nil))))))
     (unless preview-gs-outstanding
       (condition-case nil
-         (process-send-eof process)
-       (error nil)))))
+          (process-send-eof process)
+        (error nil)))))
 
 (defun preview-hook-enquiry (hook)
   "Gets a value from a configured hook.
@@ -1463,16 +1463,16 @@ non-nil counts.  Entries can be a callable function, or
 a symbol that is consulted, or a value.  Lists are evaluated
 recursively."
   (cond ((functionp hook)
-        (funcall hook))
-       ((consp hook)
-        (let (res)
-          (while (and (not res) hook)
-            (setq res (preview-hook-enquiry (car hook))
-                  hook (cdr hook)))
-          res))
-       ((and (symbolp hook) (boundp hook))
-        (symbol-value hook))
-       (t hook)))
+         (funcall hook))
+        ((consp hook)
+         (let (res)
+           (while (and (not res) hook)
+             (setq res (preview-hook-enquiry (car hook))
+                   hook (cdr hook)))
+           res))
+        ((and (symbolp hook) (boundp hook))
+         (symbol-value hook))
+        (t hook)))
 
 (defun preview-inherited-face-attribute (face attribute &optional inherit)
   "Fetch face attribute while adhering to inheritance.
@@ -1487,9 +1487,9 @@ This can be either a function to calculate the scale, or
 a fixed number."
   :group 'preview-appearance
   :type '(choice (function-item preview-scale-from-face)
-                (const 1.0)
-                (number :value 1.0)
-                (function :value preview-scale-from-face)))
+                 (const 1.0)
+                 (number :value 1.0)
+                 (function :value preview-scale-from-face)))
 
 (defcustom preview-default-document-pt 10
   "Assumed document point size for `preview-scale-from-face'.
@@ -1504,17 +1504,17 @@ This is for matching screen font size and previews."
            (number :tag "Other" :value 11.0)))
 
 (defcustom preview-document-pt-list '(preview-parsed-font-size
-                                     preview-auctex-font-size
-                                     preview-default-document-pt)
+                                      preview-auctex-font-size
+                                      preview-default-document-pt)
   "How `preview-document-pt' figures out the document size."
   :group 'preview-appearance
   :type
   '(repeat (choice
-           ;; This is a bug: type function seems to match variables, too.
-           (restricted-sexp :match-alternatives (functionp)
-                            :tag "Function" :value preview-auctex-font-size)
-           (variable :value preview-parsed-font-size)
-           (number :value 11))))
+            ;; This is a bug: type function seems to match variables, too.
+            (restricted-sexp :match-alternatives (functionp)
+                             :tag "Function" :value preview-auctex-font-size)
+            (variable :value preview-parsed-font-size)
+            (number :value 11))))
 
 (defun preview-auctex-font-size ()
   "Calculate the default font size of document.
@@ -1522,14 +1522,14 @@ If packages, classes or styles were called with an 
option
 like 10pt, size is taken from the first such option if you
 had let your document be parsed by AucTeX."
   (let* ((regexp "\\`\\([0-9]+\\)pt\\'")
-        (option
-         (or
-          (LaTeX-match-class-option regexp)
-          ;; We don't have `LaTeX-match-package-option'.
-          (TeX-member regexp
-                      (apply #'append
-                             (mapcar #'cdr LaTeX-provided-package-options))
-                      #'string-match))))
+         (option
+          (or
+           (LaTeX-match-class-option regexp)
+           ;; We don't have `LaTeX-match-package-option'.
+           (TeX-member regexp
+                       (apply #'append
+                              (mapcar #'cdr LaTeX-provided-package-options))
+                       #'string-match))))
     (if option (string-to-number (match-string 1 option)))))
 
 (defsubst preview-document-pt ()
@@ -1543,8 +1543,8 @@ to have a default font size given by function 
`preview-document-pt'
 so that they match the reference face in height."
   `(lambda nil
      (/ ,(/ (preview-inherited-face-attribute 'preview-reference-face :height
-                                             'default) 10.0)
-       (preview-document-pt))))
+                                              'default) 10.0)
+        (preview-document-pt))))
 
 (defvar preview-min-spec)
 
@@ -1555,42 +1555,42 @@ The first spec that is workable (given the current 
setting of
 icon is cached in the property list of the symbol."
   (let ((alist (get 'preview-min-alist symbol)))
     (cdr (or
-         (assq preview-min-spec alist)
-         (car (put symbol 'preview-min-alist
-                   (cons
-                    (cons preview-min-spec
-                          (preview-filter-specs
-                           (symbol-value symbol)))
-                    alist)))))))
+          (assq preview-min-spec alist)
+          (car (put symbol 'preview-min-alist
+                    (cons
+                     (cons preview-min-spec
+                           (preview-filter-specs
+                            (symbol-value symbol)))
+                     alist)))))))
 
 (defun preview-filter-specs (spec-list)
   "Find the first of the fitting specs and make an image."
   (let (image)
     (while (and spec-list
-               (not (setq image
-                          (catch 'preview-filter-specs
-                            (preview-filter-specs-1 (car spec-list))))))
+                (not (setq image
+                           (catch 'preview-filter-specs
+                             (preview-filter-specs-1 (car spec-list))))))
       (setq spec-list (cdr spec-list)))
     image))
 
 (defun preview-filter-specs-1 (specs)
   (and specs
        (if (get 'preview-filter-specs (car specs))
-          (apply (get 'preview-filter-specs (car specs)) specs)
-        `(,(nth 0 specs) ,(nth 1 specs)
-          ,@(preview-filter-specs-1 (nthcdr 2 specs))))))
+           (apply (get 'preview-filter-specs (car specs)) specs)
+         `(,(nth 0 specs) ,(nth 1 specs)
+           ,@(preview-filter-specs-1 (nthcdr 2 specs))))))
 
 (put 'preview-filter-specs :min
      #'(lambda (_keyword value &rest args)
-        (if (> value preview-min-spec)
-            (throw 'preview-filter-specs nil)
-          (preview-filter-specs-1 args))))
+         (if (> value preview-min-spec)
+             (throw 'preview-filter-specs nil)
+           (preview-filter-specs-1 args))))
 
 (put 'preview-filter-specs :file
      #'(lambda (_keyword value &rest args)
-        `(:file ,(expand-file-name value (expand-file-name "images"
-                                                           TeX-data-directory))
-                ,@(preview-filter-specs-1 args))))
+         `(:file ,(expand-file-name value (expand-file-name "images"
+                                                            
TeX-data-directory))
+                 ,@(preview-filter-specs-1 args))))
 
 (defun preview-ascent-from-bb (bb)
   "This calculates the image ascent from its bounding box.
@@ -1603,16 +1603,16 @@ numbers (can be float if available)."
   ;; If not, something is amiss.  We just use 100 in that case.
 
   (let ((bottom (aref bb 1))
-       (top (aref bb 3)))
+        (top (aref bb 3)))
     (if (and (<= bottom 720)
-            (> top 720))
-       (round (* 100.0 (/ (- top 720.0) (- top bottom))))
+             (> top 720))
+        (round (* 100.0 (/ (- top 720.0) (- top bottom))))
       100)))
 
 (defface preview-face '((((background dark))
-                        (:background "dark slate gray"))
-                       (t
-                        (:background "beige")))
+                         (:background "dark slate gray"))
+                        (t
+                         (:background "beige")))
   "Face to use for the preview source."
   :group 'preview-appearance)
 
@@ -1623,7 +1623,7 @@ Fallback to :inherit and 'default implemented."
 
 (defcustom preview-auto-reveal
   '(eval (preview-arrived-via (key-binding [left]) (key-binding [right])
-                             'backward-char 'forward-char))
+                              'backward-char 'forward-char))
   "Cause previews to open automatically when entered.
 Possibilities are:
 T autoopens,
@@ -1639,15 +1639,15 @@ point and current buffer point to the position in 
question.
 All of the options show reasonable defaults."
   :group 'preview-appearance
   :type '(choice (const :tag "Off" nil)
-                (const :tag "On" t)
-                (symbol :tag "Indirect variable" :value reveal-mode)
-                (integer :tag "Maximum distance" :value 1)
-                (cons :tag "Function call"
-                      :value (eval (preview-arrived-via
-                                    (key-binding [left])
-                                    (key-binding [right])))
-                      function (list :tag "Argument list"
-                                     (repeat :inline t sexp)))))
+                 (const :tag "On" t)
+                 (symbol :tag "Indirect variable" :value reveal-mode)
+                 (integer :tag "Maximum distance" :value 1)
+                 (cons :tag "Function call"
+                       :value (eval (preview-arrived-via
+                                     (key-binding [left])
+                                     (key-binding [right])))
+                       function (list :tag "Argument list"
+                                      (repeat :inline t sexp)))))
 
 (defun preview-auto-reveal-p (mode distance)
   "Decide whether to auto-reveal.
@@ -1657,13 +1657,13 @@ set to `preview-auto-reveal'.  DISTANCE specifies the 
movement
 distance with which point has been reached in case it has been
 a movement starting in the current buffer."
   (cond ((symbolp mode)
-        (and (boundp mode)
+         (and (boundp mode)
               (symbol-value mode)))
-       ((integerp mode)
-        (and distance (/= 0 distance) (<= (abs distance) mode)))
-       ((consp mode)
-        (apply (car mode) (cdr mode)))
-       (t mode)))
+        ((integerp mode)
+         (and distance (/= 0 distance) (<= (abs distance) mode)))
+        ((consp mode)
+         (apply (car mode) (cdr mode)))
+        (t mode)))
 
 (defun preview-arrived-via (&rest list)
   "Indicate auto-opening.
@@ -1671,7 +1671,7 @@ Returns non-NIL if called by one of the commands in LIST."
   (memq this-command list))
 
 (defcustom preview-equality-transforms '(identity
-                                        preview-canonical-spaces)
+                                         preview-canonical-spaces)
 "Transformation functions for region changes.
 These functions are tried in turn on the strings from the
 regions of a preview to decide whether a preview is to be considered
@@ -1685,14 +1685,14 @@ considered unchanged."
 Set this to something unusual when using `preview-transparent-border',
 to the default background in most other cases."
   :type '(radio (const :tag "None" nil)
-                (const :tag "Autodetect" t)
-                (color :tag "By name" :value "white")
-                (list :tag "Take from face"
-                      :value (default :background)
-                      (face)
-                      (choice :tag "What to take"
-                       (const :tag "Background" :value :background)
-                       (const :tag "Foreground" :value :foreground))))
+                 (const :tag "Autodetect" t)
+                 (color :tag "By name" :value "white")
+                 (list :tag "Take from face"
+                       :value (default :background)
+                       (face)
+                       (choice :tag "What to take"
+                        (const :tag "Background" :value :background)
+                        (const :tag "Foreground" :value :foreground))))
   :group 'preview-appearance)
 
 ;;; Note that the following default introduces a border only when
@@ -1712,20 +1712,20 @@ by PostScript as meaning a single pixel, other widths 
are
 interpreted as PostScript points (1/72 of 1in)"
   :group 'preview-appearance
   :type '(choice (const :value nil :tag "No border")
-                (number :value 1.5 :tag "Border width in pt")))
+                 (number :value 1.5 :tag "Border width in pt")))
 
 (defun preview-get-heuristic-mask ()
   "Get heuristic-mask to use for previews.
 Consults `preview-transparent-color'."
   (cond ((stringp preview-transparent-color)
-        (color-values preview-transparent-color))
-       ((or (not (consp preview-transparent-color))
-            (integerp (car preview-transparent-color)))
-        preview-transparent-color)
-       (t (color-values (preview-inherited-face-attribute
-                         (nth 0 preview-transparent-color)
-                         (nth 1 preview-transparent-color)
-                         'default)))))
+         (color-values preview-transparent-color))
+        ((or (not (consp preview-transparent-color))
+             (integerp (car preview-transparent-color)))
+         preview-transparent-color)
+        (t (color-values (preview-inherited-face-attribute
+                          (nth 0 preview-transparent-color)
+                          (nth 1 preview-transparent-color)
+                          'default)))))
 
 (defsubst preview-create-icon-1 (file type ascent border)
   `(image
@@ -1733,7 +1733,7 @@ Consults `preview-transparent-color'."
     :type ,type
     :ascent ,ascent
     ,@(and border
-          '(:mask (heuristic t)))))
+           '(:mask (heuristic t)))))
 
 (defun preview-create-icon (file type ascent border)
   "Create an icon from FILE, image TYPE, ASCENT and BORDER."
@@ -1744,23 +1744,23 @@ Consults `preview-transparent-color'."
 (put 'preview-filter-specs :type
      (lambda (keyword value &rest args)
        (if (image-type-available-p value)
-          `(image :type ,value
-                  ,@(preview-filter-specs-1 args))
-        (throw 'preview-filter-specs nil))))
+           `(image :type ,value
+                   ,@(preview-filter-specs-1 args))
+         (throw 'preview-filter-specs nil))))
 
 (defun preview-import-image (image)
   "Convert the printable IMAGE rendition back to an image."
   (cond ((stringp image)
-        (propertize image 'face 'preview-face))
-       ((eq (car image) 'image)
-        image)
-       (t
-        (preview-create-icon-1 (nth 0 image)
-                               (nth 1 image)
-                               (nth 2 image)
-                               (if (< (length image) 4)
-                                   (preview-get-heuristic-mask)
-                                 (nth 3 image))))))
+         (propertize image 'face 'preview-face))
+        ((eq (car image) 'image)
+         image)
+        (t
+         (preview-create-icon-1 (nth 0 image)
+                                (nth 1 image)
+                                (nth 2 image)
+                                (if (< (length image) 4)
+                                    (preview-get-heuristic-mask)
+                                  (nth 3 image))))))
 
 ;; No defcustom here: does not seem to make sense.
 
@@ -1785,8 +1785,8 @@ if there was any urgentization."
   (let ((dispro (overlay-get ov 'display)))
     (when (eq (car-safe dispro) 'when)
       (prog1
-         (car (cdr dispro))
-       (overlay-put ov 'display (cdr (cdr dispro)))))))
+          (car (cdr dispro))
+        (overlay-put ov 'display (cdr (cdr dispro)))))))
 
 (defvar preview-overlay nil)
 
@@ -1839,26 +1839,26 @@ COMMAND is the command that generated the format.
 FORMAT-CONS contains the format info for the main
 format dump handler."
   (let ((buffer (if (bufferp file)
-                   file
-                 (find-buffer-visiting file))) ov)
+                    file
+                  (find-buffer-visiting file))) ov)
     (setcdr
      format-cons
      (cons command
-          (when buffer
-            (with-current-buffer buffer
-              (save-excursion
-                (save-restriction
-                  (widen)
-                  (goto-char (point-min))
-                  (unless (re-search-forward preview-dump-threshold nil t)
-                    (error "Can't find preamble of `%s'" file))
-                  (setq ov (make-overlay (point-min) (point)))
-                  (overlay-put ov 'format-cons format-cons)
-                  (overlay-put ov 'insert-in-front-hooks
-                               '(preview-preamble-changed-function))
-                  (overlay-put ov 'modification-hooks
-                               '(preview-preamble-changed-function))
-                  ov))))))))
+           (when buffer
+             (with-current-buffer buffer
+               (save-excursion
+                 (save-restriction
+                   (widen)
+                   (goto-char (point-min))
+                   (unless (re-search-forward preview-dump-threshold nil t)
+                     (error "Can't find preamble of `%s'" file))
+                   (setq ov (make-overlay (point-min) (point)))
+                   (overlay-put ov 'format-cons format-cons)
+                   (overlay-put ov 'insert-in-front-hooks
+                                '(preview-preamble-changed-function))
+                   (overlay-put ov 'modification-hooks
+                                '(preview-preamble-changed-function))
+                   ov))))))))
 
 (defun preview-unwatch-preamble (format-cons)
   "Stop watching a format on FORMAT-CONS.
@@ -1876,12 +1876,12 @@ This stores the old contents of the overlay in the
 find it at some later point of time."
   (unless (overlay-get ov 'preview-prechange)
     (if (eq (overlay-get ov 'preview-state) 'disabled)
-       (overlay-put ov 'preview-prechange t)
+        (overlay-put ov 'preview-prechange t)
       (overlay-put ov 'preview-prechange
-                  (save-restriction
-                    (widen)
-                    (buffer-substring-no-properties
-                     (overlay-start ov) (overlay-end ov)))))
+                   (save-restriction
+                     (widen)
+                     (buffer-substring-no-properties
+                      (overlay-start ov) (overlay-end ov)))))
     (push ov preview-change-list)))
 
 (defun preview-check-changes ()
@@ -1889,20 +1889,20 @@ find it at some later point of time."
 Disable it if that is the case.  Ignores text properties."
   (dolist (ov preview-change-list)
     (condition-case nil
-       (with-current-buffer (overlay-buffer ov)
-         (let ((text (save-restriction
-                       (widen)
-                       (buffer-substring-no-properties
-                        (overlay-start ov) (overlay-end ov)))))
-           (if (zerop (length text))
-               (preview-delete ov)
-             (unless
-                 (or (eq (overlay-get ov 'preview-state) 'disabled)
-                     (preview-relaxed-string=
-                      text (overlay-get ov 'preview-prechange)))
-               (overlay-put ov 'insert-in-front-hooks nil)
-               (overlay-put ov 'insert-behind-hooks nil)
-               (preview-disable ov)))))
+        (with-current-buffer (overlay-buffer ov)
+          (let ((text (save-restriction
+                        (widen)
+                        (buffer-substring-no-properties
+                         (overlay-start ov) (overlay-end ov)))))
+            (if (zerop (length text))
+                (preview-delete ov)
+              (unless
+                  (or (eq (overlay-get ov 'preview-state) 'disabled)
+                      (preview-relaxed-string=
+                       text (overlay-get ov 'preview-prechange)))
+                (overlay-put ov 'insert-in-front-hooks nil)
+                (overlay-put ov 'insert-behind-hooks nil)
+                (preview-disable ov)))))
       (error nil))
     (overlay-put ov 'preview-prechange nil))
   (setq preview-change-list nil))
@@ -1914,8 +1914,8 @@ See info node `(elisp) Overlay Properties' for
 definition of OV, AFTER-CHANGE, BEG, END and LENGTH."
   (if after-change
       (unless undo-in-progress
-       (if (eq (overlay-get ov 'preview-state) 'active)
-           (move-overlay ov end (overlay-end ov))))
+        (if (eq (overlay-get ov 'preview-state) 'active)
+            (move-overlay ov end (overlay-end ov))))
     (preview-register-change ov)))
 
 (defun preview-handle-insert-behind
@@ -1926,8 +1926,8 @@ end of the overlay.  See info node `(elisp) Overlay 
Properties'
 for definition of OV, AFTER-CHANGE, BEG, END and LENGTH."
   (if after-change
       (unless undo-in-progress
-       (if (eq (overlay-get ov 'preview-state) 'active)
-           (move-overlay ov (overlay-start ov) beg)))
+        (if (eq (overlay-get ov 'preview-state) 'active)
+            (move-overlay ov (overlay-start ov) beg)))
     (preview-register-change ov)))
 
 (defun preview-handle-modification
@@ -1947,39 +1947,39 @@ occured, either by being a mouse event or by directly 
being
 the window in question.  This may be used for cursor restoration
 purposes."
   (let ((old-urgent (preview-remove-urgentization ov))
-       (preview-state
-        (if (if (eq arg 'toggle)
-                (null (eq (overlay-get ov 'preview-state) 'active))
-              arg)
-            'active
-          'inactive))
-       (strings (overlay-get ov 'strings)))
+        (preview-state
+         (if (if (eq arg 'toggle)
+                 (null (eq (overlay-get ov 'preview-state) 'active))
+               arg)
+             'active
+           'inactive))
+        (strings (overlay-get ov 'strings)))
     (unless (eq (overlay-get ov 'preview-state) 'disabled)
       (overlay-put ov 'preview-state preview-state)
       (if (eq preview-state 'active)
-         (progn
-           (overlay-put ov 'category 'preview-overlay)
-           (if (eq (overlay-start ov) (overlay-end ov))
-               (overlay-put ov 'before-string (car strings))
-             (dolist (prop '(display keymap mouse-face help-echo))
-               (overlay-put ov prop
-                            (get-text-property 0 prop (car strings))))
-             (overlay-put ov 'before-string nil))
-           (overlay-put ov 'face nil))
-       (dolist (prop '(display keymap mouse-face help-echo))
-         (overlay-put ov prop nil))
-       (overlay-put ov 'face 'preview-face)
-       (unless (cdr strings)
-         (setcdr strings (preview-inactive-string ov)))
-       (overlay-put ov 'before-string (cdr strings)))
+          (progn
+            (overlay-put ov 'category 'preview-overlay)
+            (if (eq (overlay-start ov) (overlay-end ov))
+                (overlay-put ov 'before-string (car strings))
+              (dolist (prop '(display keymap mouse-face help-echo))
+                (overlay-put ov prop
+                             (get-text-property 0 prop (car strings))))
+              (overlay-put ov 'before-string nil))
+            (overlay-put ov 'face nil))
+        (dolist (prop '(display keymap mouse-face help-echo))
+          (overlay-put ov prop nil))
+        (overlay-put ov 'face 'preview-face)
+        (unless (cdr strings)
+          (setcdr strings (preview-inactive-string ov)))
+        (overlay-put ov 'before-string (cdr strings)))
       (if old-urgent
-         (apply 'preview-add-urgentization old-urgent))))
+          (apply 'preview-add-urgentization old-urgent))))
   (if event
       (preview-restore-position
        ov
        (if (windowp event)
-          event
-        (posn-window (event-start event))))))
+           event
+         (posn-window (event-start event))))))
 
 (defvar preview-marker (make-marker)
   "Marker for fake intangibility.")
@@ -2009,59 +2009,59 @@ overlays not in the active window."
   (when (eq (overlay-buffer ov) (window-buffer window))
     (with-current-buffer (overlay-buffer ov)
       (if (eq (overlay-get ov 'preview-state) 'active)
-         (setq preview-last-location
-               (set-marker (or preview-last-location (make-marker))
-                           (window-point window)))
-       (when (and
-              (markerp preview-last-location)
-              (eq (overlay-buffer ov) (marker-buffer preview-last-location))
-              (< (overlay-start ov) preview-last-location)
-              (> (overlay-end ov) preview-last-location))
-         (set-window-point window preview-last-location))))))
+          (setq preview-last-location
+                (set-marker (or preview-last-location (make-marker))
+                            (window-point window)))
+        (when (and
+               (markerp preview-last-location)
+               (eq (overlay-buffer ov) (marker-buffer preview-last-location))
+               (< (overlay-start ov) preview-last-location)
+               (> (overlay-end ov) preview-last-location))
+          (set-window-point window preview-last-location))))))
 
 (defun preview-move-point ()
   "Move point out of fake-intangible areas."
   (preview-check-changes)
   (let* (newlist (pt (point)) (lst (overlays-at pt)) distance)
     (setq preview-temporary-opened
-         (dolist (ov preview-temporary-opened newlist)
-           (and (overlay-buffer ov)
-                (eq (overlay-get ov 'preview-state) 'inactive)
-                (if (and (eq (overlay-buffer ov) (current-buffer))
-                         (or (<= pt (overlay-start ov))
-                             (>= pt (overlay-end ov))))
-                    (preview-toggle ov t)
-                  (push ov newlist)))))
+          (dolist (ov preview-temporary-opened newlist)
+            (and (overlay-buffer ov)
+                 (eq (overlay-get ov 'preview-state) 'inactive)
+                 (if (and (eq (overlay-buffer ov) (current-buffer))
+                          (or (<= pt (overlay-start ov))
+                              (>= pt (overlay-end ov))))
+                     (preview-toggle ov t)
+                   (push ov newlist)))))
     (when lst
       (if (or disable-point-adjustment
-             global-disable-point-adjustment
-             (preview-auto-reveal-p
-              preview-auto-reveal
-              (setq distance
-                    (and (eq (marker-buffer preview-marker)
-                             (current-buffer))
-                         (- pt (marker-position preview-marker))))))
-         (preview-open-overlays lst)
-       (while lst
-         (setq lst
-               (if (and
-                    (eq (overlay-get (car lst) 'preview-state) 'active)
-                    (> pt (overlay-start (car lst))))
-                   (overlays-at
-                    (setq pt (if (and distance (< distance 0))
-                                 (overlay-start (car lst))
-                               (overlay-end (car lst)))))
-                 (cdr lst))))
-       (goto-char pt)))))
+              global-disable-point-adjustment
+              (preview-auto-reveal-p
+               preview-auto-reveal
+               (setq distance
+                     (and (eq (marker-buffer preview-marker)
+                              (current-buffer))
+                          (- pt (marker-position preview-marker))))))
+          (preview-open-overlays lst)
+        (while lst
+          (setq lst
+                (if (and
+                     (eq (overlay-get (car lst) 'preview-state) 'active)
+                     (> pt (overlay-start (car lst))))
+                    (overlays-at
+                     (setq pt (if (and distance (< distance 0))
+                                  (overlay-start (car lst))
+                                (overlay-end (car lst)))))
+                  (cdr lst))))
+        (goto-char pt)))))
 
 (defun preview-open-overlays (list &optional pos)
   "Open all previews in LIST, optionally restricted to enclosing POS."
   (dolist (ovr list)
     (when (and (eq (overlay-get ovr 'preview-state) 'active)
-              (or (null pos)
-                  (and
-                   (> pos (overlay-start ovr))
-                   (< pos (overlay-end ovr)))))
+               (or (null pos)
+                   (and
+                    (> pos (overlay-start ovr))
+                    (< pos (overlay-end ovr)))))
       (preview-toggle ovr)
       (push ovr preview-temporary-opened))))
 
@@ -2076,11 +2076,11 @@ overlays not in the active window."
   :type 'boolean
   :require 'preview
   :set (lambda (symbol value)
-        (set-default symbol value)
-        (if value
-            (ad-enable-advice 'replace-highlight 'before 'preview)
-          (ad-disable-advice 'replace-highlight 'before 'preview))
-        (ad-activate 'replace-highlight))
+         (set-default symbol value)
+         (if value
+             (ad-enable-advice 'replace-highlight 'before 'preview)
+           (ad-disable-advice 'replace-highlight 'before 'preview))
+         (ad-activate 'replace-highlight))
   :initialize #'custom-initialize-reset)
 
 (defun preview-relaxed-string= (&rest args)
@@ -2100,29 +2100,29 @@ Removes comments and collapses white space, except for 
multiple newlines."
     (while (setq pos (string-match "\\s<.*[\n\r][ \t]*" arg pos))
       (setq arg (replace-match "" t t arg 0)))
     (while (setq pos (string-match "[ \t]*\\(\\([ \t]\\)\\|[\n\r][ \t]*\\)"
-                                  arg pos))
+                                   arg pos))
       (setq arg (replace-match (if (match-beginning 2) " " "\n") t t arg 0)
-           pos (1+ pos)))
+            pos (1+ pos)))
     (while (setq pos (string-match "\n+" arg pos))
       (if (string= "\n" (match-string 0 arg))
-         (setq arg (replace-match " " t t arg 0)
-               pos (1+ pos))
-       (setq pos (match-end 0)))))
+          (setq arg (replace-match " " t t arg 0)
+                pos (1+ pos))
+        (setq pos (match-end 0)))))
   arg)
 
 (defun preview-regenerate (ovr)
   "Pass the modified region in OVR again through LaTeX."
   (let ((begin (overlay-start ovr))
-       (end (overlay-end ovr)))
+        (end (overlay-end ovr)))
     (with-current-buffer (overlay-buffer ovr)
       (preview-delete ovr)
       (preview-region begin end))))
 
 (defcustom preview-inner-environments '("Bmatrix" "Vmatrix" "aligned"
-                                       "array" "bmatrix" "cases"
-                                       "gathered" "matrix" "pmatrix"
-                                       "smallmatrix" "split"
-                                       "subarray" "vmatrix")
+                                        "array" "bmatrix" "cases"
+                                        "gathered" "matrix" "pmatrix"
+                                        "smallmatrix" "split"
+                                        "subarray" "vmatrix")
   "Environments not to be previewed on their own."
   :group 'preview-latex
   :type '(repeat string))
@@ -2134,22 +2134,22 @@ Searches backwards if BACKWARDS is non-nil."
   (let (history preview-state (pt (point)))
     (catch 'exit
       (while
-         (null
-          (memq
-           (setq preview-state
-                 (if backwards
-                     (if (> (setq pt
-                                  (previous-single-char-property-change
-                                   pt 'preview-state)) (point-min))
-                         (get-char-property (1- pt) 'preview-state)
-                       (throw 'exit (or history (point-min))))
-                   (if (< (setq pt
-                                (next-single-char-property-change
-                                 pt 'preview-state)) (point-max))
-                       (get-char-property pt 'preview-state)
-                     (throw 'exit (or history (point-max))))))
-           '(active inactive)))
-       (setq history (and (not preview-state) pt)))
+          (null
+           (memq
+            (setq preview-state
+                  (if backwards
+                      (if (> (setq pt
+                                   (previous-single-char-property-change
+                                    pt 'preview-state)) (point-min))
+                          (get-char-property (1- pt) 'preview-state)
+                        (throw 'exit (or history (point-min))))
+                    (if (< (setq pt
+                                 (next-single-char-property-change
+                                  pt 'preview-state)) (point-max))
+                        (get-char-property pt 'preview-state)
+                      (throw 'exit (or history (point-max))))))
+            '(active inactive)))
+        (setq history (and (not preview-state) pt)))
       (or history pt))))
 
 (defun preview-at-point ()
@@ -2168,31 +2168,31 @@ active (`transient-mark-mode'), it is run through 
`preview-region'."
       (preview-region (region-beginning) (region-end))
     (catch 'exit
       (dolist (ovr (overlays-in (max (point-min) (1- (point)))
-                               (min (point-max) (1+ (point)))))
-       (let ((preview-state (overlay-get ovr 'preview-state)))
-         (when preview-state
-           (unless (eq preview-state 'disabled)
-             (preview-toggle ovr 'toggle (selected-window))
-             (throw 'exit t)))))
+                                (min (point-max) (1+ (point)))))
+        (let ((preview-state (overlay-get ovr 'preview-state)))
+          (when preview-state
+            (unless (eq preview-state 'disabled)
+              (preview-toggle ovr 'toggle (selected-window))
+              (throw 'exit t)))))
       (preview-region (preview-next-border t)
-                     (preview-next-border nil)))))
+                      (preview-next-border nil)))))
 
 (defun preview-disabled-string (ov)
   "Generate a before-string for disabled preview overlay OV."
   (concat (preview-make-clickable
-          (overlay-get ov 'preview-map)
-          preview-icon
-          "\
+           (overlay-get ov 'preview-map)
+           preview-icon
+           "\
 %s regenerates preview
 %s more options"
-          `(lambda() (interactive) (preview-regenerate ,ov)))
+           `(lambda() (interactive) (preview-regenerate ,ov)))
 ;; icon on separate line only for stuff starting on its own line
-         (with-current-buffer (overlay-buffer ov)
-           (save-excursion
-             (save-restriction
-               (widen)
-               (goto-char (overlay-start ov))
-               (if (bolp) "\n" ""))))))
+          (with-current-buffer (overlay-buffer ov)
+            (save-excursion
+              (save-restriction
+                (widen)
+                (goto-char (overlay-start ov))
+                (if (bolp) "\n" ""))))))
 
 (defun preview-disable (ovr)
   "Change overlay behaviour of OVR after source edits."
@@ -2205,7 +2205,7 @@ active (`transient-mark-mode'), it is run through 
`preview-region'."
   (overlay-put ovr 'preview-state 'disabled)
   (dolist (filename (overlay-get ovr 'filenames))
     (condition-case nil
-       (preview-delete-file filename)
+        (preview-delete-file filename)
       (file-error nil))
     (overlay-put ovr 'filenames nil)))
 
@@ -2218,8 +2218,8 @@ a hook in some cases"
     (delete-overlay ovr)
     (dolist (filename filenames)
       (condition-case nil
-         (preview-delete-file filename)
-       (file-error nil)))))
+          (preview-delete-file filename)
+        (file-error nil)))))
 
 (defun preview-clearout (&optional start end timestamp)
   "Clear out all previews in the current region.
@@ -2230,11 +2230,11 @@ the entire buffer.  If TIMESTAMP is non-nil, previews
 with a `timestamp' property of it are kept."
   (interactive "r")
   (dolist (ov (overlays-in (or start (point-min))
-                          (or end (point-max))))
+                           (or end (point-max))))
     (and (overlay-get ov 'preview-state)
-        (not (and timestamp
-                  (equal timestamp (overlay-get ov 'timestamp))))
-        (preview-delete ov))))
+         (not (and timestamp
+                   (equal timestamp (overlay-get ov 'timestamp))))
+         (preview-delete ov))))
 
 (defun preview-clearout-buffer (&optional buffer)
   "Clearout BUFFER from previews, current buffer if nil."
@@ -2254,26 +2254,26 @@ with a `timestamp' property of it are kept."
   "Clearout any preview at point."
   (interactive)
   (preview-clearout (max (point-min) (1- (point)))
-                   (min (point-max) (1+ (point)))))
+                    (min (point-max) (1+ (point)))))
 
 (defun preview-walk-document (func)
   "Cycle through all buffers belonging to current document.
 Each buffer having the same master file as the current file
 has FUNC called with its current buffer being set to it."
   (let* ((buffers (buffer-list))
-        (master (expand-file-name (TeX-master-file t)))
-        (default-buffers (list (current-buffer)
-                               (find-buffer-visiting master))))
+         (master (expand-file-name (TeX-master-file t)))
+         (default-buffers (list (current-buffer)
+                                (find-buffer-visiting master))))
     (while buffers
       (with-current-buffer (pop buffers)
-       (when
-           (or (memq (current-buffer) default-buffers)
-               (and (memq major-mode '(plain-tex-mode latex-mode))
-                    (or (stringp TeX-master)
-                        (eq TeX-master t))
-                    (string= (expand-file-name (TeX-master-file t))
-                             master)))
-         (funcall func))))))
+        (when
+            (or (memq (current-buffer) default-buffers)
+                (and (memq major-mode '(plain-tex-mode latex-mode))
+                     (or (stringp TeX-master)
+                         (eq TeX-master t))
+                     (string= (expand-file-name (TeX-master-file t))
+                              master)))
+          (funcall func))))))
 
 (defun preview-clearout-document ()
   "Clear out all previews in current document.
@@ -2301,9 +2301,9 @@ kept."
 
 (defun preview-extract-counters (ctr)
   (setq preview-last-counter
-       (prog1 (copy-sequence ctr)
-         (dolist (elt preview-last-counter)
-           (setq ctr (delete elt ctr)))))
+        (prog1 (copy-sequence ctr)
+          (dolist (elt preview-last-counter)
+            (setq ctr (delete elt ctr)))))
   (apply #'concat ctr))
 
 (defun desktop-buffer-preview-misc-data (&rest ignored)
@@ -2313,15 +2313,15 @@ kept."
     (save-restriction
       (widen)
       (let (save-info (timestamp (visited-file-modtime)))
-       (dolist (ov (sort (overlays-in (point-min) (point-max))
-                         (lambda (x y) (< (overlay-start x)
-                                          (overlay-start y)))))
-         (when (and (memq (overlay-get ov 'preview-state) '(active inactive))
-                    (null (overlay-get ov 'queued))
-                    (cdr (overlay-get ov 'preview-image)))
-           (push (preview-dissect ov timestamp) save-info)))
-       (and save-info
-            (cons 'preview (cons timestamp (nreverse save-info))))))))
+        (dolist (ov (sort (overlays-in (point-min) (point-max))
+                          (lambda (x y) (< (overlay-start x)
+                                           (overlay-start y)))))
+          (when (and (memq (overlay-get ov 'preview-state) '(active inactive))
+                     (null (overlay-get ov 'queued))
+                     (cdr (overlay-get ov 'preview-image)))
+            (push (preview-dissect ov timestamp) save-info)))
+        (and save-info
+             (cons 'preview (cons timestamp (nreverse save-info))))))))
 
 (eval-after-load "desktop"
   '(add-hook
@@ -2338,13 +2338,13 @@ on first use.")
   (let ((filenames (butlast (nth 0 (overlay-get ov 'filenames)))))
     (overlay-put ov 'timestamp timestamp)
     (list (overlay-start ov)
-         (overlay-end ov)
-         (cdr (overlay-get ov 'preview-image))
-         filenames
-         (let ((ctr (overlay-get ov 'preview-counters)))
-           (and ctr
-                (cons (preview-extract-counters (car ctr))
-                      (preview-extract-counters (cdr ctr))))))))
+          (overlay-end ov)
+          (cdr (overlay-get ov 'preview-image))
+          filenames
+          (let ((ctr (overlay-get ov 'preview-counters)))
+            (and ctr
+                 (cons (preview-extract-counters (car ctr))
+                       (preview-extract-counters (cdr ctr))))))))
 
 (defun preview-buffer-restore-internal (buffer-misc)
   "Restore previews from BUFFER-MISC if proper.
@@ -2354,21 +2354,21 @@ Remove them if they have expired."
     (when (eq 'preview (pop buffer-misc))
       (preview-get-geometry)
       (if (equal (pop buffer-misc) timestamp)
-         (dolist (ovdata buffer-misc)
-           (setq tempdirlist
-                 (apply #'preview-reinstate-preview tempdirlist
-                        timestamp ovdata)))
-       (dolist (ovdata buffer-misc)
-         (setq files (nth 3 ovdata))
-         (condition-case nil
-             (delete-file (nth 0 files))
-           (file-error nil))
-         (unless (member (nth 1 files) tempdirlist)
-           (push (nth 1 files) tempdirlist)))
-       (dolist (dir tempdirlist)
-         (condition-case nil
-             (delete-directory dir)
-           (file-error nil)))))))
+          (dolist (ovdata buffer-misc)
+            (setq tempdirlist
+                  (apply #'preview-reinstate-preview tempdirlist
+                         timestamp ovdata)))
+        (dolist (ovdata buffer-misc)
+          (setq files (nth 3 ovdata))
+          (condition-case nil
+              (delete-file (nth 0 files))
+            (file-error nil))
+          (unless (member (nth 1 files) tempdirlist)
+            (push (nth 1 files) tempdirlist)))
+        (dolist (dir tempdirlist)
+          (condition-case nil
+              (delete-directory dir)
+            (file-error nil)))))))
 
 
 (defun preview-buffer-restore (buffer-misc)
@@ -2377,37 +2377,37 @@ This delay is so that minor modes changing buffer 
positions
 \(like `x-symbol-mode' does) will not wreak havoc.
 BUFFER-MISC is the appropriate data to be used."
   (add-hook 'desktop-delay-hook `(lambda ()
-                                  (with-current-buffer ,(current-buffer)
-                                    (preview-buffer-restore-internal
-                                     ',buffer-misc)))))
+                                   (with-current-buffer ,(current-buffer)
+                                     (preview-buffer-restore-internal
+                                      ',buffer-misc)))))
 
 (defun desktop-buffer-preview (file-name _buffer-name misc)
   "Hook function for restoring persistent previews into a buffer."
   (when (and file-name (file-readable-p file-name))
     (let ((buf (find-file-noselect file-name)))
       (if (eq (car misc) 'preview)
-         (with-current-buffer buf
-           (preview-buffer-restore misc)
-           buf)
-       buf))))
+          (with-current-buffer buf
+            (preview-buffer-restore misc)
+            buf)
+        buf))))
 
 (eval-after-load "desktop"
   '(if (boundp 'desktop-buffer-mode-handlers)
        (add-to-list 'desktop-buffer-mode-handlers
-                   '(latex-mode . desktop-buffer-preview))
+                    '(latex-mode . desktop-buffer-preview))
      (add-hook 'desktop-buffer-handlers '(lambda ()
-                                          (desktop-buffer-preview
-                                           desktop-buffer-file-name
-                                           desktop-buffer-name
-                                           desktop-buffer-misc)))))
+                                           (desktop-buffer-preview
+                                            desktop-buffer-file-name
+                                            desktop-buffer-name
+                                            desktop-buffer-misc)))))
 
 (defcustom preview-auto-cache-preamble 'ask
   "Whether to generate a preamble cache format automatically.
 Possible values are nil, t, and `ask'."
   :group 'preview-latex
   :type '(choice (const :tag "Cache" t)
-                (const :tag "Don't cache" nil)
-                (const :tag "Ask" ask)))
+                 (const :tag "Don't cache" nil)
+                 (const :tag "Ask" ask)))
 
 (defvar preview-dumped-alist nil
   "Alist of dumped masters.
@@ -2434,17 +2434,17 @@ visible.  For efficiency reasons it is expected that 
the buffer
 is already selected and unnarrowed."
   (concat
    (preview-make-clickable (overlay-get ov 'preview-map)
-                          preview-icon
-                          "\
+                           preview-icon
+                           "\
 %s redisplays preview
 %s more options")
 ;; icon on separate line only for stuff starting on its own line
    (with-current-buffer (overlay-buffer ov)
      (save-excursion
        (save-restriction
-        (widen)
-        (goto-char (overlay-start ov))
-        (if (bolp) "\n" ""))))))
+         (widen)
+         (goto-char (overlay-start ov))
+         (if (bolp) "\n" ""))))))
 
 (defun preview-dvipng-place-all ()
   "Place all images dvipng has created, if any.
@@ -2452,51 +2452,51 @@ Deletes the dvi file when finished."
   (let (filename queued oldfiles snippet)
     (dolist (ov (prog1 preview-gs-queue (setq preview-gs-queue nil)))
       (when (and (setq queued (overlay-get ov 'queued))
-                (setq snippet (aref (overlay-get ov 'queued) 2))
-                (setq filename (preview-make-filename
-                                (format "prev%03d.%s"
-                                        snippet preview-dvipng-image-type)
-                                TeX-active-tempdir)))
-       (if (file-exists-p (car filename))
-           (progn
-             (overlay-put ov 'filenames (list filename))
-             (preview-replace-active-icon
-              ov
-              (preview-create-icon (car filename)
-                                   preview-dvipng-image-type
-                                   (preview-ascent-from-bb
-                                    (aref queued 0))
-                                   (aref preview-colors 2)))
-             (overlay-put ov 'queued nil))
-         (push filename oldfiles)
-         (overlay-put ov 'filenames nil)
-         (push ov preview-gs-queue))))
+                 (setq snippet (aref (overlay-get ov 'queued) 2))
+                 (setq filename (preview-make-filename
+                                 (format "prev%03d.%s"
+                                         snippet preview-dvipng-image-type)
+                                 TeX-active-tempdir)))
+        (if (file-exists-p (car filename))
+            (progn
+              (overlay-put ov 'filenames (list filename))
+              (preview-replace-active-icon
+               ov
+               (preview-create-icon (car filename)
+                                    preview-dvipng-image-type
+                                    (preview-ascent-from-bb
+                                     (aref queued 0))
+                                    (aref preview-colors 2)))
+              (overlay-put ov 'queued nil))
+          (push filename oldfiles)
+          (overlay-put ov 'filenames nil)
+          (push ov preview-gs-queue))))
     (if (setq preview-gs-queue (nreverse preview-gs-queue))
-       (progn
-         (preview-start-dvips preview-fast-conversion)
-         (setq TeX-sentinel-function (lambda (process command)
-                                       (preview-gs-dvips-sentinel
-                                        process
-                                        command
-                                        t)))
-         (dolist (ov preview-gs-queue)
-           (setq snippet (aref (overlay-get ov 'queued) 2))
-           (overlay-put ov 'filenames
-                        (list
-                         (preview-make-filename
-                          (or preview-ps-file
-                              (format "preview.%03d" snippet))
-                          TeX-active-tempdir))))
-         (while (setq filename (pop oldfiles))
-           (condition-case nil
-               (preview-delete-file filename)
-             (file-error nil))))
+        (progn
+          (preview-start-dvips preview-fast-conversion)
+          (setq TeX-sentinel-function (lambda (process command)
+                                        (preview-gs-dvips-sentinel
+                                         process
+                                         command
+                                         t)))
+          (dolist (ov preview-gs-queue)
+            (setq snippet (aref (overlay-get ov 'queued) 2))
+            (overlay-put ov 'filenames
+                         (list
+                          (preview-make-filename
+                           (or preview-ps-file
+                               (format "preview.%03d" snippet))
+                           TeX-active-tempdir))))
+          (while (setq filename (pop oldfiles))
+            (condition-case nil
+                (preview-delete-file filename)
+              (file-error nil))))
       (condition-case nil
-         (let ((gsfile preview-gs-file))
-           (delete-file
-            (with-current-buffer TeX-command-buffer
-              (funcall (car gsfile) "dvi" t))))
-       (file-error nil)))))
+          (let ((gsfile preview-gs-file))
+            (delete-file
+             (with-current-buffer TeX-command-buffer
+               (funcall (car gsfile) "dvi" t))))
+        (file-error nil)))))
 
 (defun preview-active-string (ov)
   "Generate before-string for active image overlay OV."
@@ -2515,13 +2515,13 @@ name elements.  If FILE is already in that form, the 
file name itself
 gets converted into a CONS-cell with a name and a reference count."
   (if (consp file)
       (progn
-       (if (consp (car file))
-           (setcdr (car file) (1+ (cdr (car file))))
-         (setcar file (cons (car file) 1)))
-       file)
+        (if (consp (car file))
+            (setcdr (car file) (1+ (cdr (car file))))
+          (setcar file (cons (car file) 1)))
+        file)
     (setcar (nthcdr 2 tempdir) (1+ (nth 2 tempdir)))
     (cons (expand-file-name file (nth 0 tempdir))
-         tempdir)))
+          tempdir)))
 
 (defun preview-attach-filename (attached file)
   "Attaches the absolute file name ATTACHED to FILE."
@@ -2536,28 +2536,28 @@ See `preview-make-filename' for a description of the 
data
 structure.  If the containing directory becomes empty,
 it gets deleted as well."
   (let ((filename
-        (if (consp (car file))
-            (and (zerop
-                  (setcdr (car file) (1- (cdr (car file)))))
-                 (car (car file)))
-          (car file))))
+         (if (consp (car file))
+             (and (zerop
+                   (setcdr (car file) (1- (cdr (car file)))))
+                  (car (car file)))
+           (car file))))
     (if filename
-       (unwind-protect
-           (if (listp filename)
-               (dolist (elt filename) (delete-file elt))
-             (delete-file filename))
-         (let ((tempdir (cdr file)))
-           (when tempdir
-             (if (> (nth 2 tempdir) 1)
-                 (setcar (nthcdr 2 tempdir) (1- (nth 2 tempdir)))
-               (setcdr file nil)
-               (delete-directory (nth 0 tempdir)))))))))
+        (unwind-protect
+            (if (listp filename)
+                (dolist (elt filename) (delete-file elt))
+              (delete-file filename))
+          (let ((tempdir (cdr file)))
+            (when tempdir
+              (if (> (nth 2 tempdir) 1)
+                  (setcar (nthcdr 2 tempdir) (1- (nth 2 tempdir)))
+                (setcdr file nil)
+                (delete-directory (nth 0 tempdir)))))))))
 
 (defvar preview-buffer-has-counters nil)
 (make-variable-buffer-local 'preview-buffer-has-counters)
 
 (defun preview-place-preview (snippet start end
-                                     box counters tempdir place-opts)
+                                      box counters tempdir place-opts)
   "Generate and place an overlay preview image.
 This generates the filename for the preview
 snippet SNIPPET in the current buffer, and uses it for the
@@ -2575,20 +2575,20 @@ to the close hook."
     (when (fboundp 'TeX-overlay-prioritize)
       (overlay-put ov 'priority (TeX-overlay-prioritize start end)))
     (overlay-put ov 'preview-map
-                (preview-make-clickable
-                 nil nil nil
-                 `(lambda(event) (interactive "e")
-                    (preview-toggle ,ov 'toggle event))
-                 `(lambda(event) (interactive "e")
-                    (preview-context-menu ,ov event))))
+                 (preview-make-clickable
+                  nil nil nil
+                  `(lambda(event) (interactive "e")
+                     (preview-toggle ,ov 'toggle event))
+                  `(lambda(event) (interactive "e")
+                     (preview-context-menu ,ov event))))
     (overlay-put ov 'timestamp tempdir)
     (when (cdr counters)
       (overlay-put ov 'preview-counters counters)
       (setq preview-buffer-has-counters t))
     (prog1 (apply #'preview-call-hook 'place ov snippet box
-                 place-opts)
+                  place-opts)
       (overlay-put ov 'strings
-                  (list (preview-active-string ov)))
+                   (list (preview-active-string ov)))
       (preview-toggle ov t))))
 
 ;; The following is a brutal hack.  It relies on `begin' being let to
@@ -2601,31 +2601,31 @@ Factored out because of compatibility macros XEmacs 
would
 not use in advice."
   (or (car (get-char-property begin 'preview-counters))
       (cdr (get-char-property (max (point-min)
-                                  (1- begin))
-                             'preview-counters))
+                                   (1- begin))
+                              'preview-counters))
       (cdr (get-char-property
-           (max (point-min)
-                (1- (previous-single-char-property-change
-                     begin
-                     'preview-counters)))
-           'preview-counters))
+            (max (point-min)
+                 (1- (previous-single-char-property-change
+                      begin
+                      'preview-counters)))
+            'preview-counters))
       (car (get-char-property
-           (next-single-char-property-change begin 'preview-counters)
-           'preview-counters))))
+            (next-single-char-property-change begin 'preview-counters)
+            'preview-counters))))
 
 (defadvice TeX-region-create (around preview-counters)
   "Write out counter information to region."
   (let ((TeX-region-extra
-        (concat
-         (and (boundp 'begin)
-              preview-buffer-has-counters
-              (mapconcat
-               #'identity
-               (cons
-                ""
-                (preview-counter-find (symbol-value 'begin)))
-               "\\setcounter"))
-         TeX-region-extra)))
+         (concat
+          (and (boundp 'begin)
+               preview-buffer-has-counters
+               (mapconcat
+                #'identity
+                (cons
+                 ""
+                 (preview-counter-find (symbol-value 'begin)))
+                "\\setcounter"))
+          TeX-region-extra)))
     ad-do-it))
 
 (defun preview-reinstate-preview (tempdirlist timestamp start end
@@ -2643,52 +2643,52 @@ if any."
       (or (null filename) (file-readable-p (car filename)))
     (when filename
       (unless (equal (nth 1 filename) (car TeX-active-tempdir))
-       (setq TeX-active-tempdir
-             (or (assoc (nth 1 filename) tempdirlist)
-                 (car (push (append (cdr filename) (list 0))
-                            tempdirlist))))
-       (setcar (cdr TeX-active-tempdir)
-               (car (or (member (nth 1 TeX-active-tempdir)
-                                preview-temp-dirs)
-                        (progn
-                          (add-hook 'kill-emacs-hook
-                                    #'preview-cleanout-tempfiles t)
-                          (push (nth 1 TeX-active-tempdir)
-                                preview-temp-dirs))))))
+        (setq TeX-active-tempdir
+              (or (assoc (nth 1 filename) tempdirlist)
+                  (car (push (append (cdr filename) (list 0))
+                             tempdirlist))))
+        (setcar (cdr TeX-active-tempdir)
+                (car (or (member (nth 1 TeX-active-tempdir)
+                                 preview-temp-dirs)
+                         (progn
+                           (add-hook 'kill-emacs-hook
+                                     #'preview-cleanout-tempfiles t)
+                           (push (nth 1 TeX-active-tempdir)
+                                 preview-temp-dirs))))))
       (setcar (nthcdr 2 TeX-active-tempdir)
-             (1+ (nth 2 TeX-active-tempdir)))
+              (1+ (nth 2 TeX-active-tempdir)))
       (setcdr filename TeX-active-tempdir)
       (setq filename (list filename)))
     (let ((ov (make-overlay start end nil nil nil)))
       (when (fboundp 'TeX-overlay-prioritize)
-       (overlay-put ov 'priority (TeX-overlay-prioritize start end)))
+        (overlay-put ov 'priority (TeX-overlay-prioritize start end)))
       (overlay-put ov 'preview-map
-                  (preview-make-clickable
-                   nil nil nil
-                   `(lambda(event) (interactive "e")
-                      (preview-toggle ,ov 'toggle event))
-                   `(lambda(event) (interactive "e")
-                      (preview-context-menu ,ov event))))
+                   (preview-make-clickable
+                    nil nil nil
+                    `(lambda(event) (interactive "e")
+                       (preview-toggle ,ov 'toggle event))
+                    `(lambda(event) (interactive "e")
+                       (preview-context-menu ,ov event))))
       (when counters
-       (overlay-put
-        ov 'preview-counters
-        (cons
-           (mapcar #'cdr
-                   (if (string= (car counters) "")
-                       preview-parsed-counters
-                     (setq preview-parsed-counters
-                           (preview-parse-counters (car counters)))))
-           (mapcar #'cdr
-                   (if (string= (cdr counters) "")
-                       preview-parsed-counters
-                     (setq preview-parsed-counters
-                           (preview-parse-counters (cdr counters)))))))
-       (setq preview-buffer-has-counters t))
+        (overlay-put
+         ov 'preview-counters
+         (cons
+            (mapcar #'cdr
+                    (if (string= (car counters) "")
+                        preview-parsed-counters
+                      (setq preview-parsed-counters
+                            (preview-parse-counters (car counters)))))
+            (mapcar #'cdr
+                    (if (string= (cdr counters) "")
+                        preview-parsed-counters
+                      (setq preview-parsed-counters
+                            (preview-parse-counters (cdr counters)))))))
+        (setq preview-buffer-has-counters t))
       (overlay-put ov 'filenames filename)
       (overlay-put ov 'preview-image (cons (preview-import-image image)
-                                          image))
+                                           image))
       (overlay-put ov 'strings
-                  (list (preview-active-string ov)))
+                   (list (preview-active-string ov)))
       (overlay-put ov 'timestamp timestamp)
       (preview-toggle ov t)))
   tempdirlist)
@@ -2699,25 +2699,25 @@ If NOCOMPLEX is set, only basic tokens and no argument 
sequences
 will be skipped over backwards."
   (let ((oldpos (point)) oldpoint)
     (condition-case nil
-       (or (search-backward-regexp "\\(\\$\\$?\
+        (or (search-backward-regexp "\\(\\$\\$?\
 \\|\\\\[^a-zA-Z@]\
 \\|\\\\[a-zA-Z@]+\
 \\|\\\\begin[ \t]*{[^}]+}\
 \\)\\=" (line-beginning-position) t)
-           nocomplex
-           (if (eq ?\) (char-syntax (char-before)))
-               (while
-                   (progn
-                     (setq oldpoint (point))
-                     (backward-sexp)
-                     (and (not (eq oldpoint (point)))
-                          (eq ?\( (char-syntax (char-after))))))
-             (backward-char)))
+            nocomplex
+            (if (eq ?\) (char-syntax (char-before)))
+                (while
+                    (progn
+                      (setq oldpoint (point))
+                      (backward-sexp)
+                      (and (not (eq oldpoint (point)))
+                           (eq ?\( (char-syntax (char-after))))))
+              (backward-char)))
       (error (goto-char oldpos)))))
 
 (defcustom preview-required-option-list '("active" "tightpage" "auctex"
-                                         (preview-preserve-counters
-                                          "counters"))
+                                          (preview-preserve-counters
+                                           "counters"))
   "Specifies required options passed to the preview package.
 These are passed regardless of whether there is an explicit
 \\usepackage of that package present."
@@ -2730,8 +2730,8 @@ These are passed regardless of whether there is an 
explicit
   :type 'boolean)
 
 (defcustom preview-default-option-list '("displaymath" "floats"
-                                        "graphics" "textmath" "sections"
-                                        "footnotes")
+                                         "graphics" "textmath" "sections"
+                                         "footnotes")
   "Specifies default options to pass to preview package.
 These options are only used when the LaTeX document in question does
 not itself load the preview package, namely when you use preview
@@ -2739,33 +2739,33 @@ on a document not configured for preview.  \"auctex\", 
\"active\",
 \"dvips\" and \"delayed\" need not be specified here."
   :group 'preview-latex
   :type '(list (set :inline t :tag "Options known to work"
-                   :format "%t:\n%v%h" :doc
-                   "The above options are all the useful ones
+                    :format "%t:\n%v%h" :doc
+                    "The above options are all the useful ones
 at the time of the release of this package.
 You should not need \"Other options\" unless you
 upgraded to a fancier version of just the LaTeX style.
 Please also note that `psfixbb' fails to have an effect if
 `preview-fast-conversion' or `preview-prefer-TeX-bb'
 are selected."
-                   (const "displaymath")
-                   (const "floats")
-                   (const "graphics")
-                   (const "textmath")
-                   (const "sections")
-                   (const "footnotes")
-                   (const "showlabels")
-                   (const "psfixbb"))
-              (set :tag "Expert options" :inline t
-                   :format "%t:\n%v%h" :doc
-                   "Expert options should not be enabled permanently."
-                   (const "noconfig")
-                   (const "showbox")
-                   (const "tracingall"))
-              (repeat :inline t :tag "Other options" (string))))
+                    (const "displaymath")
+                    (const "floats")
+                    (const "graphics")
+                    (const "textmath")
+                    (const "sections")
+                    (const "footnotes")
+                    (const "showlabels")
+                    (const "psfixbb"))
+               (set :tag "Expert options" :inline t
+                    :format "%t:\n%v%h" :doc
+                    "Expert options should not be enabled permanently."
+                    (const "noconfig")
+                    (const "showbox")
+                    (const "tracingall"))
+               (repeat :inline t :tag "Other options" (string))))
 
 (defcustom preview-default-preamble
   '("\\RequirePackage[" ("," . preview-default-option-list)
-                                     "]{preview}[2004/11/05]")
+                                      "]{preview}[2004/11/05]")
   "Specifies default preamble code to add to a LaTeX document.
 If the document does not itself load the preview package, that is,
 when you use preview on a document not configured for preview, this
@@ -2795,7 +2795,7 @@ See description of `TeX-command-list' for details."
   (info "(preview-latex)"))
 
 (eval-after-load 'info '(add-to-list 'Info-file-list-for-emacs
-                                    '("preview" . "preview-latex")))
+                                     '("preview" . "preview-latex")))
 
 (defvar preview-map
   (let ((map (make-sparse-keymap)))
@@ -2827,38 +2827,38 @@ See description of `TeX-command-list' for details."
 This can be used to send inline images in mail and news when
 using MML mode."
   (when (catch 'badcolor
-         (let ((str (car (preview-format-mml ov))))
-           (if str
-               (if (eq last-command 'kill-region)
-                   (kill-append str nil)
-                 (kill-new str))
-             (error "No image file available")))
-         nil)
+          (let ((str (car (preview-format-mml ov))))
+            (if str
+                (if (eq last-command 'kill-region)
+                    (kill-append str nil)
+                  (kill-new str))
+              (error "No image file available")))
+          nil)
     (let (preview-transparent-border)
       (preview-regenerate ov))))
 
 (defun preview-copy-region-as-mml (start end)
   (interactive "r")
   (when (catch 'badcolor
-         (let (str lst dont-ask)
-           (dolist (ov (overlays-in start end))
-             (when (setq str (preview-format-mml ov dont-ask))
-               (setq dont-ask (cdr str))
-               (and
-                (>= (overlay-start ov) start)
-                (<= (overlay-end ov) end)
-                (push (list (- (overlay-start ov) start)
-                            (- (overlay-end ov) start)
-                            (car str)) lst))))
-           (setq str (buffer-substring start end))
-           (dolist (elt (nreverse (sort lst #'car-less-than-car)))
-             (setq str (concat (substring str 0 (nth 0 elt))
-                               (nth 2 elt)
-                               (substring str (nth 1 elt)))))
-           (if (eq last-command 'kill-region)
-               (kill-append str nil)
-             (kill-new str)))
-         nil)
+          (let (str lst dont-ask)
+            (dolist (ov (overlays-in start end))
+              (when (setq str (preview-format-mml ov dont-ask))
+                (setq dont-ask (cdr str))
+                (and
+                 (>= (overlay-start ov) start)
+                 (<= (overlay-end ov) end)
+                 (push (list (- (overlay-start ov) start)
+                             (- (overlay-end ov) start)
+                             (car str)) lst))))
+            (setq str (buffer-substring start end))
+            (dolist (elt (nreverse (sort lst #'car-less-than-car)))
+              (setq str (concat (substring str 0 (nth 0 elt))
+                                (nth 2 elt)
+                                (substring str (nth 1 elt)))))
+            (if (eq last-command 'kill-region)
+                (kill-append str nil)
+              (kill-new str)))
+          nil)
     (let (preview-transparent-border)
       (preview-region start end))))
 
@@ -2875,36 +2875,36 @@ result, DONT-ASK in the cdr."
   (and (memq (overlay-get ov 'preview-state) '(active inactive))
        (not (overlay-get ov 'queued))
        (let* ((text (with-current-buffer (overlay-buffer ov)
-                    (buffer-substring (overlay-start ov)
-                                      (overlay-end ov))))
-             (image (cdr (overlay-get ov 'preview-image)))
-             file type)
-        (cond ((consp image)
-               (and (not dont-ask)
-                    (nth 3 image)
-                    (if (y-or-n-p "Replace colored borders? ")
-                        (throw 'badcolor t)
-                      (setq dont-ask t)))
-               (setq file (car (car (last (overlay-get ov 'filenames))))
-                     type (mailcap-extension-to-mime
-                           (file-name-extension file)))
-               (cons
-                (format "<#part %s
+                     (buffer-substring (overlay-start ov)
+                                       (overlay-end ov))))
+              (image (cdr (overlay-get ov 'preview-image)))
+              file type)
+         (cond ((consp image)
+                (and (not dont-ask)
+                     (nth 3 image)
+                     (if (y-or-n-p "Replace colored borders? ")
+                         (throw 'badcolor t)
+                       (setq dont-ask t)))
+                (setq file (car (car (last (overlay-get ov 'filenames))))
+                      type (mailcap-extension-to-mime
+                            (file-name-extension file)))
+                (cons
+                 (format "<#part %s
 description=\"%s\"
 filename=%s>
 <#/part>"
-                        (if type
-                            (format "type=\"%s\" disposition=inline" type)
-                          "disposition=attachment")
-                        (if (string-match "[\n\"]" text)
-                            "preview-latex image"
-                          text)
-                        (if (string-match "[ \n<>]" file)
-                            (concat "\"" file "\"")
-                          file))
-                dont-ask))
-              ((stringp image)
-               (cons image dont-ask))))))
+                         (if type
+                             (format "type=\"%s\" disposition=inline" type)
+                           "disposition=attachment")
+                         (if (string-match "[\n\"]" text)
+                             "preview-latex image"
+                           text)
+                         (if (string-match "[ \n<>]" file)
+                             (concat "\"" file "\"")
+                           file))
+                 dont-ask))
+               ((stringp image)
+                (cons image dont-ask))))))
 
 (defun preview-active-contents (ov)
   "Check whether we have a valid image associated with OV."
@@ -2930,19 +2930,19 @@ filename=%s>
 This will be fine for prepending to a `TEXINPUTS' style
 environment variable, including an initial `.' at the front."
   (if (or (zerop (length preview-TeX-style-dir))
-         (member (substring preview-TeX-style-dir -1) '(";" ":")))
+          (member (substring preview-TeX-style-dir -1) '(";" ":")))
       preview-TeX-style-dir
     (let ((sep
-          (cond
-           ((stringp TeX-kpathsea-path-delimiter)
-            TeX-kpathsea-path-delimiter)
-           ((string-match
-             "\\`.[:]"
-             (if (file-name-absolute-p preview-TeX-style-dir)
-                 preview-TeX-style-dir
-               (expand-file-name preview-TeX-style-dir)))
-            ";")
-           (t ":"))))
+           (cond
+            ((stringp TeX-kpathsea-path-delimiter)
+             TeX-kpathsea-path-delimiter)
+            ((string-match
+              "\\`.[:]"
+              (if (file-name-absolute-p preview-TeX-style-dir)
+                  preview-TeX-style-dir
+                (expand-file-name preview-TeX-style-dir)))
+             ";")
+            (t ":"))))
       (concat "." sep preview-TeX-style-dir sep))))
 
 (defun preview-set-texinputs (&optional remove)
@@ -2950,26 +2950,26 @@ environment variable, including an initial `.' at the 
front."
 With prefix argument REMOVE, remove it again."
   (interactive "P")
   (let ((case-fold-search nil)
-       (preview-TeX-style-dir (preview-TeX-style-cooked))
-       pattern)
+        (preview-TeX-style-dir (preview-TeX-style-cooked))
+        pattern)
     (if remove
-       (progn
-         (setq pattern (concat "\\`\\(TEXINPUTS[^=]*\\)=\\(.*\\)"
-                               (regexp-quote preview-TeX-style-dir)))
-         (dolist (env (copy-sequence process-environment))
-           (if (string-match pattern env)
-               (setenv (match-string 1 env)
-                       (and (or (< (match-beginning 2) (match-end 2))
-                                (< (match-end 0) (length env)))
-                            (concat (match-string 2 env)
-                                    (substring env (match-end 0))))))))
+        (progn
+          (setq pattern (concat "\\`\\(TEXINPUTS[^=]*\\)=\\(.*\\)"
+                                (regexp-quote preview-TeX-style-dir)))
+          (dolist (env (copy-sequence process-environment))
+            (if (string-match pattern env)
+                (setenv (match-string 1 env)
+                        (and (or (< (match-beginning 2) (match-end 2))
+                                 (< (match-end 0) (length env)))
+                             (concat (match-string 2 env)
+                                     (substring env (match-end 0))))))))
       (setq pattern (regexp-quote preview-TeX-style-dir))
       (dolist (env (cons "TEXINPUTS=" (copy-sequence process-environment)))
-       (if (string-match "\\`\\(TEXINPUTS[^=]*\\)=" env)
-           (unless (string-match pattern env)
-             (setenv (match-string 1 env)
-                     (concat preview-TeX-style-dir
-                             (substring env (match-end 0))))))))))
+        (if (string-match "\\`\\(TEXINPUTS[^=]*\\)=" env)
+            (unless (string-match pattern env)
+              (setenv (match-string 1 env)
+                      (concat preview-TeX-style-dir
+                              (substring env (match-end 0))))))))))
 
 (defcustom preview-TeX-style-dir nil
   "This variable contains the location of uninstalled TeX styles.
@@ -2993,18 +2993,18 @@ Don't set this variable other than with customize so 
that its
 changes get properly reflected in the environment."
   :group 'preview-latex
   :set (lambda (var value)
-        (and (boundp var)
-             (symbol-value var)
-             (preview-set-texinputs t))
-        (set var value)
-        (and (symbol-value var)
-             (preview-set-texinputs)))
+         (and (boundp var)
+              (symbol-value var)
+              (preview-set-texinputs t))
+         (set var value)
+         (and (symbol-value var)
+              (preview-set-texinputs)))
   :type '(choice (const :tag "Installed" nil)
-                (string :tag "Style directory or TEXINPUTS path")))
+                 (string :tag "Style directory or TEXINPUTS path")))
 
 ;;;###autoload
 (defun preview-install-styles (dir &optional force-overwrite
-                                  force-save)
+                                   force-save)
   "Installs the TeX style files into a permanent location.
 This must be in the TeX search path.  If FORCE-OVERWRITE is greater
 than 1, files will get overwritten without query, if it is less
@@ -3019,25 +3019,25 @@ pp")
   (unless preview-TeX-style-dir
     (error "Styles are already installed"))
   (dolist (file (or
-                (condition-case nil
-                    (directory-files
-                     (progn
-                       (string-match
-                        "\\`\\(\\.[:;]\\)?\\(.*?\\)\\([:;]\\)?\\'"
-                        preview-TeX-style-dir)
-                       (match-string 2 preview-TeX-style-dir))
-                     t "\\.\\(sty\\|def\\|cfg\\)\\'")
-                  (error nil))
-                (error "Can't find files to install")))
+                 (condition-case nil
+                     (directory-files
+                      (progn
+                        (string-match
+                         "\\`\\(\\.[:;]\\)?\\(.*?\\)\\([:;]\\)?\\'"
+                         preview-TeX-style-dir)
+                        (match-string 2 preview-TeX-style-dir))
+                      t "\\.\\(sty\\|def\\|cfg\\)\\'")
+                   (error nil))
+                 (error "Can't find files to install")))
     (copy-file file dir (cond ((eq force-overwrite 1) 1)
-                             ((numberp force-overwrite)
-                              (> force-overwrite 1))
-                             (t force-overwrite))))
+                              ((numberp force-overwrite)
+                               (> force-overwrite 1))
+                              (t force-overwrite))))
   (if (cond ((eq force-save 1)
-            (y-or-n-p "Stop using non-installed styles permanently "))
-           ((numberp force-save)
-            (> force-save 1))
-           (t force-save))
+             (y-or-n-p "Stop using non-installed styles permanently "))
+            ((numberp force-save)
+             (> force-save 1))
+            (t force-save))
       (customize-save-variable 'preview-TeX-style-dir nil)
     (customize-set-variable 'preview-TeX-style-dir nil)))
 
@@ -3052,20 +3052,20 @@ pp")
   (when preview-tb-icon
     (define-key LaTeX-mode-map [tool-bar preview]
       `(menu-item "Preview at point" preview-at-point
-                 :image ,preview-tb-icon
-                 :help "Preview on/off at point")))
+                  :image ,preview-tb-icon
+                  :help "Preview on/off at point")))
   (when buffer-file-name
     (let* ((filename (expand-file-name buffer-file-name))
-          format-cons)
+           format-cons)
       (when (string-match (concat "\\." TeX-default-extension "\\'")
-                         filename)
-       (setq filename (substring filename 0 (match-beginning 0))))
+                          filename)
+        (setq filename (substring filename 0 (match-beginning 0))))
       (setq format-cons (assoc filename preview-dumped-alist))
       (when (consp (cdr format-cons))
-       (preview-unwatch-preamble format-cons)
-       (preview-watch-preamble (current-buffer)
-                               (cadr format-cons)
-                               format-cons)))))
+        (preview-unwatch-preamble format-cons)
+        (preview-watch-preamble (current-buffer)
+                                (cadr format-cons)
+                                format-cons)))))
 
 ;;;###autoload
 (defun LaTeX-preview-setup ()
@@ -3074,64 +3074,64 @@ This is called by `LaTeX-mode-hook' and changes AUCTeX 
variables
 to add the preview functionality."
   ;; This has to be done only once.
   (unless (and (boundp 'LaTeX-mode-hook)
-              (memq #'preview-mode-setup LaTeX-mode-hook))
+               (memq #'preview-mode-setup LaTeX-mode-hook))
     (remove-hook 'LaTeX-mode-hook #'LaTeX-preview-setup)
     (add-hook 'LaTeX-mode-hook #'preview-mode-setup)
     (define-key LaTeX-mode-map "\C-c\C-p" preview-map)
     (easy-menu-define preview-menu LaTeX-mode-map
       "This is the menu for preview-latex."
       '("Preview"
-       "Generate previews"
-       ["(or toggle) at point" preview-at-point]
-       ["for environment" preview-environment]
-       ["for section" preview-section]
-       ["for region" preview-region mark-active]
-       ["for buffer" preview-buffer]
-       ["for document" preview-document]
-       "---"
-       "Remove previews"
-       ["at point" preview-clearout-at-point]
-       ["from section" preview-clearout-section]
-       ["from region" preview-clearout mark-active]
-       ["from buffer" preview-clearout-buffer]
-       ["from document" preview-clearout-document]
-       "---"
-       "Turn preamble cache"
-       ["on" preview-cache-preamble]
-       ["off" preview-cache-preamble-off]
-       "---"
-       ("Customize"
-        ["Browse options"
-         (customize-group 'preview)]
-        ["Extend this menu"
-         (easy-menu-add-item
-          nil '("Preview")
-          (customize-menu-create 'preview))])
-       ["Read documentation" preview-goto-info-page]
-       ["Report Bug" preview-report-bug]))
+        "Generate previews"
+        ["(or toggle) at point" preview-at-point]
+        ["for environment" preview-environment]
+        ["for section" preview-section]
+        ["for region" preview-region mark-active]
+        ["for buffer" preview-buffer]
+        ["for document" preview-document]
+        "---"
+        "Remove previews"
+        ["at point" preview-clearout-at-point]
+        ["from section" preview-clearout-section]
+        ["from region" preview-clearout mark-active]
+        ["from buffer" preview-clearout-buffer]
+        ["from document" preview-clearout-document]
+        "---"
+        "Turn preamble cache"
+        ["on" preview-cache-preamble]
+        ["off" preview-cache-preamble-off]
+        "---"
+        ("Customize"
+         ["Browse options"
+          (customize-group 'preview)]
+         ["Extend this menu"
+          (easy-menu-add-item
+           nil '("Preview")
+           (customize-menu-create 'preview))])
+        ["Read documentation" preview-goto-info-page]
+        ["Report Bug" preview-report-bug]))
     (if (eq major-mode 'latex-mode)
-       (preview-mode-setup))
+        (preview-mode-setup))
     (if (boundp 'desktop-buffer-misc)
-       (preview-buffer-restore desktop-buffer-misc))))
+        (preview-buffer-restore desktop-buffer-misc))))
 
 (defun preview-clean-subdir (dir)
   "Cleans out a temporary DIR with preview image files."
   (condition-case err
       (progn
-       (mapc #'delete-file
-             (directory-files dir t "\\`pr" t))
-       (delete-directory dir))
+        (mapc #'delete-file
+              (directory-files dir t "\\`pr" t))
+        (delete-directory dir))
     (error (message "Deletion of `%s' failed: %s" dir
-                   (error-message-string err)))))
+                    (error-message-string err)))))
 
 (defun preview-clean-topdir (topdir)
   "Cleans out TOPDIR from temporary directories.
 This does not erase the directory itself since its permissions
 might be needed for colloborative work on common files."
   (mapc #'preview-clean-subdir
-       (condition-case nil
-           (directory-files topdir t "\\`tmp" t)
-         (file-error nil))))
+        (condition-case nil
+            (directory-files topdir t "\\`tmp" t)
+          (file-error nil))))
 
 (defun preview-create-subdirectory ()
   "Create a temporary subdir for the current TeX process.
@@ -3146,30 +3146,30 @@ in `preview-temp-dirs' in order not to be cleaned out
 later while in use."
   (let ((topdir (expand-file-name (TeX-active-master "prv"))))
     (if (file-directory-p topdir)
-       (unless (member topdir preview-temp-dirs)
-         ;;  Cleans out the top preview directory by
-         ;;  removing subdirs possibly left from a previous session.
-         (preview-clean-topdir topdir)
-         (push topdir preview-temp-dirs))
+        (unless (member topdir preview-temp-dirs)
+          ;;  Cleans out the top preview directory by
+          ;;  removing subdirs possibly left from a previous session.
+          (preview-clean-topdir topdir)
+          (push topdir preview-temp-dirs))
       (make-directory topdir)
       (add-to-list 'preview-temp-dirs topdir))
     (add-hook 'kill-emacs-hook #'preview-cleanout-tempfiles t)
     (setq TeX-active-tempdir
-         (list (make-temp-file (expand-file-name
-                                "tmp" (file-name-as-directory topdir)) t)
-               topdir
-               0))
+          (list (make-temp-file (expand-file-name
+                                 "tmp" (file-name-as-directory topdir)) t)
+                topdir
+                0))
     (shell-quote-argument
      (concat (file-name-as-directory (file-name-nondirectory topdir))
-            (file-name-nondirectory (nth 0 TeX-active-tempdir))))))
+             (file-name-nondirectory (nth 0 TeX-active-tempdir))))))
 
 (defun preview-parse-counters (string)
   "Extract counter information from STRING."
   (let ((list preview-parsed-counters) (pos 0))
     (while (eq pos (string-match " *\\({\\([^{}]+\\)}{[-0-9]+}\\)" string pos))
       (setcdr (or (assoc (match-string 2 string) list)
-                 (car (push (list (match-string 2 string)) list)))
-             (match-string 1 string))
+                  (car (push (list (match-string 2 string)) list)))
+              (match-string 1 string))
       (setq pos (match-end 1)))
     list))
 
@@ -3206,25 +3206,25 @@ will not get matched, usually."
     ;; converted to byte sequence, and decoded by the file coding
     ;; system.
     (setq string
-         (preview--decode-^^ab string buffer-file-coding-system))
+          (preview--decode-^^ab string buffer-file-coding-system))
 
     ;; Then, control characters are taken into account.
     (while (string-match "\\^\\{2,\\}\\([@-_?]\\)" string)
       (setq output
-           (concat output
-                   (regexp-quote (substring string
-                                            0
-                                            (- (match-beginning 1) 2)))
-                   (concat
-                    "\\(?:" (regexp-quote
-                             (substring string
-                                        (- (match-beginning 1) 2)
-                                        (match-end 0)))
-                    "\\|"
-                    (char-to-string
-                     (logxor (aref string (match-beginning 1)) 64))
-                    "\\)"))
-           string (substring string (match-end 0))))
+            (concat output
+                    (regexp-quote (substring string
+                                             0
+                                             (- (match-beginning 1) 2)))
+                    (concat
+                     "\\(?:" (regexp-quote
+                              (substring string
+                                         (- (match-beginning 1) 2)
+                                         (match-end 0)))
+                     "\\|"
+                     (char-to-string
+                      (logxor (aref string (match-beginning 1)) 64))
+                     "\\)"))
+            string (substring string (match-end 0))))
     (setq output (concat output (regexp-quote string)))
     output))
 
@@ -3248,14 +3248,14 @@ Return a new string."
     ;; naive expectation.
     (while (string-match "[^[:multibyte:]]+" string)
       (setq result
-           (concat result
-                   (substring string 0 (match-beginning 0))
-                   (let ((text
-                          (save-match-data
-                            (preview--convert-^^ab
-                             (match-string 0 string)))))
-                     (decode-coding-string text coding-system)))
-           string (substring string (match-end 0))))
+            (concat result
+                    (substring string 0 (match-beginning 0))
+                    (let ((text
+                           (save-match-data
+                             (preview--convert-^^ab
+                              (match-string 0 string)))))
+                      (decode-coding-string text coding-system)))
+            string (substring string (match-end 0))))
     (setq result (concat result string))
     result))
 
@@ -3267,14 +3267,14 @@ Return a new string."
   (let ((result ""))
     (while (string-match "\\^\\^[8-9a-f][0-9a-f]" string)
       (setq result
-           (concat result
-                   (substring string 0 (match-beginning 0))
-                   (let ((byte (string-to-number
-                                (substring string
-                                           (+ (match-beginning 0) 2)
-                                           (match-end 0)) 16)))
-                     (byte-to-string byte)))
-           string (substring string (match-end 0))))
+            (concat result
+                    (substring string 0 (match-beginning 0))
+                    (let ((byte (string-to-number
+                                 (substring string
+                                            (+ (match-beginning 0) 2)
+                                            (match-end 0)) 16)))
+                      (byte-to-string byte)))
+            string (substring string (match-end 0))))
     (setq result (concat result string))
     result))
 
@@ -3287,27 +3287,27 @@ to return in its CAR the PROCESS parameter for the CLOSE
 call, and in its CDR the final stuff for the placement hook."
   (with-temp-message "locating previews..."
     (let (TeX-error-file TeX-error-offset snippet box counters
-         file line
-         (lsnippet 0) lstart (lfile "") lline lbuffer lpoint
-         lcounters
-         string after-string
-         offset
-         parsestate (case-fold-search nil)
-         (run-buffer (current-buffer))
-         (run-directory default-directory)
-         tempdir
-         close-data
-         open-data
-         fast-hook
-         slow-hook)
+          file line
+          (lsnippet 0) lstart (lfile "") lline lbuffer lpoint
+          lcounters
+          string after-string
+          offset
+          parsestate (case-fold-search nil)
+          (run-buffer (current-buffer))
+          (run-directory default-directory)
+          tempdir
+          close-data
+          open-data
+          fast-hook
+          slow-hook)
       ;; clear parsing variables
       (dolist (var preview-parse-variables)
-       (set (nth 1 var) nil))
+        (set (nth 1 var) nil))
       (goto-char (point-min))
       (unwind-protect
-         (progn
-           (while
-               (re-search-forward "\
+          (progn
+            (while
+                (re-search-forward "\
 ^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|\
 \(\\(/*\
 \\(?:\\.+[^()\r\n{} /]*\\|[^()\r\n{} ./]+\
@@ -3352,34 +3352,34 @@ name(\\([^)]+\\))\\)\\|\
 ;;;   This would have caught overfull box messages that consist of
 ;;;   several lines of context all with 79 characters in length except
 ;;;   of the last one.  prauctex.def kills all such messages.
-             (setq file (match-string-no-properties 2))
-             (cond
-              ((match-beginning 1)
-               (if (looking-at "\
+              (setq file (match-string-no-properties 2))
+              (cond
+               ((match-beginning 1)
+                (if (looking-at "\
 \\(?:Preview\\|Package Preview Error\\): Snippet \\([---0-9]+\\) 
\\(started\\|ended\\(\
 \\.? *(\\([---0-9]+\\)\\+\\([---0-9]+\\)x\\([---0-9]+\\))\\)?\\)\\.")
-                   (progn
-                     (when file
-                       (unless TeX-error-file
-                         (push nil TeX-error-file)
-                         (push nil TeX-error-offset))
-                       (unless (car TeX-error-offset)
-                         (rplaca TeX-error-file file)))
-                     (setq snippet (string-to-number (match-string 1))
-                           box (unless
-                                   (string= (match-string 2) "started")
-                                 (if (match-string 4)
-                                     (mapcar #'(lambda (x)
-                                                 (* (preview-get-magnification)
-                                                    (string-to-number x)))
-                                             (list
-                                              (match-string 4)
-                                              (match-string 5)
-                                              (match-string 6)))
-                                   t))
-                           counters (mapcar #'cdr preview-parsed-counters)
-
-                           ;; And the line number to position the cursor.
+                    (progn
+                      (when file
+                        (unless TeX-error-file
+                          (push nil TeX-error-file)
+                          (push nil TeX-error-offset))
+                        (unless (car TeX-error-offset)
+                          (rplaca TeX-error-file file)))
+                      (setq snippet (string-to-number (match-string 1))
+                            box (unless
+                                    (string= (match-string 2) "started")
+                                  (if (match-string 4)
+                                      (mapcar #'(lambda (x)
+                                                  (* 
(preview-get-magnification)
+                                                     (string-to-number x)))
+                                              (list
+                                               (match-string 4)
+                                               (match-string 5)
+                                               (match-string 6)))
+                                    t))
+                            counters (mapcar #'cdr preview-parsed-counters)
+
+                            ;; And the line number to position the cursor.
                             line (progn
                                    (setq lpoint (point))
                                    (end-of-line)
@@ -3391,217 +3391,217 @@ name(\\([^)]+\\))\\)\\|\
 \[0-9a-f]?\\)\\)?\\([^\n\r]*?\\)\r?
 \\([^\n\r]*?\\)\\(\\(?:\\^+[89a-f]?\\)?\\.\\.\\.\\)?\r?$" nil t)
                                         (string-to-number (match-string 1))))
-                           ;; And a string of the context to search for.
-                           string (and line (match-string 3))
-                           after-string (and line (buffer-substring
-                                                   (+ (match-beginning 4)
-                                                      (- (match-end 3)
-                                                         (match-beginning 0)))
-                                                   (match-end 4)))
-
-                           ;; We may use these in another buffer.
-                           offset (or (car TeX-error-offset) 0)
-                           file (car TeX-error-file))
-                     (when (and (stringp file)
-                                (or (string= file "<none>")
-                                    (TeX-match-extension file)))
-                       ;; if we are the first time round, check for fast hooks:
-                       (when (null parsestate)
-                         (setq open-data
-                               (save-excursion (funcall open-closure))
-                               tempdir TeX-active-tempdir)
-                         (dolist
-                             (lst (if (listp TeX-translate-location-hook)
-                                      TeX-translate-location-hook
-                                    (list TeX-translate-location-hook)))
-                           (let ((fast
-                                  (and (symbolp lst)
-                                       (get lst 'TeX-translate-via-list))))
-                             (if fast
-                                 (setq fast-hook
-                                       (nconc fast-hook (list fast)))
-                               (setq slow-hook
-                                     (nconc slow-hook (list lst)))))))
-                       (condition-case err
-                           (save-excursion (mapc #'funcall slow-hook))
-                         (error (preview-log-error err "Translation hook")))
-                       (push (vector file (+ line offset)
-                                     string after-string
-                                     snippet box counters)
+                            ;; And a string of the context to search for.
+                            string (and line (match-string 3))
+                            after-string (and line (buffer-substring
+                                                    (+ (match-beginning 4)
+                                                       (- (match-end 3)
+                                                          (match-beginning 0)))
+                                                    (match-end 4)))
+
+                            ;; We may use these in another buffer.
+                            offset (or (car TeX-error-offset) 0)
+                            file (car TeX-error-file))
+                      (when (and (stringp file)
+                                 (or (string= file "<none>")
+                                     (TeX-match-extension file)))
+                        ;; if we are the first time round, check for fast 
hooks:
+                        (when (null parsestate)
+                          (setq open-data
+                                (save-excursion (funcall open-closure))
+                                tempdir TeX-active-tempdir)
+                          (dolist
+                              (lst (if (listp TeX-translate-location-hook)
+                                       TeX-translate-location-hook
+                                     (list TeX-translate-location-hook)))
+                            (let ((fast
+                                   (and (symbolp lst)
+                                        (get lst 'TeX-translate-via-list))))
+                              (if fast
+                                  (setq fast-hook
+                                        (nconc fast-hook (list fast)))
+                                (setq slow-hook
+                                      (nconc slow-hook (list lst)))))))
+                        (condition-case err
+                            (save-excursion (mapc #'funcall slow-hook))
+                          (error (preview-log-error err "Translation hook")))
+                        (push (vector file (+ line offset)
+                                      string after-string
+                                      snippet box counters)
                               parsestate)))
-                 ;; else normal error message
-                 (forward-line)
-                 (re-search-forward "^l\\.[0-9]" nil t)
-                 (forward-line 2)))
-              ((match-beginning 3)
-               ;; New file -- Push on stack
-               (push (match-string-no-properties 3) TeX-error-file)
-               (push nil TeX-error-offset)
-               (goto-char (match-end 3)))
-              ((match-beginning 4)
-               ;; End of file -- Pop from stack
-               (when (> (length TeX-error-file) 1)
-                 (pop TeX-error-file)
-                 (pop TeX-error-offset))
-               (goto-char (1+ (match-beginning 0))))
-              ((match-beginning 5)
-               ;; Hook to change line numbers
-               (setq TeX-error-offset
-                     (list (string-to-number (match-string 5)))))
-              ((match-beginning 6)
-               ;; Hook to change file name
-               (setq TeX-error-file (list (match-string-no-properties 6))))
-              ((match-beginning 7)
-               (let ((var
-                      (assoc (match-string-no-properties 7)
-                             preview-parse-variables))
-                     (offset (- (match-beginning 0) (match-beginning 8)))
-                     (str (match-string-no-properties 8)))
-                 ;; paste together continuation lines:
-                 (while (= (- (length str) offset) 79)
-                   (search-forward-regexp "^\\([^\n\r]*\\)\r?$")
-                   (setq offset (- (length str))
-                         str (concat str (match-string-no-properties 1))))
-                 (when (and var
-                            (string-match (nth 2 var) str))
-                   (set (nth 1 var)
-                        (funcall (nth 4 var)
-                                 (match-string-no-properties
-                                  (nth 3 var)
-                                  str))))))))
-           (when (null parsestate)
-             (error "LaTeX found no preview images")))
-       (unwind-protect
-           (save-excursion
-             (setq parsestate (nreverse parsestate))
-             (condition-case err
-                 (dolist (fun fast-hook)
-                   (setq parsestate
-                         (save-excursion (funcall fun parsestate))))
-               (error (preview-log-error err "Fast translation hook")))
-             (setq snippet 0)
-             (dolist (state parsestate)
-               (setq lsnippet snippet
-                     file (aref state 0)
-                     line (aref state 1)
-                     string (aref state 2)
-                     after-string (aref state 3)
-                     snippet (aref state 4)
-                     box (aref state 5)
-                     counters (aref state 6))
-               (unless (string= lfile file)
-                 (set-buffer (if (string= file "<none>")
-                                 (with-current-buffer run-buffer
-                                   TeX-command-buffer)
-                               (find-file-noselect
-                                (expand-file-name file run-directory))))
-                 (setq lfile file))
-               (save-excursion
-                 (save-restriction
-                   (widen)
-                   ;; a fast hook might have positioned us already:
-                   (if (number-or-marker-p string)
-                       (progn
-                         (goto-char string)
-                         (setq lpoint
-                               (if (number-or-marker-p after-string)
-                                   after-string
-                                 (line-beginning-position))))
-                     (if (and (eq (current-buffer) lbuffer)
-                              (<= lline line))
-                         ;; while Emacs does the perfectly correct
-                         ;; thing even when when the line differences
-                         ;; get zero or negative, I don't trust this
-                         ;; to be universally the case across other
-                         ;; implementations.  Besides, if the line
-                         ;; number gets smaller again, we are probably
-                         ;; rereading the file, and restarting from
-                         ;; the beginning will probably be faster.
-                         (progn
-                           (goto-char lpoint)
-                           (if (/= lline line)
-                               (if (eq selective-display t)
-                                   (re-search-forward "[\n\C-m]" nil
-                                                      'end
-                                                      (- line lline))
-                                 (forward-line (- line lline)))))
+                  ;; else normal error message
+                  (forward-line)
+                  (re-search-forward "^l\\.[0-9]" nil t)
+                  (forward-line 2)))
+               ((match-beginning 3)
+                ;; New file -- Push on stack
+                (push (match-string-no-properties 3) TeX-error-file)
+                (push nil TeX-error-offset)
+                (goto-char (match-end 3)))
+               ((match-beginning 4)
+                ;; End of file -- Pop from stack
+                (when (> (length TeX-error-file) 1)
+                  (pop TeX-error-file)
+                  (pop TeX-error-offset))
+                (goto-char (1+ (match-beginning 0))))
+               ((match-beginning 5)
+                ;; Hook to change line numbers
+                (setq TeX-error-offset
+                      (list (string-to-number (match-string 5)))))
+               ((match-beginning 6)
+                ;; Hook to change file name
+                (setq TeX-error-file (list (match-string-no-properties 6))))
+               ((match-beginning 7)
+                (let ((var
+                       (assoc (match-string-no-properties 7)
+                              preview-parse-variables))
+                      (offset (- (match-beginning 0) (match-beginning 8)))
+                      (str (match-string-no-properties 8)))
+                  ;; paste together continuation lines:
+                  (while (= (- (length str) offset) 79)
+                    (search-forward-regexp "^\\([^\n\r]*\\)\r?$")
+                    (setq offset (- (length str))
+                          str (concat str (match-string-no-properties 1))))
+                  (when (and var
+                             (string-match (nth 2 var) str))
+                    (set (nth 1 var)
+                         (funcall (nth 4 var)
+                                  (match-string-no-properties
+                                   (nth 3 var)
+                                   str))))))))
+            (when (null parsestate)
+              (error "LaTeX found no preview images")))
+        (unwind-protect
+            (save-excursion
+              (setq parsestate (nreverse parsestate))
+              (condition-case err
+                  (dolist (fun fast-hook)
+                    (setq parsestate
+                          (save-excursion (funcall fun parsestate))))
+                (error (preview-log-error err "Fast translation hook")))
+              (setq snippet 0)
+              (dolist (state parsestate)
+                (setq lsnippet snippet
+                      file (aref state 0)
+                      line (aref state 1)
+                      string (aref state 2)
+                      after-string (aref state 3)
+                      snippet (aref state 4)
+                      box (aref state 5)
+                      counters (aref state 6))
+                (unless (string= lfile file)
+                  (set-buffer (if (string= file "<none>")
+                                  (with-current-buffer run-buffer
+                                    TeX-command-buffer)
+                                (find-file-noselect
+                                 (expand-file-name file run-directory))))
+                  (setq lfile file))
+                (save-excursion
+                  (save-restriction
+                    (widen)
+                    ;; a fast hook might have positioned us already:
+                    (if (number-or-marker-p string)
+                        (progn
+                          (goto-char string)
+                          (setq lpoint
+                                (if (number-or-marker-p after-string)
+                                    after-string
+                                  (line-beginning-position))))
+                      (if (and (eq (current-buffer) lbuffer)
+                               (<= lline line))
+                          ;; while Emacs does the perfectly correct
+                          ;; thing even when when the line differences
+                          ;; get zero or negative, I don't trust this
+                          ;; to be universally the case across other
+                          ;; implementations.  Besides, if the line
+                          ;; number gets smaller again, we are probably
+                          ;; rereading the file, and restarting from
+                          ;; the beginning will probably be faster.
+                          (progn
+                            (goto-char lpoint)
+                            (if (/= lline line)
+                                (if (eq selective-display t)
+                                    (re-search-forward "[\n\C-m]" nil
+                                                       'end
+                                                       (- line lline))
+                                  (forward-line (- line lline)))))
                         (goto-char (point-min))
                         (forward-line (1- line)))
-                     (setq lpoint (point))
-                     (cond
-                      ((search-forward (concat string after-string)
-                                       (line-end-position) t)
-                       (backward-char (length after-string)))
-                      ;;ok, transform ^^ sequences
-                      ((search-forward-regexp
-                        (concat "\\("
-                                (setq string
-                                      (preview-error-quote
-                                       string))
-                                "\\)"
-                                (setq after-string
-                                      (preview-error-quote
-                                       after-string)))
-                        (line-end-position) t)
-                       (goto-char (match-end 1)))
-                      ((search-forward-regexp
-                        (concat "\\("
-                                (if (string-match
-                                     "^[^\0-\177]\\{1,6\\}" string)
-                                    (setq string
-                                          (substring string (match-end 0)))
-                                  string)
-                                "\\)"
-                                (if (string-match
-                                     "[^\0-\177]\\{1,6\\}$" after-string)
-                                    (setq after-string
-                                          (substring after-string
-                                                     0 (match-beginning 0)))))
-                        (line-end-position) t)
-                       (goto-char (match-end 1)))
-                      (t (search-forward-regexp
-                          string
-                          (line-end-position) t))))
-                   (setq lline line
-                         lbuffer (current-buffer))
-                   (if box
-                       (progn
-                         (if (and lstart (= snippet lsnippet))
-                             (setq close-data
-                                   (nconc
-                                    (preview-place-preview
-                                     snippet
-                                     (save-excursion
-                                       (preview-back-command
-                                        (= (prog1 (point)
-                                             (goto-char lstart))
-                                           lstart))
-                                       (point))
-                                     (point)
-                                     (preview-TeX-bb box)
-                                     (cons lcounters counters)
-                                     tempdir
-                                     (cdr open-data))
-                                    close-data))
-                           (with-current-buffer run-buffer
-                             (preview-log-error
-                              (list 'error
-                                    (format
-                                     "End of Preview snippet %d unexpected"
-                                     snippet)) "Parser")))
-                         (setq lstart nil))
-                     ;; else-part of if box
-                     (setq lstart (point) lcounters counters)
-                     ;; >= because snippets in between might have
-                     ;; been ignored because of TeX-default-extension
-                     (unless (>= snippet (1+ lsnippet))
-                       (with-current-buffer run-buffer
-                         (preview-log-error
-                          (list 'error
-                                (format
-                                 "Preview snippet %d out of sequence"
-                                 snippet)) "Parser"))))))))
-         (preview-call-hook 'close (car open-data) close-data))))))
+                      (setq lpoint (point))
+                      (cond
+                       ((search-forward (concat string after-string)
+                                        (line-end-position) t)
+                        (backward-char (length after-string)))
+                       ;;ok, transform ^^ sequences
+                       ((search-forward-regexp
+                         (concat "\\("
+                                 (setq string
+                                       (preview-error-quote
+                                        string))
+                                 "\\)"
+                                 (setq after-string
+                                       (preview-error-quote
+                                        after-string)))
+                         (line-end-position) t)
+                        (goto-char (match-end 1)))
+                       ((search-forward-regexp
+                         (concat "\\("
+                                 (if (string-match
+                                      "^[^\0-\177]\\{1,6\\}" string)
+                                     (setq string
+                                           (substring string (match-end 0)))
+                                   string)
+                                 "\\)"
+                                 (if (string-match
+                                      "[^\0-\177]\\{1,6\\}$" after-string)
+                                     (setq after-string
+                                           (substring after-string
+                                                      0 (match-beginning 0)))))
+                         (line-end-position) t)
+                        (goto-char (match-end 1)))
+                       (t (search-forward-regexp
+                           string
+                           (line-end-position) t))))
+                    (setq lline line
+                          lbuffer (current-buffer))
+                    (if box
+                        (progn
+                          (if (and lstart (= snippet lsnippet))
+                              (setq close-data
+                                    (nconc
+                                     (preview-place-preview
+                                      snippet
+                                      (save-excursion
+                                        (preview-back-command
+                                         (= (prog1 (point)
+                                              (goto-char lstart))
+                                            lstart))
+                                        (point))
+                                      (point)
+                                      (preview-TeX-bb box)
+                                      (cons lcounters counters)
+                                      tempdir
+                                      (cdr open-data))
+                                     close-data))
+                            (with-current-buffer run-buffer
+                              (preview-log-error
+                               (list 'error
+                                     (format
+                                      "End of Preview snippet %d unexpected"
+                                      snippet)) "Parser")))
+                          (setq lstart nil))
+                      ;; else-part of if box
+                      (setq lstart (point) lcounters counters)
+                      ;; >= because snippets in between might have
+                      ;; been ignored because of TeX-default-extension
+                      (unless (>= snippet (1+ lsnippet))
+                        (with-current-buffer run-buffer
+                          (preview-log-error
+                           (list 'error
+                                 (format
+                                  "Preview snippet %d out of sequence"
+                                  snippet)) "Parser"))))))))
+          (preview-call-hook 'close (car open-data) close-data))))))
 
 (defun preview-get-geometry ()
   "Transfer display geometry parameters from current display.
@@ -3609,34 +3609,34 @@ Returns list of scale, resolution and colors.  
Calculation
 is done in current buffer."
   (condition-case err
       (let* ((geometry
-             (list (preview-hook-enquiry preview-scale-function)
-                   (cons (/ (* 25.4 (display-pixel-width))
-                            (display-mm-width))
-                         (/ (* 25.4 (display-pixel-height))
-                            (display-mm-height)))
-                   (preview-get-colors)))
-            (preview-min-spec
-             (* (cdr (nth 1 geometry))
-                (/
-                 (preview-inherited-face-attribute
-                  'preview-reference-face :height 'default)
-                 720.0))))
-       (setq preview-icon (preview-make-image 'preview-icon-specs)
-             preview-error-icon (preview-make-image
-                                 'preview-error-icon-specs)
-             preview-nonready-icon (preview-make-image
-                                    'preview-nonready-icon-specs))
-       geometry)
+              (list (preview-hook-enquiry preview-scale-function)
+                    (cons (/ (* 25.4 (display-pixel-width))
+                             (display-mm-width))
+                          (/ (* 25.4 (display-pixel-height))
+                             (display-mm-height)))
+                    (preview-get-colors)))
+             (preview-min-spec
+              (* (cdr (nth 1 geometry))
+                 (/
+                  (preview-inherited-face-attribute
+                   'preview-reference-face :height 'default)
+                  720.0))))
+        (setq preview-icon (preview-make-image 'preview-icon-specs)
+              preview-error-icon (preview-make-image
+                                  'preview-error-icon-specs)
+              preview-nonready-icon (preview-make-image
+                                     'preview-nonready-icon-specs))
+        geometry)
     (error (error "Display geometry unavailable: %s"
-                 (error-message-string err)))))
+                  (error-message-string err)))))
 
 (defun preview-set-geometry (geometry)
   "Set geometry variables from GEOMETRY.
 Buffer-local `preview-scale', `preview-resolution',
 and `preview-colors' are set as given."
   (setq preview-scale (nth 0 geometry)
-       preview-resolution (nth 1 geometry)
-       preview-colors (nth 2 geometry)))
+        preview-resolution (nth 1 geometry)
+        preview-colors (nth 2 geometry)))
 
 (defun preview-get-colors ()
   "Return colors from the current display.
@@ -3646,142 +3646,142 @@ Pure borderless black-on-white will return triple NIL.
 The fourth value is the transparent border thickness."
   (let
       ((bg (color-values (preview-inherited-face-attribute
-                         'preview-reference-face :background 'default)))
+                          'preview-reference-face :background 'default)))
        (fg (color-values (preview-inherited-face-attribute
-                         'preview-reference-face :foreground 'default)))
+                          'preview-reference-face :foreground 'default)))
        (mask (preview-get-heuristic-mask)))
     (if (equal '(65535 65535 65535) bg)
-       (setq bg nil))
+        (setq bg nil))
     (if (equal '(0 0 0) fg)
-       (setq fg nil))
+        (setq fg nil))
     (unless (and (numberp preview-transparent-border)
-                (consp mask) (integerp (car mask)))
+                 (consp mask) (integerp (car mask)))
       (setq mask nil))
     (vector bg fg mask preview-transparent-border)))
 
 (defun preview-start-dvipng ()
   "Start a DviPNG process.."
   (let* ((file preview-gs-file)
-        tempdir
-        (res (/ (* (car preview-resolution)
-                   (preview-hook-enquiry preview-scale))
-                (preview-get-magnification)))
-        (resolution  (format " -D%d " res))
-        (colors (preview-dvipng-color-string preview-colors res))
-        (command (with-current-buffer TeX-command-buffer
-                   (prog1
-                       (concat (TeX-command-expand preview-dvipng-command)
-                               " " colors resolution)
-                     (setq tempdir TeX-active-tempdir))))
-        (name "Preview-DviPNG"))
+         tempdir
+         (res (/ (* (car preview-resolution)
+                    (preview-hook-enquiry preview-scale))
+                 (preview-get-magnification)))
+         (resolution  (format " -D%d " res))
+         (colors (preview-dvipng-color-string preview-colors res))
+         (command (with-current-buffer TeX-command-buffer
+                    (prog1
+                        (concat (TeX-command-expand preview-dvipng-command)
+                                " " colors resolution)
+                      (setq tempdir TeX-active-tempdir))))
+         (name "Preview-DviPNG"))
     (setq TeX-active-tempdir tempdir)
     (goto-char (point-max))
     (insert-before-markers "Running `" name "' with ``" command "''\n")
     (setq mode-name name)
     (setq TeX-sentinel-function
-         (lambda (_process name) (message "%s: done." name)))
+          (lambda (_process name) (message "%s: done." name)))
     (if TeX-process-asynchronous
-       (let ((process (start-process name (current-buffer) TeX-shell
-                                     TeX-shell-command-option
-                                     command)))
-         (if TeX-after-start-process-function
-             (funcall TeX-after-start-process-function process))
-         (TeX-command-mode-line process)
-         (set-process-filter process 'TeX-command-filter)
-         (set-process-sentinel process 'TeX-command-sentinel)
-         (set-marker (process-mark process) (point-max))
-         (push process compilation-in-progress)
-         (sit-for 0)
-         process)
+        (let ((process (start-process name (current-buffer) TeX-shell
+                                      TeX-shell-command-option
+                                      command)))
+          (if TeX-after-start-process-function
+              (funcall TeX-after-start-process-function process))
+          (TeX-command-mode-line process)
+          (set-process-filter process 'TeX-command-filter)
+          (set-process-sentinel process 'TeX-command-sentinel)
+          (set-marker (process-mark process) (point-max))
+          (push process compilation-in-progress)
+          (sit-for 0)
+          process)
       (setq mode-line-process ": run")
       (force-mode-line-update)
       (call-process TeX-shell nil (current-buffer) nil
-                   TeX-shell-command-option
-                   command))))
+                    TeX-shell-command-option
+                    command))))
 
 (defun preview-start-dvips (&optional fast)
   "Start a DviPS process.
 If FAST is set, do a fast conversion."
   (let* ((file preview-gs-file)
-        tempdir
-        (command (with-current-buffer TeX-command-buffer
-                   (prog1
-                       (TeX-command-expand (if fast
-                                               preview-fast-dvips-command
-                                             preview-dvips-command))
-                     (setq tempdir TeX-active-tempdir))))
-        (name "Preview-DviPS"))
+         tempdir
+         (command (with-current-buffer TeX-command-buffer
+                    (prog1
+                        (TeX-command-expand (if fast
+                                                preview-fast-dvips-command
+                                              preview-dvips-command))
+                      (setq tempdir TeX-active-tempdir))))
+         (name "Preview-DviPS"))
     (setq TeX-active-tempdir tempdir)
     (setq preview-ps-file (and fast
-                              (preview-make-filename
-                               (preview-make-filename
-                                "preview.ps" tempdir)
+                               (preview-make-filename
+                                (preview-make-filename
+                                 "preview.ps" tempdir)
                                 tempdir)))
     (goto-char (point-max))
     (insert-before-markers "Running `" name "' with ``" command "''\n")
     (setq mode-name name)
     (setq TeX-sentinel-function
-         (lambda (_process name) (message "%s: done." name)))
+          (lambda (_process name) (message "%s: done." name)))
     (if TeX-process-asynchronous
-       (let ((process (start-process name (current-buffer) TeX-shell
-                                     TeX-shell-command-option
-                                     command)))
-         (if TeX-after-start-process-function
-             (funcall TeX-after-start-process-function process))
-         (TeX-command-mode-line process)
-         (set-process-filter process 'TeX-command-filter)
-         (set-process-sentinel process 'TeX-command-sentinel)
-         (set-marker (process-mark process) (point-max))
-         (push process compilation-in-progress)
-         (sit-for 0)
-         process)
+        (let ((process (start-process name (current-buffer) TeX-shell
+                                      TeX-shell-command-option
+                                      command)))
+          (if TeX-after-start-process-function
+              (funcall TeX-after-start-process-function process))
+          (TeX-command-mode-line process)
+          (set-process-filter process 'TeX-command-filter)
+          (set-process-sentinel process 'TeX-command-sentinel)
+          (set-marker (process-mark process) (point-max))
+          (push process compilation-in-progress)
+          (sit-for 0)
+          process)
       (setq mode-line-process ": run")
       (force-mode-line-update)
       (call-process TeX-shell nil (current-buffer) nil
-                   TeX-shell-command-option
-                   command))))
+                    TeX-shell-command-option
+                    command))))
 
 (defun preview-start-pdf2dsc ()
   "Start a PDF2DSC process."
   (let* ((file preview-gs-file)
-        tempdir
-        pdfsource
-        (command (with-current-buffer TeX-command-buffer
-                   (prog1
-                       (TeX-command-expand preview-pdf2dsc-command)
-                     (setq tempdir TeX-active-tempdir
-                           pdfsource (funcall (car file) "pdf" t)))))
-        (name "Preview-PDF2DSC"))
+         tempdir
+         pdfsource
+         (command (with-current-buffer TeX-command-buffer
+                    (prog1
+                        (TeX-command-expand preview-pdf2dsc-command)
+                      (setq tempdir TeX-active-tempdir
+                            pdfsource (funcall (car file) "pdf" t)))))
+         (name "Preview-PDF2DSC"))
     (setq TeX-active-tempdir tempdir)
     (setq preview-ps-file (preview-attach-filename
-                          pdfsource
-                          (preview-make-filename
-                           (preview-make-filename
-                            "preview.dsc" tempdir)
+                           pdfsource
+                           (preview-make-filename
+                            (preview-make-filename
+                             "preview.dsc" tempdir)
                             tempdir)))
     (goto-char (point-max))
     (insert-before-markers "Running `" name "' with ``" command "''\n")
     (setq mode-name name)
     (setq TeX-sentinel-function
-         (lambda (_process name) (message "%s: done." name)))
+          (lambda (_process name) (message "%s: done." name)))
     (if TeX-process-asynchronous
-       (let ((process (start-process name (current-buffer) TeX-shell
-                                     TeX-shell-command-option
-                                     command)))
-         (if TeX-after-start-process-function
-             (funcall TeX-after-start-process-function process))
-         (TeX-command-mode-line process)
-         (set-process-filter process 'TeX-command-filter)
-         (set-process-sentinel process 'TeX-command-sentinel)
-         (set-marker (process-mark process) (point-max))
-         (push process compilation-in-progress)
-         (sit-for 0)
-         process)
+        (let ((process (start-process name (current-buffer) TeX-shell
+                                      TeX-shell-command-option
+                                      command)))
+          (if TeX-after-start-process-function
+              (funcall TeX-after-start-process-function process))
+          (TeX-command-mode-line process)
+          (set-process-filter process 'TeX-command-filter)
+          (set-process-sentinel process 'TeX-command-sentinel)
+          (set-marker (process-mark process) (point-max))
+          (push process compilation-in-progress)
+          (sit-for 0)
+          process)
       (setq mode-line-process ": run")
       (force-mode-line-update)
       (call-process TeX-shell nil (current-buffer) nil
-                   TeX-shell-command-option
-                   command))))
+                    TeX-shell-command-option
+                    command))))
 
 (defun preview-TeX-inline-sentinel (process _name)
   "Sentinel function for preview.
@@ -3790,18 +3790,18 @@ for definition of PROCESS and NAME."
   (if process (TeX-format-mode-line process))
   (let ((status (process-status process)))
     (if (memq status '(signal exit))
-       (delete-process process))
+        (delete-process process))
     (when (eq status 'exit)
       (save-excursion
-       (goto-char (point-max))
-       (forward-line -1)
-       (if (search-forward "abnormally with code 1" nil t)
-           (replace-match "as expected with code 1" t t)
-         (if (search-forward "finished" nil t)
-             (insert " with nothing to show"))))
+        (goto-char (point-max))
+        (forward-line -1)
+        (if (search-forward "abnormally with code 1" nil t)
+            (replace-match "as expected with code 1" t t)
+          (if (search-forward "finished" nil t)
+              (insert " with nothing to show"))))
       (condition-case err
-         (preview-call-hook 'open)
-       (error (preview-log-error err "LaTeX" process)))
+          (preview-call-hook 'open)
+        (error (preview-log-error err "LaTeX" process)))
       (preview-reraise-error process))))
 
 (defcustom preview-format-extensions '(".fmt" ".efmt")
@@ -3816,19 +3816,19 @@ FORMAT-CONS is intended to be an element of 
`preview-dumped-alist'.
 Tries through `preview-format-extensions'."
   (dolist (ext preview-format-extensions)
     (condition-case nil
-       (delete-file (preview-dump-file-name (concat (car format-cons) ext)))
+        (delete-file (preview-dump-file-name (concat (car format-cons) ext)))
       (file-error nil))))
 
 (defun preview-dump-file-name (file)
   "Make a file name suitable for dumping from FILE."
   (if file
       (concat (file-name-directory file)
-             "prv_"
-             (progn
-               (setq file (file-name-nondirectory file))
-               (while (string-match " " file)
-                 (setq file (replace-match "_" t t file)))
-               file))
+              "prv_"
+              (progn
+                (setq file (file-name-nondirectory file))
+                (while (string-match " " file)
+                  (setq file (replace-match "_" t t file)))
+                file))
     "prv_texput"))
 
 (defun preview-do-replacements (string replacements)
@@ -3841,15 +3841,15 @@ and strings get evaluated as replacement strings."
     (while replacements
       (setq rep (pop replacements))
       (cond ((symbolp rep)
-            (setq string (preview-do-replacements
-                          string (symbol-value rep))))
-           ((string-match (car rep) string)
-            (setq string
-                  (mapconcat (lambda(x)
-                               (if (symbolp x)
-                                   (symbol-value x)
-                                 (replace-match x t nil string)))
-                             (cdr rep) ""))))))
+             (setq string (preview-do-replacements
+                           string (symbol-value rep))))
+            ((string-match (car rep) string)
+             (setq string
+                   (mapconcat (lambda(x)
+                                (if (symbolp x)
+                                    (symbol-value x)
+                                  (replace-match x t nil string)))
+                              (cdr rep) ""))))))
   string)
 
 (defconst preview-LaTeX-disable-pdfoutput
@@ -3866,12 +3866,12 @@ of any command starting with `pdf'.")
 This is passed through `preview-do-replacements'."
   :group 'preview-latex
   :type '(repeat
-         (choice
-          (symbol :tag "Named replacement" :value 
preview-LaTeX-disable-pdfoutput)
-          (cons (string :tag "Matched string")
-                (repeat :tag "Concatenated elements for replacement"
-                        (choice (symbol :tag "Variable with literal string")
-                                (string :tag "non-literal regexp 
replacement")))))))
+          (choice
+           (symbol :tag "Named replacement" :value 
preview-LaTeX-disable-pdfoutput)
+           (cons (string :tag "Matched string")
+                 (repeat :tag "Concatenated elements for replacement"
+                         (choice (symbol :tag "Variable with literal string")
+                                 (string :tag "non-literal regexp 
replacement")))))))
 
 (defvar preview-format-name)
 
@@ -3885,8 +3885,8 @@ This is passed through `preview-do-replacements'."
   "Generate a dump command from the usual preview command."
   :group 'preview-latex
   :type '(repeat
-         (choice (symbol :tag "Named replacement")
-                 (cons string (repeat (choice symbol string))))))
+          (choice (symbol :tag "Named replacement")
+                  (cons string (repeat (choice symbol string))))))
 
 (defcustom preview-undump-replacements
   ;; If -kanji option exists, pick it up as the second match.
@@ -3895,15 +3895,15 @@ This is passed through `preview-do-replacements'."
 \\(?: +\\(?:\\(--?kanji[= ][^ ]+\\)\\|-\\(?:[^ 
\\\"]\\|\\\\.\\|\"[^\"]*\"\\)*\\)\\)*.*\
  \"\\\\input\" \"\\\\detokenize{\" \\(.*\\) \"}\"\\'"
      . ("\\1 \\2 -interaction=nonstopmode -file-line-error "
-       preview-format-name " \"/AUCTEXINPUT{\" \\3 \"}\"")))
+        preview-format-name " \"/AUCTEXINPUT{\" \\3 \"}\"")))
   ;; See the ini file code below in `preview-cache-preamble' for the
   ;; weird /AUCTEXINPUT construct.  In short, it is crafted so that
   ;; dumped format file can read file of non-ascii name.
   "Use a dumped format for reading preamble."
   :group 'preview-latex
   :type '(repeat
-         (choice (symbol :tag "Named replacement")
-                 (cons string (repeat (choice symbol string))))))
+          (choice (symbol :tag "Named replacement")
+                  (cons string (repeat (choice symbol string))))))
 
 
 (defun preview-cache-preamble (&optional format-cons)
@@ -3917,26 +3917,26 @@ format available.
 If FORMAT-CONS is non-nil, a previous format may get reused."
   (interactive)
   (let* ((dump-file
-         (expand-file-name (preview-dump-file-name (TeX-master-file "ini"))))
-        (master (TeX-master-file))
-        (format-name (expand-file-name master))
-        (preview-format-name (shell-quote-argument
-                              (preview-dump-file-name (file-name-nondirectory
-                                                       master))))
-        (master-file (expand-file-name (TeX-master-file t)))
-        (command (preview-do-replacements
-                  (TeX-command-expand
-                   (preview-string-expand preview-LaTeX-command))
-                  preview-dump-replacements))
-        (preview-auto-cache-preamble nil))
+          (expand-file-name (preview-dump-file-name (TeX-master-file "ini"))))
+         (master (TeX-master-file))
+         (format-name (expand-file-name master))
+         (preview-format-name (shell-quote-argument
+                               (preview-dump-file-name (file-name-nondirectory
+                                                        master))))
+         (master-file (expand-file-name (TeX-master-file t)))
+         (command (preview-do-replacements
+                   (TeX-command-expand
+                    (preview-string-expand preview-LaTeX-command))
+                   preview-dump-replacements))
+         (preview-auto-cache-preamble nil))
     (unless (and (consp (cdr format-cons))
-                (string= command (cadr format-cons)))
+                 (string= command (cadr format-cons)))
       (unless format-cons
-       (setq format-cons (assoc format-name preview-dumped-alist)))
+        (setq format-cons (assoc format-name preview-dumped-alist)))
       (if format-cons
-         (preview-cache-preamble-off format-cons)
-       (setq format-cons (list format-name))
-       (push format-cons preview-dumped-alist))
+          (preview-cache-preamble-off format-cons)
+        (setq format-cons (list format-name))
+        (push format-cons preview-dumped-alist))
       ;; mylatex.ltx expects a file name to follow.  Bad. `.tex'
       ;; in the tools bundle is an empty file.
       (write-region "\\let\\PREVIEWdump\\dump\\def\\dump{%
@@ -3949,21 +3949,21 @@ If FORMAT-CONS is non-nil, a previous format may get 
reused."
       (TeX-save-document master)
       (setq TeX-current-process-region-p nil)
       (prog1 (preview-generate-preview master command)
-       (add-hook 'kill-emacs-hook #'preview-cleanout-tempfiles t)
-       (setq TeX-sentinel-function
-             `(lambda (process string)
-                (condition-case err
-                    (progn
-                      (if (and (eq (process-status process) 'exit)
-                               (zerop (process-exit-status process)))
-                          (preview-watch-preamble
-                           ',master-file
-                           ',command
-                           ',format-cons)
-                        (preview-format-kill ',format-cons))
-                      (delete-file ',dump-file))
-                  (error (preview-log-error err "Dumping" process)))
-                (preview-reraise-error process)))))))
+        (add-hook 'kill-emacs-hook #'preview-cleanout-tempfiles t)
+        (setq TeX-sentinel-function
+              `(lambda (process string)
+                 (condition-case err
+                     (progn
+                       (if (and (eq (process-status process) 'exit)
+                                (zerop (process-exit-status process)))
+                           (preview-watch-preamble
+                            ',master-file
+                            ',command
+                            ',format-cons)
+                         (preview-format-kill ',format-cons))
+                       (delete-file ',dump-file))
+                   (error (preview-log-error err "Dumping" process)))
+                 (preview-reraise-error process)))))))
 
 (defun preview-cache-preamble-off (&optional old-format)
   "Clear the pregenerated format file.
@@ -3973,9 +3973,9 @@ stored in `preview-dumped-alist'."
   (interactive)
   (unless old-format
     (setq old-format
-         (let ((master-file (expand-file-name (TeX-master-file))))
-           (or (assoc master-file preview-dumped-alist)
-               (car (push (list master-file) preview-dumped-alist))))))
+          (let ((master-file (expand-file-name (TeX-master-file))))
+            (or (assoc master-file preview-dumped-alist)
+                (car (push (list master-file) preview-dumped-alist))))))
   (preview-unwatch-preamble old-format)
   (preview-format-kill old-format)
   (setcdr old-format nil))
@@ -3984,24 +3984,24 @@ stored in `preview-dumped-alist'."
   "Run preview on region between BEGIN and END."
   (interactive "r")
   (TeX-region-create (TeX-region-file TeX-default-extension)
-                    (buffer-substring begin end)
-                    (if buffer-file-name
-                        (file-name-nondirectory buffer-file-name)
-                      "<none>")
-                    (save-restriction
-                      (widen)
-                      (let ((inhibit-point-motion-hooks t)
-                            (inhibit-field-text-motion t))
-                        (+ (count-lines (point-min) begin)
-                           (save-excursion
-                             (goto-char begin)
-                             (if (bolp) 0 -1))))))
+                     (buffer-substring begin end)
+                     (if buffer-file-name
+                         (file-name-nondirectory buffer-file-name)
+                       "<none>")
+                     (save-restriction
+                       (widen)
+                       (let ((inhibit-point-motion-hooks t)
+                             (inhibit-field-text-motion t))
+                         (+ (count-lines (point-min) begin)
+                            (save-excursion
+                              (goto-char begin)
+                              (if (bolp) 0 -1))))))
   (setq TeX-current-process-region-p t)
   (preview-generate-preview (TeX-region-file)
-                           (preview-do-replacements
-                            (TeX-command-expand
-                             (preview-string-expand preview-LaTeX-command))
-                            preview-LaTeX-command-replacements)))
+                            (preview-do-replacements
+                             (TeX-command-expand
+                              (preview-string-expand preview-LaTeX-command))
+                             preview-LaTeX-command-replacements)))
 
 (defun preview-buffer ()
   "Run preview on current buffer."
@@ -4022,14 +4022,14 @@ stored in `preview-dumped-alist'."
   "Skip preamble for the sake of predumped formats."
   (when (string-match TeX-header-end (ad-get-arg 1))
     (ad-set-arg 1
-               (prog1 (substring (ad-get-arg 1) (match-end 0))
-                 (ad-set-arg 3
-                             (with-temp-buffer
-                               (insert (substring (ad-get-arg 1)
-                                                  0 (match-end 0)))
-                               (+ (ad-get-arg 3)
-                                  (count-lines (point-min) (point-max))
-                                  (if (bolp) 0 -1))))))))
+                (prog1 (substring (ad-get-arg 1) (match-end 0))
+                  (ad-set-arg 3
+                              (with-temp-buffer
+                                (insert (substring (ad-get-arg 1)
+                                                   0 (match-end 0)))
+                                (+ (ad-get-arg 3)
+                                   (count-lines (point-min) (point-max))
+                                   (if (bolp) 0 -1))))))))
 
 (defun preview-document ()
   "Run preview on master document."
@@ -4053,15 +4053,15 @@ environments is selected."
   (save-excursion
     (let (currenv)
       (dotimes (i (1- count))
-       (setq currenv (LaTeX-current-environment))
-       (if (string= currenv "document")
-           (error "No enclosing outer environment found"))
-       (LaTeX-find-matching-begin))
+        (setq currenv (LaTeX-current-environment))
+        (if (string= currenv "document")
+            (error "No enclosing outer environment found"))
+        (LaTeX-find-matching-begin))
       (while (member (setq currenv (LaTeX-current-environment))
-                    preview-inner-environments)
-       (LaTeX-find-matching-begin))
+                     preview-inner-environments)
+        (LaTeX-find-matching-begin))
       (if (string= currenv "document")
-         (error "No enclosing outer environment found"))
+          (error "No enclosing outer environment found"))
       (preview-region
        (save-excursion (LaTeX-find-matching-begin) (point))
        (save-excursion (LaTeX-find-matching-end) (point))))))
@@ -4080,45 +4080,45 @@ to use.
 
 It returns the started process."
   (let* ((geometry (preview-get-geometry))
-        (commandbuff (current-buffer))
-        (pr-file (cons
-                  'TeX-active-master
-                  (file-name-nondirectory file)))
-        (master (TeX-master-file))
-        (master-file (expand-file-name master))
-        (dumped-cons (assoc master-file
-                            preview-dumped-alist))
-        process)
+         (commandbuff (current-buffer))
+         (pr-file (cons
+                   'TeX-active-master
+                   (file-name-nondirectory file)))
+         (master (TeX-master-file))
+         (master-file (expand-file-name master))
+         (dumped-cons (assoc master-file
+                             preview-dumped-alist))
+         process)
     (unless dumped-cons
       (push (setq dumped-cons (cons master-file
-                                   (if (eq preview-auto-cache-preamble 'ask)
-                                       (y-or-n-p "Cache preamble? ")
-                                     preview-auto-cache-preamble)))
-           preview-dumped-alist))
+                                    (if (eq preview-auto-cache-preamble 'ask)
+                                        (y-or-n-p "Cache preamble? ")
+                                      preview-auto-cache-preamble)))
+            preview-dumped-alist))
     (when (cdr dumped-cons)
       (let* (TeX-current-process-region-p)
-       (setq process (preview-cache-preamble dumped-cons))
-       (if process
-           (setq TeX-sentinel-function
-                 `(lambda (process string)
-                    (funcall ,TeX-sentinel-function process string)
-                    (TeX-inline-preview-internal
-                     ,command ,file
-                     ',pr-file ,commandbuff
-                     ',dumped-cons
-                     ',master
-                     ',geometry
-                     (buffer-string)))))))
+        (setq process (preview-cache-preamble dumped-cons))
+        (if process
+            (setq TeX-sentinel-function
+                  `(lambda (process string)
+                     (funcall ,TeX-sentinel-function process string)
+                     (TeX-inline-preview-internal
+                      ,command ,file
+                      ',pr-file ,commandbuff
+                      ',dumped-cons
+                      ',master
+                      ',geometry
+                      (buffer-string)))))))
     (or process
-       (TeX-inline-preview-internal command file
-                                    pr-file commandbuff
-                                    dumped-cons master
-                                    geometry))))
+        (TeX-inline-preview-internal command file
+                                     pr-file commandbuff
+                                     dumped-cons master
+                                     geometry))))
 
 (defun TeX-inline-preview-internal (command file pr-file
-                                   commandbuff dumped-cons master
-                                   geometry
-                                   &optional str)
+                                    commandbuff dumped-cons master
+                                    geometry
+                                    &optional str)
   "Internal stuff for previewing.
 COMMAND and FILE should be explained in `TeX-command-list'.
 PR-FILE is the target file name in the form for `preview-gs-file'.
@@ -4127,42 +4127,42 @@ internal parameters, STR may be a log to insert into 
the current log."
   (set-buffer commandbuff)
   (let*
       ((preview-format-name (shell-quote-argument
-                            (concat "&"
-                                    (preview-dump-file-name
-                                     (file-name-nondirectory master)))))
+                             (concat "&"
+                                     (preview-dump-file-name
+                                      (file-name-nondirectory master)))))
        (process-environment (copy-sequence process-environment))
        (process
-       (progn
-         ;; Fix Bug#20773, Bug#27088.
-         ;; Make LaTeX not to insert newline in lines necessary to
-         ;; identify Bounding Boxes.
-         (setenv "max_print_line" "1000")
-         (TeX-run-command
-          "Preview-LaTeX"
-          (if (consp (cdr dumped-cons))
-              (preview-do-replacements
-               command
-               preview-undump-replacements)
-            command) file))))
+        (progn
+          ;; Fix Bug#20773, Bug#27088.
+          ;; Make LaTeX not to insert newline in lines necessary to
+          ;; identify Bounding Boxes.
+          (setenv "max_print_line" "1000")
+          (TeX-run-command
+           "Preview-LaTeX"
+           (if (consp (cdr dumped-cons))
+               (preview-do-replacements
+                command
+                preview-undump-replacements)
+             command) file))))
     (condition-case err
-       (progn
-         (when str
-           (save-excursion
-             (goto-char (point-min))
-             (insert str)
-             (when (= (process-mark process) (point-min))
-               (set-marker (process-mark process) (point)))))
-         (preview-set-geometry geometry)
-         (setq preview-gs-file pr-file)
-         (setq TeX-sentinel-function 'preview-TeX-inline-sentinel)
-         (TeX-parse-reset)
-         (setq TeX-parse-function 'TeX-parse-TeX)
-         (if TeX-process-asynchronous
-             process
-           (TeX-synchronous-sentinel "Preview-LaTeX" file process)))
+        (progn
+          (when str
+            (save-excursion
+              (goto-char (point-min))
+              (insert str)
+              (when (= (process-mark process) (point-min))
+                (set-marker (process-mark process) (point)))))
+          (preview-set-geometry geometry)
+          (setq preview-gs-file pr-file)
+          (setq TeX-sentinel-function 'preview-TeX-inline-sentinel)
+          (TeX-parse-reset)
+          (setq TeX-parse-function 'TeX-parse-TeX)
+          (if TeX-process-asynchronous
+              process
+            (TeX-synchronous-sentinel "Preview-LaTeX" file process)))
       (error (preview-log-error err "Preview" process)
-            (delete-process process)
-            (preview-reraise-error process)))))
+             (delete-process process)
+             (preview-reraise-error process)))))
 
 (defconst preview-version AUCTeX-version
   "Preview version.
@@ -4174,62 +4174,62 @@ If not a regular release, the date of the last change.")
 (defun preview-dump-state (buffer)
   (condition-case nil
       (progn
-       (unless (local-variable-p 'TeX-command-buffer (current-buffer))
-         (setq buffer (with-current-buffer buffer (TeX-active-buffer))))
-       (when (bufferp buffer)
-         (insert "\nRun buffer contents:\n\n")
-         (if (< (buffer-size buffer) 5000)
-             (insert-buffer-substring buffer)
-           (insert-buffer-substring buffer 1 2500)
-           (insert "...\n\n[...]\n\n\t...")
-           (insert-buffer-substring buffer
-                                    (- (buffer-size buffer) 2500)
-                                    (buffer-size buffer)))
-         (insert "\n")))
+        (unless (local-variable-p 'TeX-command-buffer (current-buffer))
+          (setq buffer (with-current-buffer buffer (TeX-active-buffer))))
+        (when (bufferp buffer)
+          (insert "\nRun buffer contents:\n\n")
+          (if (< (buffer-size buffer) 5000)
+              (insert-buffer-substring buffer)
+            (insert-buffer-substring buffer 1 2500)
+            (insert "...\n\n[...]\n\n\t...")
+            (insert-buffer-substring buffer
+                                     (- (buffer-size buffer) 2500)
+                                     (buffer-size buffer)))
+          (insert "\n")))
     (error nil)))
 
 ;;;###autoload
 (defun preview-report-bug () "Report a bug in the preview-latex package."
-  (interactive)
-  (let ((reporter-prompt-for-summary-p "Bug report subject: "))
-    (reporter-submit-bug-report
-     "bug-auctex@gnu.org"
-     preview-version
-     '(AUCTeX-version
-       LaTeX-command-style
-       image-types
-       preview-image-type
-       preview-image-creators
-       preview-dvipng-image-type
-       preview-dvipng-command
-       preview-pdf2dsc-command
-       preview-gs-command
-       preview-gs-options
-       preview-gs-image-type-alist
-       preview-fast-conversion
-       preview-prefer-TeX-bb
-       preview-dvips-command
-       preview-fast-dvips-command
-       preview-scale-function
-       preview-LaTeX-command
-       preview-required-option-list
-       preview-preserve-counters
-       preview-default-option-list
-       preview-default-preamble
-       preview-LaTeX-command-replacements
-       preview-dump-replacements
-       preview-undump-replacements
-       preview-auto-cache-preamble
-       preview-TeX-style-dir)
-     `(lambda () (preview-dump-state ,(current-buffer)))
-     (lambda ()
-       (insert (format "\nOutput from running `%s -h':\n"
-                      preview-gs-command))
-       (call-process preview-gs-command nil t nil "-h")
-       (insert "\n"))
-     "Remember to cover the basics.  Including a minimal LaTeX example
+       (interactive)
+       (let ((reporter-prompt-for-summary-p "Bug report subject: "))
+         (reporter-submit-bug-report
+          "bug-auctex@gnu.org"
+          preview-version
+          '(AUCTeX-version
+            LaTeX-command-style
+            image-types
+            preview-image-type
+            preview-image-creators
+            preview-dvipng-image-type
+            preview-dvipng-command
+            preview-pdf2dsc-command
+            preview-gs-command
+            preview-gs-options
+            preview-gs-image-type-alist
+            preview-fast-conversion
+            preview-prefer-TeX-bb
+            preview-dvips-command
+            preview-fast-dvips-command
+            preview-scale-function
+            preview-LaTeX-command
+            preview-required-option-list
+            preview-preserve-counters
+            preview-default-option-list
+            preview-default-preamble
+            preview-LaTeX-command-replacements
+            preview-dump-replacements
+            preview-undump-replacements
+            preview-auto-cache-preamble
+            preview-TeX-style-dir)
+          `(lambda () (preview-dump-state ,(current-buffer)))
+          (lambda ()
+            (insert (format "\nOutput from running `%s -h':\n"
+                            preview-gs-command))
+            (call-process preview-gs-command nil t nil "-h")
+            (insert "\n"))
+          "Remember to cover the basics.  Including a minimal LaTeX example
 file exhibiting the problem might help."
-     )))
+          )))
 
 (provide 'preview)
 ;;; preview.el ends here
diff --git a/style/Alegreya.el b/style/Alegreya.el
index 61034b3..84adaa5 100644
--- a/style/Alegreya.el
+++ b/style/Alegreya.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "Alegreya"
@@ -48,7 +48,7 @@
 
    ;; Load `fontaxes' or `fontspec' dep. on `type1' option:
    (if (or (LaTeX-provided-package-options-member "Alegreya" "type1")
-          (LaTeX-provided-package-options-member "Alegreya" "type1=true"))
+           (LaTeX-provided-package-options-member "Alegreya" "type1=true"))
        (TeX-run-style-hooks "fontaxes")
      (TeX-run-style-hooks "fontspec"))
 
@@ -69,19 +69,19 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textsu"    "{")
-                               ("textin"    "{"))
-                             'type-command)
+                                ("textin"    "{"))
+                              'type-command)
      (font-latex-add-keywords '(("Alegreya"      "")
-                               ("AlegreyaBlack" "")
-                               ("AlegreyaLF"    "")
-                               ("AlegreyaOsF"   "")
-                               ("AlegreyaTLF"   "")
-                               ("AlegreyaTOsF"  "")
-                               ("sufigures"     "")
-                               ("infigures"     ""))
-                             'type-declaration)))
+                                ("AlegreyaBlack" "")
+                                ("AlegreyaLF"    "")
+                                ("AlegreyaOsF"   "")
+                                ("AlegreyaTLF"   "")
+                                ("AlegreyaTOsF"  "")
+                                ("sufigures"     "")
+                                ("infigures"     ""))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-Alegreya-package-options-list
diff --git a/style/AlegreyaSans.el b/style/AlegreyaSans.el
index 653442e..3b31527 100644
--- a/style/AlegreyaSans.el
+++ b/style/AlegreyaSans.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "AlegreyaSans"
@@ -48,7 +48,7 @@
 
    ;; Load `fontaxes' or `fontspec' dep. on `type1' option:
    (if (or (LaTeX-provided-package-options-member "AlegreyaSans" "type1")
-          (LaTeX-provided-package-options-member "AlegreyaSans" "type1=true"))
+           (LaTeX-provided-package-options-member "AlegreyaSans" "type1=true"))
        (TeX-run-style-hooks "fontaxes")
      (TeX-run-style-hooks "fontspec"))
 
@@ -73,22 +73,22 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textsu"    "{")
-                               ("textin"    "{"))
-                             'type-command)
+                                ("textin"    "{"))
+                              'type-command)
      (font-latex-add-keywords '(("AlegreyaSans"           "")
-                               ("AlegreyaSansLF"         "")
-                               ("AlegreyaSansOsF"        "")
-                               ("AlegreyaSansTLF"        "")
-                               ("AlegreyaSansTOsF"       "")
-                               ("AlegreyaSansLight"      "")
-                               ("AlegreyaSansMedium"     "")
-                               ("AlegreyaSansExtraBold"  "")
-                               ("AlegreyaSansBlack"      "")
-                               ("sufigures"              "")
-                               ("infigures"              ""))
-                             'type-declaration)))
+                                ("AlegreyaSansLF"         "")
+                                ("AlegreyaSansOsF"        "")
+                                ("AlegreyaSansTLF"        "")
+                                ("AlegreyaSansTOsF"       "")
+                                ("AlegreyaSansLight"      "")
+                                ("AlegreyaSansMedium"     "")
+                                ("AlegreyaSansExtraBold"  "")
+                                ("AlegreyaSansBlack"      "")
+                                ("sufigures"              "")
+                                ("infigures"              ""))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-AlegreyaSans-package-options-list
diff --git a/style/CJK.el b/style/CJK.el
index c676c7c..446e431 100644
--- a/style/CJK.el
+++ b/style/CJK.el
@@ -52,7 +52,7 @@ The function can be used for CJK and CJK* environments."
     (let ((font-enc (TeX-read-string "(Optional) Font encoding: ")))
       (unless (zerop (length font-enc)) (format "[%s]" font-enc)))
     (format "{%s}" (completing-read "Encoding: "
-                                   (mapcar 'list LaTeX-CJK-enc-list)))
+                                    (mapcar 'list LaTeX-CJK-enc-list)))
     (format "{%s}" (TeX-read-string "Font family: ")))))
 
 (TeX-add-style-hook
diff --git a/style/FiraMono.el b/style/FiraMono.el
index 1cdb871..a612291 100644
--- a/style/FiraMono.el
+++ b/style/FiraMono.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "FiraMono"
@@ -59,20 +59,20 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("sufigures"        "")
-                               ("firamonooldstyle" "")
-                               ("firamonolining"   "")
-                               ("firamonomedium"   ""))
-                             'type-declaration)))
+                                ("firamonooldstyle" "")
+                                ("firamonolining"   "")
+                                ("firamonomedium"   ""))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-FiraMono-package-options '("scaled" "scale"
-                                        "type1"
-                                        "lining" "lf"
-                                        "oldstyle" "osf"
-                                        "nomap"
-                                        "medium" "mb")
+                                         "type1"
+                                         "lining" "lf"
+                                         "oldstyle" "osf"
+                                         "nomap"
+                                         "medium" "mb")
   "Package options for the FiraMono package.")
 
 ;;; FiraMono.el ends here
diff --git a/style/FiraSans.el b/style/FiraSans.el
index ff5ce51..10ac530 100644
--- a/style/FiraSans.el
+++ b/style/FiraSans.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "FiraSans"
@@ -69,22 +69,22 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("sufigures"        "")
-                               ("firaoldstyle"     "")
-                               ("firalining"       "")
-                               ("firatabular"      "")
-                               ("firaproportional" "")
-                               ("firathin"         "")
-                               ("firalight"        "")
-                               ("firaextralight"   "")
-                               ("firaultralight"   "")
-                               ("firamedium"       "")
-                               ("firabook"         "")
-                               ("firasemibold"     "")
-                               ("firaextrabold"    "")
-                               ("firaheavy"        ""))
-                             'type-declaration)))
+                                ("firaoldstyle"     "")
+                                ("firalining"       "")
+                                ("firatabular"      "")
+                                ("firaproportional" "")
+                                ("firathin"         "")
+                                ("firalight"        "")
+                                ("firaextralight"   "")
+                                ("firaultralight"   "")
+                                ("firamedium"       "")
+                                ("firabook"         "")
+                                ("firasemibold"     "")
+                                ("firaextrabold"    "")
+                                ("firaheavy"        ""))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-FiraSans-package-options
diff --git a/style/MinionPro.el b/style/MinionPro.el
index 7dc5546..ff76329 100644
--- a/style/MinionPro.el
+++ b/style/MinionPro.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "MinionPro"
@@ -53,10 +53,10 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("smallfrac" "{{")
-                               ("slantfrac" "{{"))
-                             'textual)))
+                                ("slantfrac" "{{"))
+                              'textual)))
  TeX-dialect)
 
 (defvar LaTeX-MinionPro-package-options
diff --git a/style/MyriadPro.el b/style/MyriadPro.el
index ff76fe0..0f3de7d 100644
--- a/style/MyriadPro.el
+++ b/style/MyriadPro.el
@@ -38,8 +38,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "MyriadPro"
@@ -56,24 +56,24 @@
 
    ;; More control over spacing in `\slantfrac':
    (LaTeX-add-lengths "MdSlantfracSpacingBeforeSlash"
-                     "MdSlantfracSpacingAfterSlash")
+                      "MdSlantfracSpacingAfterSlash")
 
    ;; `\mathversion' is available with sansmath option
    (when (LaTeX-provided-package-options-member "MyriadPro" "sansmath")
      (TeX-add-symbols
       '("mathversion"
-       (TeX-arg-eval completing-read "Math version: "
-                     '(("sans")        ("sansbold")
-                       ("sanstabular") ("sansboldtabular"))))))
+        (TeX-arg-eval completing-read "Math version: "
+                      '(("sans")        ("sansbold")
+                        ("sanstabular") ("sansboldtabular"))))))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("smallfrac"   "{{")
-                               ("slantfrac"   "{{"))
-                             'textual)
+                                ("slantfrac"   "{{"))
+                              'textual)
      (font-latex-add-keywords '(("mathversion" "{"))
-                             'variable)))
+                              'variable)))
  TeX-dialect)
 
 (defvar LaTeX-MyriadPro-package-options
diff --git a/style/XCharter.el b/style/XCharter.el
index 9c1bd39..6f35b36 100644
--- a/style/XCharter.el
+++ b/style/XCharter.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "XCharter"
@@ -72,18 +72,18 @@
    (when (and (featurep 'font-latex)
               (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textsu"    "{")
-                               ("textin"    "{")
+                                ("textin"    "{")
                                 ("textlf"    "{")
                                 ("textosf"   "{")
                                 ("textosfI"  "{")
-                               ("textnumerator"   "{")
-                               ("textnu"          "{")
-                               ("textdenominator" "{")
-                               ("textde"          "{")
-                               ("textfrac"        "{{"))
+                                ("textnumerator"   "{")
+                                ("textnu"          "{")
+                                ("textdenominator" "{")
+                                ("textde"          "{")
+                                ("textfrac"        "{{"))
                               'type-command)
      (font-latex-add-keywords '(("sustyle"   "")
-                               ("instyle"   "")
+                                ("instyle"   "")
                                 ("lfstyle"   "")
                                 ("osfstyle"  ""))
                               'type-declaration)))
diff --git a/style/acro.el b/style/acro.el
index a39221a..6d80642 100644
--- a/style/acro.el
+++ b/style/acro.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-acro-package-options-list
   '(;; General Options
@@ -63,7 +63,7 @@
     ("list-long-format")
     ("extra-format")
     ("first-style" ("default" "plain" "empty" "square" "short" "reversed"
-                   "plain-reversed" "footnote" "sidenote"))
+                    "plain-reversed" "footnote" "sidenote"))
     ("extra-style" ("default" "plain" "comma" "paren" "bracket"))
     ("plural-ending")
     ;; Options Regarding the List
@@ -75,9 +75,9 @@
     ("next-pages")
     ("list-type" ("table" "itemize" "description"))
     ("list-style" ("list" "tabular" "longtable" "extra-tabular" 
"extra-longtable"
-                  "extra-tabular-rev" "extra-longtable-rev"))
+                   "extra-tabular-rev" "extra-longtable-rev"))
     ("list-header" ("chapter" "chapter*" "section" "section*" "subsection"
-                   "subsection*" "addchap" "addsec"))
+                    "subsection*" "addchap" "addsec"))
     ("list-name")
     ("list-table-width")
     ("list-caps" ("true" "false")))
@@ -102,10 +102,10 @@
 `LaTeX-acro-list' and to `TeX-auto-symbol' if option `macros' is
 set to `true'."
   (mapc (lambda (acronym)
-         (add-to-list 'LaTeX-acro-acronym-list (list acronym)))
-       LaTeX-auto-acro-acronym)
+          (add-to-list 'LaTeX-acro-acronym-list (list acronym)))
+        LaTeX-auto-acro-acronym)
   (when (or (LaTeX-provided-package-options-member "acro" "macros")
-           (LaTeX-provided-package-options-member "acro" "macros=true"))
+            (LaTeX-provided-package-options-member "acro" "macros=true"))
     (add-to-list 'TeX-auto-symbol LaTeX-auto-acro-acronym)))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-acro-prepare t)
@@ -122,10 +122,10 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string.  If DEFINITION is non-nil, add the chosen acronym to the
 list of defined acronyms."
   (let ((acronym (completing-read (TeX-argument-prompt optional prompt 
"Acronym")
-                                 (LaTeX-acro-acronym-list) nil nil nil
-                                 'LaTeX-acro-acronym-history)))
+                                  (LaTeX-acro-acronym-list) nil nil nil
+                                  'LaTeX-acro-acronym-history)))
     (if (and definition (not (string-equal "" acronym)))
-       (LaTeX-add-acro-acronyms acronym))
+        (LaTeX-add-acro-acronyms acronym))
     (TeX-argument-insert acronym optional optional)))
 
 (defun LaTeX-arg-define-acro-acronym (optional &optional prompt)
@@ -160,7 +160,7 @@ be a list with strings to be used as values for the key."
   ;; Remove <SPC> key binding from map used in `multi-prompt-key-value' (called
   ;; by `TeX-arg-key-val') with `require-match' set to `nil'.
   (let ((crm-local-completion-map
-        (remove (assoc 32 crm-local-completion-map) crm-local-completion-map)))
+         (remove (assoc 32 crm-local-completion-map) 
crm-local-completion-map)))
     (TeX-arg-key-val optional key-val-alist prompt)))
 
 (TeX-add-style-hook
@@ -171,7 +171,7 @@ be a list with strings to be used as values for the key."
     ;; Creating New Acronyms
     '("DeclareAcronym" LaTeX-arg-define-acro-acronym
       (LaTeX-arg-acro-key-val "Definition of acronym (k=v)"
-                             LaTeX-acro-declareacronym-keys))
+                              LaTeX-acro-declareacronym-keys))
     ;; Using the Acronyms
     '("ac" LaTeX-arg-acro-acronym)
     '("ac*" LaTeX-arg-acro-acronym)
@@ -257,40 +257,40 @@ be a list with strings to be used as values for the key."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("DeclareAcronym" "{{")
-                               ("ac" "*{")
-                               ("Ac" "*{")
-                               ("acs" "*{")
-                               ("acl" "*{")
-                               ("Acl" "*{")
-                               ("aca" "*{")
-                               ("acf" "*{")
-                               ("Acf" "*{")
-                               ("acp" "*{")
-                               ("Acp" "*{")
-                               ("acsp" "*{")
-                               ("aclp" "*{")
-                               ("Aclp" "*{")
-                               ("acap" "*{")
-                               ("acfp" "*{")
-                               ("Acfp" "*{")
-                               ("acflike" "*{")
-                               ("acfplike" "*{")
-                               ("iac" "*{")
-                               ("Iac" "*{")
-                               ("iacs" "*{")
-                               ("Iacs" "*{")
-                               ("iaca" "*{")
-                               ("Iaca" "*{")
-                               ("iacl" "*{")
-                               ("Iacl" "*{")
-                               ("iacf" "*{")
-                               ("Iacf" "*{")
-                               ("iacflike" "*{")
-                               ("Iacflike" "*{")
-                               ("acuse" "{"))
-                             'function)))
+                                ("ac" "*{")
+                                ("Ac" "*{")
+                                ("acs" "*{")
+                                ("acl" "*{")
+                                ("Acl" "*{")
+                                ("aca" "*{")
+                                ("acf" "*{")
+                                ("Acf" "*{")
+                                ("acp" "*{")
+                                ("Acp" "*{")
+                                ("acsp" "*{")
+                                ("aclp" "*{")
+                                ("Aclp" "*{")
+                                ("acap" "*{")
+                                ("acfp" "*{")
+                                ("Acfp" "*{")
+                                ("acflike" "*{")
+                                ("acfplike" "*{")
+                                ("iac" "*{")
+                                ("Iac" "*{")
+                                ("iacs" "*{")
+                                ("Iacs" "*{")
+                                ("iaca" "*{")
+                                ("Iaca" "*{")
+                                ("iacl" "*{")
+                                ("Iacl" "*{")
+                                ("iacf" "*{")
+                                ("Iacf" "*{")
+                                ("iacflike" "*{")
+                                ("Iacflike" "*{")
+                                ("acuse" "{"))
+                              'function)))
  TeX-dialect)
 
 (defun LaTeX-acro-package-options ()
diff --git a/style/acronym.el b/style/acronym.el
index d86debe..a99fa85 100644
--- a/style/acronym.el
+++ b/style/acronym.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-auto-add-type "acronym" "LaTeX")
 
@@ -54,8 +54,8 @@
 (defun LaTeX-acronym-cleanup ()
   "Move acronyms from `LaTeX-auto-acronym' to `LaTeX-acronym-list'."
   (mapc (lambda (acronym)
-         (add-to-list 'LaTeX-acronym-list (list acronym)))
-       LaTeX-auto-acronym))
+          (add-to-list 'LaTeX-acronym-list (list acronym)))
+        LaTeX-auto-acronym))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-acronym-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-acronym-cleanup t)
@@ -73,10 +73,10 @@ argument, otherwise as a mandatory one.  Use PROMPT as the 
prompt
 string.  If DEFINITION is non-nil, add the chosen acronym to the
 list of defined acronyms."
   (let ((acronym (completing-read (TeX-argument-prompt optional prompt 
"Acronym")
-                                 (LaTeX-acronym-list) nil nil nil
-                                 'LaTeX-acronym-acronym-history)))
+                                  (LaTeX-acronym-list) nil nil nil
+                                  'LaTeX-acronym-acronym-history)))
     (if (and definition (not (string-equal "" acronym)))
-       (LaTeX-add-acronyms acronym))
+        (LaTeX-add-acronyms acronym))
     (TeX-argument-insert acronym optional optional)))
 
 (defun LaTeX-arg-define-acronym-acronym (optional &optional prompt)
@@ -150,32 +150,32 @@ string."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("ac" "*{")
-                               ("acf" "*{")
-                               ("acs" "*{")
-                               ("acl" "*{")
-                               ("acp" "*{")
-                               ("acfp" "*{")
-                               ("acsp" "*{")
-                               ("aclp" "*{")
-                               ("acfi" "*{")
-                               ("acused" "{")
-                               ("acsu" "*{")
-                               ("aclu" "*{")
-                               ("iac" "*{")
-                               ("Iac" "*{")
-                               ("acro" "{[{")
-                               ("acroextra" "{")
-                               ("newacro" "{[{")
-                               ("acrodef" "{[{")
-                               ("acroindefinite" "{{{")
-                               ("acrodefindefinite" "{{{")
-                               ("newacroindefinite" "{{{")
-                               ("acroplural" "{[{")
-                               ("acrodefplural" "{[{")
-                               ("newacroplural" "{[{"))
-                             'function)))
+                                ("acf" "*{")
+                                ("acs" "*{")
+                                ("acl" "*{")
+                                ("acp" "*{")
+                                ("acfp" "*{")
+                                ("acsp" "*{")
+                                ("aclp" "*{")
+                                ("acfi" "*{")
+                                ("acused" "{")
+                                ("acsu" "*{")
+                                ("aclu" "*{")
+                                ("iac" "*{")
+                                ("Iac" "*{")
+                                ("acro" "{[{")
+                                ("acroextra" "{")
+                                ("newacro" "{[{")
+                                ("acrodef" "{[{")
+                                ("acroindefinite" "{{{")
+                                ("acrodefindefinite" "{{{")
+                                ("newacroindefinite" "{{{")
+                                ("acroplural" "{[{")
+                                ("acrodefplural" "{[{")
+                                ("newacroplural" "{[{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-acronym-package-options
diff --git a/style/algorithm.el b/style/algorithm.el
index 10e8530..c493c82 100644
--- a/style/algorithm.el
+++ b/style/algorithm.el
@@ -39,23 +39,23 @@
 (defun LaTeX-env-algorithm (environment)
   "Insert a algorithm-like ENVIRONMENT with caption and label."
   (let* ((pos (completing-read (TeX-argument-prompt t nil "Position")
-                              '(("H"))))
-        (caption (TeX-read-string "Caption: "))
-        (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
-                         (TeX-read-string "(Optional) Short caption: "))))
+                               '(("H"))))
+         (caption (TeX-read-string "Caption: "))
+         (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
+                          (TeX-read-string "(Optional) Short caption: "))))
     (LaTeX-insert-environment environment
-                             (concat
-                              (unless (zerop (length pos))
-                                (concat LaTeX-optop pos LaTeX-optcl))))
+                              (concat
+                               (unless (zerop (length pos))
+                                 (concat LaTeX-optop pos LaTeX-optcl))))
     ;; top caption -- do nothing if user skips caption
     (unless (zerop (length caption))
       ;; insert `\caption[short-caption]{caption':
       (insert TeX-esc "caption")
       (when (and short-caption (not (string= short-caption "")))
-       (insert LaTeX-optop short-caption LaTeX-optcl))
+        (insert LaTeX-optop short-caption LaTeX-optcl))
       (insert TeX-grop caption)
       ;; ask for a label and insert it
-;      (LaTeX-label environment 'environment)
+                                        ;      (LaTeX-label environment 
'environment)
       ;; the longtable `\caption' is equivalent to a
       ;; `\multicolumn', so it needs a `\\' at the
       ;; end of the line.  Prior to that, add } to
diff --git a/style/alltt.el b/style/alltt.el
index 2b9af53..57d1ab2 100644
--- a/style/alltt.el
+++ b/style/alltt.el
@@ -35,18 +35,18 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 (TeX-add-style-hook
  "alltt"
  (lambda ()
    (LaTeX-add-environments "alltt")
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("alltt" current-indentation) t)
+                '("alltt" current-indentation) t)
    (add-to-list 'LaTeX-verbatim-environments-local "alltt")
    ;; Fontification
    (when (and (fboundp 'font-latex-set-syntactic-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      ;; Tell font-lock about the update.
      (font-latex-set-syntactic-keywords)))
  TeX-dialect)
diff --git a/style/alphanum.el b/style/alphanum.el
index b198128..cc24c3b 100644
--- a/style/alphanum.el
+++ b/style/alphanum.el
@@ -42,35 +42,35 @@
 (defvar reftex-section-regexp)
 
 (defun reftex-get-section-level-alphanum ()
-  (save-excursion                      ; preserve position
-    (save-match-data            ; preserve matching data (important!)
+  (save-excursion                       ; preserve position
+    (save-match-data             ; preserve matching data (important!)
       ;; Go back to the beginning of the sectioning command
       (goto-char (match-beginning 0))
       ;; Define an initial level number, depending on the current macro.
-      (let* ((macro (reftex-match-string 3))     ; "toc" or "sub"
-            (lev (cond ((string= macro "toc") 1) ; min level for "toc"
-                       ((string= macro "sub") 2) ; min level for "sub"
-                       (t 0)))
-            ;; Make a regular expression which will match sectioning commands
-            ;; and the levelup macro.
-            (re (concat "\\(^[^%]*\\\\levelup\\>\\)"
-                        "\\|"
-                        "\\(" reftex-section-regexp "\\)")))
-       ;; Now parse backwards for all sectioning and levelup macros,
-       ;; and keep track of the relative level changes.
-       (while (re-search-backward re nil t)
-         (cond
-          ((match-beginning 1)
-           ;; levelup matched, reduce level counter
-           (setq lev (1- lev)))
-          ((string= (reftex-match-string 4) "toc")
-           ;; a toc entry, nothing changes
-           )
-          ((string= (reftex-match-string 4) "sub")
-           ;; a sub entry, increase level counter
-           (setq lev (1+ lev)))))
-       ;; return the level
-       lev))))
+      (let* ((macro (reftex-match-string 3))      ; "toc" or "sub"
+             (lev (cond ((string= macro "toc") 1) ; min level for "toc"
+                        ((string= macro "sub") 2) ; min level for "sub"
+                        (t 0)))
+             ;; Make a regular expression which will match sectioning commands
+             ;; and the levelup macro.
+             (re (concat "\\(^[^%]*\\\\levelup\\>\\)"
+                         "\\|"
+                         "\\(" reftex-section-regexp "\\)")))
+        ;; Now parse backwards for all sectioning and levelup macros,
+        ;; and keep track of the relative level changes.
+        (while (re-search-backward re nil t)
+          (cond
+           ((match-beginning 1)
+            ;; levelup matched, reduce level counter
+            (setq lev (1- lev)))
+           ((string= (reftex-match-string 4) "toc")
+            ;; a toc entry, nothing changes
+            )
+           ((string= (reftex-match-string 4) "sub")
+            ;; a sub entry, increase level counter
+            (setq lev (1+ lev)))))
+        ;; return the level
+        lev))))
 
 (TeX-add-style-hook
  "alphanum"
@@ -86,9 +86,9 @@
       ("sub" 0))
     t)
    (setq LaTeX-section-label
-        '(("part" . "part:")
-          ("toc" . "sec:")
-          ("sub" . "sec:")))
+         '(("part" . "part:")
+           ("toc" . "sec:")
+           ("sub" . "sec:")))
    ;;
    ;; ****************** reftex part ******************
    ;; this won't work in multifile documents, but at least there is
@@ -96,8 +96,8 @@
 
    (if (fboundp 'reftex-add-section-levels)
        (reftex-add-section-levels
-       '(("toc" .  reftex-get-section-level-alphanum)
-         ("sub" .  reftex-get-section-level-alphanum)))))
+        '(("toc" .  reftex-get-section-level-alphanum)
+          ("sub" .  reftex-get-section-level-alphanum)))))
  TeX-dialect)
 
 ;; Local Variables:
diff --git a/style/amsfonts.el b/style/amsfonts.el
index eb4c2e5..03556e7 100644
--- a/style/amsfonts.el
+++ b/style/amsfonts.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "amsfonts"
@@ -44,14 +44,14 @@
     '("bold" 1))
    ;; New math font by `amsfonts'.
    (setq TeX-font-list
-        (append
-         TeX-font-list
-         '((?\C-k "" "" "\\mathfrak{" "}"))))
+         (append
+          TeX-font-list
+          '((?\C-k "" "" "\\mathfrak{" "}"))))
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("bold" "{"))
-                             'bold-command)))
+                              'bold-command)))
  TeX-dialect)
 
 ;; The `psamsfonts' option is obsolete in AMSFonts v3
diff --git a/style/amsmath.el b/style/amsmath.el
index 4cde128..6f51588 100644
--- a/style/amsmath.el
+++ b/style/amsmath.el
@@ -35,8 +35,8 @@
 
 ;; Fontification
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "amsmath"
@@ -109,55 +109,55 @@
     "iint" "iiint" "iiiint" "idotsint")
 
    (setq LaTeX-item-list
-        (append '(("split"    . LaTeX-item-equation)
-                  ("multline" . LaTeX-item-equation)
-                  ("multline*" . LaTeX-item-equation)
-                  ("gather"   . LaTeX-item-equation)
-                  ("gather*"  . LaTeX-item-equation)
-                  ("gathered" . LaTeX-item-equation)
-                  ("align"    . LaTeX-item-equation)
-                  ("align*"   . LaTeX-item-equation)
-                  ("aligned"  . LaTeX-item-equation)
-                  ("alignat"  . LaTeX-item-equation-alignat)
-                  ("alignat*" . LaTeX-item-equation-alignat)
-                  ("xalignat"  . LaTeX-item-equation-alignat)
-                  ("xalignat*" . LaTeX-item-equation-alignat)
-                  ("xxalignat" . LaTeX-item-equation-alignat)
-                  ("alignedat" . LaTeX-item-equation-alignat)
-                  ("flalign"  . LaTeX-item-equation)
-                  ("flalign*" . LaTeX-item-equation)
-                  ("matrix" .  LaTeX-item-equation)
-                  ("pmatrix" .  LaTeX-item-equation)
-                  ("bmatrix" .  LaTeX-item-equation)
-                  ("Bmatrix" .  LaTeX-item-equation)
-                  ("vmatrix" .  LaTeX-item-equation)
-                  ("Vmatrix" .  LaTeX-item-equation)
-                  ("subarray" . LaTeX-item-equation)
-                  ("cases"    . LaTeX-item-equation))
-                LaTeX-item-list))
+         (append '(("split"    . LaTeX-item-equation)
+                   ("multline" . LaTeX-item-equation)
+                   ("multline*" . LaTeX-item-equation)
+                   ("gather"   . LaTeX-item-equation)
+                   ("gather*"  . LaTeX-item-equation)
+                   ("gathered" . LaTeX-item-equation)
+                   ("align"    . LaTeX-item-equation)
+                   ("align*"   . LaTeX-item-equation)
+                   ("aligned"  . LaTeX-item-equation)
+                   ("alignat"  . LaTeX-item-equation-alignat)
+                   ("alignat*" . LaTeX-item-equation-alignat)
+                   ("xalignat"  . LaTeX-item-equation-alignat)
+                   ("xalignat*" . LaTeX-item-equation-alignat)
+                   ("xxalignat" . LaTeX-item-equation-alignat)
+                   ("alignedat" . LaTeX-item-equation-alignat)
+                   ("flalign"  . LaTeX-item-equation)
+                   ("flalign*" . LaTeX-item-equation)
+                   ("matrix" .  LaTeX-item-equation)
+                   ("pmatrix" .  LaTeX-item-equation)
+                   ("bmatrix" .  LaTeX-item-equation)
+                   ("Bmatrix" .  LaTeX-item-equation)
+                   ("vmatrix" .  LaTeX-item-equation)
+                   ("Vmatrix" .  LaTeX-item-equation)
+                   ("subarray" . LaTeX-item-equation)
+                   ("cases"    . LaTeX-item-equation))
+                 LaTeX-item-list))
 
    ;; When `LaTeX-amsmath-label' is nil, use value of LaTeX-equation-label:
    (unless LaTeX-amsmath-label
      (setq LaTeX-amsmath-label LaTeX-equation-label))
 
    (setq LaTeX-label-alist
-        ;; Append amsmath environments to `LaTeX-label-alist', in order not to
-        ;; override possible custome values.
-        (append LaTeX-label-alist
-                '(("align"      . LaTeX-amsmath-label)
-                  ("alignat"    . LaTeX-amsmath-label)
-                  ("xalignat"   . LaTeX-amsmath-label)
-                  ("multline"   . LaTeX-amsmath-label)
-                  ("flalign"    . LaTeX-amsmath-label)
-                  ("gather"     . LaTeX-amsmath-label))))
+         ;; Append amsmath environments to `LaTeX-label-alist', in order not to
+         ;; override possible custome values.
+         (append LaTeX-label-alist
+                 '(("align"      . LaTeX-amsmath-label)
+                   ("alignat"    . LaTeX-amsmath-label)
+                   ("xalignat"   . LaTeX-amsmath-label)
+                   ("multline"   . LaTeX-amsmath-label)
+                   ("flalign"    . LaTeX-amsmath-label)
+                   ("gather"     . LaTeX-amsmath-label))))
 
    (set (make-local-variable 'TeX-braces-association)
-       (append '(("\\lvert" . "\\rvert")
-                 ("\\lVert" . "\\rVert"))
-               TeX-braces-association))
+        (append '(("\\lvert" . "\\rvert")
+                  ("\\lVert" . "\\rVert"))
+                TeX-braces-association))
    (set (make-local-variable 'TeX-left-right-braces)
-       (append '(("\\lvert") ("\\rvert") ("\\lVert") ("\\rVert"))
-               TeX-left-right-braces))
+        (append '(("\\lvert") ("\\rvert") ("\\lVert") ("\\rVert"))
+                TeX-left-right-braces))
 
    ;; amsmath includes amstext, amsbsy, & amsopn.
    ;; So we run their hooks, too.
@@ -169,24 +169,24 @@
 
    ;; Add \eqref to `reftex-ref-style-alist' and associate it to `e'
    (when (and (boundp 'reftex-ref-style-alist)
-             ;; check if Emacs is already equipped with this
-             (not (assoc "AMSmath" reftex-ref-style-alist)))
+              ;; check if Emacs is already equipped with this
+              (not (assoc "AMSmath" reftex-ref-style-alist)))
      ;; Append it to a local version in order to avoid a clash with
      ;; user settings
      (add-to-list (make-local-variable 'reftex-ref-style-alist)
-                 '("AMSmath" "amsmath" (("\\eqref" ?e)))
-                 t))
+                  '("AMSmath" "amsmath" (("\\eqref" ?e)))
+                  t))
 
    ;; Activate `AMSmath' when `LaTeX-reftex-ref-style-auto-activate'
    ;; is non-nil
    (and LaTeX-reftex-ref-style-auto-activate
-       (fboundp 'reftex-ref-style-activate)
-       (reftex-ref-style-activate "AMSmath"))
+        (fboundp 'reftex-ref-style-activate)
+        (reftex-ref-style-activate "AMSmath"))
 
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("boxed" "{"))
-                             'math-command)))
+                              'math-command)))
  TeX-dialect)
 
 (defun LaTeX-amsmath-env-alignat (env)
@@ -200,7 +200,7 @@ Insert suitable number of ampersands also if possible."
   "Insert ENV with position and column number specifications.
 Insert suitable number of ampersands also if possible."
   (let ((where (TeX-read-string "(Optional) Vertical position (t or b): "))
-       (ncols (TeX-read-string "Number of columns: ")))
+        (ncols (TeX-read-string "Number of columns: ")))
     (unless (string= where "")
       (setq where (concat LaTeX-optop where LaTeX-optcl)))
     (LaTeX-insert-environment env (concat where TeX-grop ncols TeX-grcl))
@@ -220,7 +220,7 @@ If SUPPRESS is non-nil, do not insert line break macro."
     (indent-according-to-mode))
   (let ((env (LaTeX-current-environment)))
     (when (and (assoc env LaTeX-label-alist)
-              (LaTeX-label env 'environment))
+               (LaTeX-label env 'environment))
       (LaTeX-newline)
       (indent-according-to-mode))))
 
@@ -234,8 +234,8 @@ If SUPPRESS is non-nil, do not insert line break macro."
   (LaTeX-item-equation suppress)
   (LaTeX-insert-ampersands
    (concat "\\(?:"
-          (regexp-quote LaTeX-optop) "[tb]" (regexp-quote LaTeX-optcl)
-          "\\)?")
+           (regexp-quote LaTeX-optop) "[tb]" (regexp-quote LaTeX-optcl)
+           "\\)?")
    'LaTeX-amsmath-alignat-number-of-ampersands))
 
 (defun LaTeX-amsmath-alignat-number-of-ampersands (start end)
@@ -246,13 +246,13 @@ START and END."
     (if (integerp num) (+ num num -1))))
 
 (defvar LaTeX-amsmath-package-options '("intlimits" "nointlimits"
-                                       "sumlimits" "nosumlimits"
-                                       "namelimits" "nonamelimits"
-                                       "leqno" "reqno" "centertags"
-                                       "tbtags" "cmex10" "fleqn" "?"
-                                       "alignedleftspaceyes"
-                                       "alignedleftspaceno"
-                                       "alignedleftspaceyesifneg")
+                                        "sumlimits" "nosumlimits"
+                                        "namelimits" "nonamelimits"
+                                        "leqno" "reqno" "centertags"
+                                        "tbtags" "cmex10" "fleqn" "?"
+                                        "alignedleftspaceyes"
+                                        "alignedleftspaceno"
+                                        "alignedleftspaceyesifneg")
   "Package options for the amsmath package.")
 
 ;;; amsmath.el ends here.
diff --git a/style/amsopn.el b/style/amsopn.el
index fd2c5fc..10572bd 100644
--- a/style/amsopn.el
+++ b/style/amsopn.el
@@ -45,8 +45,8 @@
     '("operatorname*" t))
 
    (add-to-list 'LaTeX-auto-regexp-list
-               '("\\\\DeclareMathOperator\\*?{?\\\\\\([A-Za-z0-9]+\\)}?"
-                 1 TeX-auto-symbol)))
+                '("\\\\DeclareMathOperator\\*?{?\\\\\\([A-Za-z0-9]+\\)}?"
+                  1 TeX-auto-symbol)))
  TeX-dialect
  )
 
diff --git a/style/amstex.el b/style/amstex.el
index c9c1b9b..7588935 100644
--- a/style/amstex.el
+++ b/style/amstex.el
@@ -51,13 +51,13 @@
  TeX-dialect)
 
 (defvar LaTeX-amstex-package-options '("noamsfonts" "psamsfonts" 
-                                      "intlimits" "nointlimits"
-                                      "sumlimits" "nosumlimits"
-                                      "namelimits" "nonamelimits"
-                                      "leqno" "reqno" "centertags"
-                                      "tbtags" "fleqn" "righttag"
-                                      "ctagsplt" "intlim" "nosumlim"
-                                      "nonamelm")
-    "Package options for the amstex package.")
+                                       "intlimits" "nointlimits"
+                                       "sumlimits" "nosumlimits"
+                                       "namelimits" "nonamelimits"
+                                       "leqno" "reqno" "centertags"
+                                       "tbtags" "fleqn" "righttag"
+                                       "ctagsplt" "intlim" "nosumlim"
+                                       "nonamelm")
+  "Package options for the amstex package.")
 
 ;;; amstex.el ends here.
diff --git a/style/amsthm.el b/style/amsthm.el
index a71feda..a009ae0 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-amsthm-package-options nil
   "Package options for the amsthm package.")
@@ -62,15 +62,15 @@
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument.  Use PROMPT as the prompt string."
   (let* ((crm-separator (regexp-quote TeX-esc))
-        (fontdecl (mapconcat #'identity
-                             (TeX-completing-read-multiple
-                              (TeX-argument-prompt optional prompt "Font: \\" 
t)
-                              LaTeX-amsthm-fontdecl)
-                             TeX-esc)))
+         (fontdecl (mapconcat #'identity
+                              (TeX-completing-read-multiple
+                               (TeX-argument-prompt optional prompt "Font: \\" 
t)
+                               LaTeX-amsthm-fontdecl)
+                              TeX-esc)))
     (TeX-argument-insert fontdecl
-                        optional
-                        (when (and fontdecl (not (string= fontdecl "")))
-                          TeX-esc))))
+                         optional
+                         (when (and fontdecl (not (string= fontdecl "")))
+                           TeX-esc))))
 
 (defun LaTeX-amsthm-env-label (environment)
   "Insert ENVIRONMENT, query for an optional argument and prompt
@@ -84,14 +84,14 @@ RefTeX users should customize or add ENVIRONMENT to
 
   (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
   (add-to-list \\='reftex-label-alist
-              \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
-                nil (\"Lemma\" \"lemma\") nil))"
+               \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
+                 nil (\"Lemma\" \"lemma\") nil))"
   (let ((opthead (TeX-read-string
-                 (TeX-argument-prompt t nil "Heading"))))
+                  (TeX-argument-prompt t nil "Heading"))))
     (LaTeX-insert-environment environment
-                             (when (and opthead
-                                        (not (string= opthead "")))
-                               (format "[%s]" opthead))))
+                              (when (and opthead
+                                         (not (string= opthead "")))
+                                (format "[%s]" opthead))))
   (when (LaTeX-label environment 'environment)
     (LaTeX-newline)
     (indent-according-to-mode)))
@@ -123,8 +123,8 @@ make them available as new environments."
  (lambda ()
    ;; Add the pre-defined styles:
    (LaTeX-add-amsthm-newtheoremstyles "definition"
-                                     "plain"
-                                     "remark")
+                                      "plain"
+                                      "remark")
 
    (LaTeX-add-environments
     '("proof" LaTeX-amsthm-env-label))
@@ -134,45 +134,45 @@ make them available as new environments."
     '("newtheorem"
       (TeX-arg-eval
        (lambda ()
-        (let ((nthm (TeX-read-string
-                     (TeX-argument-prompt nil nil "Environment"))))
-          (LaTeX-add-amsthm-newtheorems nthm)
-          (LaTeX-add-environments (list nthm 'LaTeX-amsthm-env-label))
-          (format "%s" nthm))))
+         (let ((nthm (TeX-read-string
+                      (TeX-argument-prompt nil nil "Environment"))))
+           (LaTeX-add-amsthm-newtheorems nthm)
+           (LaTeX-add-environments (list nthm 'LaTeX-amsthm-env-label))
+           (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"))
-                       "") ])
+                                        (backward-char 2)
+                                        (preceding-char)) ?\])
+                                  ()
+                                (TeX-arg-counter t "Within counter"))
+                        "") ])
 
     '("newtheorem*"
       (TeX-arg-eval
        (lambda ()
-        (let ((nthm (TeX-read-string
-                     (TeX-argument-prompt nil nil "Environment")))
-              (heading (TeX-read-string
-                        (TeX-argument-prompt nil nil "Heading"))))
-          (LaTeX-add-amsthm-newtheorems nthm)
-          (LaTeX-add-environments (list nthm 'LaTeX-amsthm-env-label))
-          (insert (concat TeX-grop nthm TeX-grcl))
-          (format "%s" heading)))))
+         (let ((nthm (TeX-read-string
+                      (TeX-argument-prompt nil nil "Environment")))
+               (heading (TeX-read-string
+                         (TeX-argument-prompt nil nil "Heading"))))
+           (LaTeX-add-amsthm-newtheorems nthm)
+           (LaTeX-add-environments (list nthm 'LaTeX-amsthm-env-label))
+           (insert (concat TeX-grop nthm TeX-grcl))
+           (format "%s" heading)))))
 
     '("theoremstyle"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Style")
-                   (LaTeX-amsthm-newtheoremstyle-list)))
+                    (TeX-argument-prompt nil nil "Style")
+                    (LaTeX-amsthm-newtheoremstyle-list)))
     "qedhere"
     "swapnumbers"
 
     '("newtheoremstyle"
       (TeX-arg-eval
        (lambda ()
-        (let ((nthmstyle (TeX-read-string
-                          (TeX-argument-prompt nil nil "Style name"))))
-          (LaTeX-add-amsthm-newtheoremstyles nthmstyle)
-          (format "%s" nthmstyle))))
+         (let ((nthmstyle (TeX-read-string
+                           (TeX-argument-prompt nil nil "Style name"))))
+           (LaTeX-add-amsthm-newtheoremstyles nthmstyle)
+           (format "%s" nthmstyle))))
       (TeX-arg-length "Space above")
       (TeX-arg-length "Space below")
       (LaTeX-arg-amsthm-fontdecl "Body font: \\")
@@ -191,11 +191,11 @@ make them available as new environments."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("newtheorem"      "*{[{[")
-                               ("theoremstyle"    "{")
-                               ("newtheoremstyle" "{{{{{{{{{"))
-                             'function)))
+                                ("theoremstyle"    "{")
+                                ("newtheoremstyle" "{{{{{{{{{"))
+                              'function)))
  TeX-dialect)
 
 ;;; amsthm.el ends here
diff --git a/style/appendix.el b/style/appendix.el
index 1df68a6..406aef5 100644
--- a/style/appendix.el
+++ b/style/appendix.el
@@ -69,11 +69,11 @@
    ;; Don't indent the content inside \(sub\)?appendices environments:
    (unless (string-match "appendices" LaTeX-document-regexp)
      (set (make-local-variable 'LaTeX-document-regexp)
-         (concat LaTeX-document-regexp "\\|\\(?:sub\\)?appendices"))))
+          (concat LaTeX-document-regexp "\\|\\(?:sub\\)?appendices"))))
  TeX-dialect)
 
 (defvar LaTeX-appendix-package-options '("toc" "page" "title"
-                                        "titletoc" "header")
+                                         "titletoc" "header")
   "Package options for the appendix package.")
 
 ;;; appendix.el ends here
diff --git a/style/arabxetex.el b/style/arabxetex.el
index ed4cd03..05068a4 100644
--- a/style/arabxetex.el
+++ b/style/arabxetex.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 (declare-function TeX-check-engine-add-engines
                   "tex-buf"
                   (&rest engines))
@@ -56,44 +56,44 @@
 
    ;; New macros & environments:
    (let ((langs '("arab"
-                 "farsi" "persian"
-                 "urdu"
-                 "sindhi"
-                 "pashto"
-                 "ottoman" "turk"
-                 "kurdisch"
-                 "kashmiri"
-                 "malay" "jawi"
-                 "uighur")))
+                  "farsi" "persian"
+                  "urdu"
+                  "sindhi"
+                  "pashto"
+                  "ottoman" "turk"
+                  "kurdisch"
+                  "kashmiri"
+                  "malay" "jawi"
+                  "uighur")))
      ;; Add \text<language>[option]{...}
      (mapc #'TeX-add-symbols
-          (mapcar
-           (lambda (symbol)
-             (list symbol
-                   [ TeX-arg-eval completing-read
-                                  (TeX-argument-prompt t nil "Mode")
-                                  LaTeX-arabxetex-package-options ]
-                   t))
-           (mapcar (lambda (lang) (concat "text" lang)) langs)))
+           (mapcar
+            (lambda (symbol)
+              (list symbol
+                    [ TeX-arg-eval completing-read
+                      (TeX-argument-prompt t nil "Mode")
+                      LaTeX-arabxetex-package-options ]
+                    t))
+            (mapcar (lambda (lang) (concat "text" lang)) langs)))
      ;;
      ;; Add \begin{<language>}[option] ... \end{<language>}
      (mapc #'LaTeX-add-environments
-          (mapcar
-           (lambda (environment)
-             (list environment
-                   #'LaTeX-env-args
-                   [ TeX-arg-eval completing-read
-                                  (TeX-argument-prompt t nil "Mode")
-                                  LaTeX-arabxetex-package-options ]))
-           langs))
+           (mapcar
+            (lambda (environment)
+              (list environment
+                    #'LaTeX-env-args
+                    [ TeX-arg-eval completing-read
+                      (TeX-argument-prompt t nil "Mode")
+                      LaTeX-arabxetex-package-options ]))
+            langs))
      ;;
      ;; Fontification
      (when (and (featurep 'font-latex)
-               (eq TeX-install-font-lock 'font-latex-setup))
+                (eq TeX-install-font-lock 'font-latex-setup))
        (font-latex-add-keywords (mapcar (lambda (lang)
-                                         (list (concat "text" lang) "[{"))
-                                       langs)
-                               'textual)))
+                                          (list (concat "text" lang) "[{"))
+                                        langs)
+                                'textual)))
 
    ;; Other macros:
    (TeX-add-symbols
@@ -103,20 +103,20 @@
     ;; 3.3 Transliteration
     '("SetTranslitConvention"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Mapping")
-                   '("dmg" "loc")))
+                    (TeX-argument-prompt nil nil "Mapping")
+                    '("dmg" "loc")))
     '("SetTranslitStyle" "Style"))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textLR" "{"))
-                             'textual)
+                              'textual)
      (font-latex-add-keywords '(("aemph"  "{"))
-                             'italic-command)
+                              'italic-command)
      (font-latex-add-keywords '(("SetTranslitConvention" "{")
-                               ("SetTranslitStyle"      "{"))
-                             'function)))
+                                ("SetTranslitStyle"      "{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-arabxetex-package-options
diff --git a/style/array.el b/style/array.el
index 4b3f1d4..b944103 100644
--- a/style/array.el
+++ b/style/array.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-auto-add-type "array-newcolumntype" "LaTeX")
 
@@ -47,7 +47,7 @@ package.")
 
 (defun LaTeX-array-auto-prepare ()
   "Clear `LaTeX-auto-array-newcolumntype' before parsing."
-  (setq        LaTeX-auto-array-newcolumntype nil))
+  (setq LaTeX-auto-array-newcolumntype nil))
 
 (defun LaTeX-array-auto-cleanup ()
   "Move parsed column specification from
@@ -60,12 +60,12 @@ package.")
 and make it buffer local. "
   (set (make-local-variable 'LaTeX-array-column-letters)
        (mapconcat 'identity
-                 (TeX-delete-duplicate-strings
-                  (split-string
-                   (concat LaTeX-array-column-letters
-                           (mapconcat #'car (LaTeX-array-newcolumntype-list) 
""))
-                   "" t))
-                 "")))
+                  (TeX-delete-duplicate-strings
+                   (split-string
+                    (concat LaTeX-array-column-letters
+                            (mapconcat #'car (LaTeX-array-newcolumntype-list) 
""))
+                    "" t))
+                  "")))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-array-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-array-auto-cleanup t)
@@ -81,10 +81,10 @@ and make it buffer local. "
     '("newcolumntype"
       (TeX-arg-eval
        (lambda ()
-        (let ((col (TeX-read-string "Column type: ")))
-          (LaTeX-add-array-newcolumntypes col)
-          (LaTeX-array-update-column-letters)
-          (format "%s" col))))
+         (let ((col (TeX-read-string "Column type: ")))
+           (LaTeX-add-array-newcolumntypes col)
+           (LaTeX-array-update-column-letters)
+           (format "%s" col))))
       [ "Number of arguments" ] t)
     '("showcols" 0)
     '("firsthline" 0)
@@ -96,13 +96,13 @@ and make it buffer local. "
 
    ;; `array.sty' adds some new column specification letters.
    (set (make-local-variable 'LaTeX-array-column-letters)
-       (concat LaTeX-array-column-letters "m" "b" "w" "W"))
+        (concat LaTeX-array-column-letters "m" "b" "w" "W"))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("newcolumntype" "{[{"))
-                             'function)))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-array-package-options nil
diff --git a/style/article.el b/style/article.el
index aa4d764..1278ddb 100644
--- a/style/article.el
+++ b/style/article.el
@@ -16,7 +16,7 @@
  (lambda ()
    (LaTeX-largest-level-set "section")
    (LaTeX-add-counters "part" "section" "subsection" "subsubsection" 
"paragraph"
-                      "subparagraph" "figure" "table")
+                       "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings")
    (LaTeX-add-environments "abstract"))
  TeX-dialect)
diff --git a/style/attachfile.el b/style/attachfile.el
index 8f077be..c090b5a 100644
--- a/style/attachfile.el
+++ b/style/attachfile.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-attachfile-key-val-options
   '(("appearance" ("true" "false"))
@@ -84,9 +84,9 @@
       [TeX-arg-key-val LaTeX-attachfile-key-val-options]
       (TeX-arg-eval
        (lambda ()
-        (let ((atfi (file-relative-name
-                     (read-file-name "File to attach: "))))
-          (format "%s" atfi)))))
+         (let ((atfi (file-relative-name
+                      (read-file-name "File to attach: "))))
+           (format "%s" atfi)))))
 
     ;; \noattachfile[<options>]
     '("noattachfile"
@@ -97,9 +97,9 @@
       [TeX-arg-key-val LaTeX-attachfile-key-val-options]
       (TeX-arg-eval
        (lambda ()
-        (let ((atfi (file-relative-name
-                     (read-file-name "File to attach: "))))
-          (format "%s" atfi))))
+         (let ((atfi (file-relative-name
+                      (read-file-name "File to attach: "))))
+           (format "%s" atfi))))
       t)
 
     ;; \notextattachfile[<options>]{<text>}
@@ -112,13 +112,13 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("attachfilesetup"  "{")
-                               ("attachfile"       "[{")
-                               ("noattachfile"     "[")
-                               ("textattachfile"   "[{{")
-                               ("notextattachfile" "[{"))
-                             'function)))
+                                ("attachfile"       "[{")
+                                ("noattachfile"     "[")
+                                ("textattachfile"   "[{{")
+                                ("notextattachfile" "[{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-attachfile-package-options nil
diff --git a/style/babel.el b/style/babel.el
index 43f19ab..e8f792c 100644
--- a/style/babel.el
+++ b/style/babel.el
@@ -38,8 +38,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-babel-language-list
   '("afrikaans"
@@ -109,31 +109,31 @@
   (let (main-language active-languages)
     ;; Loop over options provided to class and `babel' package at load time.
     (dolist (elt (append
-                 ;; In most cases there is only one element in the alist, if
-                 ;; there is more than one element, the first one should
-                 ;; contain the class options of the current buffer.  So we can
-                 ;; take the car of `LaTeX-provided-class-options'.
-                 (cdr (car LaTeX-provided-class-options))
-                 (cdr (assoc "babel" LaTeX-provided-package-options))))
+                  ;; In most cases there is only one element in the alist, if
+                  ;; there is more than one element, the first one should
+                  ;; contain the class options of the current buffer.  So we 
can
+                  ;; take the car of `LaTeX-provided-class-options'.
+                  (cdr (car LaTeX-provided-class-options))
+                  (cdr (assoc "babel" LaTeX-provided-package-options))))
       (setq elt (TeX-split-string "=" elt))
       (if (equal (car elt) "main")
-         ;; Starting from version 3.9 of `babel' package, languages can be set
-         ;; with the following syntax:
-         ;;   \usepackage[latin.medieval,main=danish,spanish.notilde]{babel}
-         ;; with `danish' being the default language.  When the default
-         ;; language is set with the `main' option, we record it and append to
-         ;; the list at the end.
-         (setq main-language (car (cdr elt)))
-       ;; Get rid of the modifiers (`medieval' and `notilde' in the above
-       ;; example).
-       (setq elt (car (TeX-split-string "\\." (car elt))))
-       (if (member elt LaTeX-babel-language-list)
-           ;; Append element to `active-languages' to respect loading order.
-           ;; `babel' package uses as default language the last loaded one,
-           ;; except if it is set with the `main' option.
-           (cl-pushnew elt active-languages :test #'equal))))
+          ;; Starting from version 3.9 of `babel' package, languages can be set
+          ;; with the following syntax:
+          ;;   \usepackage[latin.medieval,main=danish,spanish.notilde]{babel}
+          ;; with `danish' being the default language.  When the default
+          ;; language is set with the `main' option, we record it and append to
+          ;; the list at the end.
+          (setq main-language (car (cdr elt)))
+        ;; Get rid of the modifiers (`medieval' and `notilde' in the above
+        ;; example).
+        (setq elt (car (TeX-split-string "\\." (car elt))))
+        (if (member elt LaTeX-babel-language-list)
+            ;; Append element to `active-languages' to respect loading order.
+            ;; `babel' package uses as default language the last loaded one,
+            ;; except if it is set with the `main' option.
+            (cl-pushnew elt active-languages :test #'equal))))
     (if main-language
-       (cl-pushnew main-language active-languages :test #'equal))
+        (cl-pushnew main-language active-languages :test #'equal))
     (nreverse active-languages)))
 
 ;; Setup for \babeltags: Note that the macro is \babeltags, we use
@@ -153,36 +153,36 @@
       ;; Clean up the parsed results from characters we don't want;
       ;; also remove possible comment lines
       (setq results
-           (replace-regexp-in-string
-            "\\(%.*$\\|[ \n\r\t]\\)" ""
-            (mapconcat #'car (LaTeX-babel-babeltag-list) ",")))
+            (replace-regexp-in-string
+             "\\(%.*$\\|[ \n\r\t]\\)" ""
+             (mapconcat #'car (LaTeX-babel-babeltag-list) ",")))
       ;; Look if \babeltags was issued once with multiple entries or
       ;; more than once in the document:
       (if (string-match-p "," results)
-         (progn
-           (dolist (elt (split-string results "," t))
-             (setq tag (car (split-string elt "=" t)))
-             (push tag tags)
-             (push (list (concat "text" tag) t) cmds)
-             (push (list tag -1) cmds)))
-       ;; One \babeltags with one entry only
-       (setq tag (car (split-string results "=" t)))
-       (push tag tags)
-       (push (list (concat "text" tag) t) cmds)
-       (push (list tag -1) cmds))
+          (progn
+            (dolist (elt (split-string results "," t))
+              (setq tag (car (split-string elt "=" t)))
+              (push tag tags)
+              (push (list (concat "text" tag) t) cmds)
+              (push (list tag -1) cmds)))
+        ;; One \babeltags with one entry only
+        (setq tag (car (split-string results "=" t)))
+        (push tag tags)
+        (push (list (concat "text" tag) t) cmds)
+        (push (list tag -1) cmds))
       (mapc #'TeX-add-symbols cmds)
       (mapc #'LaTeX-add-environments tags)
       ;; Fontification
       (when (and (featurep 'font-latex)
-                (eq TeX-install-font-lock 'font-latex-setup))
-       (font-latex-add-keywords (mapcar (lambda (x)
-                                          (list (concat "text" x)  "{"))
-                                        tags)
-                                'textual)
-       (font-latex-add-keywords (mapcar (lambda (x)
-                                          (list x  ""))
-                                        tags)
-                                'type-declaration)))))
+                 (eq TeX-install-font-lock 'font-latex-setup))
+        (font-latex-add-keywords (mapcar (lambda (x)
+                                           (list (concat "text" x)  "{"))
+                                         tags)
+                                 'textual)
+        (font-latex-add-keywords (mapcar (lambda (x)
+                                           (list x  ""))
+                                         tags)
+                                 'type-declaration)))))
 
 ;; Setup for \babelfont:
 (TeX-auto-add-type "babel-babelfont" "LaTeX")
@@ -198,27 +198,27 @@
     (dolist (elt (mapcar #'car (LaTeX-babel-babelfont-list)))
       ;; Don't do anything for standard font-families:
       (unless (member elt '("rm" "sf" "tt"))
-       ;; Define \<font>family, \<font>default and \text<font>:
-       (let ((fam (concat elt "family"))
-             (def (concat elt "default"))
-             (mac (concat "text" elt)))
-         (apply #'TeX-add-symbols
-                `((,fam -1)
-                  (,def -1)
-                  (,mac t)))
-         ;; Cater for fontification:
-         (when (and (featurep 'font-latex)
-                    (eq TeX-install-font-lock 'font-latex-setup))
-           (font-latex-add-keywords `((,fam "")
-                                      (,def ""))
-                                    'type-declaration)
-           (font-latex-add-keywords `((,mac "{"))
-                                    'type-command)))))))
+        ;; Define \<font>family, \<font>default and \text<font>:
+        (let ((fam (concat elt "family"))
+              (def (concat elt "default"))
+              (mac (concat "text" elt)))
+          (apply #'TeX-add-symbols
+                 `((,fam -1)
+                   (,def -1)
+                   (,mac t)))
+          ;; Cater for fontification:
+          (when (and (featurep 'font-latex)
+                     (eq TeX-install-font-lock 'font-latex-setup))
+            (font-latex-add-keywords `((,fam "")
+                                       (,def ""))
+                                     'type-declaration)
+            (font-latex-add-keywords `((,mac "{"))
+                                     'type-command)))))))
 
 (defun LaTeX-babel-auto-prepare ()
   "Clear `LaTeX-auto-babel-babel*' before parsing."
   (setq LaTeX-auto-babel-babeltag  nil
-       LaTeX-auto-babel-babelfont nil))
+        LaTeX-auto-babel-babelfont nil))
 
 (defun LaTeX-babel-auto-cleanup ()
   "Process parsed elements."
@@ -241,7 +241,7 @@
   "Prompt for a language and insert it as an argument of ENV."
   (LaTeX-insert-environment
    env (format "{%s}" (completing-read "Language: "
-                                      (LaTeX-babel-active-languages)))))
+                                       (LaTeX-babel-active-languages)))))
 
 (defun LaTeX-babel-load-languages ()
   "Load style files of babel active languages."
@@ -269,15 +269,15 @@
     ;; 1.9 More on selection
     '("babeltags" t)
     '("babelensure" (TeX-arg-key-val
-                    (("include") ("exclude")
-                     ("fontenc" (;; 128+ glyph encodings (text)
-                                 "OT1" "OT2" "OT3" "OT4" "OT6"
-                                 ;; 256 glyph encodings (text)
-                                 "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5"
-                                 ;; 256 glyph encodings (text extended)
-                                 "X2"
-                                 ;; Other encodings
-                                 "LY1" "LV1" "LGR"))))
+                     (("include") ("exclude")
+                      ("fontenc" (;; 128+ glyph encodings (text)
+                                  "OT1" "OT2" "OT3" "OT4" "OT6"
+                                  ;; 256 glyph encodings (text)
+                                  "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5"
+                                  ;; 256 glyph encodings (text extended)
+                                  "X2"
+                                  ;; Other encodings
+                                  "LY1" "LV1" "LGR"))))
       TeX-arg-babel-lang)
     ;; 1.10 Shorthands
     '("shorthandon"    "Shorthands list")
@@ -287,9 +287,9 @@
     '("useshorthands*" "Character")
     '("defineshorthand"
       [ TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt t nil "Language(s)")
-                     (LaTeX-babel-active-languages)) ""]
+        (TeX-completing-read-multiple
+         (TeX-argument-prompt t nil "Language(s)")
+         (LaTeX-babel-active-languages)) ""]
       t nil)
     '("aliasshorthand"   "Original" "Alias")
     '("languageshorthands" TeX-arg-babel-lang)
@@ -299,32 +299,32 @@
     ;; 1.12 The base option
     '("AfterBabelLanguage"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Language")
-                   LaTeX-babel-language-list)
+                    (TeX-argument-prompt nil nil "Language")
+                    LaTeX-babel-language-list)
       t)
 
     ;; 1.14 Selecting fonts
     '("babelfont"
       [ TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt t nil "Language(s)")
-                     LaTeX-babel-language-list)
-                    "," ]
+        (TeX-completing-read-multiple
+         (TeX-argument-prompt t nil "Language(s)")
+         LaTeX-babel-language-list)
+        "," ]
       (TeX-arg-eval let ((fontfam (completing-read
-                                  (TeX-argument-prompt nil nil "font family")
-                                  '("rm" "sf" "tt"))))
-                   ;; Make sure `tex-buf.el' is also loaded otherwise
-                   ;; `TeX-check-engine-add-engines' is not defined.
-                   ;; Then load `fontspec.el' and make sure the
-                   ;; key-vals are up to date.
-                   (unless (member "fontspec" (TeX-style-list))
-                     (require 'tex-buf)
-                     (TeX-check-engine-add-engines 'luatex 'xetex)
-                     (TeX-run-style-hooks "fontspec")
-                     (LaTeX-fontspec-auto-cleanup))
-                   (LaTeX-add-babel-babelfonts fontfam)
-                   (LaTeX-babel-cleanup-babelfont)
-                   (format "%s" fontfam))
+                                   (TeX-argument-prompt nil nil "font family")
+                                   '("rm" "sf" "tt"))))
+                    ;; Make sure `tex-buf.el' is also loaded otherwise
+                    ;; `TeX-check-engine-add-engines' is not defined.
+                    ;; Then load `fontspec.el' and make sure the
+                    ;; key-vals are up to date.
+                    (unless (member "fontspec" (TeX-style-list))
+                      (require 'tex-buf)
+                      (TeX-check-engine-add-engines 'luatex 'xetex)
+                      (TeX-run-style-hooks "fontspec")
+                      (LaTeX-fontspec-auto-cleanup))
+                    (LaTeX-add-babel-babelfonts fontfam)
+                    (LaTeX-babel-cleanup-babelfont)
+                    (format "%s" fontfam))
       [ TeX-arg-key-val LaTeX-fontspec-font-features-local]
       LaTeX-fontspec-arg-font)
 
@@ -332,8 +332,8 @@
     '("babelprovide"
       [ TeX-arg-key-val LaTeX-babel-babelprovide-key-val-options ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Language")
-                   LaTeX-babel-language-list))
+                    (TeX-argument-prompt nil nil "Language")
+                    LaTeX-babel-language-list))
 
     ;; 1.18 Getting the current language name
     '("languagename" 0)
@@ -342,19 +342,19 @@
     ;; 1.19 Hyphenation and line breaking
     '("babelhyphen"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Type/Text")
-                   '("soft" "hard" "repeat" "empty")))
+                    (TeX-argument-prompt nil nil "Type/Text")
+                    '("soft" "hard" "repeat" "empty")))
     '("babelhyphen*"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Type/Text")
-                   '("soft" "hard" "repeat" "empty")))
+                    (TeX-argument-prompt nil nil "Type/Text")
+                    '("soft" "hard" "repeat" "empty")))
 
     '("babelhyphenation"
       [ TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt nil nil "Language(s)")
-                     LaTeX-babel-language-list)
-                    "," ]
+        (TeX-completing-read-multiple
+         (TeX-argument-prompt nil nil "Language(s)")
+         LaTeX-babel-language-list)
+        "," ]
       t)
 
     ;; 1.20 Selecting scripts
@@ -371,29 +371,29 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("selectlanguage"     "{")
-                               ("foreignlanguage"    "{{")
-                               ("babeltags"          "{")
-                               ("babelensure"        "{{")
-                               ("shorthandon"        "{")
-                               ("shorthandoff"       "*{")
-                               ("useshorthands"      "*{")
-                               ("languageshorthands" "{")
-                               ("babelshorthand"     "{")
-                               ("AfterBabelLanguage" "{")
-                               ("babelfont"          "[{[{")
-                               ("babelprovide"       "[{")
-                               ("languagename"       "")
-                               ("iflanguage"         "{{{")
-                               ("babelhyphen"        "*{")
-                               ("babelhyphenation"   "[{")
-                               ("ensureascii"        "{"))
-                             'function)
+                                ("foreignlanguage"    "{{")
+                                ("babeltags"          "{")
+                                ("babelensure"        "{{")
+                                ("shorthandon"        "{")
+                                ("shorthandoff"       "*{")
+                                ("useshorthands"      "*{")
+                                ("languageshorthands" "{")
+                                ("babelshorthand"     "{")
+                                ("AfterBabelLanguage" "{")
+                                ("babelfont"          "[{[{")
+                                ("babelprovide"       "[{")
+                                ("languagename"       "")
+                                ("iflanguage"         "{{{")
+                                ("babelhyphen"        "*{")
+                                ("babelhyphenation"   "[{")
+                                ("ensureascii"        "{"))
+                              'function)
      (font-latex-add-keywords '(("defineshorthand"    "[{{")
-                               ("aliasshorthand"     "{{")
-                               ("languageattribute"  "{{"))
-                             'variable)))
+                                ("aliasshorthand"     "{{")
+                                ("languageattribute"  "{{"))
+                              'variable)))
  TeX-dialect)
 
 (defun LaTeX-babel-package-options ()
@@ -417,13 +417,13 @@
       ("nocase")
       ("silent")
       ("strings" ("generic" "unicode" "encoded"
-                 "OT1" "OT2" "OT3" "OT4" "OT6"
-                 "T1"  "T2A" "T2B" "T2C" "T3" "T4" "T5"
-                 "X2"  "LY1" "LV1" "LGR"))
+                  "OT1" "OT2" "OT3" "OT4" "OT6"
+                  "T1"  "T2A" "T2B" "T2C" "T3" "T4" "T5"
+                  "X2"  "LY1" "LV1" "LGR"))
       ("hyphenmap" ("off" "main" "select" "other" "other*"))
       ("bidi" ("default" "basic" "basic-r" "bidi-l" "bidi-r"))
       ("layout" ("sectioning" "counters" "lists" "captions"
-                "contents" "footnotes" "columns" "extras"))
+                 "contents" "footnotes" "columns" "extras"))
       ("base"))
     (mapcar #'list LaTeX-babel-language-list))))
 
diff --git a/style/baskervaldx.el b/style/baskervaldx.el
index ed347d9..dce6c5f 100644
--- a/style/baskervaldx.el
+++ b/style/baskervaldx.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "baskervaldx"
@@ -66,21 +66,21 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textlf"    "{")
-                               ("texttlf"   "{")
-                               ("textosf"   "{")
-                               ("texttosf"  "{")
-                               ("textsu"    "{"))
-                             'type-command)
+                                ("texttlf"   "{")
+                                ("textosf"   "{")
+                                ("texttosf"  "{")
+                                ("textsu"    "{"))
+                              'type-command)
      (font-latex-add-keywords '(("lfstyle"   "")
-                               ("tlfstyle"  "")
-                               ("osfstyle"  "")
-                               ("tosfstyle" "")
-                               ("sufigures" ""))
-                             'type-declaration)
+                                ("tlfstyle"  "")
+                                ("osfstyle"  "")
+                                ("tosfstyle" "")
+                                ("sufigures" ""))
+                              'type-declaration)
      (font-latex-add-keywords '(("swshape"   ""))
-                             'bold-declaration)))
+                              'bold-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-baskervaldx-package-options
diff --git a/style/beamer.el b/style/beamer.el
index d84d275..ea9ed4e 100644
--- a/style/beamer.el
+++ b/style/beamer.el
@@ -34,30 +34,30 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defun LaTeX-beamer-after-insert-env (env start _end)
   "Do beamer-specific stuff after the insertion of an environment."
   ;; Add `fragile' as an optional argument to the frame environment if
   ;; a verbatim environment is inserted.
   (when (and (TeX-member env (LaTeX-verbatim-environments) 'string-equal)
-            (save-excursion
-              (goto-char start)
-              (string-equal (LaTeX-current-environment) "frame")))
+             (save-excursion
+               (goto-char start)
+               (string-equal (LaTeX-current-environment) "frame")))
     (save-excursion
       (when (re-search-backward "\\\\begin[ \t]*{frame}" nil t)
-       (let ((end-of-begin (match-end 0)))
-         (goto-char end-of-begin)
-         (while (forward-comment 1))
-         (if (eq (char-after) (string-to-char LaTeX-optop))
-             (progn
-               (forward-char)
-               (insert "fragile")
-               (unless (looking-at (concat "[ \t]*" LaTeX-optcl))
-                 (insert ",")))
-           (goto-char end-of-begin)
-           (insert "[fragile]")))))))
+        (let ((end-of-begin (match-end 0)))
+          (goto-char end-of-begin)
+          (while (forward-comment 1))
+          (if (eq (char-after) (string-to-char LaTeX-optop))
+              (progn
+                (forward-char)
+                (insert "fragile")
+                (unless (looking-at (concat "[ \t]*" LaTeX-optcl))
+                  (insert ",")))
+            (goto-char end-of-begin)
+            (insert "[fragile]")))))))
 
 (defvar LaTeX-beamer-frametitle-history nil
   "History of frame titles in beamer.")
@@ -68,19 +68,19 @@
    (add-hook 'LaTeX-after-insert-env-hook 'LaTeX-beamer-after-insert-env nil t)
 
    (TeX-run-style-hooks "amsmath" "amssymb" "amsthm" "color" "geometry"
-                       "hyperref" "inputenc" "translator" "xcolor")
+                        "hyperref" "inputenc" "translator" "xcolor")
 
    (unless LaTeX-beamer-section-labels-flag
      (make-local-variable 'LaTeX-section-hook)
      (setq LaTeX-section-hook
-          '(LaTeX-section-heading
-            LaTeX-section-title
-            LaTeX-section-section)))
+           '(LaTeX-section-heading
+             LaTeX-section-title
+             LaTeX-section-section)))
 
    (setq LaTeX-item-list
-        (append '(("itemize" . LaTeX-item-beamer)
-                  ("enumerate" . LaTeX-item-beamer))
-                LaTeX-item-list))
+         (append '(("itemize" . LaTeX-item-beamer)
+                   ("enumerate" . LaTeX-item-beamer))
+                 LaTeX-item-list))
 
    (setq LaTeX-default-document-environment "frame")
 
@@ -137,58 +137,58 @@
     '("alertblock" 1)
     '("beamerboxesrounded" 1)
     '("block" (lambda (env &rest ignore)
-               (LaTeX-insert-environment
-                env (format "{%s}" (TeX-read-string "Title: ")))))
+                (LaTeX-insert-environment
+                 env (format "{%s}" (TeX-read-string "Title: ")))))
     '("column" "Width")
     "columns"
     "columnsonlytextwidth"
     '("exampleblock" 1)
     '("frame"  (lambda (env &rest ignore)
-                (let ((title (TeX-read-string "(Optional) Title: " nil
-                                              
'LaTeX-beamer-frametitle-history)))
-                  (LaTeX-insert-environment env)
-                  (unless (zerop (length title))
-                    (save-excursion
-                      (LaTeX-find-matching-begin)
-                      (end-of-line)
-                      (LaTeX-newline)
-                      (insert (format "\\frametitle{%s}" title))
-                      ;; This works because \frametitle is a
-                      ;; paragraph command.
-                      (backward-char)
-                      (LaTeX-fill-paragraph))))))
+                 (let ((title (TeX-read-string "(Optional) Title: " nil
+                                               
'LaTeX-beamer-frametitle-history)))
+                   (LaTeX-insert-environment env)
+                   (unless (zerop (length title))
+                     (save-excursion
+                       (LaTeX-find-matching-begin)
+                       (end-of-line)
+                       (LaTeX-newline)
+                       (insert (format "\\frametitle{%s}" title))
+                       ;; This works because \frametitle is a
+                       ;; paragraph command.
+                       (backward-char)
+                       (LaTeX-fill-paragraph))))))
     '("onlyenv" (lambda (env &rest ignore)
-                 (LaTeX-insert-environment
-                  env
-                  (let ((overlay (TeX-read-string "(Optional) Overlay: ")))
-                    (unless (zerop (length overlay))
-                      (format "<%s>" overlay))))))
+                  (LaTeX-insert-environment
+                   env
+                   (let ((overlay (TeX-read-string "(Optional) Overlay: ")))
+                     (unless (zerop (length overlay))
+                       (format "<%s>" overlay))))))
     '("overlayarea" "Area width" "Area height")
     '("overprint"  (lambda (env &rest ignore)
-                    (LaTeX-insert-environment
-                     env
-                     (let ((width (TeX-read-string "(Optional) Area width: ")))
-                       (unless (zerop (length width))
-                         (format "[%s]" width))))))
+                     (LaTeX-insert-environment
+                      env
+                      (let ((width (TeX-read-string "(Optional) Area width: 
")))
+                        (unless (zerop (length width))
+                          (format "[%s]" width))))))
     "semiverbatim")
 
    (LaTeX-largest-level-set "section")
    (LaTeX-add-counters "lecture" "part" "section" "subsection" "subsubsection"
-                      "subsectionslide" "framenumber" "figure" "table"
-                      "beamerpauses")
+                       "subsectionslide" "framenumber" "figure" "table"
+                       "beamerpauses")
    (LaTeX-add-pagestyles "navigation")
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("semiverbatim" current-indentation) t)
+                '("semiverbatim" current-indentation) t)
    (add-to-list 'LaTeX-verbatim-environments-local "semiverbatim")
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("title" "[{")
-                               ("subtitle" "[{")
-                               ("author" "[{")
-                               ("date" "[{")
-                               ("frametitle" "<[{")) 'slide-title)))
+                                ("subtitle" "[{")
+                                ("author" "[{")
+                                ("date" "[{")
+                                ("frametitle" "<[{")) 'slide-title)))
  TeX-dialect)
 
 (defun TeX-arg-beamer-overlay-spec (optional &optional prompt)
@@ -209,7 +209,7 @@ one."
   (let ((title (TeX-read-string "Title: " nil 
'LaTeX-beamer-frametitle-history)))
     (if (not (zerop (length title)))
         (insert TeX-grop TeX-esc "frametitle" TeX-grop
-               title TeX-grcl TeX-grcl)
+                title TeX-grcl TeX-grcl)
       (insert TeX-grop TeX-grcl))))
 
 (defun LaTeX-item-beamer ()
@@ -244,25 +244,25 @@ The function removes the first LENGTH characters and the
 extension of the file and returns a list of strings.  LENGTH may
 also be a string.  Then the length of the string is used."
   (let* ((match (or regexp "^beamertheme[A-Z]"))
-        (exts  (or extensions '("tex" "sty")))
-        (chars (cond ((integerp length)
-                      length)
-                     ((stringp length)
-                      (string-width length))
-                     ;; Try some DWIM magic...
-                     ((and (not length)
-                           (string-match "beamer[A-Za-z0-9]*theme" match))
-                      (- (match-end 0) (match-beginning 0)))
-                     (t (error "Invalid length: `%s'" length)))))
+         (exts  (or extensions '("tex" "sty")))
+         (chars (cond ((integerp length)
+                       length)
+                      ((stringp length)
+                       (string-width length))
+                      ;; Try some DWIM magic...
+                      ((and (not length)
+                            (string-match "beamer[A-Za-z0-9]*theme" match))
+                       (- (match-end 0) (match-beginning 0)))
+                      (t (error "Invalid length: `%s'" length)))))
     ;; (message "match=`%s' chars=`%s'" match chars)
     (TeX-delete-duplicate-strings
      (delete nil
-            (mapcar
-             (lambda (file)
-               (let ((case-fold-search nil))
-                 (and (numberp (string-match match file))
-                      (substring file chars))))
-             (TeX-search-files nil exts t t))))))
+             (mapcar
+              (lambda (file)
+                (let ((case-fold-search nil))
+                  (and (numberp (string-match match file))
+                       (substring file chars))))
+              (TeX-search-files nil exts t t))))))
 
 (defun LaTeX-arg-beamer-theme (&rest _ignore)
   "Prompt for beamer theme with completion."
@@ -270,16 +270,16 @@ also be a string.  Then the length of the string is used."
    (completing-read
     (TeX-argument-prompt nil nil "Theme")
     (mapcar 'list
-           (cond ((eq LaTeX-beamer-themes 'local)
-                  (set (make-local-variable 'LaTeX-beamer-themes)
-                       (LaTeX-beamer-search-themes)))
-                 ((functionp LaTeX-beamer-themes)
-                  (funcall LaTeX-beamer-themes))
-                 ((listp LaTeX-beamer-themes)
-                  LaTeX-beamer-themes)
-                 (t (error
-                     "`LaTeX-beamer-themes' should be a list: `%s'"
-                     LaTeX-beamer-themes))))
+            (cond ((eq LaTeX-beamer-themes 'local)
+                   (set (make-local-variable 'LaTeX-beamer-themes)
+                        (LaTeX-beamer-search-themes)))
+                  ((functionp LaTeX-beamer-themes)
+                   (funcall LaTeX-beamer-themes))
+                  ((listp LaTeX-beamer-themes)
+                   LaTeX-beamer-themes)
+                  (t (error
+                      "`LaTeX-beamer-themes' should be a list: `%s'"
+                      LaTeX-beamer-themes))))
     nil nil nil)
    t))
 
@@ -289,16 +289,16 @@ also be a string.  Then the length of the string is used."
    (completing-read
     (TeX-argument-prompt nil nil "Theme")
     (mapcar 'list
-           (cond ((eq LaTeX-beamer-inner-themes 'local)
-                  (set (make-local-variable 'LaTeX-beamer-inner-themes)
-                       (LaTeX-beamer-search-themes "^beamerinnertheme")))
-                 ((functionp LaTeX-beamer-inner-themes)
-                  (funcall LaTeX-beamer-inner-themes))
-                 ((listp LaTeX-beamer-inner-themes)
-                  LaTeX-beamer-inner-themes)
-                 (t (error
-                     "`LaTeX-beamer-inner-themes' should be a list: `%s'"
-                     LaTeX-beamer-inner-themes))))
+            (cond ((eq LaTeX-beamer-inner-themes 'local)
+                   (set (make-local-variable 'LaTeX-beamer-inner-themes)
+                        (LaTeX-beamer-search-themes "^beamerinnertheme")))
+                  ((functionp LaTeX-beamer-inner-themes)
+                   (funcall LaTeX-beamer-inner-themes))
+                  ((listp LaTeX-beamer-inner-themes)
+                   LaTeX-beamer-inner-themes)
+                  (t (error
+                      "`LaTeX-beamer-inner-themes' should be a list: `%s'"
+                      LaTeX-beamer-inner-themes))))
     nil nil nil)
    t))
 
@@ -308,16 +308,16 @@ also be a string.  Then the length of the string is used."
    (completing-read
     (TeX-argument-prompt nil nil "Theme")
     (mapcar 'list
-           (cond ((eq LaTeX-beamer-outer-themes 'local)
-                  (set (make-local-variable 'LaTeX-beamer-outer-themes)
-                       (LaTeX-beamer-search-themes "^beameroutertheme")))
-                 ((functionp LaTeX-beamer-outer-themes)
-                  (funcall LaTeX-beamer-outer-themes))
-                 ((listp LaTeX-beamer-outer-themes)
-                  LaTeX-beamer-outer-themes)
-                 (t (error
-                     "`LaTeX-beamer-outer-themes' should be a list: `%s'"
-                     LaTeX-beamer-outer-themes))))
+            (cond ((eq LaTeX-beamer-outer-themes 'local)
+                   (set (make-local-variable 'LaTeX-beamer-outer-themes)
+                        (LaTeX-beamer-search-themes "^beameroutertheme")))
+                  ((functionp LaTeX-beamer-outer-themes)
+                   (funcall LaTeX-beamer-outer-themes))
+                  ((listp LaTeX-beamer-outer-themes)
+                   LaTeX-beamer-outer-themes)
+                  (t (error
+                      "`LaTeX-beamer-outer-themes' should be a list: `%s'"
+                      LaTeX-beamer-outer-themes))))
     nil nil nil)
    t))
 
@@ -327,16 +327,16 @@ also be a string.  Then the length of the string is used."
    (completing-read
     (TeX-argument-prompt nil nil "Theme")
     (mapcar 'list
-           (cond ((eq LaTeX-beamer-color-themes 'local)
-                  (set (make-local-variable 'LaTeX-beamer-color-themes)
-                       (LaTeX-beamer-search-themes "^beamercolortheme")))
-                 ((functionp LaTeX-beamer-color-themes)
-                  (funcall LaTeX-beamer-color-themes))
-                 ((listp LaTeX-beamer-color-themes)
-                  LaTeX-beamer-color-themes)
-                 (t (error
-                     "`LaTeX-beamer-color-themes' should be a list: `%s'"
-                     LaTeX-beamer-color-themes))))
+            (cond ((eq LaTeX-beamer-color-themes 'local)
+                   (set (make-local-variable 'LaTeX-beamer-color-themes)
+                        (LaTeX-beamer-search-themes "^beamercolortheme")))
+                  ((functionp LaTeX-beamer-color-themes)
+                   (funcall LaTeX-beamer-color-themes))
+                  ((listp LaTeX-beamer-color-themes)
+                   LaTeX-beamer-color-themes)
+                  (t (error
+                      "`LaTeX-beamer-color-themes' should be a list: `%s'"
+                      LaTeX-beamer-color-themes))))
     nil nil nil)
    t))
 
@@ -346,16 +346,16 @@ also be a string.  Then the length of the string is used."
    (completing-read
     (TeX-argument-prompt nil nil "Theme")
     (mapcar 'list
-           (cond ((eq LaTeX-beamer-font-themes 'local)
-                  (set (make-local-variable 'LaTeX-beamer-font-themes)
-                       (LaTeX-beamer-search-themes "^beamerfonttheme")))
-                 ((functionp LaTeX-beamer-font-themes)
-                  (funcall LaTeX-beamer-font-themes))
-                 ((listp LaTeX-beamer-font-themes)
-                  LaTeX-beamer-font-themes)
-                 (t (error
-                     "`LaTeX-beamer-font-themes' should be a list: `%s'"
-                     LaTeX-beamer-font-themes))))
+            (cond ((eq LaTeX-beamer-font-themes 'local)
+                   (set (make-local-variable 'LaTeX-beamer-font-themes)
+                        (LaTeX-beamer-search-themes "^beamerfonttheme")))
+                  ((functionp LaTeX-beamer-font-themes)
+                   (funcall LaTeX-beamer-font-themes))
+                  ((listp LaTeX-beamer-font-themes)
+                   LaTeX-beamer-font-themes)
+                  (t (error
+                      "`LaTeX-beamer-font-themes' should be a list: `%s'"
+                      LaTeX-beamer-font-themes))))
     nil nil nil)
    t))
 
@@ -363,15 +363,15 @@ also be a string.  Then the length of the string is used."
   "Read the beamer class options from the user."
   (TeX-load-style "hyperref")
   (TeX-read-key-val t '(("usepdftitle" ("false")) ("envcountsect")
-                       ("notheorems") ("noamsthm") ("compress") ("t") ("c")
-                       ("leqno") ("fleqn") ("handout") ("trans") ("pdftex")
-                       ("nativepdf") ("pdfmark") ("dvips") ("dviwindo")
-                       ("dvipsone") ("vtex") ("ps2pdf") ("ignorenonframetext")
-                       ("noamssymb") ("bigger") ("smaller") ("8pt") ("9pt")
-                       ("10pt") ("11pt") ("12pt") ("14pt") ("17pt") ("20pt")
-                       ("draft") ("CJK") ("cjk") ("pgf")
-                       ("hyperref" LaTeX-hyperref-package-options-list)
-                       ("color") ("xcolor") ("ucs") ("utf8x") ("utf8")
-                       ("aspectratio" ("1610" "169" "149" "54" "43" "32")))))
+                        ("notheorems") ("noamsthm") ("compress") ("t") ("c")
+                        ("leqno") ("fleqn") ("handout") ("trans") ("pdftex")
+                        ("nativepdf") ("pdfmark") ("dvips") ("dviwindo")
+                        ("dvipsone") ("vtex") ("ps2pdf") ("ignorenonframetext")
+                        ("noamssymb") ("bigger") ("smaller") ("8pt") ("9pt")
+                        ("10pt") ("11pt") ("12pt") ("14pt") ("17pt") ("20pt")
+                        ("draft") ("CJK") ("cjk") ("pgf")
+                        ("hyperref" LaTeX-hyperref-package-options-list)
+                        ("color") ("xcolor") ("ucs") ("utf8x") ("utf8")
+                        ("aspectratio" ("1610" "169" "149" "54" "43" "32")))))
 
 ;;; beamer.el ends here
diff --git a/style/biblatex.el b/style/biblatex.el
index e1e803d..10e76ec 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar reftex-cite-format-builtin)
 
@@ -76,7 +76,7 @@
     ("autocite" ("plain" "inline" "footnote" "superscript"))
     ("autopunct" ("true" "false"))
     ("language" (append LaTeX-biblatex-language-list
-                       '("autobib" "autocite" "auto")))
+                        '("autobib" "autocite" "auto")))
     ("clearlang" ("true" "false"))
     ("autolang" ("none" "hyphen" "other" "other*" "langname"))
     ("block" ("none" "space" "par" "nbpar" "ragged"))
@@ -85,7 +85,7 @@
     ("backref" ("true" "false"))
     ("backrefstyle" ("none" "three" "two" "two+" "three+" "all+"))
     ("backrefsetstyle" ("setonly" "memonly" "setormem" "setandmem" "memandset"
-                       "setplusmem"))
+                        "setplusmem"))
     ("indexing" ("true" "false" "cite" "bib"))
     ("loadfiles" ("true" "false"))
     ("refsection" ("none" "part" "chapter" "section" "subsection"))
@@ -135,7 +135,7 @@
     ("labeldate" ("true" "false"))
     ("singletitle" ("true" "false"))
     ("uniquename" ("true" "false" "init" "full" "allinit" "allfull" "mininit"
-                  "minfull"))
+                   "minfull"))
     ("uniquelist" ("true" "false" "minyear")))
   "Key=value options for ExecuteBibliographyOptions macro of the biblatex 
package.")
 
@@ -161,22 +161,22 @@ argument, otherwise as a mandatory one.  Use PROMPT as 
the prompt
 string."
   (let (files inputs database)
     (if LaTeX-using-Biber
-       (setq files 'TeX-Biber-global-files
-             inputs 'biberinputs)
+        (setq files 'TeX-Biber-global-files
+              inputs 'biberinputs)
       (setq files 'BibTeX-global-files
-           inputs 'bibinputs))
+            inputs 'bibinputs))
     (setq files 'TeX-Biber-global-files
-         inputs 'biberinputs)
+          inputs 'biberinputs)
     (message "Searching for BibLaTeX files...")
     (or (symbol-value files)
-       (set files (mapcar 'list (TeX-search-files-by-type
-                                 'biberinputs 'global t nil))))
+        (set files (mapcar 'list (TeX-search-files-by-type
+                                  'biberinputs 'global t nil))))
     (message "Searching for BibLaTeX files...done")
     (setq database (completing-read
-                   (TeX-argument-prompt optional prompt "BibLaTeX files")
-                   (append (mapcar 'list (TeX-search-files-by-type
-                                          inputs 'local t nil))
-                           (symbol-value files))))
+                    (TeX-argument-prompt optional prompt "BibLaTeX files")
+                    (append (mapcar 'list (TeX-search-files-by-type
+                                           inputs 'local t nil))
+                            (symbol-value files))))
     (LaTeX-add-bibliographies database)
     ;; Run style file associated to the bibliography database file in order to
     ;; immediately fill `LaTeX-bibitem-list'.  We need to strip the extension
@@ -194,59 +194,59 @@ for citation keys."
   ;; Prompt for global prenote and postnote.
   (and TeX-arg-cite-note-p (not current-prefix-arg)
        (let ((TeX-arg-opening-brace "(")
-            (TeX-arg-closing-brace ")")
-            (prenote (TeX-read-string
-                      (TeX-argument-prompt t nil "Global prenote"))))
-        (TeX-argument-insert prenote t)
-        ;; If the prenote is empty the postnote is optional, otherwise it's
-        ;; mandatory.
-        (TeX-argument-insert
-         (TeX-read-string (TeX-argument-prompt t nil "Global postnote"))
-         (equal prenote ""))))
+             (TeX-arg-closing-brace ")")
+             (prenote (TeX-read-string
+                       (TeX-argument-prompt t nil "Global prenote"))))
+         (TeX-argument-insert prenote t)
+         ;; If the prenote is empty the postnote is optional, otherwise it's
+         ;; mandatory.
+         (TeX-argument-insert
+          (TeX-read-string (TeX-argument-prompt t nil "Global postnote"))
+          (equal prenote ""))))
   (let ((items t) (noinsert nil))
     (while items
       ;; Prompt for prenote and postnote of the current keys.
       (and TeX-arg-cite-note-p (not current-prefix-arg)
-          (let ((TeX-arg-opening-brace "[")
-                (TeX-arg-closing-brace "]")
-                (prenote (TeX-read-string
-                          (TeX-argument-prompt t nil "Prenote"))))
-            (TeX-argument-insert prenote t)
-            ;; If the prenote is empty the postnote is optional, otherwise it's
-            ;; mandatory.
-            (TeX-argument-insert
-             (TeX-read-string (TeX-argument-prompt t nil "Postnote"))
-             (equal prenote ""))))
+           (let ((TeX-arg-opening-brace "[")
+                 (TeX-arg-closing-brace "]")
+                 (prenote (TeX-read-string
+                           (TeX-argument-prompt t nil "Prenote"))))
+             (TeX-argument-insert prenote t)
+             ;; If the prenote is empty the postnote is optional, otherwise 
it's
+             ;; mandatory.
+             (TeX-argument-insert
+              (TeX-read-string (TeX-argument-prompt t nil "Postnote"))
+              (equal prenote ""))))
       (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))))
+                           (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.
       (unless (and (not items) noinsert)
-       (TeX-argument-insert (mapconcat 'identity items ",") optional))
+        (TeX-argument-insert (mapconcat 'identity items ",") optional))
       (setq noinsert t))))
 
 (defun LaTeX-arg-biblatex-natbib-notes (optional)
   "Prompt for two note arguments of a natbib compat citation command."
   (when TeX-arg-cite-note-p
       (let ((pre (TeX-read-string
-                 (TeX-argument-prompt optional nil "Prenote")))
-           (post (TeX-read-string
-                  (TeX-argument-prompt optional nil "Postnote"))))
-       (TeX-argument-insert pre optional)
-       (TeX-argument-insert post optional)
-       ;; pre is given, post is empty: Make sure that we insert an
-       ;; extra pair of `[]', otherwise pre becomes post
-       (when (and pre (not (string= pre ""))
-                  (string= post ""))
-         (insert LaTeX-optop LaTeX-optcl)))))
+                  (TeX-argument-prompt optional nil "Prenote")))
+            (post (TeX-read-string
+                   (TeX-argument-prompt optional nil "Postnote"))))
+        (TeX-argument-insert pre optional)
+        (TeX-argument-insert post optional)
+        ;; pre is given, post is empty: Make sure that we insert an
+        ;; extra pair of `[]', otherwise pre becomes post
+        (when (and pre (not (string= pre ""))
+                   (string= post ""))
+          (insert LaTeX-optop LaTeX-optcl)))))
 
 (TeX-add-style-hook
  "biblatex"
@@ -256,14 +256,14 @@ for citation keys."
    ;; the backend can be overridden by setting `LaTeX-biblatex-use-Biber' as a
    ;; local variable.
    (setq LaTeX-using-Biber
-        (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
-            LaTeX-biblatex-use-Biber
-          (not (or (LaTeX-provided-package-options-member
-                    "biblatex" "backend=bibtex")
-                   (LaTeX-provided-package-options-member
-                    "biblatex" "backend=bibtex8")
-                   (LaTeX-provided-package-options-member
-                    "biblatex" "backend=bibtexu")))))
+         (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
+             LaTeX-biblatex-use-Biber
+           (not (or (LaTeX-provided-package-options-member
+                     "biblatex" "backend=bibtex")
+                    (LaTeX-provided-package-options-member
+                     "biblatex" "backend=bibtex8")
+                    (LaTeX-provided-package-options-member
+                     "biblatex" "backend=bibtexu")))))
 
    (TeX-run-style-hooks
     "etoolbox"
@@ -277,8 +277,8 @@ for citation keys."
     ;; Setting Package Options
     '("ExecuteBibliographyOptions"
       [TeX-arg-eval  mapconcat 'identity
-                    (TeX-completing-read-multiple
-                     "Entry type: " LaTeX-biblatex-entrytype) ","]
+                     (TeX-completing-read-multiple
+                      "Entry type: " LaTeX-biblatex-entrytype) ","]
       (TeX-arg-key-val LaTeX-biblatex-executebibliographyoptions-options))
     ;;; Bibliography Commands
     ;; Resources
@@ -291,11 +291,11 @@ for citation keys."
     ;; The Bibliography
     '("printbibliography"
       [TeX-arg-key-val (("env") ("heading") ("title") ("prenote") ("postnote")
-                       ("section") ("segment") ("sorting") ("type") ("nottype")
-                       ("subtype") ("notsubtype") ("keyword") ("notkeyword")
-                       ("categoy") ("notcategory") ("filter") ("check")
-                       ("prefixnumbers") ("resetnumbers" ("true" "false"))
-                       ("omitnumbers" ("true" "false")))])
+                        ("section") ("segment") ("sorting") ("type") 
("nottype")
+                        ("subtype") ("notsubtype") ("keyword") ("notkeyword")
+                        ("categoy") ("notcategory") ("filter") ("check")
+                        ("prefixnumbers") ("resetnumbers" ("true" "false"))
+                        ("omitnumbers" ("true" "false")))])
     '("bibbysection"
       [TeX-arg-key-val (("env") ("heading") ("prenote") ("postnote"))])
     '("bibbysegment"
@@ -307,9 +307,9 @@ for citation keys."
     ;; The List of Shorthands
     '("printshorthands"
       [TeX-arg-key-val (("env") ("heading") ("title") ("prenote") ("postnote")
-                       ("section") ("segment") ("sorting") ("type") ("nottype")
-                       ("subtype") ("notsubtype") ("keyword") ("notkeyword")
-                       ("categoy") ("notcategory") ("filter") ("check"))])
+                        ("section") ("segment") ("sorting") ("type") 
("nottype")
+                        ("subtype") ("notsubtype") ("keyword") ("notkeyword")
+                        ("categoy") ("notcategory") ("filter") ("check"))])
     ;; Bibliography Sections
     '("newrefsection" ["Resources"])
     "endrefsection"
@@ -330,35 +330,35 @@ for citation keys."
     ;; Dynamic Entry Sets
     '("defbibentryset" "Set"
       (TeX-arg-eval mapconcat 'identity (TeX-completing-read-multiple
-                                        "Keys: " (LaTeX-bibitem-list)) ","))
+                                         "Keys: " (LaTeX-bibitem-list)) ","))
     ;;; Citation Commands
     '("cite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                 (["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
+                                  (["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
     '("Cite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                 (["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
+                                  (["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
     '("parencite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Parencite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("footcite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("footcitetext" (TeX-arg-conditional TeX-arg-cite-note-p
-                                         (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                          (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     ;; Style-specific Commands
     '("textcite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Textcite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("smartcite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Smartcite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("cite*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                  (["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
+                                   (["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
     '("parencite*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("supercite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     ;; Qualified Citation Lists
     '("cites" LaTeX-arg-biblatex-cites)
     '("Cites" LaTeX-arg-biblatex-cites)
@@ -373,45 +373,45 @@ for citation keys."
     '("supercites" LaTeX-arg-biblatex-cites)
     ;; Style-independent Commands
     '("autocite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Autocite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("autocite*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Autocite*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("autocites" LaTeX-arg-biblatex-cites)
     '("Autocites" LaTeX-arg-biblatex-cites)
     ;; Text Commands
     '("citeauthor" (TeX-arg-conditional TeX-arg-cite-note-p
-                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Citeauthor" (TeX-arg-conditional TeX-arg-cite-note-p
-                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citeauthor*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                         (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Citeauthor*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                         (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citetitle" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citetitle*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                        (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citeyear" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citeyear*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citedate" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citedate*" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("citeurl" (TeX-arg-conditional TeX-arg-cite-note-p
-                                    (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("parentext" "Text")
     '("brackettext" "Text")
     ;; Special Commands
     '("fullcite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("footfullcite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                         (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                          (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("volcite"
       (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
       (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
@@ -449,15 +449,15 @@ for citation keys."
       (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
       (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
     '("notecite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Notecite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                     (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("pnotecite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("Pnotecite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     '("fnotecite" (TeX-arg-conditional TeX-arg-cite-note-p
-                                      (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
+                                       (["Prenote"] ["Postnote"]) ()) 
TeX-arg-cite)
     ;; Low-level Commands
     '("citename"
       (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"] ["Postnote"]) ())
@@ -495,49 +495,49 @@ for citation keys."
 
    ;; § 3.8.9 natbib Compatibility Commands
    (when (or (LaTeX-provided-package-options-member "biblatex" "natbib")
-            (LaTeX-provided-package-options-member "biblatex" "natbib=true"))
+             (LaTeX-provided-package-options-member "biblatex" "natbib=true"))
      (let ((cmds '(("citet" . 1) ("citet*" . 1)
-                  ("Citet" . 1) ("Citet*" . 1)
-                  ("citep" . 2) ("citep*" . 2)
-                  ("Citep" . 2) ("Citep*" . 2)
-                  ("citealt" . 1) ("citealt*" . 1)
-                  ("Citealt" . 1) ("Citealt*" . 1)
-                  ("citealp" . 2) ("citealp*" . 2)
-                  ("Citealp" . 2) ("Citealp*" . 2))))
+                   ("Citet" . 1) ("Citet*" . 1)
+                   ("citep" . 2) ("citep*" . 2)
+                   ("Citep" . 2) ("Citep*" . 2)
+                   ("citealt" . 1) ("citealt*" . 1)
+                   ("Citealt" . 1) ("Citealt*" . 1)
+                   ("citealp" . 2) ("citealp*" . 2)
+                   ("Citealp" . 2) ("Citealp*" . 2))))
        ;; Taken from natbib.el:
        (apply
-       #'TeX-add-symbols
-       (mapcar
-        (lambda (cmd)
-          (cond
-           ((= (cdr cmd) 1)
-            ;; Just one optional argument, the post note
-            (list
-             (car cmd)
-             '(TeX-arg-conditional TeX-arg-cite-note-p (["Postnote"]) nil)
-             'TeX-arg-cite))
-           ((= (cdr cmd) 2)
-            ;; Pre and post notes
-            (list
-             (car cmd)
-             '(TeX-arg-conditional TeX-arg-cite-note-p
-                                   ([LaTeX-arg-biblatex-natbib-notes])
-                                 nil)
-             'TeX-arg-cite))))
-        cmds))
+        #'TeX-add-symbols
+        (mapcar
+         (lambda (cmd)
+           (cond
+            ((= (cdr cmd) 1)
+             ;; Just one optional argument, the post note
+             (list
+              (car cmd)
+              '(TeX-arg-conditional TeX-arg-cite-note-p (["Postnote"]) nil)
+              'TeX-arg-cite))
+            ((= (cdr cmd) 2)
+             ;; Pre and post notes
+             (list
+              (car cmd)
+              '(TeX-arg-conditional TeX-arg-cite-note-p
+                                    ([LaTeX-arg-biblatex-natbib-notes])
+                                  nil)
+              'TeX-arg-cite))))
+         cmds))
 
      ;; Fontification for compat macros does not go into `font-latex.el':
      (when (and (featurep 'font-latex)
-               (eq TeX-install-font-lock 'font-latex-setup))
+                (eq TeX-install-font-lock 'font-latex-setup))
        (font-latex-add-keywords '(("citet"        "*[[{")
-                                 ("Citet"        "*[[{")
-                                 ("citep"        "*[[{")
-                                 ("Citep"        "*[[{")
-                                 ("citealt"      "*[[{")
-                                 ("Citealt"      "*[[{")
-                                 ("citealp"      "*[[{")
-                                 ("Citealp"      "*[[{"))
-                               'biblatex))))
+                                  ("Citet"        "*[[{")
+                                  ("citep"        "*[[{")
+                                  ("Citep"        "*[[{")
+                                  ("citealt"      "*[[{")
+                                  ("Citealt"      "*[[{")
+                                  ("citealp"      "*[[{")
+                                  ("Citealp"      "*[[{"))
+                                'biblatex))))
 
    (LaTeX-add-environments
     ;;; Bibliography commands
@@ -566,34 +566,34 @@ for citation keys."
    ;; 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))
+              (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)
+             (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}")
-           (?i    . "\\citetitle{%l}")
-           (?I    . "\\citetitle*{%l}")
-           (?y    . "\\citeyear{%l}")
-           (?Y    . "\\citeyear*{%l}")
-           (?n    . "\\nocite{%l}")))))))
+           (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}")
+            (?i    . "\\citetitle{%l}")
+            (?I    . "\\citetitle*{%l}")
+            (?y    . "\\citeyear{%l}")
+            (?Y    . "\\citeyear*{%l}")
+            (?n    . "\\nocite{%l}")))))))
  TeX-dialect)
 
 (defvar LaTeX-biblatex-package-options-list
@@ -623,24 +623,24 @@ for citation keys."
   "Prompt for package options for the biblatex package."
   (unless BibLaTeX-global-style-files
     (if (if (eq TeX-arg-input-file-search 'ask)
-           (not (y-or-n-p "Find BibLaTeX style yourself? "))
-         TeX-arg-input-file-search)
-       ;; ...then, search for BibLaTeX styles.
-       (progn
-         (message "Searching for BibLaTeX styles...")
-         (setq BibLaTeX-global-style-files
-               (TeX-search-files-by-type 'bbxinputs 'global t t))
-         (message "Searching for BibLaTeX styles...done"))
+            (not (y-or-n-p "Find BibLaTeX style yourself? "))
+          TeX-arg-input-file-search)
+        ;; ...then, search for BibLaTeX styles.
+        (progn
+          (message "Searching for BibLaTeX styles...")
+          (setq BibLaTeX-global-style-files
+                (TeX-search-files-by-type 'bbxinputs 'global t t))
+          (message "Searching for BibLaTeX styles...done"))
       ;; ...else, use for completion only standard BibLaTeX styles (see §3.3 of
       ;; Biblatex reference manual).
       (setq BibLaTeX-global-style-files
-           '("numeric" "numeric-comp" "numeric-verb" "alphabetic"
-             "alphabetic-verb" "authoryear" "authoryear-comp" "authoryear-ibid"
-             "authoryear-icomp" "authortitle" "authortitle-comp"
-             "authortitle-ibid" "authortitle-icomp" "authortitle-terse"
-             "authortitle-tcomp" "authortitle-ticomp" "verbose" "verbose-ibid"
-             "verbose-note" "verbose-inote" "verbose-trad1" "verbose-trad2"
-             "verbose-trad3" "reading" "draft" "debug"))))
+            '("numeric" "numeric-comp" "numeric-verb" "alphabetic"
+              "alphabetic-verb" "authoryear" "authoryear-comp" 
"authoryear-ibid"
+              "authoryear-icomp" "authortitle" "authortitle-comp"
+              "authortitle-ibid" "authortitle-icomp" "authortitle-terse"
+              "authortitle-tcomp" "authortitle-ticomp" "verbose" "verbose-ibid"
+              "verbose-note" "verbose-inote" "verbose-trad1" "verbose-trad2"
+              "verbose-trad3" "reading" "draft" "debug"))))
   (TeX-read-key-val t LaTeX-biblatex-package-options-list))
 
 ;;; biblatex.el ends here
diff --git a/style/bicaption.el b/style/bicaption.el
index 0918b56..b8d6cb7 100644
--- a/style/bicaption.el
+++ b/style/bicaption.el
@@ -39,8 +39,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-babel-active-languages "babel" ())
 (declare-function LaTeX-polyglossia-active-languages "polyglossia" ())
@@ -68,35 +68,35 @@ arguments."
   ;; \bicaptionbox[<list entry #1>]{<heading #1>}[<list entry #2>]{<heading 
#2>}
   ;;              [<width>][<inner-pos>]{<contents>}
   (let* (;; \bisubcaption needs an environment, "minipage" will be
-        ;; popular.  If so, check next higher environment to find out
-        ;; where we are
-        (currenv (if (string= (LaTeX-current-environment) "minipage")
-                     (LaTeX-current-environment 2)
-                   (LaTeX-current-environment)))
-        (captionI (TeX-read-string
-                   (TeX-argument-prompt
-                    optional (when prompt
-                               (concat "1. " prompt "bicaption"))
-                    "1. bicaption")))
-        (short-captionI
-         (when (and (not star)
-                    (>= (length captionI) LaTeX-short-caption-prompt-length))
-           (TeX-read-string
-            (TeX-argument-prompt t (when prompt
-                                     (concat "Short 1. " prompt "bicaption"))
-                                 "Short 1. bicaption"))))
-        (captionII (TeX-read-string
-                    (TeX-argument-prompt
-                     optional (when prompt
-                                (concat "2. " prompt "bicaption"))
-                     "2. bicaption")))
-        (short-captionII
-         (when (and (not star)
-                    (>= (length captionII) LaTeX-short-caption-prompt-length))
-           (TeX-read-string
-            (TeX-argument-prompt t (when prompt
-                                     (concat "Short 2. " prompt "bicaption"))
-                                 "Short 2. bicaption")))))
+         ;; popular.  If so, check next higher environment to find out
+         ;; where we are
+         (currenv (if (string= (LaTeX-current-environment) "minipage")
+                      (LaTeX-current-environment 2)
+                    (LaTeX-current-environment)))
+         (captionI (TeX-read-string
+                    (TeX-argument-prompt
+                     optional (when prompt
+                                (concat "1. " prompt "bicaption"))
+                     "1. bicaption")))
+         (short-captionI
+          (when (and (not star)
+                     (>= (length captionI) LaTeX-short-caption-prompt-length))
+            (TeX-read-string
+             (TeX-argument-prompt t (when prompt
+                                      (concat "Short 1. " prompt "bicaption"))
+                                  "Short 1. bicaption"))))
+         (captionII (TeX-read-string
+                     (TeX-argument-prompt
+                      optional (when prompt
+                                 (concat "2. " prompt "bicaption"))
+                      "2. bicaption")))
+         (short-captionII
+          (when (and (not star)
+                     (>= (length captionII) LaTeX-short-caption-prompt-length))
+            (TeX-read-string
+             (TeX-argument-prompt t (when prompt
+                                      (concat "Short 2. " prompt "bicaption"))
+                                  "Short 2. bicaption")))))
     (indent-according-to-mode)
     ;; Insert short & regular 1. caption
     (when (and short-captionI (not (string= short-captionI "")))
@@ -116,25 +116,25 @@ arguments."
     ;; Insert width & pos in case of captionbox macros:
     (when cap-box
       (let* ((TeX-arg-opening-brace "[")
-            (TeX-arg-closing-brace "]")
-            (TeX-last-optional-rejected nil)
-            (width (LaTeX-check-insert-macro-default-style
-                    (completing-read (TeX-argument-prompt t nil "Width")
-                                     (mapcar (lambda (elt) (concat TeX-esc 
(car elt)))
-                                             (LaTeX-length-list)))))
-            (TeX-last-optional-rejected (or (not width)
-                                            (and width (string= width ""))))
-            (inpos (LaTeX-check-insert-macro-default-style
-                    (if (and width (not (string-equal width "")))
-                        (completing-read (TeX-argument-prompt t nil "Inner 
position")
-                                         '("c" "l" "r" "s"))
-                      ""))))
-       (and width (TeX-argument-insert width t))
-       (and inpos (TeX-argument-insert inpos t))))
+             (TeX-arg-closing-brace "]")
+             (TeX-last-optional-rejected nil)
+             (width (LaTeX-check-insert-macro-default-style
+                     (completing-read (TeX-argument-prompt t nil "Width")
+                                      (mapcar (lambda (elt) (concat TeX-esc 
(car elt)))
+                                              (LaTeX-length-list)))))
+             (TeX-last-optional-rejected (or (not width)
+                                             (and width (string= width ""))))
+             (inpos (LaTeX-check-insert-macro-default-style
+                     (if (and width (not (string-equal width "")))
+                         (completing-read (TeX-argument-prompt t nil "Inner 
position")
+                                          '("c" "l" "r" "s"))
+                       ""))))
+        (and width (TeX-argument-insert width t))
+        (and inpos (TeX-argument-insert inpos t))))
     (LaTeX-fill-paragraph)
     ;; 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)))
+               (save-excursion (LaTeX-label currenv 'environment)))
       (LaTeX-newline)
       (indent-according-to-mode)
       (end-of-line))))
@@ -144,14 +144,14 @@ arguments."
 When OPTIONAL is non-nil, include both as optional arguments in
 square brackets."
   (let* ((flttype (completing-read (TeX-argument-prompt optional nil "Float 
type")
-                                 LaTeX-caption-supported-float-types))
-        (biflt (if (and (not (or (string= flttype "bi")
-                                 (string= flttype "bi-first")
-                                 (string= flttype "bi-second")))
-                        flttype (not (string= flttype "")))
-                   (completing-read (TeX-argument-prompt optional nil 
"Bicaption type")
-                                    '("bi" "bi-first" "bi-second"))
-                 "")))
+                                  LaTeX-caption-supported-float-types))
+         (biflt (if (and (not (or (string= flttype "bi")
+                                  (string= flttype "bi-first")
+                                  (string= flttype "bi-second")))
+                         flttype (not (string= flttype "")))
+                    (completing-read (TeX-argument-prompt optional nil 
"Bicaption type")
+                                     '("bi" "bi-first" "bi-second"))
+                  "")))
     (TeX-argument-insert flttype optional)
     (TeX-argument-insert biflt optional)))
 
@@ -175,32 +175,32 @@ square brackets."
 
    ;; \bi(sub)?caption(box)? macros should get their own lines
    (LaTeX-paragraph-commands-add-locally '("bicaption"    "bicaptionbox"
-                                          "bisubcaption" "bisubcaptionbox"))
+                                           "bisubcaption" "bisubcaptionbox"))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("bicaption"       "*[{[{")
-                               ("bicaptionbox"    "*[{[{[[")
-                               ("bisubcaption"    "*[{[{")
-                               ("bisubcaptionbox" "*[{[{[["))
-                             'textual)))
+                                ("bicaptionbox"    "*[{[{[[")
+                                ("bisubcaption"    "*[{[{")
+                                ("bisubcaptionbox" "*[{[{[["))
+                              'textual)))
  TeX-dialect)
 
 (defun LaTeX-bicaption-package-options ()
   "Prompt for package options for the bicaption package."
   (TeX-load-style "caption")
   (TeX-read-key-val t
-                   (append
-                    `(,(list "language"
-                             (cond ((and (member "babel" (TeX-style-list))
-                                         (LaTeX-babel-active-languages))
-                                    (butlast (LaTeX-babel-active-languages)))
-                                   ((and (member "polyglossia" 
(TeX-style-list))
-                                         (LaTeX-polyglossia-active-languages))
-                                    (butlast (LaTeX-babel-active-languages)))
-                                   (t nil))))
-                    LaTeX-bicaption-key-val-options
-                    LaTeX-caption-key-val-options)))
+                    (append
+                     `(,(list "language"
+                              (cond ((and (member "babel" (TeX-style-list))
+                                          (LaTeX-babel-active-languages))
+                                     (butlast (LaTeX-babel-active-languages)))
+                                    ((and (member "polyglossia" 
(TeX-style-list))
+                                          (LaTeX-polyglossia-active-languages))
+                                     (butlast (LaTeX-babel-active-languages)))
+                                    (t nil))))
+                     LaTeX-bicaption-key-val-options
+                     LaTeX-caption-key-val-options)))
 
 ;;; bicaption.el ends here
diff --git a/style/bidi.el b/style/bidi.el
index 287bbfd..6f1f0b3 100644
--- a/style/bidi.el
+++ b/style/bidi.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 (declare-function TeX-check-engine-add-engines
                   "tex-buf"
                   (&rest engines))
@@ -176,25 +176,25 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("LR"        "{")
-                               ("LRE"       "{")
-                               ("RLE"       "{")
-                               ("RL"        "{")
-                               ("LTRthanks" "{")
-                               ("RTLthanks" "{"))
-                             'textual)
+                                ("LRE"       "{")
+                                ("RLE"       "{")
+                                ("RL"        "{")
+                                ("LTRthanks" "{")
+                                ("RTLthanks" "{"))
+                              'textual)
      (font-latex-add-keywords '(("LTRfootnote"     "[{")
-                               ("RTLfootnote"     "[{")
-                               ("LTRfootnotetext" "[{")
-                               ("RTLfootnotetext" "[{")
-                               ("LTRmarginpar"    "[{")
-                               ("RTLmarginpar"    "[{"))
-                             'reference)
+                                ("RTLfootnote"     "[{")
+                                ("LTRfootnotetext" "[{")
+                                ("RTLfootnotetext" "[{")
+                                ("LTRmarginpar"    "[{")
+                                ("RTLmarginpar"    "[{"))
+                              'reference)
      (font-latex-add-keywords '(("XeTeX"   "")
-                               ("XeLaTeX" "")
-                               ("SepMark" "{"))
-                             'function)))
+                                ("XeLaTeX" "")
+                                ("SepMark" "{"))
+                              'function)))
  TeX-dialect)
 
 ;;; bidi.el ends here
diff --git a/style/bm.el b/style/bm.el
index 5ded3ac..7b9cd11 100644
--- a/style/bm.el
+++ b/style/bm.el
@@ -33,28 +33,28 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook "bm"
- (lambda ()
-   (TeX-add-symbols
-    '("bm" 1)
-    '("hm" 1)
-    '("DeclareBoldMathCommand" [ "Math version" ] TeX-arg-define-macro "Math 
expression")
-    '("bmdefine" TeX-arg-define-macro "Math expression")
-    '("hmdefine" TeX-arg-define-macro "Math expression"))
-   ;; Fontification
-   (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(("bm" "{")
-                               ("hm" "{"))
-                             'bold-command)
-     (font-latex-add-keywords '(("DeclareBoldMathCommand" "[|{\\{")
-                               ("bmdefine" "|{\\{")
-                               ("hmdefine" "|{\\{"))
-                             'function)))
- TeX-dialect)
+                    (lambda ()
+                      (TeX-add-symbols
+                       '("bm" 1)
+                       '("hm" 1)
+                       '("DeclareBoldMathCommand" [ "Math version" ] 
TeX-arg-define-macro "Math expression")
+                       '("bmdefine" TeX-arg-define-macro "Math expression")
+                       '("hmdefine" TeX-arg-define-macro "Math expression"))
+                      ;; Fontification
+                      (when (and (featurep 'font-latex)
+                                 (eq TeX-install-font-lock 'font-latex-setup))
+                        (font-latex-add-keywords '(("bm" "{")
+                                                   ("hm" "{"))
+                                                 'bold-command)
+                        (font-latex-add-keywords '(("DeclareBoldMathCommand" 
"[|{\\{")
+                                                   ("bmdefine" "|{\\{")
+                                                   ("hmdefine" "|{\\{"))
+                                                 'function)))
+                    TeX-dialect)
 
 (defvar LaTeX-bm-package-options nil
   "Package options for the bm package.")
diff --git a/style/book.el b/style/book.el
index cdc754a..4a23d25 100644
--- a/style/book.el
+++ b/style/book.el
@@ -17,7 +17,7 @@
  (lambda ()
    (LaTeX-largest-level-set "part")
    (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection"
-                      "paragraph" "subparagraph" "figure" "table")
+                       "paragraph" "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings"))
  TeX-dialect)
 
diff --git a/style/booktabs.el b/style/booktabs.el
index 7abecc1..7de74b6 100644
--- a/style/booktabs.el
+++ b/style/booktabs.el
@@ -34,15 +34,15 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defun LaTeX-booktabs-arg-paren (optional prompt)
   "Prompt for a value and use parentheses when it is inserted.
 If OPTIONAL is non-nil the parameter is labeled as optional.
 PROMPT is the value of the prompt to be shown."
   (let ((TeX-arg-opening-brace "\(")
-       (TeX-arg-closing-brace "\)"))
+        (TeX-arg-closing-brace "\)"))
     (TeX-parse-argument optional prompt)))
 
 (TeX-add-style-hook
@@ -51,9 +51,9 @@ PROMPT is the value of the prompt to be shown."
    ;; Do not append an empty group to toprule, midrule, and bottomrule macros,
    ;; otherwise one gets a wrong spacing in the table.
    (setq TeX-insert-braces-alist (append TeX-insert-braces-alist
-                                        '(("toprule" . nil)
-                                          ("midrule" . nil)
-                                          ("bottomrule" . nil))))
+                                         '(("toprule" . nil)
+                                           ("midrule" . nil)
+                                           ("bottomrule" . nil))))
    ;; New symbols
    (TeX-add-symbols
     '("toprule" [ "Thickness" ])
@@ -69,15 +69,15 @@ PROMPT is the value of the prompt to be shown."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("toprule" "[")
-                               ("midrule" "[")
-                               ("bottomrule" "[")
-                               ("cmidrule" "[({")
-                               ("addlinespace" "[")
-                               ("morecmidrules" "")
-                               ("specialrule" "{{{"))
-                             'function)))
+                                ("midrule" "[")
+                                ("bottomrule" "[")
+                                ("cmidrule" "[({")
+                                ("addlinespace" "[")
+                                ("morecmidrules" "")
+                                ("specialrule" "{{{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-booktabs-package-options nil
diff --git a/style/breqn.el b/style/breqn.el
index b5d4138..0352055 100644
--- a/style/breqn.el
+++ b/style/breqn.el
@@ -52,8 +52,8 @@
 
 (defvar LaTeX-breqn-key-val-options
   '(("style" ("\\tiny" "\\scriptsize" "\\footnotesize" "\\small"
-             "\\normalsize" "\\large" "\\Large" "\\LARGE"
-             "\\huge" "\\Huge"))
+              "\\normalsize" "\\large" "\\Large" "\\LARGE"
+              "\\huge" "\\Huge"))
     ("number")
     ("indentstep")
     ("compact")
@@ -78,19 +78,19 @@ The keys \"label\" and \"labelprefix\" are omitted.")
 Keys offered for key=val query depend on ENV.  \"label\" and
 \"labelprefix\" are omitted."
   (let ((keyvals
-        (TeX-read-key-val t
-                          (cond ((or (string= env "dgroup")
-                                     (string= env "dgroup*"))
-                                 (append '(("noalign") ("brace"))
-                                         LaTeX-breqn-key-val-options))
-                                ((or (string= env "darray")
-                                     (string= env "darray*"))
-                                 (append '(("noalign") ("brace") ("cols" 
("{}")))
-                                         LaTeX-breqn-key-val-options))
-                                (t LaTeX-breqn-key-val-options)))))
+         (TeX-read-key-val t
+                           (cond ((or (string= env "dgroup")
+                                      (string= env "dgroup*"))
+                                  (append '(("noalign") ("brace"))
+                                          LaTeX-breqn-key-val-options))
+                                 ((or (string= env "darray")
+                                      (string= env "darray*"))
+                                  (append '(("noalign") ("brace") ("cols" 
("{}")))
+                                          LaTeX-breqn-key-val-options))
+                                 (t LaTeX-breqn-key-val-options)))))
     (LaTeX-insert-environment env (when (and keyvals
-                                            (not (string= keyvals "")))
-                                   (concat LaTeX-optop keyvals LaTeX-optcl)))
+                                             (not (string= keyvals "")))
+                                    (concat LaTeX-optop keyvals LaTeX-optcl)))
     (LaTeX-env-label-as-keyval nil nil keyvals env)))
 
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
diff --git a/style/bulgarian.el b/style/bulgarian.el
index c7437db..d571a5f 100644
--- a/style/bulgarian.el
+++ b/style/bulgarian.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (defvar LaTeX-bulgarian-mode-syntax-table
   (copy-syntax-table LaTeX-mode-syntax-table)
@@ -51,7 +51,7 @@
    (set-syntax-table LaTeX-bulgarian-mode-syntax-table)
    (unless (eq (car TeX-quote-language) 'override)
      (setq TeX-quote-language
-          `("bulgarian" "\"`" "\"'" ,TeX-quote-after-quote)))
+           `("bulgarian" "\"`" "\"'" ,TeX-quote-after-quote)))
    (setq LaTeX-babel-hyphen-language "bulgarian")
    ;; Fontification of quotation marks.
    (when (fboundp 'font-latex-add-quotes)
diff --git a/style/captcont.el b/style/captcont.el
index d68babd..5bf1ba1 100644
--- a/style/captcont.el
+++ b/style/captcont.el
@@ -33,8 +33,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "captcont"
@@ -48,7 +48,7 @@
  TeX-dialect)
 
 (defvar LaTeX-captcont-package-options '("figbotcap" "figtopcap" "tabbotcap"
-                                        "tabtopcap")
+                                         "tabtopcap")
   "Package options for the captcont package.")
 
 ;;; captcont.el ends here
diff --git a/style/caption.el b/style/caption.el
index 19c225d..346b84d 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -45,8 +45,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-babel-active-languages "babel" ())
 (declare-function LaTeX-polyglossia-active-languages "polyglossia" ())
@@ -57,30 +57,30 @@
   '(("aboveskip")
     ("belowskip")
     ("font"   ("scriptsize" "footnotesize" "small" "normalsize" "large"
-              "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
-              "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
-              "stretch" "normalcolor" "color" "normal"))
+               "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+               "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+               "stretch" "normalcolor" "color" "normal"))
     ("font+"  ("scriptsize" "footnotesize" "small" "normalsize" "large"
-              "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
-              "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
-              "stretch" "normalcolor" "color" "normal"))
+               "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+               "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+               "stretch" "normalcolor" "color" "normal"))
     ("format" ("plain" "hang"))
     ("hangindent")
     ("hypcap" ("false" "no" "off" "0" "true" "yes" "on" "1"))
     ("hypcapspace")
     ("indention")
     ("justification" ("justified" "centering" "centerlast" "centerfirst"
-                     "raggedright" "RaggedRight" "raggedleft"))
+                      "raggedright" "RaggedRight" "raggedleft"))
     ("labelfont"     ("scriptsize" "footnotesize" "small" "normalsize" "large"
-                     "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
-                     "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
-                     "stretch" "normalcolor" "color" "normal"))
+                      "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+                      "sf" "tt" "singlespacing" "onehalfspacing" 
"doublespacing"
+                      "stretch" "normalcolor" "color" "normal"))
     ("labelfont+"    ("scriptsize" "footnotesize" "small" "normalsize" "large"
-                     "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
-                     "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
-                     "stretch" "normalcolor" "color" "normal"))
+                      "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+                      "sf" "tt" "singlespacing" "onehalfspacing" 
"doublespacing"
+                      "stretch" "normalcolor" "color" "normal"))
     ("labelformat"   ("default" "empty" "simple" "brace" "parens"
-                     "autodot" "unnumbered"))
+                      "autodot" "unnumbered"))
     ("labelsep"      ("none" "colon" "period" "space" "quad" "newline" 
"endash"))
     ("list"          ("false" "no" "off" "0" "true" "yes" "on" "1"))
     ("listformat"    ("empty" "simple" "paren" "subsimple" "subparens"))
@@ -99,13 +99,13 @@
     ("strut"      ("false" "no" "off" "0" "true" "yes" "on" "1"))
     ("style"      ("base" "default"))
     ("textfont"   ("scriptsize" "footnotesize" "small" "normalsize" "large"
-                  "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
-                  "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
-                  "stretch" "normalcolor" "color" "normal"))
+                   "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+                   "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+                   "stretch" "normalcolor" "color" "normal"))
     ("textfont+"  ("scriptsize" "footnotesize" "small" "normalsize" "large"
-                  "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
-                  "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
-                  "stretch" "normalcolor" "color" "normal"))
+                   "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+                   "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+                   "stretch" "normalcolor" "color" "normal"))
     ("textformat" ("empty" "simple" "period"))
     ("twoside")
     ("type"       ("figure" "table"))
@@ -118,19 +118,19 @@
 (make-variable-buffer-local 'LaTeX-caption-key-val-options-local)
 
 (defvar LaTeX-caption-supported-float-types
-  '("figure" "table" "ContinuedFloat"  ; Standard caption.sty
+  '("figure" "table" "ContinuedFloat"   ; Standard caption.sty
     "sub" "subtable" "subfigure"        ; subcaption.sty
     "bi" "bi-first" "bi-second"         ; bicaption.sty
-    "ruled" "boxed"                    ; float.sty
-    "floatingfigure" "floatingtable"   ; floatflt.sty
-    "lstlisting"                       ; listings.sty
-    "longtable"                                ; longtable.sty
-    "figwindow" "tabwindow"            ; picinpar.sty
-    "parpic"                           ; picins.sty
-    "SCfigure" "SCtable"               ; sidecap.sty
-    "supertabular" "xtabular"          ; supertabular.sty & xtab.sty
+    "ruled" "boxed"                     ; float.sty
+    "floatingfigure" "floatingtable"    ; floatflt.sty
+    "lstlisting"                        ; listings.sty
+    "longtable"                         ; longtable.sty
+    "figwindow" "tabwindow"             ; picinpar.sty
+    "parpic"                            ; picins.sty
+    "SCfigure" "SCtable"                ; sidecap.sty
+    "supertabular" "xtabular"           ; supertabular.sty & xtab.sty
     "threeparttable" "measuredfigure"   ; threeparttable.sty
-    "wrapfigure" "wraptable")          ; wrapfigure
+    "wrapfigure" "wraptable")           ; wrapfigure
   "List of float types provided by other LaTeX packages and
 supported by `caption.sty'.")
 
@@ -143,18 +143,18 @@ supported by `caption.sty'.")
 ;; `docname.el' file.
 (defvar LaTeX-caption-DeclareCaption-regexp
   `(,(concat "\\\\DeclareCaption\\(Font\\|Format\\|Justification"
-            "\\|LabelFormat\\|LabelSeparator\\|ListFormat"
-            "\\|Option\\|Style\\|TextFormat\\)"
-            "\\*?"
-            "[ \t\n\r%]*"
-            "{\\([^}]+\\)}")
+             "\\|LabelFormat\\|LabelSeparator\\|ListFormat"
+             "\\|Option\\|Style\\|TextFormat\\)"
+             "\\*?"
+             "[ \t\n\r%]*"
+             "{\\([^}]+\\)}")
     (0 1 2) LaTeX-auto-caption-DeclareCaption)
   "Matches the arguments of different `\\DeclareCaption*' from
 `caption.sty'.")
 
 (defun LaTeX-caption-auto-prepare ()
   "Clear `LaTeX-auto-caption-DeclareCaption' before parsing."
-  (setq        LaTeX-auto-caption-DeclareCaption nil))
+  (setq LaTeX-auto-caption-DeclareCaption nil))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-caption-auto-prepare t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
@@ -164,51 +164,51 @@ supported by `caption.sty'.")
 in `caption'-completions."
   (dolist (keyvals (LaTeX-caption-DeclareCaption-list))
     (let* ((key (cond ((string-equal (nth 1 keyvals) "LabelSeparator")
-                      (downcase (substring (nth 1 keyvals) 0 8)))
-                     (t (downcase (nth 1 keyvals)))))
-          (val (nth 2 keyvals))
-          (val-match (cdr (assoc key LaTeX-caption-key-val-options-local)))
-          (temp (copy-alist LaTeX-caption-key-val-options-local))
-          ;; If `subcaption.el' is loaded, delete and update also the
-          ;; entry for `subrefformat' when processing the `labelformat'.
-          (opts (progn
-                  (when (and (string-equal key "labelformat")
-                             (boundp 'LaTeX-subcaption-key-val-options))
-                    (setq temp
-                          (assq-delete-all
-                           (car (assoc (caar LaTeX-subcaption-key-val-options) 
temp))
-                           temp)))
-                  (assq-delete-all (car (assoc key temp)) temp))))
+                       (downcase (substring (nth 1 keyvals) 0 8)))
+                      (t (downcase (nth 1 keyvals)))))
+           (val (nth 2 keyvals))
+           (val-match (cdr (assoc key LaTeX-caption-key-val-options-local)))
+           (temp (copy-alist LaTeX-caption-key-val-options-local))
+           ;; If `subcaption.el' is loaded, delete and update also the
+           ;; entry for `subrefformat' when processing the `labelformat'.
+           (opts (progn
+                   (when (and (string-equal key "labelformat")
+                              (boundp 'LaTeX-subcaption-key-val-options))
+                     (setq temp
+                           (assq-delete-all
+                            (car (assoc (caar 
LaTeX-subcaption-key-val-options) temp))
+                            temp)))
+                   (assq-delete-all (car (assoc key temp)) temp))))
       ;; For `\DeclareCaptionOption', only add the value
       ;; (remember:      key=^^^^^^, val="defined key")
       (if (string-equal key "option")
-         (cl-pushnew (list val) opts :test #'equal)
-       ;; For anything but `\DeclareCaptionOption', do the standard
-       ;; procedure.  Again, take care of `subrefformat' for `subcaption.el'.
-       (if val-match
-           (progn
-             (when (and (string-equal key "labelformat")
-                        (boundp 'LaTeX-subcaption-key-val-options))
-               (cl-pushnew (list "subrefformat"
-                                 (TeX-delete-duplicate-strings (apply #'append 
(list val) val-match)))
-                           opts :test #'equal))
-             (cl-pushnew (list key (TeX-delete-duplicate-strings (apply 
#'append (list val) val-match)))
-                         opts :test #'equal))
-         (cl-pushnew (list key (list val)) opts :test #'equal)))
+          (cl-pushnew (list val) opts :test #'equal)
+        ;; For anything but `\DeclareCaptionOption', do the standard
+        ;; procedure.  Again, take care of `subrefformat' for `subcaption.el'.
+        (if val-match
+            (progn
+              (when (and (string-equal key "labelformat")
+                         (boundp 'LaTeX-subcaption-key-val-options))
+                (cl-pushnew (list "subrefformat"
+                                  (TeX-delete-duplicate-strings (apply 
#'append (list val) val-match)))
+                            opts :test #'equal))
+              (cl-pushnew (list key (TeX-delete-duplicate-strings (apply 
#'append (list val) val-match)))
+                          opts :test #'equal))
+          (cl-pushnew (list key (list val)) opts :test #'equal)))
       (setq LaTeX-caption-key-val-options-local (copy-alist opts))))
   ;; Support for environments defined with newfloat.sty: These
   ;; environments are added to "type" and "type*" key:
   (when (and (member "newfloat" (TeX-style-list))
-            (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list)
-            (LaTeX-newfloat-DeclareFloatingEnvironment-list))
+             (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list)
+             (LaTeX-newfloat-DeclareFloatingEnvironment-list))
     (dolist (key '("type" "type*"))
       (let* ((val (mapcar #'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
-            (val-match (cdr (assoc key LaTeX-caption-key-val-options-local)))
-            (temp (copy-alist LaTeX-caption-key-val-options-local))
-            (opts (assq-delete-all (car (assoc key temp)) temp)))
-       (cl-pushnew (list key (TeX-delete-duplicate-strings (apply #'append val 
val-match)))
-                   opts :test #'equal)
-       (setq LaTeX-caption-key-val-options-local (copy-alist opts))))))
+             (val-match (cdr (assoc key LaTeX-caption-key-val-options-local)))
+             (temp (copy-alist LaTeX-caption-key-val-options-local))
+             (opts (assq-delete-all (car (assoc key temp)) temp)))
+        (cl-pushnew (list key (TeX-delete-duplicate-strings (apply #'append 
val val-match)))
+                    opts :test #'equal)
+        (setq LaTeX-caption-key-val-options-local (copy-alist opts))))))
 
 (defun LaTeX-arg-caption-command (optional &optional prompt)
   "Insert caption-commands from `caption.sty'. If OPTIONAL,
@@ -216,8 +216,8 @@ indicate `(Optional)' while reading key=val and insert it in
 square brackets.  PROMPT replaces the standard one."
   (LaTeX-caption-update-key-val-options)
   (let ((opts (TeX-read-key-val optional
-                               LaTeX-caption-key-val-options-local
-                               prompt)))
+                                LaTeX-caption-key-val-options-local
+                                prompt)))
     (TeX-argument-insert opts optional)))
 
 ;; In `LaTeX-caption-DeclareCaption-regexp', we match (0 1 2).  When
@@ -231,7 +231,7 @@ suffix of the command."
   (let ((name (TeX-read-string "Name: ")))
     (LaTeX-add-caption-DeclareCaptions
      (list (concat "\\DeclareCaption" format "{" name "}")
-          format name))
+           format name))
     (TeX-argument-insert name optional)))
 
 ;; Support for an undocumented feature of caption.sty:
@@ -254,13 +254,13 @@ suffix of the command."
 If STAR is non-nil, then do not query for a \\label and a short
 caption, insert only a caption."
   (let* ((currenv (LaTeX-current-environment))
-        (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")))))
+         (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)
     (when (and short-caption (not (string= short-caption "")))
       (insert LaTeX-optop short-caption LaTeX-optcl))
@@ -268,19 +268,19 @@ caption, insert only a caption."
     (unless star (LaTeX-label currenv 'environment))
     (insert TeX-grcl))
   (let* ((TeX-arg-opening-brace "[")
-        (TeX-arg-closing-brace "]")
-        (TeX-last-optional-rejected nil)
-        (width (LaTeX-check-insert-macro-default-style
-                (completing-read (TeX-argument-prompt t nil "Width")
-                                 (mapcar (lambda (elt) (concat TeX-esc (car 
elt)))
-                                         (LaTeX-length-list)))))
-        (TeX-last-optional-rejected (or (not width)
-                                        (and width (string= width ""))))
-        (inpos (LaTeX-check-insert-macro-default-style
-                (if (and width (not (string-equal width "")))
-                    (completing-read (TeX-argument-prompt t nil "Inner 
position")
-                                     '("c" "l" "r" "s"))
-                  ""))))
+         (TeX-arg-closing-brace "]")
+         (TeX-last-optional-rejected nil)
+         (width (LaTeX-check-insert-macro-default-style
+                 (completing-read (TeX-argument-prompt t nil "Width")
+                                  (mapcar (lambda (elt) (concat TeX-esc (car 
elt)))
+                                          (LaTeX-length-list)))))
+         (TeX-last-optional-rejected (or (not width)
+                                         (and width (string= width ""))))
+         (inpos (LaTeX-check-insert-macro-default-style
+                 (if (and width (not (string-equal width "")))
+                     (completing-read (TeX-argument-prompt t nil "Inner 
position")
+                                      '("c" "l" "r" "s"))
+                   ""))))
     (and width (TeX-argument-insert width t))
     (and inpos (TeX-argument-insert inpos t)))
   ;; Fill the paragraph before inserting {}.  We can use
@@ -294,18 +294,18 @@ caption, insert only a caption."
 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")))))
+                                   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 "")))
@@ -313,21 +313,21 @@ STAR is non-nil, do not query for a short-caption and a 
label."
     (TeX-argument-insert caption optional)
     (LaTeX-fill-paragraph)
     (when (and (not 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))))
+               ;; 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))))
       (LaTeX-newline)
       (indent-according-to-mode)
       (end-of-line))))
@@ -341,22 +341,22 @@ STAR is non-nil, do not query for a short-caption and a 
label."
 
    ;; Activate the buffer-local version of key-vals.
    (setq LaTeX-caption-key-val-options-local
-        (copy-alist LaTeX-caption-key-val-options))
+         (copy-alist LaTeX-caption-key-val-options))
 
    ;; Append key=vals from bicaption.sty if loaded: "language" key
    ;; depends on the active languages, it is appended extra where main
    ;; language is removed from the list:
    (when (and (member "bicaption" (TeX-style-list))
-             ;; Make sure that one of these packages is loaded:
-             (or (fboundp 'LaTeX-babel-active-languages)
-                 (fboundp 'LaTeX-polyglossia-active-languages)))
+              ;; Make sure that one of these packages is loaded:
+              (or (fboundp 'LaTeX-babel-active-languages)
+                  (fboundp 'LaTeX-polyglossia-active-languages)))
      (setq LaTeX-caption-key-val-options-local
-          (append
-           `(,(list "language"
-                    (or (butlast (LaTeX-babel-active-languages))
-                        (butlast (LaTeX-polyglossia-active-languages)))))
-           LaTeX-bicaption-key-val-options
-           LaTeX-caption-key-val-options-local)))
+           (append
+            `(,(list "language"
+                     (or (butlast (LaTeX-babel-active-languages))
+                         (butlast (LaTeX-polyglossia-active-languages)))))
+            LaTeX-bicaption-key-val-options
+            LaTeX-caption-key-val-options-local)))
 
    ;; Caption commands:
    (TeX-add-symbols
@@ -364,7 +364,7 @@ STAR is non-nil, do not query for a short-caption and a 
label."
 
     '("captionlistentry"
       [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
-                   LaTeX-caption-supported-float-types]
+                    LaTeX-caption-supported-float-types]
       t)
 
     '("captionof" LaTeX-arg-caption-captionof)
@@ -373,29 +373,29 @@ STAR is non-nil, do not query for a short-caption and a 
label."
 
     '("captionsetup"
       (TeX-arg-conditional (member "bicaption" (TeX-style-list))
-                          ([LaTeX-arg-bicaption-captionsetup])
-                          ([TeX-arg-eval completing-read
-                                         (TeX-argument-prompt t nil "Float 
type")
-                                         LaTeX-caption-supported-float-types]))
+                           ([LaTeX-arg-bicaption-captionsetup])
+                           ([TeX-arg-eval completing-read
+                                          (TeX-argument-prompt t nil "Float 
type")
+                                          
LaTeX-caption-supported-float-types]))
       (LaTeX-arg-caption-command))
 
     '("captionsetup*"
       (TeX-arg-conditional (member "bicaption" (TeX-style-list))
-                          ([LaTeX-arg-bicaption-captionsetup])
-                          ([TeX-arg-eval completing-read
-                                         (TeX-argument-prompt t nil "Float 
type")
-                                         LaTeX-caption-supported-float-types]))
+                           ([LaTeX-arg-bicaption-captionsetup])
+                           ([TeX-arg-eval completing-read
+                                          (TeX-argument-prompt t nil "Float 
type")
+                                          
LaTeX-caption-supported-float-types]))
       (LaTeX-arg-caption-command))
 
     '("clearcaptionsetup"
       [LaTeX-arg-caption-command "Single key"]
       (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
-                   LaTeX-caption-supported-float-types))
+                    LaTeX-caption-supported-float-types))
 
     '("clearcaptionsetup*"
       [LaTeX-arg-caption-command "Single key"]
       (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
-                   LaTeX-caption-supported-float-types))
+                    LaTeX-caption-supported-float-types))
 
     '("captionbox"  (LaTeX-arg-caption-captionbox) t)
 
@@ -448,33 +448,33 @@ STAR is non-nil, do not query for a short-caption and a 
label."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("caption"           "*[{")
-                               ("captionlistentry"  "[{")
-                               ("captionof"         "*{[{")
-                               ("captionbox"        "*[{[["))
-                             'textual)
+                                ("captionlistentry"  "[{")
+                                ("captionof"         "*{[{")
+                                ("captionbox"        "*[{[["))
+                              'textual)
      (font-latex-add-keywords '(("captionsetup"                  "*[[{")
-                               ("clearcaptionsetup"             "*[{")
-                               ("continuedfloat"                "")
-                               ("DeclareCaptionFont"            "{{")
-                               ("DeclareCaptionFormat"          "*{{")
-                               ("DeclareCaptionJustification"   "{{")
-                               ("DeclareCaptionLabelFormat"     "{{")
-                               ("DeclareCaptionLabelSeparator"  "*{{")
-                               ("DeclareCaptionListFormat"      "{{")
-                               ("DeclareCaptionOption"          "{{")
-                               ("DeclareCaptionStyle"           "{[{")
-                               ("DeclareCaptionTextFormat"      "{{"))
-                             'function)) )
+                                ("clearcaptionsetup"             "*[{")
+                                ("continuedfloat"                "")
+                                ("DeclareCaptionFont"            "{{")
+                                ("DeclareCaptionFormat"          "*{{")
+                                ("DeclareCaptionJustification"   "{{")
+                                ("DeclareCaptionLabelFormat"     "{{")
+                                ("DeclareCaptionLabelSeparator"  "*{{")
+                                ("DeclareCaptionListFormat"      "{{")
+                                ("DeclareCaptionOption"          "{{")
+                                ("DeclareCaptionStyle"           "{[{")
+                                ("DeclareCaptionTextFormat"      "{{"))
+                              'function)) )
  TeX-dialect)
 
 (defun LaTeX-caption-package-options ()
   "Prompt for package options for the caption package."
   (TeX-read-key-val t
-   (append '(("compatibility"  ("true" "false")))
-          '(("figureposition" ("top" "above" "bottom" "below")))
-          '(("tableposition"  ("top" "above" "bottom" "below")))
-          LaTeX-caption-key-val-options)))
+                    (append '(("compatibility"  ("true" "false")))
+                            '(("figureposition" ("top" "above" "bottom" 
"below")))
+                            '(("tableposition"  ("top" "above" "bottom" 
"below")))
+                            LaTeX-caption-key-val-options)))
 
 ;;; caption.el ends here
diff --git a/style/changelog.el b/style/changelog.el
index efd1afe..a4ebb43 100644
--- a/style/changelog.el
+++ b/style/changelog.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 (defvar reftex-label-alist)
 
 (defvar LaTeX-changelog-env-key-val-options
@@ -60,45 +60,45 @@ The keys sectioncmd and label are added in the function
 (defun LaTeX-env-changelog (environment)
   "Insert ENVIRONMENT, ask for optional argument and insert a label."
   (let* ((seccmds (mapcar #'car LaTeX-section-list))
-        ;; Collect the key=vals acc. to environment & documentclass
-        (opts (TeX-read-key-val
-               t
-               (if (string= environment "changelog")
-                   (append
-                    `(("sectioncmd"
-                       ,(if (< (LaTeX-largest-level) 2)
-                            (append
-                             (mapcar (lambda (cmd) (concat TeX-esc cmd))
-                                     seccmds)
-                             (mapcar (lambda (cmd) (concat TeX-esc cmd "*"))
-                                     seccmds))
-                          (append
-                           (mapcar (lambda (cmd) (concat TeX-esc cmd))
-                                   (remove "chapter" seccmds))
-                           (mapcar (lambda (cmd) (concat TeX-esc cmd "*"))
-                                   (remove "chapter" seccmds))))))
-                    LaTeX-changelog-env-key-val-options
-                    LaTeX-changelog-version-env-key-val-options)
-                 LaTeX-changelog-version-env-key-val-options)))
-        ;; Extract the chosen sectioning command
-        (sec (progn
-               (string-match "sectioncmd=\\\\\\([a-z]+\\)\\(\\*?\\)" opts)
-               (match-string-no-properties 1 opts)))
-        ;; Temp. re-bind `LaTeX-label-alist' and pick the label
-        ;; prefix from `LaTeX-section-label'
-        (LaTeX-label-alist
-         (when (and (string= environment "changelog")
-                    (match-string 2 opts)
-                    (not (string= (match-string 2 opts) "*")))
-           `(,(cons environment
-                    (cdr (assoc sec LaTeX-section-label))))))
-        ;; Temp. re-bind `reftex-label-alist' as well and make
-        ;; `reftex-label' DTRT:
-        (reftex-label-alist
-         (when (and (boundp 'reftex-label-alist)
-                    LaTeX-label-alist
-                    (string= environment "changelog"))
-           `((,environment ?s ,(cdr (assoc sec LaTeX-section-label)) nil t)))))
+         ;; Collect the key=vals acc. to environment & documentclass
+         (opts (TeX-read-key-val
+                t
+                (if (string= environment "changelog")
+                    (append
+                     `(("sectioncmd"
+                        ,(if (< (LaTeX-largest-level) 2)
+                             (append
+                              (mapcar (lambda (cmd) (concat TeX-esc cmd))
+                                      seccmds)
+                              (mapcar (lambda (cmd) (concat TeX-esc cmd "*"))
+                                      seccmds))
+                           (append
+                            (mapcar (lambda (cmd) (concat TeX-esc cmd))
+                                    (remove "chapter" seccmds))
+                            (mapcar (lambda (cmd) (concat TeX-esc cmd "*"))
+                                    (remove "chapter" seccmds))))))
+                     LaTeX-changelog-env-key-val-options
+                     LaTeX-changelog-version-env-key-val-options)
+                  LaTeX-changelog-version-env-key-val-options)))
+         ;; Extract the chosen sectioning command
+         (sec (progn
+                (string-match "sectioncmd=\\\\\\([a-z]+\\)\\(\\*?\\)" opts)
+                (match-string-no-properties 1 opts)))
+         ;; Temp. re-bind `LaTeX-label-alist' and pick the label
+         ;; prefix from `LaTeX-section-label'
+         (LaTeX-label-alist
+          (when (and (string= environment "changelog")
+                     (match-string 2 opts)
+                     (not (string= (match-string 2 opts) "*")))
+            `(,(cons environment
+                     (cdr (assoc sec LaTeX-section-label))))))
+         ;; Temp. re-bind `reftex-label-alist' as well and make
+         ;; `reftex-label' DTRT:
+         (reftex-label-alist
+          (when (and (boundp 'reftex-label-alist)
+                     LaTeX-label-alist
+                     (string= environment "changelog"))
+            `((,environment ?s ,(cdr (assoc sec LaTeX-section-label)) nil 
t)))))
     (LaTeX-insert-environment
      environment
      (when (and opts (not (string= opts "")))
@@ -127,34 +127,34 @@ The keys sectioncmd and label are added in the function
     '("fixed"      0)
     '("security"   0)
     `("shortversion" (TeX-arg-key-val
-                     ,(append
-                       '(("changes"))
-                       LaTeX-changelog-version-env-key-val-options))))
+                      ,(append
+                        '(("changes"))
+                        LaTeX-changelog-version-env-key-val-options))))
 
    ;; Tell RefTeX that the optional arg of changelog env. can contain a label:
    (when (and (boundp 'reftex-label-regexps)
-             (fboundp 'reftex-compile-variables)
-             (not (string-match  "\\bchangelog\\b"
-                                 (mapconcat #'identity
-                                            reftex-label-regexps
-                                            "|"))))
+              (fboundp 'reftex-compile-variables)
+              (not (string-match  "\\bchangelog\\b"
+                                  (mapconcat #'identity
+                                             reftex-label-regexps
+                                             "|"))))
      (add-to-list (make-local-variable 'reftex-label-regexps)
-                 (concat "\\\\begin{changelog}"
-                         (LaTeX-extract-key-value-label nil 1))
-                 t)
+                  (concat "\\\\begin{changelog}"
+                          (LaTeX-extract-key-value-label nil 1))
+                  t)
      (reftex-compile-variables))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("added"        "")
-                               ("changed"      "")
-                               ("deprecated"   "")
-                               ("removed"      "")
-                               ("fixed"        "")
-                               ("security"     "")
-                               ("shortversion" "{"))
-                             'function)))
+                                ("changed"      "")
+                                ("deprecated"   "")
+                                ("removed"      "")
+                                ("fixed"        "")
+                                ("security"     "")
+                                ("shortversion" "{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-changelog-package-options nil
diff --git a/style/cleveref.el b/style/cleveref.el
index 6545f17..373dcd8 100644
--- a/style/cleveref.el
+++ b/style/cleveref.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defun TeX-arg-cleveref-multiple-labels (optional &optional prompt)
   "Prompt for a series of labels completing with known labels.
@@ -44,15 +44,15 @@ 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 (and (fboundp 'reftex-arg-label)
-          (fboundp 'reftex-plug-flag)
-          (reftex-plug-flag 2))
+           (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-prompt optional prompt "Keys")
+                    (LaTeX-label-list)))
+           (labels-string (mapconcat #'identity labels ",")))
       (TeX-argument-insert labels-string optional))))
 
 (defun TeX-arg-cleveref-crossref-type (optional &optional prompt)
@@ -60,10 +60,10 @@ string."
 If OPTIONAL is non-nil, insert the resulting value in brackets.
 Use PROMPT as the prompt string."
   (let* ((type (mapcar #'list
-                      '("appendix" "subappendix" "subsubappendix"
-                        "subsubsubappendix" "subfigure" "subtable"
-                        "subequation")))
-        (types (append (LaTeX-counter-list) type)))
+                       '("appendix" "subappendix" "subsubappendix"
+                         "subsubsubappendix" "subfigure" "subtable"
+                         "subequation")))
+         (types (append (LaTeX-counter-list) type)))
     (TeX-argument-insert
      (completing-read (TeX-argument-prompt optional prompt "Type") types)
      optional)))
@@ -148,54 +148,54 @@ Use PROMPT as the prompt string."
    ;; order not to run `reftex-compile-variables' every time the style
    ;; hook runs
    (when (and (boundp 'reftex-label-regexps)
-             (fboundp 'reftex-compile-variables))
+              (fboundp 'reftex-compile-variables))
      (let ((regexp "\\\\label\\[[^]]*\\]{\\(?1:[^\n\r%\\{}]+\\)}"))
        (unless (member regexp reftex-label-regexps)
-        (add-to-list (make-local-variable 'reftex-label-regexps)
-                     regexp t)
-        (reftex-compile-variables))))
+         (add-to-list (make-local-variable 'reftex-label-regexps)
+                      regexp t)
+         (reftex-compile-variables))))
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("cref"          "*{")
-                               ("Cref"          "*{")
-                               ("crefrange"     "*{{")
-                               ("Crefrange"     "*{{")
-                               ("cpageref"      "{")
-                               ("Cpageref"      "{")
-                               ("cpagerefrange" "{{")
-                               ("Cpagerefrange" "{{")
-                               ("namecref"      "{")
-                               ("nameCref"      "{")
-                               ("lcnamecref"    "{")
-                               ("namecrefs"     "{")
-                               ("nameCrefs"     "{")
-                               ("lcnamecrefs"   "{")
-                               ("labelcref"     "{")
-                               ("labelcpageref" "{")
-                               ("label"         "[{"))
-                             'reference)
+                                ("Cref"          "*{")
+                                ("crefrange"     "*{{")
+                                ("Crefrange"     "*{{")
+                                ("cpageref"      "{")
+                                ("Cpageref"      "{")
+                                ("cpagerefrange" "{{")
+                                ("Cpagerefrange" "{{")
+                                ("namecref"      "{")
+                                ("nameCref"      "{")
+                                ("lcnamecref"    "{")
+                                ("namecrefs"     "{")
+                                ("nameCrefs"     "{")
+                                ("lcnamecrefs"   "{")
+                                ("labelcref"     "{")
+                                ("labelcpageref" "{")
+                                ("label"         "[{"))
+                              'reference)
      (font-latex-add-keywords '(("crefalias"              "{{")
-                               ("crefname"               "{{{")
-                               ("Crefname"               "{{{")
-                               ("creflabelformat"        "{{")
-                               ("crefrangelabelformat"   "{{")
-                               ("crefdefaultlabelformat" "{")
-                               ("crefformat"             "{{")
-                               ("Crefformat"             "{{")
-                               ("crefrangeformat"        "{{")
-                               ("Crefrangeformat"        "{{")
-                               ("crefmultiformat"        "{{{{{")
-                               ("Crefmultiformat"        "{{{{{")
-                               ("crefrangemultiformat"   "{{{{{")
-                               ("Crefrangemultiformat"   "{{{{{"))
-                             'function))
+                                ("crefname"               "{{{")
+                                ("Crefname"               "{{{")
+                                ("creflabelformat"        "{{")
+                                ("crefrangelabelformat"   "{{")
+                                ("crefdefaultlabelformat" "{")
+                                ("crefformat"             "{{")
+                                ("Crefformat"             "{{")
+                                ("crefrangeformat"        "{{")
+                                ("Crefrangeformat"        "{{")
+                                ("crefmultiformat"        "{{{{{")
+                                ("Crefmultiformat"        "{{{{{")
+                                ("crefrangemultiformat"   "{{{{{")
+                                ("Crefrangemultiformat"   "{{{{{"))
+                              'function))
 
    ;; Activate RefTeX reference style.
    (and LaTeX-reftex-ref-style-auto-activate
-       (fboundp 'reftex-ref-style-activate)
-       (reftex-ref-style-activate "Cleveref")))
+        (fboundp 'reftex-ref-style-activate)
+        (reftex-ref-style-activate "Cleveref")))
  TeX-dialect)
 
 (defvar LaTeX-cleveref-package-options
diff --git a/style/color.el b/style/color.el
index 501698e..517780f 100644
--- a/style/color.el
+++ b/style/color.el
@@ -39,8 +39,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-color-colour-models
   '("cmyk" "gray" "named" "rgb")
@@ -92,37 +92,37 @@
     (TeX-argument-insert colorname optional))
   ;; Ask and insert <model>
   (let ((model (completing-read
-               (TeX-argument-prompt optional prompt "Color model")
-               (if (not (or (LaTeX-provided-package-options-member "color" 
"dvips")
-                            (LaTeX-provided-package-options-member "color" 
"dvipsnames")))
-                   (remove "named" LaTeX-color-colour-models)
-                 LaTeX-color-colour-models))))
+                (TeX-argument-prompt optional prompt "Color model")
+                (if (not (or (LaTeX-provided-package-options-member "color" 
"dvips")
+                             (LaTeX-provided-package-options-member "color" 
"dvipsnames")))
+                    (remove "named" LaTeX-color-colour-models)
+                  LaTeX-color-colour-models))))
     (TeX-argument-insert model optional)
     ;; Depending on <model>, ask for <color spec> and insert it
     (cond (;; <cmyk> model
-          (string-equal model "cmyk")
-          (let ((cyan    (TeX-read-string "Value Cyan (between 0,1): "))
-                (magenta (TeX-read-string "Value Magenta (between 0,1): "))
-                (yellow  (TeX-read-string "Value Yellow (between 0,1): "))
-                (black   (TeX-read-string "Value Black (between 0,1): ")))
-            (TeX-argument-insert
-             (concat cyan "," magenta "," yellow "," black) optional)))
-         ;; <rgb> model
-         ((string-equal model "rgb")
-          (let ((red   (TeX-read-string "Value Red (between 0,1): "))
-                (green (TeX-read-string "Value Green (between 0,1): "))
-                (blue  (TeX-read-string "Value Blue (between 0,1): ")))
-            (TeX-argument-insert
-             (concat red "," green "," blue) optional)))
-         ;; <gray> model
-         ((string-equal model "gray")
-          (let ((grayness (TeX-read-string "Value Gray (between 0,1): ")))
-            (TeX-argument-insert grayness optional)))
-         ;; <named> model takes the dvipsnames
-         ((string-equal model "named")
-          (let ((color (completing-read "Named Color: "
-                                        LaTeX-color-dvipsnames-colors)))
-            (TeX-argument-insert color optional))))))
+           (string-equal model "cmyk")
+           (let ((cyan    (TeX-read-string "Value Cyan (between 0,1): "))
+                 (magenta (TeX-read-string "Value Magenta (between 0,1): "))
+                 (yellow  (TeX-read-string "Value Yellow (between 0,1): "))
+                 (black   (TeX-read-string "Value Black (between 0,1): ")))
+             (TeX-argument-insert
+              (concat cyan "," magenta "," yellow "," black) optional)))
+          ;; <rgb> model
+          ((string-equal model "rgb")
+           (let ((red   (TeX-read-string "Value Red (between 0,1): "))
+                 (green (TeX-read-string "Value Green (between 0,1): "))
+                 (blue  (TeX-read-string "Value Blue (between 0,1): ")))
+             (TeX-argument-insert
+              (concat red "," green "," blue) optional)))
+          ;; <gray> model
+          ((string-equal model "gray")
+           (let ((grayness (TeX-read-string "Value Gray (between 0,1): ")))
+             (TeX-argument-insert grayness optional)))
+          ;; <named> model takes the dvipsnames
+          ((string-equal model "named")
+           (let ((color (completing-read "Named Color: "
+                                         LaTeX-color-dvipsnames-colors)))
+             (TeX-argument-insert color optional))))))
 
 (defun TeX-arg-color (optional &optional prompt)
   "Insert arguments of various color commands from `color.sty'."
@@ -182,7 +182,7 @@
   ;; `TeX-insert-macro-default-style' and `current-prefix-arg'.
   ;; Remove `named' if necessary.
   (let* ((TeX-last-optional-rejected nil)
-        (model (LaTeX-check-insert-macro-default-style
+         (model (LaTeX-check-insert-macro-default-style
                  (completing-read
                   (TeX-argument-prompt t prompt "Color model")
                   (if (not (or (LaTeX-provided-package-options-member "color" 
"dvips")
@@ -193,57 +193,57 @@
     ;; an empty string, then insert [<model>] and cater for 2
     ;; mandatory args.
     (if (and model (not (string-equal model "")))
-       (progn
-         (insert (concat LaTeX-optop model LaTeX-optcl))
-         (cond (;; <cmyk> model
-                (string-equal model "cmyk")
-                (let ((cyan    (TeX-read-string "Frame value Cyan (between 
0,1): "))
-                      (magenta (TeX-read-string "Frame value Magenta (between 
0,1): "))
-                      (yellow  (TeX-read-string "Frame value Yellow (between 
0,1): "))
-                      (black   (TeX-read-string "Frame value Black (between 
0,1): ")))
-                  (TeX-argument-insert
-                   (concat cyan "," magenta "," yellow "," black) optional))
-                (let ((cyan    (TeX-read-string "Box value Cyan (between 0,1): 
"))
-                      (magenta (TeX-read-string "Box value Magenta (between 
0,1): "))
-                      (yellow  (TeX-read-string "Box value Yellow (between 
0,1): "))
-                      (black   (TeX-read-string "Box value Black (between 
0,1): ")))
-                  (TeX-argument-insert
-                   (concat cyan "," magenta "," yellow "," black) optional)))
-               ;; <rgb> model
-               ((string-equal model "rgb")
-                (let ((red   (TeX-read-string "Frame value Red (between 0,1): 
"))
-                      (green (TeX-read-string "Frame value Green (between 
0,1): "))
-                      (blue  (TeX-read-string "Frame value Blue (between 0,1): 
")))
-                  (TeX-argument-insert
-                   (concat red "," green "," blue) optional))
-                (let ((red   (TeX-read-string "Box value Red (between 0,1): "))
-                      (green (TeX-read-string "Box value Green (between 0,1): 
"))
-                      (blue  (TeX-read-string "box value Blue (between 0,1): 
")))
-                  (TeX-argument-insert
-                   (concat red "," green "," blue) optional)))
-               ;; <gray> model
-               ((string-equal model "gray")
-                (let ((grayness (TeX-read-string "Frame value Gray (between 
0,1): ")))
-                  (TeX-argument-insert grayness optional))
-                (let ((grayness (TeX-read-string "Box value Gray (between 
0,1): ")))
-                  (TeX-argument-insert grayness optional)))
-               ;; <named> model; allowed are dvipsnames.
-               ((string-equal model "named")
-                (let ((color (completing-read "Frame named Color: "
-                                              LaTeX-color-dvipsnames-colors)))
-                  (TeX-argument-insert color optional))
-                (let ((color (completing-read "Box named Color: "
-                                              LaTeX-color-dvipsnames-colors)))
-                  (TeX-argument-insert color optional)))))
+        (progn
+          (insert (concat LaTeX-optop model LaTeX-optcl))
+          (cond (;; <cmyk> model
+                 (string-equal model "cmyk")
+                 (let ((cyan    (TeX-read-string "Frame value Cyan (between 
0,1): "))
+                       (magenta (TeX-read-string "Frame value Magenta (between 
0,1): "))
+                       (yellow  (TeX-read-string "Frame value Yellow (between 
0,1): "))
+                       (black   (TeX-read-string "Frame value Black (between 
0,1): ")))
+                   (TeX-argument-insert
+                    (concat cyan "," magenta "," yellow "," black) optional))
+                 (let ((cyan    (TeX-read-string "Box value Cyan (between 
0,1): "))
+                       (magenta (TeX-read-string "Box value Magenta (between 
0,1): "))
+                       (yellow  (TeX-read-string "Box value Yellow (between 
0,1): "))
+                       (black   (TeX-read-string "Box value Black (between 
0,1): ")))
+                   (TeX-argument-insert
+                    (concat cyan "," magenta "," yellow "," black) optional)))
+                ;; <rgb> model
+                ((string-equal model "rgb")
+                 (let ((red   (TeX-read-string "Frame value Red (between 0,1): 
"))
+                       (green (TeX-read-string "Frame value Green (between 
0,1): "))
+                       (blue  (TeX-read-string "Frame value Blue (between 
0,1): ")))
+                   (TeX-argument-insert
+                    (concat red "," green "," blue) optional))
+                 (let ((red   (TeX-read-string "Box value Red (between 0,1): 
"))
+                       (green (TeX-read-string "Box value Green (between 0,1): 
"))
+                       (blue  (TeX-read-string "box value Blue (between 0,1): 
")))
+                   (TeX-argument-insert
+                    (concat red "," green "," blue) optional)))
+                ;; <gray> model
+                ((string-equal model "gray")
+                 (let ((grayness (TeX-read-string "Frame value Gray (between 
0,1): ")))
+                   (TeX-argument-insert grayness optional))
+                 (let ((grayness (TeX-read-string "Box value Gray (between 
0,1): ")))
+                   (TeX-argument-insert grayness optional)))
+                ;; <named> model; allowed are dvipsnames.
+                ((string-equal model "named")
+                 (let ((color (completing-read "Frame named Color: "
+                                               LaTeX-color-dvipsnames-colors)))
+                   (TeX-argument-insert color optional))
+                 (let ((color (completing-read "Box named Color: "
+                                               LaTeX-color-dvipsnames-colors)))
+                   (TeX-argument-insert color optional)))))
       ;; if empty, ask for {<frame color spce>}{<box color name>} with 
completion
       (let ((frame-color (completing-read
-                         (TeX-argument-prompt optional prompt "Frame color 
name")
-                         (LaTeX-color-definecolor-list)))
-           (box-color   (completing-read
-                         (TeX-argument-prompt optional prompt "Box color name")
-                         (LaTeX-color-definecolor-list))))
-       (TeX-argument-insert frame-color optional)
-       (TeX-argument-insert box-color   optional)))))
+                          (TeX-argument-prompt optional prompt "Frame color 
name")
+                          (LaTeX-color-definecolor-list)))
+            (box-color   (completing-read
+                          (TeX-argument-prompt optional prompt "Box color 
name")
+                          (LaTeX-color-definecolor-list))))
+        (TeX-argument-insert frame-color optional)
+        (TeX-argument-insert box-color   optional)))))
 
 (TeX-add-style-hook
  "color"
@@ -257,8 +257,8 @@
 
    ;; Add dvips colors in conjunction with `usenames'.
    (when (and (LaTeX-provided-package-options-member "color" "usenames")
-             (or (LaTeX-provided-package-options-member "color" "dvips")
-                 (LaTeX-provided-package-options-member "color" "dvipsnames")))
+              (or (LaTeX-provided-package-options-member "color" "dvips")
+                  (LaTeX-provided-package-options-member "color" 
"dvipsnames")))
      (apply #'LaTeX-add-color-definecolors LaTeX-color-dvipsnames-colors))
 
    (unless (member "xcolor" (TeX-style-list))
@@ -290,16 +290,16 @@
 
      ;; Fontification
      (when (and (featurep 'font-latex)
-               (eq TeX-install-font-lock 'font-latex-setup))
+                (eq TeX-install-font-lock 'font-latex-setup))
        (font-latex-add-keywords '(("color"         "[{")
-                                 ("pagecolor"     "[{"))
-                               'type-declaration)
+                                  ("pagecolor"     "[{"))
+                                'type-declaration)
        (font-latex-add-keywords '(("textcolor"     "[{{")
-                                 ("colorbox"      "[{{" )
-                                 ("fcolorbox"     "[{{{"))
-                               'type-command)
+                                  ("colorbox"      "[{{" )
+                                  ("fcolorbox"     "[{{{"))
+                                'type-command)
        (font-latex-add-keywords '(("definecolor"    "{{{"))
-                               'function))))
+                                'function))))
  TeX-dialect)
 
 (defvar LaTeX-color-package-options
diff --git a/style/colortbl.el b/style/colortbl.el
index e4ba824..7bbab91 100644
--- a/style/colortbl.el
+++ b/style/colortbl.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "colortbl"
@@ -56,39 +56,39 @@
     ;; `TeX-arg-color' is provided by color.el,
     ;; `TeX-arg-xcolor' is provided by xcolor.el.
     '("columncolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list))
-                                        (TeX-arg-xcolor)
-                                      (TeX-arg-color))
+                                         (TeX-arg-xcolor)
+                                         (TeX-arg-color))
       [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
 
     '("rowcolor"    (TeX-arg-conditional (member "xcolor" (TeX-style-list))
-                                        (TeX-arg-xcolor)
-                                      (TeX-arg-color))
+                                         (TeX-arg-xcolor)
+                                         (TeX-arg-color))
       [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
 
     '("cellcolor"   (TeX-arg-conditional (member "xcolor" (TeX-style-list))
-                                        (TeX-arg-xcolor)
-                                      (TeX-arg-color))
+                                         (TeX-arg-xcolor)
+                                         (TeX-arg-color))
       [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
 
     '("arrayrulecolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list))
-                                        (TeX-arg-xcolor)
-                                      (TeX-arg-color)))
+                                            (TeX-arg-xcolor)
+                                            (TeX-arg-color)))
 
     '("doublerulesepcolor" (TeX-arg-conditional (member "xcolor" 
(TeX-style-list))
-                                        (TeX-arg-xcolor)
-                                      (TeX-arg-color))))
+                                                (TeX-arg-xcolor)
+                                                (TeX-arg-color))))
 
    (LaTeX-add-lengths "minrowclearance")
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("columncolor"  "[{[[")
-                               ("rowcolor"     "[{[[")
-                               ("cellcolor"    "[{[[")
-                               ("arrayrulecolor"     "[{")
-                               ("doublerulesepcolor" "[{"))
-                             'function)))
+                                ("rowcolor"     "[{[[")
+                                ("cellcolor"    "[{[[")
+                                ("arrayrulecolor"     "[{")
+                                ("doublerulesepcolor" "[{"))
+                              'function)))
  TeX-dialect)
 
 ;; colortbl.sty has one option `debugshow'.  I ignore that since it
diff --git a/style/commath.el b/style/commath.el
index dda6528..5c2b491 100644
--- a/style/commath.el
+++ b/style/commath.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "commath"
@@ -88,19 +88,19 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("thmref"  "{")
-                               ("exref"   "{")
-                               ("defnref" "{")
-                               ("secref"  "{")
-                               ("lemref"  "{")
-                               ("propref" "{")
-                               ("remref"  "{")
-                               ("figref"  "{")
-                               ("colref"  "{")
-                               ("appref"  "{")
-                               ("assref"  "{"))
-                             'reference)))
+                                ("exref"   "{")
+                                ("defnref" "{")
+                                ("secref"  "{")
+                                ("lemref"  "{")
+                                ("propref" "{")
+                                ("remref"  "{")
+                                ("figref"  "{")
+                                ("colref"  "{")
+                                ("appref"  "{")
+                                ("assref"  "{"))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-commath-package-options nil
diff --git a/style/comment.el b/style/comment.el
index 996ca9a..1e20e7e 100644
--- a/style/comment.el
+++ b/style/comment.el
@@ -35,11 +35,11 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 (defvar font-latex-syntactic-keywords-extra)
 
@@ -57,23 +57,23 @@
    (mapc 'LaTeX-add-environments LaTeX-comment-env-list)
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      ;; For syntactic fontification.
      (add-to-list 'font-latex-syntactic-keywords-extra
-                 ;; \begin is supposed to start at the beginning of a line.
-                 `(,(format "^\\\\begin *{%s}.*\\(\n\\)"
-                            (regexp-opt LaTeX-comment-env-list))
-                   (1 "!" t)))
+                  ;; \begin is supposed to start at the beginning of a line.
+                  `(,(format "^\\\\begin *{%s}.*\\(\n\\)"
+                             (regexp-opt LaTeX-comment-env-list))
+                    (1 "!" t)))
      (add-to-list 'font-latex-syntactic-keywords-extra
-                 ;; \end is supposed to start at the beginning of a line.
-                 `(,(format "^\\(\\\\\\)end *{%s}"
-                            (regexp-opt LaTeX-comment-env-list))
-                   (1 "!" t)))
+                  ;; \end is supposed to start at the beginning of a line.
+                  `(,(format "^\\(\\\\\\)end *{%s}"
+                             (regexp-opt LaTeX-comment-env-list))
+                    (1 "!" t)))
      (font-latex-add-keywords '(("includecomment" "{")
-                               ("excludecomment" "{")
-                               ("specialcomment" "{{{")
-                               ("processcomment" "{{{{"))
-                             'variable)
+                                ("excludecomment" "{")
+                                ("specialcomment" "{{{")
+                                ("processcomment" "{{{{"))
+                              'variable)
      ;; Tell font-lock about the update.
      (font-latex-set-syntactic-keywords)))
  TeX-dialect)
diff --git a/style/csquotes.el b/style/csquotes.el
index 9dae9b1..38e9309 100644
--- a/style/csquotes.el
+++ b/style/csquotes.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defun LaTeX-csquotes-read-language (optional &optional prompt)
   "Read and return a language for csquotes macros.
@@ -48,18 +48,18 @@ or `LaTeX-polyglossia-active-languages' are bound and use 
them to
 retrieve the active languages.  If none available, user is
 requested to enter a language."
   (cond ((and (fboundp 'LaTeX-babel-active-languages)
-             (LaTeX-babel-active-languages))
-        (completing-read
-         (TeX-argument-prompt optional prompt "Language")
-         (LaTeX-babel-active-languages)))
-       ((and (fboundp 'LaTeX-polyglossia-active-languages)
-             (LaTeX-polyglossia-active-languages))
-        (completing-read
-         (TeX-argument-prompt optional prompt "Language")
-         (LaTeX-polyglossia-active-languages)))
-       (t
-        (TeX-read-string
-         (TeX-argument-prompt optional prompt "Language")))))
+              (LaTeX-babel-active-languages))
+         (completing-read
+          (TeX-argument-prompt optional prompt "Language")
+          (LaTeX-babel-active-languages)))
+        ((and (fboundp 'LaTeX-polyglossia-active-languages)
+              (LaTeX-polyglossia-active-languages))
+         (completing-read
+          (TeX-argument-prompt optional prompt "Language")
+          (LaTeX-polyglossia-active-languages)))
+        (t
+         (TeX-read-string
+          (TeX-argument-prompt optional prompt "Language")))))
 
 (defun LaTeX-arg-csquotes-language (optional &optional prompt)
   "Insert a language for csquotes macros.
@@ -73,17 +73,17 @@ PROMPT replaces the standard one \"Language\"."
  "csquotes"
  (lambda ()
    (let ((quote-style-variant-list '(("american")   ("brazilian")
-                                    ("british")    ("german")
-                                    ("guillemets") ("guillemets*")
-                                    ("mexican")    ("portuguese")
-                                    ("quotes")     ("quotes*")
-                                    ("spanish")    ("swiss")))
-        (quote-style-name-list '(("austrian")   ("croatian") ("czech")
-                                 ("danish")     ("dutch")    ("english")
-                                 ("finnish")    ("french")   ("german")
-                                 ("greek")      ("italian")  ("norwegian")
-                                 ("portuguese") ("russian")  ("serbian")
-                                 ("spanish")    ("swedish"))))
+                                     ("british")    ("german")
+                                     ("guillemets") ("guillemets*")
+                                     ("mexican")    ("portuguese")
+                                     ("quotes")     ("quotes*")
+                                     ("spanish")    ("swiss")))
+         (quote-style-name-list '(("austrian")   ("croatian") ("czech")
+                                  ("danish")     ("dutch")    ("english")
+                                  ("finnish")    ("french")   ("german")
+                                  ("greek")      ("italian")  ("norwegian")
+                                  ("portuguese") ("russian")  ("serbian")
+                                  ("spanish")    ("swedish"))))
      ;; New symbols
      (TeX-add-symbols
 
@@ -103,31 +103,31 @@ PROMPT replaces the standard one \"Language\"."
 
       ;; 3.4 Formal Quoting of Text in a Foreign Language
       '("foreigntextquote"
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
       '("foreigntextquote*"
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
       '("hyphentextquote"
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
       '("hyphentextquote*"
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
 
       ;; 3.5 Block Quoting of Regular Text
       '("blockquote" ["Citation"] ["Punctuation"] t)
 
       ;; 3.6 Block Quoting of Text in a Foreign Language
       '("foreignblockquote"
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
       '("hyphenblockquote"
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
       '("hybridblockquote"
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t)
 
       ;; 3.7 Selecting Quote Styles
       `("setquotestyle"
-       [ (TeX-arg-eval completing-read "Quote style variant: "
-                       ',quote-style-variant-list) ]
-       (TeX-arg-eval completing-read "Quote style name or alias: "
-                     ',quote-style-name-list))
+        [ (TeX-arg-eval completing-read "Quote style variant: "
+                        ',quote-style-variant-list) ]
+        (TeX-arg-eval completing-read "Quote style name or alias: "
+                      ',quote-style-name-list))
       "setquotestyle*"
 
       ;; 4.1 Quoting Regular Text
@@ -138,26 +138,26 @@ PROMPT replaces the standard one \"Language\"."
 
       ;; 4.2 Quoting Text in a Foreign Language
       '("MakeForeignQuote" LaTeX-arg-csquotes-language
-       "Opening quotation mark" "Closing quotation mark")
+        "Opening quotation mark" "Closing quotation mark")
       '("MakeForeignQuote*" LaTeX-arg-csquotes-language
-       "Opening quotation mark" "Closing quotation mark")
+        "Opening quotation mark" "Closing quotation mark")
 
       '("MakeHyphenQuote" LaTeX-arg-csquotes-language
-       "Opening quotation mark" "Closing quotation mark")
+        "Opening quotation mark" "Closing quotation mark")
       '("MakeHyphenQuote" LaTeX-arg-csquotes-language
-       "Opening quotation mark" "Closing quotation mark")
+        "Opening quotation mark" "Closing quotation mark")
 
       ;; 4.3 Block Quoting of Regular Text
       '("MakeBlockQuote" "Opening quotation mark" "Delimiter for citation"
-       "Closing quotation mark")
+        "Closing quotation mark")
 
       ;; 4.4 Block Quoting of Text in a Foreign Language
       '("MakeForeignBlockQuote" LaTeX-arg-csquotes-language
-       "Opening quotation mark" "Delimiter for citation" "Closing quotation 
mark")
+        "Opening quotation mark" "Delimiter for citation" "Closing quotation 
mark")
       '("MakeHyphenBlockQuote" LaTeX-arg-csquotes-language
-       "Opening quotation mark" "Delimiter for citation" "Closing quotation 
mark")
+        "Opening quotation mark" "Delimiter for citation" "Closing quotation 
mark")
       '("MakeHybridBlockQuote" LaTeX-arg-csquotes-language
-       "Opening quotation mark" "Delimiter for citation" "Closing quotation 
mark")
+        "Opening quotation mark" "Delimiter for citation" "Closing quotation 
mark")
 
       ;; 4.5 Controlling Active Quotes
       "EnableQuotes"
@@ -171,24 +171,24 @@ PROMPT replaces the standard one \"Language\"."
 
       ;; 5.2 Formal Quoting of Text in a Foreign Language
       '("foreigntextcquote" LaTeX-arg-csquotes-language
-       ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
+        ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
       '("foreigntextcquote*" LaTeX-arg-csquotes-language
-       ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
+        ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
       '("hyphentextcquote" LaTeX-arg-csquotes-language
-       ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
+        ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
       '("hyphentextcquote*" LaTeX-arg-csquotes-language
-       ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
+        ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
 
       ;; 5.3 Block Quoting of Regular Text
       '("blockcquote" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
 
       ;; 5.4 Block Quoting of Text in a Foreign Language
       '("foreignblockcquote" LaTeX-arg-csquotes-language
-       ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
+        ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
       '("hyphenblockcquote" LaTeX-arg-csquotes-language
-       ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
+        ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
       '("hybridblockcquote" LaTeX-arg-csquotes-language
-       ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
+        ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
 
       ;; 7 Auxiliary Commands
       '("textelp" 1)
@@ -199,26 +199,26 @@ PROMPT replaces the standard one \"Language\"."
 
       ;; 8.1 Defining Quote Styles
       `("DeclareQuoteStyle"
-       [ (TeX-arg-eval completing-read "Quote style variant: "
-                       ',quote-style-variant-list) ]
-       (TeX-arg-eval completing-read "Quote style name: "
-                     ',quote-style-name-list)
-       ["Outer quote initialization"] ["Inner quote initialization"]
-       "Opening outer quotation mark" ["Middle outer quotation mark"]
-       "Closing outer quotation mark" ["Kerning between adjoining marks"]
-       "Opening inner quotation mark" ["Middle inner quotation mark"]
-       "Closing inner quotation mark")
+        [ (TeX-arg-eval completing-read "Quote style variant: "
+                        ',quote-style-variant-list) ]
+        (TeX-arg-eval completing-read "Quote style name: "
+                      ',quote-style-name-list)
+        ["Outer quote initialization"] ["Inner quote initialization"]
+        "Opening outer quotation mark" ["Middle outer quotation mark"]
+        "Closing outer quotation mark" ["Kerning between adjoining marks"]
+        "Opening inner quotation mark" ["Middle inner quotation mark"]
+        "Closing inner quotation mark")
       `("DeclareQuoteAlias"
-       [ (TeX-arg-eval completing-read "Quote style variant: "
-                       ',quote-style-variant-list) ]
-       (TeX-arg-eval completing-read "Quote style name: "
-                     ',quote-style-name-list)
-       "Alias name")
+        [ (TeX-arg-eval completing-read "Quote style variant: "
+                        ',quote-style-variant-list) ]
+        (TeX-arg-eval completing-read "Quote style name: "
+                      ',quote-style-name-list)
+        "Alias name")
       '("DeclareQuoteOption" 1)
       '("ExecuteQuoteOptions" 1)
       '("DeclarePlainStyle" "Opening outer quotation mark"
-       "Closing outer quotation mark" "Opening inner quotation mark"
-       "Closing inner quotation mark")
+        "Closing outer quotation mark" "Opening inner quotation mark"
+        "Closing inner quotation mark")
       '("SetBlockThreshold" "Number of lines")
       '("SetBlockEnvironment" "Environment")
       '("SetCiteCommand" "Command")
@@ -250,142 +250,142 @@ PROMPT replaces the standard one \"Language\"."
 
       ;; 6.1 Basic Display Environments
       '("displayquote" LaTeX-env-args
-       ["Citation"] ["Punctuation"])
+        ["Citation"] ["Punctuation"])
 
       '("foreigndisplayquote" LaTeX-env-args
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"])
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"])
 
       '("hyphendisplayquote" LaTeX-env-args
-       LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"])
+        LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"])
 
       ;; 6.2 Integrated Display Environments
       '("displaycquote" LaTeX-env-args
-       ["Pre-note"] ["Post-note"] "Key" ["Punctuation"])
+        ["Pre-note"] ["Post-note"] "Key" ["Punctuation"])
 
       '("foreigndisplaycquote" LaTeX-env-args
-       LaTeX-arg-csquotes-language["Pre-note"] ["Post-note"] "Key" 
["Punctuation"])
+        LaTeX-arg-csquotes-language["Pre-note"] ["Post-note"] "Key" 
["Punctuation"])
 
       '("hyphendisplaycquote" LaTeX-env-args
-       LaTeX-arg-csquotes-language["Pre-note"] ["Post-note"] "Key" 
["Punctuation"]))
+        LaTeX-arg-csquotes-language["Pre-note"] ["Post-note"] "Key" 
["Punctuation"]))
 
      ;; Quotation marks
      (when (and (> (length LaTeX-csquotes-open-quote) 0)
-               (> (length LaTeX-csquotes-close-quote) 0))
+                (> (length LaTeX-csquotes-close-quote) 0))
        (setq TeX-quote-language
-            `(override ,LaTeX-csquotes-open-quote ,LaTeX-csquotes-close-quote
-                       ,LaTeX-csquotes-quote-after-quote)))
+             `(override ,LaTeX-csquotes-open-quote ,LaTeX-csquotes-close-quote
+                        ,LaTeX-csquotes-quote-after-quote)))
      ;; Fontification
      (when (and (featurep 'font-latex)
-               (eq TeX-install-font-lock 'font-latex-setup))
+                (eq TeX-install-font-lock 'font-latex-setup))
        (font-latex-add-keywords '(("EnableQuotes"   "")
-                                 ("DisableQuotes"  "")
-                                 ("VerbatimQuotes" "")
-                                 ("DeleteQuotes"   ""))
-                               'function)
+                                  ("DisableQuotes"  "")
+                                  ("VerbatimQuotes" "")
+                                  ("DeleteQuotes"   ""))
+                                'function)
        (font-latex-add-keywords '(("enquote"            "*{")
-                                 ("foreignquote"       "*{{")
-                                 ("hyphenquote"        "*{{")
-                                 ("textquote"          "*[[{")
-                                 ("foreigntextquote"   "*{[[{")
-                                 ("hyphentextquote"    "*{[[{")
-                                 ("blockquote"         "[[{")
-                                 ("foreignblockquote"  "{[[{")
-                                 ("hyphenblockquote"   "{[[{")
-                                 ("hybridblockquote"   "{[[{")
-                                 ("textcquote"         "*[[{[{")
-                                 ("foreigntextcquote"  "*{[[{[{")
-                                 ("hyphentextcquote"   "*{[[{[{")
-                                 ("blockcquote"        "[[{[{")
-                                 ("foreignblockcquote" "{[[{[{")
-                                 ("hyphenblockcquote"  "{[[{[{")
-                                 ("hybridblockcquote"  "{[[{[{"))
-                               'textual)
+                                  ("foreignquote"       "*{{")
+                                  ("hyphenquote"        "*{{")
+                                  ("textquote"          "*[[{")
+                                  ("foreigntextquote"   "*{[[{")
+                                  ("hyphentextquote"    "*{[[{")
+                                  ("blockquote"         "[[{")
+                                  ("foreignblockquote"  "{[[{")
+                                  ("hyphenblockquote"   "{[[{")
+                                  ("hybridblockquote"   "{[[{")
+                                  ("textcquote"         "*[[{[{")
+                                  ("foreigntextcquote"  "*{[[{[{")
+                                  ("hyphentextcquote"   "*{[[{[{")
+                                  ("blockcquote"        "[[{[{")
+                                  ("foreignblockcquote" "{[[{[{")
+                                  ("hyphenblockcquote"  "{[[{[{")
+                                  ("hybridblockcquote"  "{[[{[{"))
+                                'textual)
        (font-latex-add-keywords '(("setquotestyle"         "[{")
-                                 ("MakeOuterQuote"        "{")
-                                 ("MakeInnerQuote"        "{")
-                                 ("MakeAutoQuote"         "*{{")
-                                 ("MakeForeignQuote"      "*{{{")
-                                 ("MakeHyphenQuote"       "*{{{")
-                                 ("MakeBlockQuote"        "{{{")
-                                 ("MakeForeignBlockQuote" "{{{{")
-                                 ("MakeHyphenBlockQuote"  "{{{{")
-                                 ("DeclareQuoteStyle"     "[{[[{[{[{[{")
-                                 ("DeclareQuoteAlias"     "[{{")
-                                 ("DeclareQuoteOption"    "{")
-                                 ("DeclarePlainStyle"     "{{{{")
-                                 ("SetBlockThreshold"     "{")
-                                 ("SetBlockEnvironment"   "{")
-                                 ("SetCiteCommand"        "{"))
-                               'variable))))
+                                  ("MakeOuterQuote"        "{")
+                                  ("MakeInnerQuote"        "{")
+                                  ("MakeAutoQuote"         "*{{")
+                                  ("MakeForeignQuote"      "*{{{")
+                                  ("MakeHyphenQuote"       "*{{{")
+                                  ("MakeBlockQuote"        "{{{")
+                                  ("MakeForeignBlockQuote" "{{{{")
+                                  ("MakeHyphenBlockQuote"  "{{{{")
+                                  ("DeclareQuoteStyle"     "[{[[{[{[{[{")
+                                  ("DeclareQuoteAlias"     "[{{")
+                                  ("DeclareQuoteOption"    "{")
+                                  ("DeclarePlainStyle"     "{{{{")
+                                  ("SetBlockThreshold"     "{")
+                                  ("SetBlockEnvironment"   "{")
+                                  ("SetCiteCommand"        "{"))
+                                'variable))))
  TeX-dialect)
 
 (defun LaTeX-csquotes-package-options ()
   "Prompt for package options for the csquotes package."
   (TeX-read-key-val t '(("strict"     ("true" "false"))
-                       ("style"      ("american"
-                                      "australian"
-                                      "austrian"
-                                      "brazil"
-                                      "brazilian"
-                                      "british"
-                                      "canadian"
-                                      "croatian"
-                                      "czech"
-                                      "danish"
-                                      "dutch"
-                                      "english"
-                                      "finnish"
-                                      "french"
-                                      "german"
-                                      "greek"
-                                      "italian"
-                                      "mexican"
-                                      "naustrian"
-                                      "newzealand"
-                                      "ngerman"
-                                      "norsk"
-                                      "norwegian"
-                                      "nswissgerman"
-                                      "nynorsk"
-                                      "portuges"
-                                      "portuguese"
-                                      "russian"
-                                      "serbian"
-                                      "spanish"
-                                      "swedish"
-                                      "swiss"
-                                      "swissgerman"
-                                      "UKenglish"
-                                      "USenglish"))
-                       ("autostyle"  ("true" "false" "try" "once" "tryonce"))
-                       ("austrian"   ("quotes" "guillemets"))
-                       ("croatian"   ("quotes" "guillemets" "guillemets*"))
-                       ("czech"      ("quotes" "guillemets"))
-                       ("danish"     ("quotes" "guillemets" "topquotes"))
-                       ("english"    ("american" "british"))
-                       ("estonian")
-                       ("french"     ("quotes" "quotes*" "guillemets" 
"guillemets*"))
-                       ("galician"   ("quotes" "guillemets"))
-                       ("german"     ("quotes" "guillemets" "swiss"))
-                       ("hungarian")
-                       ("italian"    ("guillemets" "quotes"))
-                       ("latvian")
-                       ("norwegian"  ("guillemets" "quotes"))
-                       ("polish"     ("guillemets" "guillemets*"))
-                       ("portuguese" ("portuguese" "brazilian"))
-                       ("serbian"    ("quotes" "guillemets" "german"))
-                       ("spanish"    ("spanish" "mexican"))
-                       ("swedish"    ("quotes" "guillemets" "guillemets*"))
-                       ("maxlevel")
-                       ("autopunct"     ("true" "false"))
-                       ("threshold")
-                       ("thresholdtype" ("lines" "words"))
-                       ("parthreshold"  ("true" "false"))
-                       ("splitcomp"     ("true" "false"))
-                       ("csdisplay"     ("true" "false"))
-                       ("debug"         ("true" "false"))
-                       ;; "babel" key is deprecated, replaced by "autostyle":
-                       ;; ("babel" ("true" "false" "try" "once" "tryonce"))
-                       ("version"       ("4.4" "3.6" "3.0")))))
+                        ("style"      ("american"
+                                       "australian"
+                                       "austrian"
+                                       "brazil"
+                                       "brazilian"
+                                       "british"
+                                       "canadian"
+                                       "croatian"
+                                       "czech"
+                                       "danish"
+                                       "dutch"
+                                       "english"
+                                       "finnish"
+                                       "french"
+                                       "german"
+                                       "greek"
+                                       "italian"
+                                       "mexican"
+                                       "naustrian"
+                                       "newzealand"
+                                       "ngerman"
+                                       "norsk"
+                                       "norwegian"
+                                       "nswissgerman"
+                                       "nynorsk"
+                                       "portuges"
+                                       "portuguese"
+                                       "russian"
+                                       "serbian"
+                                       "spanish"
+                                       "swedish"
+                                       "swiss"
+                                       "swissgerman"
+                                       "UKenglish"
+                                       "USenglish"))
+                        ("autostyle"  ("true" "false" "try" "once" "tryonce"))
+                        ("austrian"   ("quotes" "guillemets"))
+                        ("croatian"   ("quotes" "guillemets" "guillemets*"))
+                        ("czech"      ("quotes" "guillemets"))
+                        ("danish"     ("quotes" "guillemets" "topquotes"))
+                        ("english"    ("american" "british"))
+                        ("estonian")
+                        ("french"     ("quotes" "quotes*" "guillemets" 
"guillemets*"))
+                        ("galician"   ("quotes" "guillemets"))
+                        ("german"     ("quotes" "guillemets" "swiss"))
+                        ("hungarian")
+                        ("italian"    ("guillemets" "quotes"))
+                        ("latvian")
+                        ("norwegian"  ("guillemets" "quotes"))
+                        ("polish"     ("guillemets" "guillemets*"))
+                        ("portuguese" ("portuguese" "brazilian"))
+                        ("serbian"    ("quotes" "guillemets" "german"))
+                        ("spanish"    ("spanish" "mexican"))
+                        ("swedish"    ("quotes" "guillemets" "guillemets*"))
+                        ("maxlevel")
+                        ("autopunct"     ("true" "false"))
+                        ("threshold")
+                        ("thresholdtype" ("lines" "words"))
+                        ("parthreshold"  ("true" "false"))
+                        ("splitcomp"     ("true" "false"))
+                        ("csdisplay"     ("true" "false"))
+                        ("debug"         ("true" "false"))
+                        ;; "babel" key is deprecated, replaced by "autostyle":
+                        ;; ("babel" ("true" "false" "try" "once" "tryonce"))
+                        ("version"       ("4.4" "3.6" "3.0")))))
 
 ;;; csquotes.el ends here
diff --git a/style/currvita.el b/style/currvita.el
index 7b693d9..03a099a 100644
--- a/style/currvita.el
+++ b/style/currvita.el
@@ -43,12 +43,12 @@
      (format "{%s}" heading)))
   (if (TeX-active-mark)
       (progn
-       (LaTeX-find-matching-begin)
-       (end-of-line 1))
+        (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]*$"))
+                            "^[ \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'
@@ -59,9 +59,9 @@
   ;; The inserted \item may have outdented the first line to the
   ;; right.  Fill it, if appropriate.
   (when (and (not (looking-at "$"))
-            (not (assoc env LaTeX-indent-environment-list))
-            (> (- (line-end-position) (line-beginning-position))
-               (current-fill-column)))
+             (not (assoc env LaTeX-indent-environment-list))
+             (> (- (line-end-position) (line-beginning-position))
+                (current-fill-column)))
     (LaTeX-fill-paragraph nil)))
 
 
diff --git a/style/danish.el b/style/danish.el
index 4f3a1cc..a582e9e 100644
--- a/style/danish.el
+++ b/style/danish.el
@@ -7,8 +7,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (TeX-add-style-hook
  "danish"
diff --git a/style/dashundergaps.el b/style/dashundergaps.el
index dfe5077..cb58760 100644
--- a/style/dashundergaps.el
+++ b/style/dashundergaps.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-dashundergaps-key-val-options
   `(;; 2.1.1 Gap modes
@@ -46,17 +46,17 @@
     ("teachermode"  ("true" "false"))
     ;; 2.1.2 Gap formatting
     ("gap-format"        ("underline" "double-underline"
-                         "dash" "dot" "wave" "blank"))
+                          "dash" "dot" "wave" "blank"))
     ("gap-format-adjust"  ("true" "false"))
     ("teacher-gap-format" ("underline" "double-underline"
-                          "dash" "dot" "wave" "blank"))
+                           "dash" "dot" "wave" "blank"))
     ("gap-font" ,(mapcar (lambda (x)
-                          (concat TeX-esc x))
-                        '("rmfamily" "sffamily" "ttfamily" "mdseries" 
"bfseries"
-                          "upshape" "itshape" "slshape" "scshape"
-                          "tiny"  "scriptsize" "footnotesize"
-                          "small" "normalsize" "large"
-                          "Large" "LARGE" "huge" "Huge" "normalfont")))
+                           (concat TeX-esc x))
+                         '("rmfamily" "sffamily" "ttfamily" "mdseries" 
"bfseries"
+                           "upshape" "itshape" "slshape" "scshape"
+                           "tiny"  "scriptsize" "footnotesize"
+                           "small" "normalsize" "large"
+                           "Large" "LARGE" "huge" "Huge" "normalfont")))
     ("dash")
     ("dot")
     ;; 2.1.3 Gap numbers
@@ -68,8 +68,8 @@
     ;; 2.1.4 Gap widening
     ("gap-widen"          ("true" "false"))
     ("gap-extend-minimum" ,(mapcar (lambda (x)
-                                    (concat TeX-esc x))
-                                  (mapcar #'car (LaTeX-length-list))))
+                                     (concat TeX-esc x))
+                                   (mapcar #'car (LaTeX-length-list))))
     ("gap-extend-percent")
     ("widen"))
   "Key=value options for dashundergaps macro.")
@@ -91,13 +91,13 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("gap" "*[{"))
-                             'textual)
+                              'textual)
      (font-latex-add-keywords '(("dashundergapssetup" "{")
-                               ("TeacherModeOn"      "")
-                               ("TeacherModeOff"     ""))
-                             'function)))
+                                ("TeacherModeOn"      "")
+                                ("TeacherModeOff"     ""))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-dashundergaps-package-options nil
diff --git a/style/dcolumn.el b/style/dcolumn.el
index 778fc1f..8151f59 100644
--- a/style/dcolumn.el
+++ b/style/dcolumn.el
@@ -39,7 +39,7 @@
 
    ;; `dcolumn.sty' adds one new column specification letter:
    (set (make-local-variable 'LaTeX-array-column-letters)
-       (concat LaTeX-array-column-letters "D"))
+        (concat LaTeX-array-column-letters "D"))
 
    ;; Also run style hook for `array':
    (TeX-run-style-hooks "array"))
diff --git a/style/dinbrief.el b/style/dinbrief.el
index 7e2e8db..8b0ccd7 100644
--- a/style/dinbrief.el
+++ b/style/dinbrief.el
@@ -38,7 +38,7 @@
  "dinbrief"
  (lambda ()
    (add-hook 'LaTeX-document-style-hook
-            'LaTeX-dinbrief-style)
+             'LaTeX-dinbrief-style)
    (LaTeX-add-environments
     '("letter" LaTeX-dinbrief-env-recipient)
     "dinquote")
@@ -74,8 +74,8 @@
 (defun LaTeX-dinbrief-style ()
   "Insert some useful packages for writing german letters."
   (let ((func (if (fboundp 'indent-relative-first-indent-point)
-                 'indent-relative-first-indent-point
-               'indent-relative-maybe)))
+                  'indent-relative-first-indent-point
+                'indent-relative-maybe)))
     (save-excursion
       (goto-char (point-min)) ; insert before \begin{document}
       (if (re-search-forward ".begin.document." (point-max) t)
@@ -83,52 +83,52 @@
       (open-line 2)
       (funcall func)
       (LaTeX-dinbrief-insert TeX-esc "usepackage"
-                            LaTeX-optop "latin1,utf8" LaTeX-optcl
-                            TeX-grop "inputenc" TeX-grcl)
+                             LaTeX-optop "latin1,utf8" LaTeX-optcl
+                             TeX-grop "inputenc" TeX-grcl)
       (newline-and-indent)
       (LaTeX-dinbrief-insert TeX-esc "usepackage"
-                            LaTeX-optop "T1" LaTeX-optcl
-                            TeX-grop "fontenc" TeX-grcl)
+                             LaTeX-optop "T1" LaTeX-optcl
+                             TeX-grop "fontenc" TeX-grcl)
       (funcall func)
       (LaTeX-dinbrief-insert TeX-esc "usepackage"
-                            TeX-grop "ngerman" TeX-grcl))
+                             TeX-grop "ngerman" TeX-grcl))
     (TeX-run-style-hooks "inputenc" "fontenc" "ngerman")))
 
 (defun LaTeX-dinbrief-env-recipient (environment)
   "Insert ENVIRONMENT and prompt for recipient and address."
   (let ((sender (LaTeX-dinbrief-sender))
-       (recipient (TeX-read-string "Empfänger: "))
-       (address (LaTeX-dinbrief-recipient))
-       (date (TeX-read-string "Datum: " (LaTeX-dinbrief-today)))
-       (postremark (TeX-read-string "Postvermerk: "))
-       (fenster (TeX-read-string "Fenster (ja/nein): "))
-       (vermerk (TeX-read-string "Behandlungsvermerk: "))
-       (verteil (TeX-read-string "Verteiler: "))
-       (betreff (TeX-read-string "Betreff: "))
-       (opening (TeX-read-string "Anrede: "))
-       (closing (TeX-read-string "Schluss: "))
-       (signature (TeX-read-string "Unterschrift: "))
-       (anlage (TeX-read-string "Anlagen: "))
-       (func (if (fboundp 'indent-relative-first-indent-point)
-                 'indent-relative-first-indent-point
-               'indent-relative-maybe)))
+        (recipient (TeX-read-string "Empfänger: "))
+        (address (LaTeX-dinbrief-recipient))
+        (date (TeX-read-string "Datum: " (LaTeX-dinbrief-today)))
+        (postremark (TeX-read-string "Postvermerk: "))
+        (fenster (TeX-read-string "Fenster (ja/nein): "))
+        (vermerk (TeX-read-string "Behandlungsvermerk: "))
+        (verteil (TeX-read-string "Verteiler: "))
+        (betreff (TeX-read-string "Betreff: "))
+        (opening (TeX-read-string "Anrede: "))
+        (closing (TeX-read-string "Schluss: "))
+        (signature (TeX-read-string "Unterschrift: "))
+        (anlage (TeX-read-string "Anlagen: "))
+        (func (if (fboundp 'indent-relative-first-indent-point)
+                  'indent-relative-first-indent-point
+                'indent-relative-maybe)))
     (if (string= fenster "ja")
-       (progn
-         (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
-         (newline-and-indent)
-         (LaTeX-dinbrief-insert TeX-esc "centeraddress")
-         (newline-and-indent)
-         (LaTeX-dinbrief-insert TeX-esc "nowindowrules")
-         (newline-and-indent)
-         (LaTeX-dinbrief-insert TeX-esc "windowtics")
-         (newline-and-indent)
-         (let ((retouradr (TeX-read-string "Retouradresse: " sender)))
-           (newline-and-indent)
-           (if (not (zerop (length retouradr)))
-               (progn
-                 (if mark-active (deactivate-mark))
-                 (LaTeX-dinbrief-insert TeX-esc "backaddress" TeX-grop 
retouradr TeX-grcl)
-                 (newline-and-indent)))))
+        (progn
+          (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
+          (newline-and-indent)
+          (LaTeX-dinbrief-insert TeX-esc "centeraddress")
+          (newline-and-indent)
+          (LaTeX-dinbrief-insert TeX-esc "nowindowrules")
+          (newline-and-indent)
+          (LaTeX-dinbrief-insert TeX-esc "windowtics")
+          (newline-and-indent)
+          (let ((retouradr (TeX-read-string "Retouradresse: " sender)))
+            (newline-and-indent)
+            (if (not (zerop (length retouradr)))
+                (progn
+                  (if mark-active (deactivate-mark))
+                  (LaTeX-dinbrief-insert TeX-esc "backaddress" TeX-grop 
retouradr TeX-grcl)
+                  (newline-and-indent)))))
       (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
       (newline-and-indent)
       (LaTeX-dinbrief-insert TeX-esc "centeraddress")
@@ -138,143 +138,143 @@
       (LaTeX-dinbrief-insert TeX-esc "windowtics"))
     (newline-and-indent)
     (if (not (zerop (length signature)))
-       (progn
-         (LaTeX-dinbrief-insert TeX-esc "signature" TeX-grop signature 
TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (LaTeX-dinbrief-insert TeX-esc "signature" TeX-grop signature 
TeX-grcl)
+          (newline-and-indent)))
     (if (not (zerop (length date)))
-       (progn
-         (LaTeX-dinbrief-insert TeX-esc "date" TeX-grop date TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (LaTeX-dinbrief-insert TeX-esc "date" TeX-grop date TeX-grcl)
+          (newline-and-indent)))
     (newline-and-indent)
 
     (let ((indentation (current-column)))
       (LaTeX-insert-environment
        environment
        (concat TeX-grop recipient
-              (if (not (zerop (length address)))
-                  (concat
-                   (if (not (zerop (length recipient)))
-                       (concat " " TeX-esc TeX-esc " "))
-                   address))
-              TeX-grcl))
-      (save-excursion                  ; Fix indentation of address
-       (if (search-backward TeX-grcl nil 'move)
-           (let ((addr-end (point-marker)))
-             (if (search-backward TeX-grop nil 'move)
-                 (let ((addr-column (current-column)))
-                   (while (search-forward
-                           (concat TeX-esc TeX-esc)
-                           (marker-position addr-end) 'move)
-                     (progn
-                       (newline)
-                       (indent-to addr-column))))))))
+               (if (not (zerop (length address)))
+                   (concat
+                    (if (not (zerop (length recipient)))
+                        (concat " " TeX-esc TeX-esc " "))
+                    address))
+               TeX-grcl))
+      (save-excursion                   ; Fix indentation of address
+        (if (search-backward TeX-grcl nil 'move)
+            (let ((addr-end (point-marker)))
+              (if (search-backward TeX-grop nil 'move)
+                  (let ((addr-column (current-column)))
+                    (while (search-forward
+                            (concat TeX-esc TeX-esc)
+                            (marker-position addr-end) 'move)
+                      (progn
+                        (newline)
+                        (indent-to addr-column))))))))
       (LaTeX-dinbrief-insert "\n")
       (indent-to indentation))
     (if (not (zerop (length postremark)))
-       (progn
-         (LaTeX-dinbrief-insert TeX-esc "postremark" TeX-grop postremark 
TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (LaTeX-dinbrief-insert TeX-esc "postremark" TeX-grop postremark 
TeX-grcl)
+          (newline-and-indent)))
     (if (not (zerop (length betreff)))
-       (progn
-         (LaTeX-dinbrief-insert TeX-esc "subject" TeX-grop)
-         (LaTeX-dinbrief-insert betreff TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (LaTeX-dinbrief-insert TeX-esc "subject" TeX-grop)
+          (LaTeX-dinbrief-insert betreff TeX-grcl)
+          (newline-and-indent)))
     (if (not (zerop (length vermerk)))
-       (progn
-         (LaTeX-dinbrief-insert TeX-esc "handling" TeX-grop vermerk TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (LaTeX-dinbrief-insert TeX-esc "handling" TeX-grop vermerk TeX-grcl)
+          (newline-and-indent)))
     (if (not (zerop (length verteil)))
-       (progn
-         (LaTeX-dinbrief-insert TeX-esc "cc" TeX-grop verteil TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (LaTeX-dinbrief-insert TeX-esc "cc" TeX-grop verteil TeX-grcl)
+          (newline-and-indent)))
     (if (not (zerop (length anlage)))
-       (progn
-         (LaTeX-dinbrief-insert TeX-esc "encl" TeX-grop anlage TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (LaTeX-dinbrief-insert TeX-esc "encl" TeX-grop anlage TeX-grcl)
+          (newline-and-indent)))
     (LaTeX-dinbrief-insert TeX-esc "opening"
-                          TeX-grop
-                          (if (zerop (length opening))
-                              (concat TeX-esc " ")
-                            opening)
-                          TeX-grcl "\n")
+                           TeX-grop
+                           (if (zerop (length opening))
+                               (concat TeX-esc " ")
+                             opening)
+                           TeX-grcl "\n")
 
     (funcall func)
     (save-excursion
       (LaTeX-dinbrief-insert "\n" TeX-esc "closing"
-                            TeX-grop
-                            (if (zerop (length closing))
-                                (concat TeX-esc " ")
-                              closing)
-                            TeX-grcl "\n")
+                             TeX-grop
+                             (if (zerop (length closing))
+                                 (concat TeX-esc " ")
+                               closing)
+                             TeX-grcl "\n")
       (funcall func))))
 
 (defun LaTeX-dinbrief-sender ()
   "Read and write the senders address."
   (interactive)
   (let ((name (TeX-read-string "Absender: " (user-full-name)))
-       (str  (TeX-read-string "Meine Strasse:  "))
-       (ort  (TeX-read-string "Mein Wohnort:  ")))
+        (str  (TeX-read-string "Meine Strasse:  "))
+        (ort  (TeX-read-string "Mein Wohnort:  ")))
     (if (not (zerop (length name)))
-       (progn
-         (goto-char (point-min)) ; insert before \end{document}
-         (if (re-search-forward ".end.document." (point-max) t)
-             (beginning-of-line 1))
-         (forward-line -1)
-         (LaTeX-dinbrief-insert TeX-esc "address" TeX-grop name)
-         (if (not (zerop (length str)))
-             (progn
-               (LaTeX-dinbrief-insert " " TeX-esc TeX-esc)
-               (newline-and-indent)
-               (LaTeX-dinbrief-insert str)))
-         (if (not (zerop (length ort)))
-             (progn
-               (LaTeX-dinbrief-insert " " TeX-esc "par")
-               (newline-and-indent)
-               (LaTeX-dinbrief-insert ort)))
-         (LaTeX-dinbrief-insert TeX-grcl)
-         (newline-and-indent)
-         (concat name ", " str ", " ort)))))
+        (progn
+          (goto-char (point-min)) ; insert before \end{document}
+          (if (re-search-forward ".end.document." (point-max) t)
+              (beginning-of-line 1))
+          (forward-line -1)
+          (LaTeX-dinbrief-insert TeX-esc "address" TeX-grop name)
+          (if (not (zerop (length str)))
+              (progn
+                (LaTeX-dinbrief-insert " " TeX-esc TeX-esc)
+                (newline-and-indent)
+                (LaTeX-dinbrief-insert str)))
+          (if (not (zerop (length ort)))
+              (progn
+                (LaTeX-dinbrief-insert " " TeX-esc "par")
+                (newline-and-indent)
+                (LaTeX-dinbrief-insert ort)))
+          (LaTeX-dinbrief-insert TeX-grcl)
+          (newline-and-indent)
+          (concat name ", " str ", " ort)))))
 
 (defun LaTeX-dinbrief-recipient ()
   "Read and return the recipient address."
   (interactive)
   (let ((str  (TeX-read-string "Wohnhaft in Strasse:  "))
-       (ort  (TeX-read-string "Aus der Ortschaft:  ")))
+        (ort  (TeX-read-string "Aus der Ortschaft:  ")))
     (if (not (zerop (length str)))
-       (if (not (zerop (length ort)))
-           (concat str " " TeX-esc TeX-esc " " ort)
-         str)
+        (if (not (zerop (length ort)))
+            (concat str " " TeX-esc TeX-esc " " ort)
+          str)
       (if (not (zerop (length ort)))
-         ort))))
+          ort))))
 
 (defun LaTeX-dinbrief-today ()
   "Return a string representing todays date according to flavor."
   (interactive)
-   (let ((ctime-string (current-time-string))
-       (month-alist '(("Jan" . "Januar")
-                      ("Feb" . "Februar")
-                      ("Mar" . "M\\\"arz")
-                      ("Apr" . "April")
-                      ("May" . "Mai")
-                      ("Jun" . "Juni")
-                      ("Jul" . "Juli")
-                      ("Aug" . "August")
-                      ("Sep" . "September")
-                      ("Oct" . "Oktober")
-                      ("Nov" . "November")
-                      ("Dec" . "Dezember"))))
+  (let ((ctime-string (current-time-string))
+        (month-alist '(("Jan" . "Januar")
+                       ("Feb" . "Februar")
+                       ("Mar" . "M\\\"arz")
+                       ("Apr" . "April")
+                       ("May" . "Mai")
+                       ("Jun" . "Juni")
+                       ("Jul" . "Juli")
+                       ("Aug" . "August")
+                       ("Sep" . "September")
+                       ("Oct" . "Oktober")
+                       ("Nov" . "November")
+                       ("Dec" . "Dezember"))))
     (string-match
      "^\\S-+\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-+\\S-+\\s-+\\(\\S-+\\)"
      ctime-string)
     (let ((year (substring ctime-string (match-beginning 3) (match-end 3)))
-         (month (substring ctime-string (match-beginning 1) (match-end 1)))
-         (day (substring ctime-string (match-beginning 2) (match-end 2)))
-         (place (TeX-read-string "Heutiger Ort: ")))
+          (month (substring ctime-string (match-beginning 1) (match-end 1)))
+          (day (substring ctime-string (match-beginning 2) (match-end 2)))
+          (place (TeX-read-string "Heutiger Ort: ")))
       (if (assoc month month-alist)
-         (progn
-           (setq month (cdr (assoc month month-alist)))
-           (if (> 2 (length day))
-               (setq day (concat "0" day)))))
+          (progn
+            (setq month (cdr (assoc month month-alist)))
+            (if (> 2 (length day))
+                (setq day (concat "0" day)))))
       (format "%s, den %s. %s %s" place day month year))))
 
 ;;; dinbrief.el ends here
diff --git a/style/dk-bib.el b/style/dk-bib.el
index 4db937d..9af5445 100644
--- a/style/dk-bib.el
+++ b/style/dk-bib.el
@@ -33,28 +33,28 @@
 (defun LaTeX-dk-bib-package-options nil
   "Prompt for package options for the dk-bib package."
   (let ((options
-        (mapconcat 'identity
-                   (TeX-completing-read-multiple
-                    "Options: "
-                    '(("isbn") ("issn") ("url") ("annote")
-                      ("printing") ("apalike") ("fixcitedash=false")
-                      ("ordinals2word") ("ordinaldepth=")))
-                   ","))
-       (depth -1))
+         (mapconcat 'identity
+                    (TeX-completing-read-multiple
+                     "Options: "
+                     '(("isbn") ("issn") ("url") ("annote")
+                       ("printing") ("apalike") ("fixcitedash=false")
+                       ("ordinals2word") ("ordinaldepth=")))
+                    ","))
+        (depth -1))
     (when (string-match "\\(ordinaldepth=\\)\\([^0-9]\\|$\\)" options)
       (while (or (< depth 0)
-                (> depth 20))
-       (setq depth (if (fboundp 'read-number)
-                       (read-number "Ordinal depth: ")
-                     (string-to-number (TeX-read-string "Ordinal depth: "))))
-       (when (or (< depth 0)
-                 (> depth 20))
-         (message "Ordinal depth must be between 0 and 20")
-         (sit-for 1)))
+                 (> depth 20))
+        (setq depth (if (fboundp 'read-number)
+                        (read-number "Ordinal depth: ")
+                      (string-to-number (TeX-read-string "Ordinal depth: "))))
+        (when (or (< depth 0)
+                  (> depth 20))
+          (message "Ordinal depth must be between 0 and 20")
+          (sit-for 1)))
       (setq options (concat
-                    (substring options 0 (match-end 1))
-                    (number-to-string depth)
-                    (substring options (match-end 1)))))
+                     (substring options 0 (match-end 1))
+                     (number-to-string depth)
+                     (substring options (match-end 1)))))
     options))
 
 ;; Local Variables:
diff --git a/style/doc.el b/style/doc.el
index 2eabef0..48e2714 100644
--- a/style/doc.el
+++ b/style/doc.el
@@ -35,16 +35,16 @@
 (defun LaTeX-env-no-comment (environment)
   "Insert ENVIRONMENT and make sure there is no commented empty line inside."
   (LaTeX-insert-environment environment
-                           (when (string-equal environment "macro")
-                             (let ((macroname (TeX-read-string
-                                               (TeX-argument-prompt nil nil 
"Macro")
-                                               TeX-esc)))
-                               (format "{%s}" macroname))))
+                            (when (string-equal environment "macro")
+                              (let ((macroname (TeX-read-string
+                                                (TeX-argument-prompt nil nil 
"Macro")
+                                                TeX-esc)))
+                                (format "{%s}" macroname))))
   (unless (TeX-active-mark)
     (when (save-excursion
-           (beginning-of-line)
-           (looking-at (concat "[ \t]+$\\|[ \t]*"
-                               TeX-comment-start-regexp "+[ \t]*$")))
+            (beginning-of-line)
+            (looking-at (concat "[ \t]+$\\|[ \t]*"
+                                TeX-comment-start-regexp "+[ \t]*$")))
       (delete-region (line-beginning-position) (line-end-position))
       (indent-according-to-mode))))
 
@@ -55,25 +55,25 @@
       (goto-char end)
       (skip-chars-backward " \t")
       (when (bolp)
-       (insert "%")
-       (indent-according-to-mode))
+        (insert "%")
+        (indent-according-to-mode))
       (goto-char start)
       (skip-chars-backward " \t")
       (when (bolp)
-       (insert "%")
-       (indent-according-to-mode)))))
+        (insert "%")
+        (indent-according-to-mode)))))
 
 (TeX-add-style-hook
  "doc"
  (lambda ()
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("macrocode" current-indentation) t)
+                '("macrocode" current-indentation) t)
    (add-to-list 'LaTeX-indent-environment-list
-               '("macrocode*" current-indentation) t)
+                '("macrocode*" current-indentation) t)
    (add-to-list 'LaTeX-indent-environment-list
-               '("macro" current-indentation) t)
+                '("macro" current-indentation) t)
    (add-hook 'LaTeX-after-insert-env-hook 'LaTeX-doc-after-insert-macrocode
-            nil t)
+             nil t)
    (LaTeX-add-environments
     "theglossary"
     '("macrocode" LaTeX-env-no-comment)
@@ -87,11 +87,11 @@
     "CheckModules"
     "Module"
     '("DescribeMacro" (TeX-arg-eval
-                      (lambda ()
-                        (let ((name (TeX-read-string
-                                     (TeX-argument-prompt nil nil "Macro")
-                                     TeX-esc)))
-                          (format "%s" name)))))
+                       (lambda ()
+                         (let ((name (TeX-read-string
+                                      (TeX-argument-prompt nil nil "Macro")
+                                      TeX-esc)))
+                           (format "%s" name)))))
     '("DescribeEnv" "Environment")
     "verbatim"
     "verb"
@@ -101,11 +101,11 @@
     '("meta" "Text")
     '("cs" "Name")
     '("cmd" (TeX-arg-eval
-            (lambda ()
-              (let ((name (TeX-read-string
-                           (TeX-argument-prompt nil nil "Name")
-                           TeX-esc)))
-                (format "%s" name)))))
+             (lambda ()
+               (let ((name (TeX-read-string
+                            (TeX-argument-prompt nil nil "Name")
+                            TeX-esc)))
+                 (format "%s" name)))))
     "makelabel"
     '("MacroFont" t)
     '("AltMacroFont" t)
@@ -167,23 +167,23 @@
     '("DocInput"
       (TeX-arg-eval
        (lambda ()
-        (let ((file (file-relative-name
-                     (read-file-name
-                      "File to input: " nil nil nil nil
-                      (lambda (x)
-                        (string-match "\\.fdd$\\|\\.dtx$" x)))
-                     (TeX-master-directory))))
-          (format "%s" file)))))
+         (let ((file (file-relative-name
+                      (read-file-name
+                       "File to input: " nil nil nil nil
+                       (lambda (x)
+                         (string-match "\\.fdd$\\|\\.dtx$" x)))
+                      (TeX-master-directory))))
+           (format "%s" file)))))
     '("DocInclude"
       (TeX-arg-eval
        (lambda ()
-        (let ((file (file-relative-name
-                     (read-file-name
-                      "File to include: " nil nil nil nil
-                      (lambda (x)
-                        (string-match "\\.fdd$\\|\\.dtx$" x)))
-                     (TeX-master-directory))))
-          (format "%s" file)))))
+         (let ((file (file-relative-name
+                      (read-file-name
+                       "File to include: " nil nil nil nil
+                       (lambda (x)
+                         (string-match "\\.fdd$\\|\\.dtx$" x)))
+                      (TeX-master-directory))))
+           (format "%s" file)))))
     "GetFileInfo"
     "filename"
     "fileinfo")
diff --git a/style/emp.el b/style/emp.el
index 13b754e..ad2bc27 100644
--- a/style/emp.el
+++ b/style/emp.el
@@ -32,7 +32,7 @@
  "emp"
  (lambda ()
    (TeX-add-symbols "empuse" "empTeX"  "empaddtoTeX"
-                   "emprelude" "empaddtoprelude" "unitlength")
+                    "emprelude" "empaddtoprelude" "unitlength")
    (LaTeX-add-environments
     '("empfile" LaTeX-env-empfile)
     '("emp" LaTeX-env-emp-gen)
@@ -45,18 +45,18 @@
    "Ask for file, width and length. Insert environment-name environment
 Used for emp, empdef, and empgraph environments."
    (let ((emp-fig-name (TeX-read-string "figure name: " ""))
-        (emp-fig-width (TeX-read-string "figure width: " "1" ))
-        (emp-fig-height (TeX-read-string "figure height: " "1" ))
-        ;;; emp.sty demands a width and a height for each of the
-        ;;; emp, empdef, and empgraph environments
-        ;;; we give them 1 by default
-        ;;; not necessarily the best thing to do?
-        LaTeX-emp-fig-name)
+         (emp-fig-width (TeX-read-string "figure width: " "1" ))
+         (emp-fig-height (TeX-read-string "figure height: " "1" ))
+         ;;; emp.sty demands a width and a height for each of the
+         ;;; emp, empdef, and empgraph environments
+         ;;; we give them 1 by default
+         ;;; not necessarily the best thing to do?
+         LaTeX-emp-fig-name)
      (if (not (zerop (length emp-fig-name)))
-        (progn
-          (setq LaTeX-emp-fig-name (concat LaTeX-optop emp-fig-name 
LaTeX-optcl))
-          (LaTeX-insert-environment environment-name LaTeX-emp-fig-name))
-        (LaTeX-insert-environment environment-name))
+         (progn
+           (setq LaTeX-emp-fig-name (concat LaTeX-optop emp-fig-name 
LaTeX-optcl))
+           (LaTeX-insert-environment environment-name LaTeX-emp-fig-name))
+         (LaTeX-insert-environment environment-name))
      (forward-line -1)
      (end-of-line)
      (insert "(" emp-fig-width "," emp-fig-height ")")
@@ -64,22 +64,22 @@ Used for emp, empdef, and empgraph environments."
      (indent-according-to-mode)))
 
 (defun LaTeX-env-empfile (_optional)
-   "Ask for file. Insert empfile environment."
-   (let ((empfile (TeX-read-string "empfile: " ""))
-        LaTeX-emp-file-name mpost-emp-file-name)
-     (if (not (zerop (length empfile)))
-        (progn
-          (setq LaTeX-emp-file-name (concat LaTeX-optop empfile LaTeX-optcl))
-          (setq mpost-emp-file-name (concat empfile ".mp"))
-          (LaTeX-insert-environment "empfile" LaTeX-emp-file-name))
-       (setq mpost-emp-file-name "\\jobname")
-       (LaTeX-insert-environment "empfile"))
-     (if LaTeX-write18-enabled-p
-        (progn
-          (forward-line 1)
-          (end-of-line)
-          (newline-and-indent)
-          (insert "\\immediate\\write18{mpost -tex=latex " mpost-emp-file-name 
TeX-grcl)
-          (forward-line -2)))))
+  "Ask for file. Insert empfile environment."
+  (let ((empfile (TeX-read-string "empfile: " ""))
+        LaTeX-emp-file-name mpost-emp-file-name)
+    (if (not (zerop (length empfile)))
+        (progn
+          (setq LaTeX-emp-file-name (concat LaTeX-optop empfile LaTeX-optcl))
+          (setq mpost-emp-file-name (concat empfile ".mp"))
+          (LaTeX-insert-environment "empfile" LaTeX-emp-file-name))
+      (setq mpost-emp-file-name "\\jobname")
+      (LaTeX-insert-environment "empfile"))
+    (if LaTeX-write18-enabled-p
+        (progn
+          (forward-line 1)
+          (end-of-line)
+          (newline-and-indent)
+          (insert "\\immediate\\write18{mpost -tex=latex " mpost-emp-file-name 
TeX-grcl)
+          (forward-line -2)))))
 
 ;;; emp.el ends here
diff --git a/style/empheq.el b/style/empheq.el
index fc1716a..ac88b77 100644
--- a/style/empheq.el
+++ b/style/empheq.el
@@ -38,11 +38,11 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-item-equation-alignat
-                 "amsmath" (&optional suppress))
+                  "amsmath" (&optional suppress))
 
 (defvar LaTeX-mathtools-package-options)
 
@@ -50,43 +50,43 @@
   `(("box")
     ("innerbox")
     ("left" ,(mapcar
-             (lambda (x)
-               (concat TeX-esc x))
-             '("empheqlbrace"
-               "empheqlbrack"
-               "empheqlangle"
-               "empheqlparen"
-               "empheqlvert"
-               "empheqlVert"
-               "empheqlfloor"
-               "empheqlceil"
-               "empheqbiglbrace"
-               "empheqbiglbrack"
-               "empheqbiglangle"
-               "empheqbiglparen"
-               "empheqbiglvert"
-               "empheqbiglVert"
-               "empheqbiglfloor"
-               "empheqbiglceil")))
+              (lambda (x)
+                (concat TeX-esc x))
+              '("empheqlbrace"
+                "empheqlbrack"
+                "empheqlangle"
+                "empheqlparen"
+                "empheqlvert"
+                "empheqlVert"
+                "empheqlfloor"
+                "empheqlceil"
+                "empheqbiglbrace"
+                "empheqbiglbrack"
+                "empheqbiglangle"
+                "empheqbiglparen"
+                "empheqbiglvert"
+                "empheqbiglVert"
+                "empheqbiglfloor"
+                "empheqbiglceil")))
     ("right" ,(mapcar
-              (lambda (x)
-                (concat TeX-esc x))
-              '("empheqrbrace"
-                "empheqrbrack"
-                "empheqrangle"
-                "empheqrparen"
-                "empheqrvert"
-                "empheqrVert"
-                "empheqrfloor"
-                "empheqrceil"
-                "empheqbigrbrace"
-                "empheqbigrbrack"
-                "empheqbigrangle"
-                "empheqbigrparen"
-                "empheqbigrvert"
-                "empheqbigrVert"
-                "empheqbigrfloor"
-                "empheqbigrceil")))
+               (lambda (x)
+                 (concat TeX-esc x))
+               '("empheqrbrace"
+                 "empheqrbrack"
+                 "empheqrangle"
+                 "empheqrparen"
+                 "empheqrvert"
+                 "empheqrVert"
+                 "empheqrfloor"
+                 "empheqrceil"
+                 "empheqbigrbrace"
+                 "empheqbigrbrack"
+                 "empheqbigrangle"
+                 "empheqbigrparen"
+                 "empheqbigrvert"
+                 "empheqbigrVert"
+                 "empheqbigrfloor"
+                 "empheqbigrceil")))
     ("outerbox")
     ("marginbox"))
   "Key=value options for environments from empheq.sty.")
@@ -119,12 +119,12 @@
 
 (defvar LaTeX-empheq-declaredelimiter-regexp
   `(,(concat "\\\\Declare\\(Left\\|Right\\)Delimiter"
-            "[ \t\n\r%]*"
-            "\\(?:\\[[^]]*\\]\\)?"
-            "[ \t\n\r%]*"
-            "{"
-            (regexp-quote TeX-esc)
-            "\\([^}]+\\)}")
+             "[ \t\n\r%]*"
+             "\\(?:\\[[^]]*\\]\\)?"
+             "[ \t\n\r%]*"
+             "{"
+             (regexp-quote TeX-esc)
+             "\\([^}]+\\)}")
     (2 1) LaTeX-auto-empheq-declaredelimiter)
   "Matches the argument of \\Declare(Left|Right)Delimiter from empheq 
package.")
 
@@ -136,7 +136,7 @@
   "Process parsed delimiters."
   (dolist (delim (mapcar #'car (LaTeX-empheq-declaredelimiter-list)))
     (TeX-add-symbols (concat "empheq" delim)
-                    (concat "empheqbig" delim)))
+                     (concat "empheqbig" delim)))
   (LaTeX-empheq-update-key-val-options))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-empheq-auto-prepare t)
@@ -148,59 +148,59 @@
 `LaTeX-empheq-declaredelimiter-list' returns non-nil."
   (when (LaTeX-empheq-declaredelimiter-list)
     (let ((lvals (cadr (assoc "left" LaTeX-empheq-key-val-options)))
-         (rvals (cadr (assoc "right" LaTeX-empheq-key-val-options)))
-         (tmp (copy-alist LaTeX-empheq-key-val-options))
-         lval rval)
+          (rvals (cadr (assoc "right" LaTeX-empheq-key-val-options)))
+          (tmp (copy-alist LaTeX-empheq-key-val-options))
+          lval rval)
       (dolist (delims (LaTeX-empheq-declaredelimiter-list))
-       (let ((delim (car delims))
-             (where (cadr delims)))
-         (if (string= where "Left")
-             (progn
-               (cl-pushnew (concat TeX-esc "empheq" delim) lval :test #'equal)
-               (cl-pushnew (concat TeX-esc "empheqbig" delim) lval :test 
#'equal))
-           (progn
-             (cl-pushnew (concat TeX-esc "empheq" delim) rval :test #'equal)
-             (cl-pushnew (concat TeX-esc "empheqbig" delim) rval :test 
#'equal)))))
+        (let ((delim (car delims))
+              (where (cadr delims)))
+          (if (string= where "Left")
+              (progn
+                (cl-pushnew (concat TeX-esc "empheq" delim) lval :test #'equal)
+                (cl-pushnew (concat TeX-esc "empheqbig" delim) lval :test 
#'equal))
+            (progn
+              (cl-pushnew (concat TeX-esc "empheq" delim) rval :test #'equal)
+              (cl-pushnew (concat TeX-esc "empheqbig" delim) rval :test 
#'equal)))))
       (when lval
-       (setq tmp (assq-delete-all (car (assoc "left" tmp)) tmp))
-       (setq lvals (append lval lvals))
-       (push (list "left" lvals) tmp))
+        (setq tmp (assq-delete-all (car (assoc "left" tmp)) tmp))
+        (setq lvals (append lval lvals))
+        (push (list "left" lvals) tmp))
       (when rval
-       (setq tmp (assq-delete-all (car (assoc "right" tmp)) tmp))
-       (setq rvals (append rval rvals))
-       (push (list "right" rvals) tmp))
+        (setq tmp (assq-delete-all (car (assoc "right" tmp)) tmp))
+        (setq rvals (append rval rvals))
+        (push (list "right" rvals) tmp))
       (setq LaTeX-empheq-key-val-options-local
-           (copy-alist tmp)))))
+            (copy-alist tmp)))))
 
 (defun LaTeX-empheq-env (env)
   "Query for a supported amsmath environment and insert it accordingly."
   (let* ((keyvals (TeX-read-key-val t LaTeX-empheq-key-val-options-local))
-        (amsenv (completing-read
-                 (TeX-argument-prompt nil nil "amsmath environment")
-                 LaTeX-empheq-supported-amsmath-envs))
-        (ncols (when (or (string= amsenv "alignat")
-                         (string= amsenv "alignat*"))
-                 (TeX-read-string
-                  (TeX-argument-prompt nil nil "Number of columns"))))
-        num)
+         (amsenv (completing-read
+                  (TeX-argument-prompt nil nil "amsmath environment")
+                  LaTeX-empheq-supported-amsmath-envs))
+         (ncols (when (or (string= amsenv "alignat")
+                          (string= amsenv "alignat*"))
+                  (TeX-read-string
+                   (TeX-argument-prompt nil nil "Number of columns"))))
+         num)
     (LaTeX-insert-environment
      env
      (concat
       (when (and keyvals (not (string= keyvals "")))
-       (concat LaTeX-optop keyvals LaTeX-optcl))
+        (concat LaTeX-optop keyvals LaTeX-optcl))
       TeX-grop
       (if (and ncols (not (string= ncols "")))
-         (concat amsenv "=" ncols)
-       amsenv)
+          (concat amsenv "=" ncols)
+        amsenv)
       TeX-grcl))
     (when (and (assoc amsenv LaTeX-label-alist)
-              (LaTeX-label amsenv 'environment))
+               (LaTeX-label amsenv 'environment))
       (LaTeX-newline)
       (indent-according-to-mode))
     (when (and ncols (not (string= ncols "")))
       (setq num (string-to-number ncols))
       (save-excursion
-       (insert (make-string (+ num num -1) ?&))))))
+        (insert (make-string (+ num num -1) ?&))))))
 
 (defun LaTeX-empheq-env-overload (env &optional _ignore)
   "Insert amsmath ENV's when option overload is given to empheq package.
@@ -208,24 +208,24 @@ This function combines the capabilities of 
`LaTeX-env-label' and
 `LaTeX-amsmath-env-alignat'.  It overwrites the definitions of
 `amsmath.el'."
   (if (or (string= env "alignat")
-         (string= env "alignat*"))
+          (string= env "alignat*"))
       (let ((ncols (TeX-read-string
-                   (TeX-argument-prompt nil nil "Number of columns")))
-           (keyvals (TeX-read-key-val t
-                                      LaTeX-empheq-key-val-options-local
-                                      "empheq options (k=v)")))
-       (LaTeX-insert-environment env (concat TeX-grop ncols TeX-grcl
-                                             (when (and keyvals (not (string= 
keyvals "")))
-                                               (concat LaTeX-optop keyvals 
LaTeX-optcl))))
-       (LaTeX-item-equation-alignat t))
+                    (TeX-argument-prompt nil nil "Number of columns")))
+            (keyvals (TeX-read-key-val t
+                                       LaTeX-empheq-key-val-options-local
+                                       "empheq options (k=v)")))
+        (LaTeX-insert-environment env (concat TeX-grop ncols TeX-grcl
+                                              (when (and keyvals (not (string= 
keyvals "")))
+                                                (concat LaTeX-optop keyvals 
LaTeX-optcl))))
+        (LaTeX-item-equation-alignat t))
     (let ((keyvals
-          (TeX-read-key-val t LaTeX-empheq-key-val-options-local "empheq 
options (k=v)")))
+           (TeX-read-key-val t LaTeX-empheq-key-val-options-local "empheq 
options (k=v)")))
       (LaTeX-insert-environment env (when (and keyvals (not (string= keyvals 
"")))
-                                     (concat LaTeX-optop keyvals LaTeX-optcl)))
+                                      (concat LaTeX-optop keyvals 
LaTeX-optcl)))
       (when (and (assoc env LaTeX-label-alist)
-                (LaTeX-label env 'environment))
-       (LaTeX-newline)
-       (indent-according-to-mode)))))
+                 (LaTeX-label env 'environment))
+        (LaTeX-newline)
+        (indent-according-to-mode)))))
 
 (defun LaTeX-empheq-item-equation ()
   "Insert contents to terminate a line in multi-line equations environment.
@@ -233,45 +233,45 @@ Put line break macro on the last line.  Next, if the 
current
 environment wants \\label, insert it also.  And insert suitable
 number of ampersands if possible."
   (let ((env (LaTeX-current-environment))
-       amsenv ncols match)
+        amsenv ncols match)
     (save-excursion
       (LaTeX-find-matching-begin)
       (re-search-forward (concat (regexp-quote TeX-esc)
-                                "begin" TeX-grop env TeX-grcl))
+                                 "begin" TeX-grop env TeX-grcl))
       (when (looking-at "[ \t\n\r%]*\\[")
-       (forward-sexp))
+        (forward-sexp))
       (re-search-forward "[ \t\n\r%]*{\\([^}]+\\)}")
       (setq match (replace-regexp-in-string "[ \t\n\r%]" ""
-                                               (match-string-no-properties 1)))
+                                                (match-string-no-properties 
1)))
       (if (string-match "=" match)
-         (progn
-           (setq amsenv (car (split-string match "=")))
-           (setq ncols (string-to-number (cadr (split-string match "=")))))
-       (setq amsenv match)))
+          (progn
+            (setq amsenv (car (split-string match "=")))
+            (setq ncols (string-to-number (cadr (split-string match "=")))))
+        (setq amsenv match)))
     ;; Do not ask for "\\" if in "equation" or "equation*" since these
     ;; are single line equations only
     (if (or (string= amsenv "equation")
-           (string= amsenv "equation*"))
-       ;; Nullify the effect of `M-RET'
-       (progn
-         (message "This environment does not support multi-line equations")
-         (end-of-line 0)
-         (kill-line 1))
+            (string= amsenv "equation*"))
+        ;; Nullify the effect of `M-RET'
+        (progn
+          (message "This environment does not support multi-line equations")
+          (end-of-line 0)
+          (kill-line 1))
       (progn
-       (end-of-line 0)
-       (just-one-space)
-       (TeX-insert-macro "\\")
-       (forward-line 1)
-       (indent-according-to-mode)))
+        (end-of-line 0)
+        (just-one-space)
+        (TeX-insert-macro "\\")
+        (forward-line 1)
+        (indent-according-to-mode)))
     ;; Add a new label only if not in "equation"
     (when (and (not (string= amsenv "equation"))
-              (assoc amsenv LaTeX-label-alist)
-              (LaTeX-label amsenv 'environment))
+               (assoc amsenv LaTeX-label-alist)
+               (LaTeX-label amsenv 'environment))
       (LaTeX-newline)
       (indent-according-to-mode))
     (when ncols
       (save-excursion
-       (insert (make-string (+ ncols ncols -1) ?&))))))
+        (insert (make-string (+ ncols ncols -1) ?&))))))
 
 (TeX-add-style-hook
  "empheq"
@@ -285,7 +285,7 @@ number of ampersands if possible."
 
    ;; Local version of key-val options
    (setq LaTeX-empheq-key-val-options-local
-        (copy-alist LaTeX-empheq-key-val-options))
+         (copy-alist LaTeX-empheq-key-val-options))
 
    ;; Initial update of key-vals
    (LaTeX-empheq-update-key-val-options)
@@ -343,21 +343,21 @@ number of ampersands if possible."
    ;; Append delimiters to `TeX-braces-association'
    (make-local-variable 'TeX-braces-association)
    (let ((delimiters '(("\\empheqlbrace" . "\\empheqrbrace")
-                      ("\\empheqlbrack" . "\\empheqrbrack")
-                      ("\\empheqlangle" . "\\empheqrangle")
-                      ("\\empheqlparen" . "\\empheqrparen")
-                      ("\\empheqlvert"  . "\\empheqrvert")
-                      ("\\empheqlVert"  . "\\empheqrVert")
-                      ("\\empheqlfloor" . "\\empheqrfloor")
-                      ("\\empheqlceil"  . "\\empheqrceil")
-                      ("\\empheqbiglbrace" . "\\empheqbigrbrace")
-                      ("\\empheqbiglbrack" . "\\empheqbigrbrack")
-                      ("\\empheqbiglangle" . "\\empheqbigrangle")
-                      ("\\empheqbiglparen" . "\\empheqbigrparen")
-                      ("\\empheqbiglvert"  . "\\empheqbigrvert")
-                      ("\\empheqbiglVert"  . "\\empheqbigrVert")
-                      ("\\empheqbiglfloor" . "\\empheqbigrfloor")
-                      ("\\empheqbiglceil"  . "\\empheqbigrceil"))))
+                       ("\\empheqlbrack" . "\\empheqrbrack")
+                       ("\\empheqlangle" . "\\empheqrangle")
+                       ("\\empheqlparen" . "\\empheqrparen")
+                       ("\\empheqlvert"  . "\\empheqrvert")
+                       ("\\empheqlVert"  . "\\empheqrVert")
+                       ("\\empheqlfloor" . "\\empheqrfloor")
+                       ("\\empheqlceil"  . "\\empheqrceil")
+                       ("\\empheqbiglbrace" . "\\empheqbigrbrace")
+                       ("\\empheqbiglbrack" . "\\empheqbigrbrack")
+                       ("\\empheqbiglangle" . "\\empheqbigrangle")
+                       ("\\empheqbiglparen" . "\\empheqbigrparen")
+                       ("\\empheqbiglvert"  . "\\empheqbigrvert")
+                       ("\\empheqbiglVert"  . "\\empheqbigrVert")
+                       ("\\empheqbiglfloor" . "\\empheqbigrfloor")
+                       ("\\empheqbiglceil"  . "\\empheqbigrceil"))))
      (dolist (elt delimiters)
        (add-to-list 'TeX-braces-association elt t)))
 
@@ -369,7 +369,7 @@ number of ampersands if possible."
    ;; 2.2.2 The overload option
    ;; I simplify it and ignore the additional feature overload2:
    (when (or (LaTeX-provided-package-options-member "empheq" "overload")
-            (LaTeX-provided-package-options-member "empheq" "overload2"))
+             (LaTeX-provided-package-options-member "empheq" "overload2"))
      (LaTeX-add-environments
       '("align"      LaTeX-empheq-env-overload)
       '("alignat"    LaTeX-empheq-env-overload)
@@ -400,47 +400,47 @@ number of ampersands if possible."
 
      ;; Append original definitions to `LaTeX-label-alist'
      (let ((envs '("AmSalign"
-                  "AmSalignat"
-                  "AmSequation"
-                  "AmSflalign"
-                  "AmSgather"
-                  "AmSmultline")))
+                   "AmSalignat"
+                   "AmSequation"
+                   "AmSflalign"
+                   "AmSgather"
+                   "AmSmultline")))
        (dolist (env envs)
-        (add-to-list 'LaTeX-label-alist `(,env . LaTeX-amsmath-label) t)))
+         (add-to-list 'LaTeX-label-alist `(,env . LaTeX-amsmath-label) t)))
 
      ;; RefTeX support: Add original definitions with 
`reftex-add-label-environments'
      (when (fboundp 'reftex-add-label-environments)
        (let ((envs '(("AmSalign"     ?e nil nil eqnarray-like)
-                    ("AmSequation"  ?e nil nil t)
-                    ("AmSgather"    ?e nil nil eqnarray-like)
-                    ("AmSmultline"  ?e nil nil t)
-                    ("AmSflalign"   ?e nil nil eqnarray-like)
-                    ("AmSalignat"   ?e nil nil alignat-like))))
-        (dolist (env envs)
-          (reftex-add-label-environments `(,env)))))
+                     ("AmSequation"  ?e nil nil t)
+                     ("AmSgather"    ?e nil nil eqnarray-like)
+                     ("AmSmultline"  ?e nil nil t)
+                     ("AmSflalign"   ?e nil nil eqnarray-like)
+                     ("AmSalignat"   ?e nil nil alignat-like))))
+         (dolist (env envs)
+           (reftex-add-label-environments `(,env)))))
 
      ;; Append original definitions to `LaTeX-item-list'; functions
      ;; are provided by amsmath.el
      (let ((envs '(("AmSalign" . LaTeX-item-equation)
-                  ("AmSalign*" . LaTeX-item-equation)
-                  ("AmSflalign" . LaTeX-item-equation)
-                  ("AmSalignat" . LaTeX-item-equation-alignat)
-                  ("AmSalignat*" . LaTeX-item-equation-alignat)
-                  ("AmSflalign*" . LaTeX-item-equation)
-                  ("AmSgather" . LaTeX-item-equation)
-                  ("AmSgather*" . LaTeX-item-equation)
-                  ("AmSmultline" . LaTeX-item-equation)
-                  ("AmSmultline*" . LaTeX-item-equation))))
+                   ("AmSalign*" . LaTeX-item-equation)
+                   ("AmSflalign" . LaTeX-item-equation)
+                   ("AmSalignat" . LaTeX-item-equation-alignat)
+                   ("AmSalignat*" . LaTeX-item-equation-alignat)
+                   ("AmSflalign*" . LaTeX-item-equation)
+                   ("AmSgather" . LaTeX-item-equation)
+                   ("AmSgather*" . LaTeX-item-equation)
+                   ("AmSmultline" . LaTeX-item-equation)
+                   ("AmSmultline*" . LaTeX-item-equation))))
        (dolist (env envs)
-        (add-to-list 'LaTeX-item-list env t)))
+         (add-to-list 'LaTeX-item-list env t)))
 
      ;; Ispell skip lists:
      (TeX-ispell-skip-setcdr
       `(,(cons (concat "\\(AmS\\(?:align\\(?:\\*\\|at\\*?\\)?\\|"
-                      
"equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)")
-              (concat "\\\\end{"
-                      "\\(AmS\\(?:align\\(?:\\*\\|at\\*?\\)?\\|"
-                      
"equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)}")))))
+                       
"equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)")
+               (concat "\\\\end{"
+                       "\\(AmS\\(?:align\\(?:\\*\\|at\\*?\\)?\\|"
+                       
"equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)}")))))
 
    ;; 3.2 Support for ntheorem
    (LaTeX-add-lengths "mintagvsep")
@@ -451,23 +451,23 @@ number of ampersands if possible."
       [ "Space adjustment" ]
       (TeX-arg-eval
        (lambda ()
-        (let ((delim (TeX-read-string (concat "Delimiter: " TeX-esc))))
-          (TeX-add-symbols (concat "empheq" delim)
-                           (concat "empheqbig" delim))
-          (LaTeX-add-empheq-declaredelimiters `(,delim "Left"))
-          (LaTeX-empheq-update-key-val-options)
-          (concat TeX-esc delim)))))
+         (let ((delim (TeX-read-string (concat "Delimiter: " TeX-esc))))
+           (TeX-add-symbols (concat "empheq" delim)
+                            (concat "empheqbig" delim))
+           (LaTeX-add-empheq-declaredelimiters `(,delim "Left"))
+           (LaTeX-empheq-update-key-val-options)
+           (concat TeX-esc delim)))))
 
     '("DeclareRightDelimiter"
       [ "Space adjustment" ]
       (TeX-arg-eval
        (lambda ()
-        (let ((delim (TeX-read-string (concat "Delimiter: " TeX-esc))))
-          (TeX-add-symbols (concat "empheq" delim)
-                           (concat "empheqbig" delim))
-          (LaTeX-add-empheq-declaredelimiters `(,delim "Right"))
-          (LaTeX-empheq-update-key-val-options)
-          (concat TeX-esc delim))))))
+         (let ((delim (TeX-read-string (concat "Delimiter: " TeX-esc))))
+           (TeX-add-symbols (concat "empheq" delim)
+                            (concat "empheqbig" delim))
+           (LaTeX-add-empheq-declaredelimiters `(,delim "Right"))
+           (LaTeX-empheq-update-key-val-options)
+           (concat TeX-esc delim))))))
 
    ;; 4.2 Fine-tuning of delimiters
    (LaTeX-add-lengths "EmphEqdelimitershortfall")
@@ -483,11 +483,11 @@ number of ampersands if possible."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("empheqset"             "{")
-                               ("DeclareLeftDelimiter"  "[{")
-                               ("DeclareRightDelimiter" "[{"))
-                             'function)))
+                                ("DeclareLeftDelimiter"  "[{")
+                                ("DeclareRightDelimiter" "[{"))
+                              'function)))
  TeX-dialect)
 
 ;;; empheq.el ends here
diff --git a/style/enumitem.el b/style/enumitem.el
index bdc6c5c..efb8aa3 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -45,45 +45,45 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-enumitem-key-val-options
   `(;; 3.1 Label and cross references format
     ("label"  ("\\alph*"  "\\Alph*"  "\\arabic*"
-              "\\roman*" "\\Roman*" "\\value*"))
+               "\\roman*" "\\Roman*" "\\value*"))
     ("label*" ("\\alph*"  "\\Alph*"  "\\arabic*"
-              "\\roman*" "\\Roman*" "\\value*"))
+               "\\roman*" "\\Roman*" "\\value*"))
     ("ref"    ("\\alph*"  "\\Alph*"  "\\arabic*"
-              "\\roman*" "\\Roman*" "\\value*"))
+               "\\roman*" "\\Roman*" "\\value*"))
     ("font" ,(mapcar (lambda (mac)
-                      (concat TeX-esc mac))
-                    '(;; family
-                      "rmfamily" "sffamily" "ttfamily"
-                      ;; series
-                      "mdseries" "bfseries"
-                      ;; shape
-                      "upshape" "itshape" "slshape" "scshape"
-                      ;; size
-                      "tiny"  "scriptsize" "footnotesize"
-                      "small" "normalsize" "large"
-                      "Large" "LARGE" "huge" "Huge"
-                      ;; reset macro
-                      "normalfont")))
+                       (concat TeX-esc mac))
+                     '(;; family
+                       "rmfamily" "sffamily" "ttfamily"
+                       ;; series
+                       "mdseries" "bfseries"
+                       ;; shape
+                       "upshape" "itshape" "slshape" "scshape"
+                       ;; size
+                       "tiny"  "scriptsize" "footnotesize"
+                       "small" "normalsize" "large"
+                       "Large" "LARGE" "huge" "Huge"
+                       ;; reset macro
+                       "normalfont")))
     ("format" ,(mapcar (lambda (mac)
-                        (concat TeX-esc mac))
-                      '(;; family
-                        "rmfamily" "sffamily" "ttfamily"
-                        ;; series
-                        "mdseries" "bfseries"
-                        ;; shape
-                        "upshape" "itshape" "slshape" "scshape"
-                        ;; size
-                        "tiny"  "scriptsize" "footnotesize"
-                        "small" "normalsize" "large"
-                        "Large" "LARGE" "huge" "Huge"
-                        ;; reset macro
-                        "normalfont")))
+                         (concat TeX-esc mac))
+                       '(;; family
+                         "rmfamily" "sffamily" "ttfamily"
+                         ;; series
+                         "mdseries" "bfseries"
+                         ;; shape
+                         "upshape" "itshape" "slshape" "scshape"
+                         ;; size
+                         "tiny"  "scriptsize" "footnotesize"
+                         "small" "normalsize" "large"
+                         "Large" "LARGE" "huge" "Huge"
+                         ;; reset macro
+                         "normalfont")))
     ("align" ("left" "right" "parleft"))
     ;; 3.2 Horizontal spacing of labels
     ("labelindent" ("*" "!"))
@@ -192,9 +192,9 @@ package.")
 (defun LaTeX-enumitem-auto-prepare ()
   "Clear various `LaTeX-enumitem-*' before parsing."
   (setq LaTeX-auto-enumitem-newlist          nil
-       LaTeX-auto-enumitem-SetLabelAlign    nil
-       LaTeX-auto-enumitem-SetEnumitemKey   nil
-       LaTeX-auto-enumitem-SetEnumitemValue nil))
+        LaTeX-auto-enumitem-SetLabelAlign    nil
+        LaTeX-auto-enumitem-SetEnumitemKey   nil
+        LaTeX-auto-enumitem-SetEnumitemValue nil))
 
 (defun LaTeX-enumitem-auto-cleanup ()
   "Move parsing results into right places for further usage."
@@ -202,19 +202,19 @@ package.")
   ;; env=<name>, type=<type>, ignored=<max-depth>
   (dolist (env-type (LaTeX-enumitem-newlist-list))
     (let* ((env  (car env-type))
-          (type (cadr env-type)))
+           (type (cadr env-type)))
       (LaTeX-add-environments (list env 'LaTeX-enumitem-env-with-opts))
       ;; Tell AUCTeX about parsed description like environments.
       (when (or (string-equal type "description")
-               (string-equal type "description*"))
-       (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument)))
+                (string-equal type "description*"))
+        (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument)))
       ;; Add new env's to `ispell-tex-skip-alist': skip the optional argument
       (TeX-ispell-skip-setcdr `((,env ispell-tex-arg-end 0)))))
   ;; Now add the parsed env's to the local list.
   (when (LaTeX-enumitem-newlist-list)
     (setq LaTeX-enumitem-newlist-list-local
-         (append (mapcar #'list (mapcar #'car (LaTeX-enumitem-newlist-list)))
-                 LaTeX-enumitem-newlist-list-local))))
+          (append (mapcar #'list (mapcar #'car (LaTeX-enumitem-newlist-list)))
+                  LaTeX-enumitem-newlist-list-local))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-enumitem-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-enumitem-auto-cleanup t)
@@ -231,12 +231,12 @@ key-val and the first item."
        (format "[%s]" opts))))
   (if (TeX-active-mark)
       (progn
-       (LaTeX-find-matching-begin)
-       (end-of-line 1))
+        (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]*$"))
+                            "^[ \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'
@@ -247,9 +247,9 @@ key-val and the first item."
   ;; The inserted \item may have outdented the first line to the
   ;; right.  Fill it, if appropriate.
   (when (and (not (looking-at "$"))
-            (not (assoc env LaTeX-indent-environment-list))
-            (> (- (line-end-position) (line-beginning-position))
-               (current-fill-column)))
+             (not (assoc env LaTeX-indent-environment-list))
+             (> (- (line-end-position) (line-beginning-position))
+                (current-fill-column)))
     (LaTeX-fill-paragraph nil)))
 
 (defun LaTeX-arg-SetLabelAlign (optional)
@@ -265,8 +265,8 @@ key-val and the first item."
 `LaTeX-enumitem-key-val-options-local'."
   (LaTeX-enumitem-update-key-val-options)
   (let ((key     (TeX-read-string "New Key: "))
-       (replace (TeX-read-key-val optional
-                                  LaTeX-enumitem-key-val-options-local 
"Replacement")))
+        (replace (TeX-read-key-val optional
+                                   LaTeX-enumitem-key-val-options-local 
"Replacement")))
     (TeX-argument-insert key     optional)
     (TeX-argument-insert replace optional)
     (LaTeX-add-enumitem-SetEnumitemKeys key)))
@@ -282,12 +282,12 @@ key-val and the first item."
 replacement of the value."
   (LaTeX-enumitem-update-key-val-options)
   (let ((key (completing-read  "Key: " LaTeX-enumitem-key-val-options-local))
-       (val (TeX-read-string "String value: ")))
+        (val (TeX-read-string "String value: ")))
     (TeX-argument-insert key optional)
     (TeX-argument-insert val optional)
     (LaTeX-add-enumitem-SetEnumitemValues
      (list (concat "\\SetEnumitemValue{" key "}{" val "}")
-          key val))))
+           key val))))
 
 (defun LaTeX-enumitem-update-key-val-options ()
   "Update the buffer-local key-val options before offering them
@@ -296,24 +296,24 @@ in `enumitem'-completions."
     (add-to-list 'LaTeX-enumitem-key-val-options-local key))
   (dolist (keyvals (LaTeX-enumitem-SetEnumitemValue-list))
     (let* ((key (nth 1 keyvals))
-          (val (nth 2 keyvals))
-          ;; (key-match (car (assoc key LaTeX-enumitem-key-val-options-local)))
-          (val-match (cdr (assoc key LaTeX-enumitem-key-val-options-local)))
-          (temp (copy-alist LaTeX-enumitem-key-val-options-local))
-          (opts (assq-delete-all (car (assoc key temp)) temp)))
+           (val (nth 2 keyvals))
+           ;; (key-match (car (assoc key 
LaTeX-enumitem-key-val-options-local)))
+           (val-match (cdr (assoc key LaTeX-enumitem-key-val-options-local)))
+           (temp (copy-alist LaTeX-enumitem-key-val-options-local))
+           (opts (assq-delete-all (car (assoc key temp)) temp)))
       (if val-match
-         (cl-pushnew (list key (TeX-delete-duplicate-strings (apply #'append 
(list val) val-match)))
-                     opts :test #'equal)
-       (cl-pushnew (list key (list val)) opts :test #'equal))
+          (cl-pushnew (list key (TeX-delete-duplicate-strings (apply #'append 
(list val) val-match)))
+                      opts :test #'equal)
+        (cl-pushnew (list key (list val)) opts :test #'equal))
       (setq LaTeX-enumitem-key-val-options-local (copy-alist opts))))
   (dolist (newalign (LaTeX-enumitem-SetLabelAlign-list))
     (let* ((key "align")
-          (val (car newalign))
-          (val-match (cdr (assoc key LaTeX-enumitem-key-val-options-local)))
-          (temp (copy-alist LaTeX-enumitem-key-val-options-local))
-          (opts (assq-delete-all (car (assoc key temp)) temp)))
+           (val (car newalign))
+           (val-match (cdr (assoc key LaTeX-enumitem-key-val-options-local)))
+           (temp (copy-alist LaTeX-enumitem-key-val-options-local))
+           (opts (assq-delete-all (car (assoc key temp)) temp)))
       (cl-pushnew (list key (TeX-delete-duplicate-strings (apply #'append 
(list val) val-match)))
-                 opts :test #'equal)
+                  opts :test #'equal)
       (setq LaTeX-enumitem-key-val-options-local (copy-alist opts)))))
 
 (TeX-add-style-hook
@@ -328,17 +328,17 @@ in `enumitem'-completions."
 
    ;; Activate the buffer-local version of key-vals.
    (setq LaTeX-enumitem-key-val-options-local
-        (copy-alist LaTeX-enumitem-key-val-options))
+         (copy-alist LaTeX-enumitem-key-val-options))
 
    ;; Set the standard env's to the local list.
    (setq LaTeX-enumitem-newlist-list-local
-        '(("itemize") ("enumerate") ("description")))
+         '(("itemize") ("enumerate") ("description")))
 
    ;; Add the starred versions to the local list.
    (when (LaTeX-provided-package-options-member "enumitem" "inline")
      (setq LaTeX-enumitem-newlist-list-local
-          (append '(("itemize*") ("enumerate*") ("description*"))
-                  LaTeX-enumitem-newlist-list-local)))
+           (append '(("itemize*") ("enumerate*") ("description*"))
+                   LaTeX-enumitem-newlist-list-local)))
 
    ;; Standard env's take key-val as optional argument.
    (LaTeX-add-environments
@@ -369,66 +369,66 @@ in `enumitem'-completions."
     '("newlist"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string "Name: "))
-              (type (completing-read
-                     "Type: "
-                     '(("itemize")  ("enumerate")  ("description")
-                       ("itemize*") ("enumerate*") ("description*"))))
-              (depth (TeX-read-string "Max-depth: ")))
-          (setq LaTeX-enumitem-newlist-list-local
-                (append `(,(list name)) LaTeX-enumitem-newlist-list-local))
-          (when (or (string-equal type "description")
-                    (string-equal type "description*"))
-            (add-to-list 'LaTeX-item-list `(,name . LaTeX-item-argument)))
-          (LaTeX-add-environments `(,name LaTeX-enumitem-env-with-opts))
-          (LaTeX-add-enumitem-newlists (list name type))
-          (TeX-ispell-skip-setcdr `((,name ispell-tex-arg-end 0)))
-          (TeX-argument-insert name nil)
-          (TeX-argument-insert type nil)
-          (format "%s" depth)))))
+         (let ((name (TeX-read-string "Name: "))
+               (type (completing-read
+                      "Type: "
+                      '(("itemize")  ("enumerate")  ("description")
+                        ("itemize*") ("enumerate*") ("description*"))))
+               (depth (TeX-read-string "Max-depth: ")))
+           (setq LaTeX-enumitem-newlist-list-local
+                 (append `(,(list name)) LaTeX-enumitem-newlist-list-local))
+           (when (or (string-equal type "description")
+                     (string-equal type "description*"))
+             (add-to-list 'LaTeX-item-list `(,name . LaTeX-item-argument)))
+           (LaTeX-add-environments `(,name LaTeX-enumitem-env-with-opts))
+           (LaTeX-add-enumitem-newlists (list name type))
+           (TeX-ispell-skip-setcdr `((,name ispell-tex-arg-end 0)))
+           (TeX-argument-insert name nil)
+           (TeX-argument-insert type nil)
+           (format "%s" depth)))))
 
     ;; \renewlist{<name>}{<type>}{<max-depth>}
     '("renewlist"
       (TeX-arg-eval completing-read "Name: "
-                   LaTeX-enumitem-newlist-list-local)
+                    LaTeX-enumitem-newlist-list-local)
       (TeX-arg-eval completing-read "Type: "
-                   '(("itemize")  ("enumerate")  ("description")
-                     ("itemize*") ("enumerate*") ("description*")))
+                    '(("itemize")  ("enumerate")  ("description")
+                      ("itemize*") ("enumerate*") ("description*")))
       "Max-depth")
 
     ;; \setlist[<names,levels>]{<key-vals>}
     '("setlist"
       [TeX-arg-eval mapconcat #'identity
-                   (TeX-completing-read-multiple
-                    (TeX-argument-prompt t nil "Environment(s), level(s)")
-                    (append
-                     (when (LaTeX-provided-package-options-member "enumitem"
-                                                                  
"includedisplayed")
-                       '("trivlist"))
-                     LaTeX-enumitem-newlist-list-local
-                     '(("1") ("2") ("3") ("4")))) ","]
+                    (TeX-completing-read-multiple
+                     (TeX-argument-prompt t nil "Environment(s), level(s)")
+                     (append
+                      (when (LaTeX-provided-package-options-member "enumitem"
+                                                                   
"includedisplayed")
+                        '("trivlist"))
+                      LaTeX-enumitem-newlist-list-local
+                      '(("1") ("2") ("3") ("4")))) ","]
       (TeX-arg-eval
        (lambda ()
-        (LaTeX-enumitem-update-key-val-options)
-        (let ((opts (TeX-read-key-val nil 
LaTeX-enumitem-key-val-options-local)))
-          (format "%s" opts)))))
+         (LaTeX-enumitem-update-key-val-options)
+         (let ((opts (TeX-read-key-val nil 
LaTeX-enumitem-key-val-options-local)))
+           (format "%s" opts)))))
 
     ;; \setlist*[<names,levels>]{<key-vals>}
     '("setlist*"
       [TeX-arg-eval mapconcat #'identity
-                   (TeX-completing-read-multiple
-                    (TeX-argument-prompt t nil "Environment(s), level(s)")
-                    (append
-                     (when (LaTeX-provided-package-options-member "enumitem"
-                                                                  
"includedisplayed")
-                       '("trivlist"))
-                     LaTeX-enumitem-newlist-list-local
-                     '(("1") ("2") ("3") ("4")))) ","]
+                    (TeX-completing-read-multiple
+                     (TeX-argument-prompt t nil "Environment(s), level(s)")
+                     (append
+                      (when (LaTeX-provided-package-options-member "enumitem"
+                                                                   
"includedisplayed")
+                        '("trivlist"))
+                      LaTeX-enumitem-newlist-list-local
+                      '(("1") ("2") ("3") ("4")))) ","]
       (TeX-arg-eval
        (lambda ()
-        (LaTeX-enumitem-update-key-val-options)
-        (let ((opts (TeX-read-key-val nil 
LaTeX-enumitem-key-val-options-local)))
-          (format "%s" opts))))) )
+         (LaTeX-enumitem-update-key-val-options)
+         (let ((opts (TeX-read-key-val nil 
LaTeX-enumitem-key-val-options-local)))
+           (format "%s" opts))))) )
 
    ;; General commands:
    (TeX-add-symbols
@@ -447,16 +447,16 @@ in `enumitem'-completions."
     '("restartlist"
       (TeX-arg-eval
        (lambda ()
-        (let ((enums '("enumerate")))
-          (when (LaTeX-provided-package-options-member "enumitem" "inline")
-            (cl-pushnew "enumerate*" enums :test #'equal))
-          (dolist (env-type (LaTeX-enumitem-newlist-list))
-            (let ((env   (car env-type))
-                  (type  (cadr env-type)))
-              (when (or (string-equal type "enumerate")
-                        (string-equal type "enumerate*"))
-                (cl-pushnew env enums :test #'equal))))
-          (completing-read "List name: " enums)))))
+         (let ((enums '("enumerate")))
+           (when (LaTeX-provided-package-options-member "enumitem" "inline")
+             (cl-pushnew "enumerate*" enums :test #'equal))
+           (dolist (env-type (LaTeX-enumitem-newlist-list))
+             (let ((env   (car env-type))
+                   (type  (cadr env-type)))
+               (when (or (string-equal type "enumerate")
+                         (string-equal type "enumerate*"))
+                 (cl-pushnew env enums :test #'equal))))
+           (completing-read "List name: " enums)))))
 
     ;; "Align" is added as new value to "align" key in key-val list.
     '("SetLabelAlign" LaTeX-arg-SetLabelAlign t)
@@ -474,28 +474,28 @@ in `enumitem'-completions."
    (when (LaTeX-provided-package-options-member "enumitem" "shortlabels")
      (TeX-add-symbols
       '("SetEnumerateShortLabel"
-       (TeX-arg-eval completing-read "Key: "
-                     '(("A") ("a") ("I") ("i") ("1")))
-       "Replacement")))
+        (TeX-arg-eval completing-read "Key: "
+                      '(("A") ("a") ("I") ("i") ("1")))
+        "Replacement")))
 
    ;; Add \labelindent to list of known lengths:
    (LaTeX-add-lengths "labelitem")
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("newlist"             "{{{")
-                               ("renewlist"           "{{{")
-                               ("setlist"             "*[{")
-                               ("AddEnumerateCounter" "*{{{")
-                               ("SetLabelAlign"       "{{")
-                               ("SetEnumitemKey"      "{{" )
-                               ("SetEnumitemValue"    "{{{"))
-                             'function)
+                                ("renewlist"           "{{{")
+                                ("setlist"             "*[{")
+                                ("AddEnumerateCounter" "*{{{")
+                                ("SetLabelAlign"       "{{")
+                                ("SetEnumitemKey"      "{{" )
+                                ("SetEnumitemValue"    "{{{"))
+                              'function)
      (font-latex-add-keywords '(("restartlist"            "{" )
-                               ("setlistdepth"           "{" )
-                               ("SetEnumerateShortLabel" "{{"))
-                             'variable)))
+                                ("setlistdepth"           "{" )
+                                ("SetEnumerateShortLabel" "{{"))
+                              'variable)))
  TeX-dialect)
 
 (defvar LaTeX-enumitem-package-options
diff --git a/style/environ.el b/style/environ.el
index 6b7f465..3a17f50 100644
--- a/style/environ.el
+++ b/style/environ.el
@@ -50,8 +50,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-auto-environ-NewEnviron nil
   "Temporary for parsing the arguments of `\\NewEnviron'
@@ -59,9 +59,9 @@ from `environ' package.")
 
 (defvar LaTeX-environ-NewEnviron-regexp
   `(,(concat "\\\\\\(?:Ren\\|N\\)ewEnviron"
-            "[ \t\n\r]*{\\([A-Za-z0-9]+\\)}%?"
-            "[ \t\n\r]*\\[?\\([0-9]?\\)\\]?%?"
-            "[ \t\n\r]*\\(\\[\\)?")
+             "[ \t\n\r]*{\\([A-Za-z0-9]+\\)}%?"
+             "[ \t\n\r]*\\[?\\([0-9]?\\)\\]?%?"
+             "[ \t\n\r]*\\(\\[\\)?")
     (1 2 3) LaTeX-auto-environ-NewEnviron)
   "Matches the argument of `\\NewEnviron' and `\\RenewEnviron'
 from `environ.sty'.")
@@ -74,21 +74,21 @@ from `environ.sty'.")
   "Process the parsed results of `\\NewEnviron'."
   (dolist (env-args LaTeX-auto-environ-NewEnviron)
     (let ((env  (car   env-args))
-         (args (cadr  env-args))
-         (opt  (nth 2 env-args)))
+          (args (cadr  env-args))
+          (opt  (nth 2 env-args)))
       (cond (;; opt. 1st argument and mandatory argument(s)
-            (and args (not (string-equal args ""))
-                 opt  (not (string-equal opt  "")))
-            (add-to-list 'LaTeX-auto-environment
-                         (list env 'LaTeX-env-args (vector "argument")
-                               (1- (string-to-number args)))))
-           (;; mandatory argument(s) only
-            (and args (not (string-equal args ""))
-                 (string-equal opt ""))
-            (add-to-list 'LaTeX-auto-environment
-                         (list env (string-to-number args))))
-           (t ; No args
-            (add-to-list 'LaTeX-auto-environment (list env)))))))
+             (and args (not (string-equal args ""))
+                  opt  (not (string-equal opt  "")))
+             (add-to-list 'LaTeX-auto-environment
+                          (list env 'LaTeX-env-args (vector "argument")
+                                (1- (string-to-number args)))))
+            (;; mandatory argument(s) only
+             (and args (not (string-equal args ""))
+                  (string-equal opt ""))
+             (add-to-list 'LaTeX-auto-environment
+                          (list env (string-to-number args))))
+            (t ; No args
+             (add-to-list 'LaTeX-auto-environment (list env)))))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-environ-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-environ-auto-cleanup t)
@@ -99,7 +99,7 @@ from `environ.sty'.")
 `\\NewEnviron' and insert the appropriate brackets."
   (let ((fincode (y-or-n-p "With optional final code? ")))
     (when fincode
-       (insert "[]"))))
+      (insert "[]"))))
 
 (TeX-add-style-hook
  "environ"
@@ -130,12 +130,12 @@ from `environ.sty'.")
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("NewEnviron"      "{[[{[")
-                               ("RenewEnviron"    "{[[{[")
-                               ("environbodyname" "|{\\"))
-                             'function)))
-  TeX-dialect)
+                                ("RenewEnviron"    "{[[{[")
+                                ("environbodyname" "|{\\"))
+                              'function)))
+ TeX-dialect)
 
 (defvar LaTeX-environ-package-options nil
   "Package options for the environ package.")
diff --git a/style/epigraph.el b/style/epigraph.el
index 93a555e..14b276f 100644
--- a/style/epigraph.el
+++ b/style/epigraph.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "epigraph"
@@ -65,34 +65,34 @@
 
    ;; The value of these lengths can be changed with \setlength
    (LaTeX-add-lengths "epigraphwidth" "epigraphrule"
-                     "beforeepigraphskip"
-                     "afterepigraphskip")
+                      "beforeepigraphskip"
+                      "afterepigraphskip")
 
    ;; Append epigraphs to `LaTeX-item-list':
    (add-to-list 'LaTeX-item-list
-               '("epigraphs" . LaTeX-epigraph-qitem) t)
+                '("epigraphs" . LaTeX-epigraph-qitem) t)
 
    ;; Append qitem to `LaTeX-item-regexp':
    (unless (string-match "qitem" LaTeX-item-regexp)
      (set (make-local-variable 'LaTeX-item-regexp)
-         (concat
-          LaTeX-item-regexp
-          "\\|"
-          "qitem\\b"))
+          (concat
+           LaTeX-item-regexp
+           "\\|"
+           "qitem\\b"))
      (LaTeX-set-paragraph-start))
 
    ;; Fontification:
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("epigraph"     "{{")
-                               ("qitem"        "{{")
-                               ("epigraphhead" "[{"))
-                             'textual)
+                                ("qitem"        "{{")
+                                ("epigraphhead" "[{"))
+                              'textual)
      (font-latex-add-keywords '(("dropchapter"  "{")
-                               ("undodrop"     ""))
-                             'variable)
+                                ("undodrop"     ""))
+                              'variable)
      (font-latex-add-keywords '("cleartoevenpage")
-                             'warning)))
+                              'warning)))
  TeX-dialect)
 
 (defvar LaTeX-epigraph-package-options nil
diff --git a/style/erewhon.el b/style/erewhon.el
index 66acf53..c438214 100644
--- a/style/erewhon.el
+++ b/style/erewhon.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "erewhon"
@@ -70,24 +70,24 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textlf"    "{")
-                               ("texttlf"   "{")
-                               ("textosf"   "{")
-                               ("texttosf"  "{")
-                               ("textsu"    "{")
-                               ("textin"    "{")
-                               ("textnu"    "{")
-                               ("textde"    "{"))
-                             'type-command)
+                                ("texttlf"   "{")
+                                ("textosf"   "{")
+                                ("texttosf"  "{")
+                                ("textsu"    "{")
+                                ("textin"    "{")
+                                ("textnu"    "{")
+                                ("textde"    "{"))
+                              'type-command)
      (font-latex-add-keywords '(("lfstyle"   "")
-                               ("tlfstyle"  "")
-                               ("osfstyle"  "")
-                               ("tosfstyle" "")
-                               ("sufigures" ""))
-                             'type-declaration)
+                                ("tlfstyle"  "")
+                                ("osfstyle"  "")
+                                ("tosfstyle" "")
+                                ("sufigures" ""))
+                              'type-declaration)
      (font-latex-add-keywords '(("textfrac"  "{{"))
-                             'textual)))
+                              'textual)))
  TeX-dialect)
 
 (defvar LaTeX-erewhon-package-options
diff --git a/style/exam.el b/style/exam.el
index 2431522..15b7928 100644
--- a/style/exam.el
+++ b/style/exam.el
@@ -37,8 +37,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-article-class-options)
 
@@ -64,9 +64,9 @@ Item inserted depends on the environment."
             "subpart")
            ((string= env "subsubparts")
             "subsubpart")
-          ((member env '("choices" "oneparchoices"
-                         "checkboxes" "oneparcheckboxes"))
-           "choice")
+           ((member env '("choices" "oneparchoices"
+                          "checkboxes" "oneparcheckboxes"))
+            "choice")
            ;; Fallback
            (t "item")))))
 
@@ -116,13 +116,13 @@ Arguments NAME and TYPE are the same as for the function
 
    ;; Tell AUCTeX about special environments:
    (let ((envs '("questions"
-                "parts"      "subparts"         "subsubparts"
-                "choices"    "oneparchoices"
-                "checkboxes" "oneparcheckboxes")))
+                 "parts"      "subparts"         "subsubparts"
+                 "choices"    "oneparchoices"
+                 "checkboxes" "oneparcheckboxes")))
      (dolist (env envs)
        (add-to-list 'LaTeX-item-list
                     (cons env 'LaTeX-exam-insert-item)
-                   t)))
+                    t)))
 
    ;; Append us only once:
    (unless (and (string-match "question" LaTeX-item-regexp)
@@ -131,8 +131,8 @@ Arguments NAME and TYPE are the same as for the function
           (concat
            LaTeX-item-regexp
            "\\|"
-          "choice\\b"
-          "\\|"
+           "choice\\b"
+           "\\|"
            "\\(titled\\)?question\\b"
            "\\|"
            "\\(sub\\)*part\\b"))
@@ -143,60 +143,60 @@ Arguments NAME and TYPE are the same as for the function
     '("subpart" [ "Points" ] (TeX-arg-literal " "))
     '("gradetable"
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Orientation")
-                     '("v" "h") ]
+        (TeX-argument-prompt t nil "Orientation")
+        '("v" "h") ]
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Table index")
-                     '("questions" "pages") ] )
+        (TeX-argument-prompt t nil "Table index")
+        '("questions" "pages") ] )
     '("bonusgradetable"
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Orientation")
-                     '("v" "h") ]
+        (TeX-argument-prompt t nil "Orientation")
+        '("v" "h") ]
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Table index")
-                     '("questions" "pages") ] )
+        (TeX-argument-prompt t nil "Table index")
+        '("questions" "pages") ] )
     '("bonuspointtable"
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Orientation")
-                     '("v" "h") ]
+        (TeX-argument-prompt t nil "Orientation")
+        '("v" "h") ]
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Table index")
-                     '("questions" "pages") ] )
+        (TeX-argument-prompt t nil "Table index")
+        '("questions" "pages") ] )
     '("partialgradetable"
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Orientation")
-                     '("v" "h") ]
+        (TeX-argument-prompt t nil "Orientation")
+        '("v" "h") ]
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Table index")
-                     '("questions" "pages") ] )
+        (TeX-argument-prompt t nil "Table index")
+        '("questions" "pages") ] )
     '("partialbonusgradetable"
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Orientation")
-                     '("v" "h") ]
+        (TeX-argument-prompt t nil "Orientation")
+        '("v" "h") ]
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Table index")
-                     '("questions" "pages") ] )
+        (TeX-argument-prompt t nil "Table index")
+        '("questions" "pages") ] )
     '("partialbonuspointtable"
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Orientation")
-                     '("v" "h") ]
+        (TeX-argument-prompt t nil "Orientation")
+        '("v" "h") ]
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Table index")
-                     '("questions" "pages") ] )
+        (TeX-argument-prompt t nil "Table index")
+        '("questions" "pages") ] )
     '("pointtable"
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Orientation")
-                     '("v" "h") ]
+        (TeX-argument-prompt t nil "Orientation")
+        '("v" "h") ]
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Table index")
-                     '("questions" "pages") ] )
+        (TeX-argument-prompt t nil "Table index")
+        '("questions" "pages") ] )
     '("partialpointtable"
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Orientation")
-                     '("v" "h") ]
+        (TeX-argument-prompt t nil "Orientation")
+        '("v" "h") ]
       [ TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Table index")
-                     '("questions" "pages") ] )
+        (TeX-argument-prompt t nil "Table index")
+        '("questions" "pages") ] )
 
     '("subsubpart" [ "Points" ] (TeX-arg-literal " "))
     '("question"  ["Points"] (TeX-arg-literal " "))
diff --git a/style/expl3.el b/style/expl3.el
index 1b732a1..b0d5a38 100644
--- a/style/expl3.el
+++ b/style/expl3.el
@@ -55,9 +55,9 @@
 (defun LaTeX-expl3-package-options ()
   "Read the expl3 package options from the user."
   (TeX-read-key-val t '(("check-declarations" ("true" "false"))
-                       ("log-functions" ("true" "false"))
-                       ("driver" ("auto"    "latex2e"
-                                  "dvips"   "dvipdfmx"
-                                  "pdfmode" "xdvipdfmx")))))
+                        ("log-functions" ("true" "false"))
+                        ("driver" ("auto"    "latex2e"
+                                   "dvips"   "dvipdfmx"
+                                   "pdfmode" "xdvipdfmx")))))
 
 ;;; expl3.el ends here
diff --git a/style/fancyhdr.el b/style/fancyhdr.el
index 0ec2ee0..4557e3b 100644
--- a/style/fancyhdr.el
+++ b/style/fancyhdr.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "fancyhdr"
@@ -72,7 +72,7 @@
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("fancyhead" "[{")
                                 ("fancyfoot" "[{")
                                 ("lhead" "{")
diff --git a/style/fancyref.el b/style/fancyref.el
index cf6555f..22fd1c1 100644
--- a/style/fancyref.el
+++ b/style/fancyref.el
@@ -29,8 +29,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "fancyref"
@@ -89,23 +89,23 @@
 
    ;; Insatall completion for labels and formats
    (setq TeX-complete-list
-        (append
-         '(("\\\\[fF]ref\\(\\[[^]]*\\]\\)?{\\([^{}\n\r\\%,]*\\)" 
-            2 LaTeX-label-list "}")
-           ("\\\\[fF]ref\\[\\([^{}\n\r\\%,]*\\)" 
-            1 LaTeX-fancyref-formats "]")
-           ("\\\\[fF]refformat{\\([^{}\n\r\\%,]*\\)"
-            1 LaTeX-fancyref-formats "}"))
-         TeX-complete-list))
+         (append
+          '(("\\\\[fF]ref\\(\\[[^]]*\\]\\)?{\\([^{}\n\r\\%,]*\\)" 
+             2 LaTeX-label-list "}")
+            ("\\\\[fF]ref\\[\\([^{}\n\r\\%,]*\\)" 
+             1 LaTeX-fancyref-formats "]")
+            ("\\\\[fF]refformat{\\([^{}\n\r\\%,]*\\)"
+             1 LaTeX-fancyref-formats "}"))
+          TeX-complete-list))
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("fref" "[{") ("Fref" "[{")) 'reference))
 
    ;; Activate RefTeX reference style.
    (and LaTeX-reftex-ref-style-auto-activate
-       (fboundp 'reftex-ref-style-activate)
-       (reftex-ref-style-activate "Fancyref")))
+        (fboundp 'reftex-ref-style-activate)
+        (reftex-ref-style-activate "Fancyref")))
  TeX-dialect)
 
 ;; The following list keeps a list of available format names
@@ -123,14 +123,14 @@
   "Prompt for a fancyref format name.
 If the user gives an unknown name, add it to the list."
   (let ((format (completing-read (TeX-argument-prompt optional prompt "Format")
-                                LaTeX-fancyref-formats)))
+                                 LaTeX-fancyref-formats)))
     (if (not (string-equal "" format))
-       (add-to-list 'LaTeX-fancyref-formats (list format)))
+        (add-to-list 'LaTeX-fancyref-formats (list format)))
     (TeX-argument-insert format optional)))
 
 (defvar LaTeX-fancyref-package-options '("english" "german" "loose"
-                                        "margin" "paren" "plain" "tight"
-                                        "vario")
+                                         "margin" "paren" "plain" "tight"
+                                         "vario")
   "Package options for the fancyref package.")
 
 ;;; fancyref.el ends here
diff --git a/style/fancyvrb.el b/style/fancyvrb.el
index 69fe18b..37dc3c7 100644
--- a/style/fancyvrb.el
+++ b/style/fancyvrb.el
@@ -61,11 +61,11 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 (defvar LaTeX-fancyvrb-key-val-options
   `(("commentchar" ("none"))
@@ -74,8 +74,8 @@
     ("formatcom*")    ; Undocumented key
     ("fontfamily" ("tt" "courier" "helvetica"))
     ("fontsize"   ("auto" "\\tiny" "\\scriptsize"
-                  "\\footnotesize" "\\small" "\\normalsize"
-                  "\\large" "\\Large" "\\LARGE" "\\huge" "\\Huge"))
+                   "\\footnotesize" "\\small" "\\normalsize"
+                   "\\large" "\\Large" "\\LARGE" "\\huge" "\\Huge"))
     ("fontshape"  ("auto" "n" "it" "sl" "sc" "scit"))
     ("fontseries" ("auto" "m" "b" "bx" "sb" "c" "l" "lc"))
     ("frame" ("none" "leftline" "topline" "bottomline" "lines" "single"))
@@ -110,8 +110,8 @@
     ("reflabel")
     ;; Undocumented key and introduced in version 2.81 2011/04/06
     ("vspace" ,(mapcar (lambda (x)
-                        (concat TeX-esc (car x)))
-                      (LaTeX-length-list)))
+                         (concat TeX-esc (car x)))
+                       (LaTeX-length-list)))
     ;; Actually, the following options are used only by the `BVerbatim'
     ;; environment.
     ("boxwidth" ("auto" "dimension"))
@@ -148,8 +148,8 @@ Starred versions are not included in this list.")
 
 (defvar LaTeX-fancyvrb-macro-regexp
   `(,(concat "\\\\\\(Rec\\|C\\)ustomVerbatimCommand"
-            "[ \t\n\r]*{?[ \t\n\r]*\\\\\\([A-Za-z]+\\)[ \t\n\r]*}?"
-            "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z]+\\)[ \t\n\r]*}")
+             "[ \t\n\r]*{?[ \t\n\r]*\\\\\\([A-Za-z]+\\)[ \t\n\r]*}?"
+             "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z]+\\)[ \t\n\r]*}")
     (2 3 1) LaTeX-auto-fancyvrb-macro)
   "Matches macros by fancyvrb package.")
 
@@ -159,8 +159,8 @@ Starred versions are not included in this list.")
 
 (defvar LaTeX-fancyvrb-environment-regexp
   `(,(concat "\\\\DefineVerbatimEnvironment"
-            "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z0-9]+\\)[ \t\n\r]*}"
-            "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z]+\\)[ \t\n\r]*}")
+             "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z0-9]+\\)[ \t\n\r]*}"
+             "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z]+\\)[ \t\n\r]*}")
     (1 2) LaTeX-auto-fancyvrb-environment)
   "Matches new environments defined by fancyvrb package.")
 
@@ -170,8 +170,8 @@ Starred versions are not included in this list.")
 
 (defvar LaTeX-fancyvrb-saveverb-regexp
   `(,(concat "\\\\SaveVerb"
-            LaTeX-fancyvrb-key-val-skip-regexp
-            "{\\([^}]+\\)}")
+             LaTeX-fancyvrb-key-val-skip-regexp
+             "{\\([^}]+\\)}")
     1 LaTeX-auto-fancyvrb-saveverb)
   "Match the name under which verbatim text is saved by SaveVerb macro.")
 
@@ -181,17 +181,17 @@ Starred versions are not included in this list.")
 
 (defvar LaTeX-fancyvrb-saveverbatim-regexp
   `(,(concat "\\\\begin{SaveVerbatim}"
-            LaTeX-fancyvrb-key-val-skip-regexp
-            "{\\([^}]+\\)}")
+             LaTeX-fancyvrb-key-val-skip-regexp
+             "{\\([^}]+\\)}")
     1 LaTeX-auto-fancyvrb-saveverbatim)
   "Match the name under which verbatim text is saved by SaveVerbatim 
environment.")
 
 (defun LaTeX-fancyvrb-auto-prepare ()
   "Clear various LaTeX-auto-fancyvrb-* variables before parsing."
   (setq LaTeX-auto-fancyvrb-macro        nil
-       LaTeX-auto-fancyvrb-environment  nil
-       LaTeX-auto-fancyvrb-saveverb     nil
-       LaTeX-auto-fancyvrb-saveverbatim nil))
+        LaTeX-auto-fancyvrb-environment  nil
+        LaTeX-auto-fancyvrb-saveverb     nil
+        LaTeX-auto-fancyvrb-saveverbatim nil))
 
 (defun LaTeX-fancyvrb-auto-cleanup ()
   "Process parsed elements for fancyvrb package."
@@ -212,14 +212,14 @@ RECUSTOM is non-nil, delete macros from the variable
   ;; This part is only relevant when called by user:
   (unless cleanup
     (let ((new-mac (if recustom
-                      (completing-read
-                       (TeX-argument-prompt optional nil "Verbatim macro: \\" 
t)
-                       (mapcar #'car (apply #'append 
LaTeX-fancyvrb-macro-list)))
-                    (TeX-read-string
-                     (TeX-argument-prompt optional nil "New verbatim macro: 
\\" t))))
-         (base-mac (completing-read (TeX-argument-prompt optional nil "Based 
on macro")
-                                    LaTeX-fancyvrb-base-macros))
-         (rec-flag (if recustom "Rec" "C")))
+                       (completing-read
+                        (TeX-argument-prompt optional nil "Verbatim macro: \\" 
t)
+                        (mapcar #'car (apply #'append 
LaTeX-fancyvrb-macro-list)))
+                     (TeX-read-string
+                      (TeX-argument-prompt optional nil "New verbatim macro: 
\\" t))))
+          (base-mac (completing-read (TeX-argument-prompt optional nil "Based 
on macro")
+                                     LaTeX-fancyvrb-base-macros))
+          (rec-flag (if recustom "Rec" "C")))
       ;; We are (re-)defining a macro: Insert user queried input and
       ;; use `LaTeX-add-fancyvrb-macros' on the input.  Do not enclose
       ;; the first argument in braces as this will improve
@@ -228,8 +228,8 @@ RECUSTOM is non-nil, delete macros from the variable
       ;; \CustomVerbatimCommand{\foo}{Verb}{}
       ;;                            ^     ^
       (let ((TeX-arg-opening-brace "")
-           (TeX-arg-closing-brace ""))
-       (TeX-argument-insert new-mac optional TeX-esc))
+            (TeX-arg-closing-brace ""))
+        (TeX-argument-insert new-mac optional TeX-esc))
       (TeX-argument-insert base-mac optional)
       (TeX-argument-insert
        (TeX-read-key-val optional LaTeX-fancyvrb-key-val-options-local) 
optional)
@@ -241,74 +241,74 @@ RECUSTOM is non-nil, delete macros from the variable
   ;; the variable as is, hence (apply #'append ...);
   (dolist (elt (apply #'append LaTeX-fancyvrb-macro-list))
     (let ((mac-name (nth 0 elt))
-         (base-mac (nth 1 elt))
-         (flag     (nth 2 elt)))
+          (base-mac (nth 1 elt))
+          (flag     (nth 2 elt)))
       ;; If we're Rec-ustomizing, delete the entry first from
       ;; `TeX-symbol-list':
       (when (string= flag "Rec")
-       (setq TeX-symbol-list
-             (assq-delete-all (car (assoc mac-name (TeX-symbol-list))) 
TeX-symbol-list)))
+        (setq TeX-symbol-list
+              (assq-delete-all (car (assoc mac-name (TeX-symbol-list))) 
TeX-symbol-list)))
       ;; Now add the new item: Start with new macros for loading
       ;; files:
       (cond ((member base-mac '("VerbatimInput" "BVerbatimInput" 
"LVerbatimInput"))
-            (TeX-add-symbols
-             `(,mac-name
-               [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
-               LaTeX-fancyvrb-arg-file-relative))
-            (when (and (fboundp 'font-latex-add-keywords)
-                       (eq TeX-install-font-lock 'font-latex-setup))
-              (font-latex-add-keywords `((,mac-name "[{"))
-                                       'reference)))
-           ;; New macros for saving verbatim text:
-           ((string= base-mac "SaveVerb")
-            (TeX-add-symbols
-             `(,mac-name
-               [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
-               (TeX-arg-eval
-                (lambda ()
-                  (let ((name (TeX-read-string
-                               (TeX-argument-prompt nil nil "Save name"))))
-                    (LaTeX-add-fancyvrb-saveverbs name)
-                    (format "%s" name))))
-               TeX-arg-verb))
-            (when (and (fboundp 'font-latex-add-keywords)
-                       (eq TeX-install-font-lock 'font-latex-setup))
-              (font-latex-add-keywords `((,mac-name "[{"))
-                                       'textual)))
-           ;; New macros for using previously saved text:
-           ((string= base-mac "UseVerb")
-            (TeX-add-symbols
-             `(,mac-name
-               (TeX-arg-eval
-                completing-read
-                (TeX-argument-prompt nil nil "Saved name")
-                (LaTeX-fancyvrb-saveverb-list))))
-            (when (and (fboundp 'font-latex-add-keywords)
-                       (eq TeX-install-font-lock 'font-latex-setup))
-              (font-latex-add-keywords `((,mac-name "{"))
-                                       'textual)))
-           ;; Anything else is considered as verbatim typesetting macro:
-           (t
-            (TeX-add-symbols
-             `(,mac-name
-               [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
-               TeX-arg-verb)
-             ;; Defined macros have a starred version where the
-             ;; `showspaces' key is set to true
-             `(,(concat mac-name "*")
-               [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
-               TeX-arg-verb))
-            (add-to-list 'LaTeX-verbatim-macros-with-delims-local
-                         mac-name t)
-            (add-to-list 'LaTeX-verbatim-macros-with-delims-local
-                         (concat mac-name "*") t)
-            (when (and (fboundp 'font-latex-add-keywords)
-                       (eq TeX-install-font-lock 'font-latex-setup))
-              (font-latex-add-keywords `((,mac-name "*["))
-                                       'textual))))))
+             (TeX-add-symbols
+              `(,mac-name
+                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                LaTeX-fancyvrb-arg-file-relative))
+             (when (and (fboundp 'font-latex-add-keywords)
+                        (eq TeX-install-font-lock 'font-latex-setup))
+               (font-latex-add-keywords `((,mac-name "[{"))
+                                        'reference)))
+            ;; New macros for saving verbatim text:
+            ((string= base-mac "SaveVerb")
+             (TeX-add-symbols
+              `(,mac-name
+                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                (TeX-arg-eval
+                 (lambda ()
+                   (let ((name (TeX-read-string
+                                (TeX-argument-prompt nil nil "Save name"))))
+                     (LaTeX-add-fancyvrb-saveverbs name)
+                     (format "%s" name))))
+                TeX-arg-verb))
+             (when (and (fboundp 'font-latex-add-keywords)
+                        (eq TeX-install-font-lock 'font-latex-setup))
+               (font-latex-add-keywords `((,mac-name "[{"))
+                                        'textual)))
+            ;; New macros for using previously saved text:
+            ((string= base-mac "UseVerb")
+             (TeX-add-symbols
+              `(,mac-name
+                (TeX-arg-eval
+                 completing-read
+                 (TeX-argument-prompt nil nil "Saved name")
+                 (LaTeX-fancyvrb-saveverb-list))))
+             (when (and (fboundp 'font-latex-add-keywords)
+                        (eq TeX-install-font-lock 'font-latex-setup))
+               (font-latex-add-keywords `((,mac-name "{"))
+                                        'textual)))
+            ;; Anything else is considered as verbatim typesetting macro:
+            (t
+             (TeX-add-symbols
+              `(,mac-name
+                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                TeX-arg-verb)
+              ;; Defined macros have a starred version where the
+              ;; `showspaces' key is set to true
+              `(,(concat mac-name "*")
+                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                TeX-arg-verb))
+             (add-to-list 'LaTeX-verbatim-macros-with-delims-local
+                          mac-name t)
+             (add-to-list 'LaTeX-verbatim-macros-with-delims-local
+                          (concat mac-name "*") t)
+             (when (and (fboundp 'font-latex-add-keywords)
+                        (eq TeX-install-font-lock 'font-latex-setup))
+               (font-latex-add-keywords `((,mac-name "*["))
+                                        'textual))))))
   ;; Update font-lock:
   (when (and (fboundp 'font-latex-set-syntactic-keywords)
-            (eq TeX-install-font-lock 'font-latex-setup))
+             (eq TeX-install-font-lock 'font-latex-setup))
     (font-latex-set-syntactic-keywords)))
 
 (defun LaTeX-fancyvrb-arg-define-environment (optional &optional cleanup)
@@ -318,10 +318,10 @@ CLEANUP is non-nil, do not insert any arguments in the 
buffer and
 update only various AUCTeX variables for verbatim environments."
   (unless cleanup
     (let ((new-env (TeX-read-string
-                   (TeX-argument-prompt optional nil "New verbatim 
environment")))
-         (base-env (completing-read
-                    (TeX-argument-prompt optional nil "Based on environment")
-                    LaTeX-fancyvrb-base-environments)))
+                    (TeX-argument-prompt optional nil "New verbatim 
environment")))
+          (base-env (completing-read
+                     (TeX-argument-prompt optional nil "Based on environment")
+                     LaTeX-fancyvrb-base-environments)))
       ;; We are defining a new env: First insert the arguments and then
       ;; run `LaTeX-add-fancyvrb-environments' on '(new-env base-env).
       ;; If base-env is SaveVerbatim, run
@@ -332,88 +332,88 @@ update only various AUCTeX variables for verbatim 
environments."
        (TeX-read-key-val optional LaTeX-fancyvrb-key-val-options-local) 
optional)
       (LaTeX-add-fancyvrb-environments `(,new-env ,base-env))
       (when (string= base-env "SaveVerbatim")
-       (LaTeX-add-fancyvrb-saveverbatims new-env))))
+        (LaTeX-add-fancyvrb-saveverbatims new-env))))
   ;;
   ;; Now run the procdure:
   (dolist (elt (LaTeX-fancyvrb-environment-list))
     (let ((env (car elt))
-         (type (cadr elt)))
+          (type (cadr elt)))
       (cond ((string= type "VerbatimOut")
-            (LaTeX-add-environments
-             `(,env (lambda (env)
-                      (let ((options (TeX-read-key-val
-                                      t LaTeX-fancyvrb-key-val-options-local))
-                            (file (TeX-read-string "Output file: ")))
-                        (LaTeX-insert-environment
-                         env
-                         (concat
-                          (unless (zerop (length options))
-                            (concat LaTeX-optop options LaTeX-optcl))
-                          (concat TeX-grop file TeX-grcl))))))))
-           ((string= type "SaveVerbatim")
-            (TeX-auto-add-regexp `(,(concat "\\\\begin{"
-                                            env
-                                            "}"
-                                            LaTeX-fancyvrb-key-val-skip-regexp
-                                            "{\\([^}]+\\)}")
-                                   1 LaTeX-auto-fancyvrb-saveverbatim)))
-           (t
-            ;; Regular verbatim environments have a starred
-            ;; version; so add them here; the non-starred additions
-            ;; to `LaTeX-verbatim-environments-local' and
-            ;; `LaTeX-indent-environment-list' are done outside
-            ;; (cond ...):
-            (LaTeX-add-environments
-             `(,env LaTeX-env-args
-                    [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
-                    LaTeX-fancyvrb-env-reflabel-key-val))
-            (LaTeX-add-environments
-             `(,(concat env "*") LaTeX-env-args
-               [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
-               LaTeX-fancyvrb-env-reflabel-key-val))
-            (add-to-list 'LaTeX-verbatim-environments-local (concat env "*"))
-            (add-to-list 'LaTeX-indent-environment-list
-                         `(,(concat env "*") current-indentation) t)
-            ;; Tell AUCTeX about label values to reflabel key:
-            (add-to-list 'LaTeX-label-alist
-                         (cons env 'LaTeX-listing-label) t)
-            (add-to-list 'LaTeX-label-alist
-                         (cons (concat env "*") 'LaTeX-listing-label) t)
-            (TeX-auto-add-regexp
-             `(,(concat  (regexp-quote TeX-esc)
-                         "begin[[:space:]]*"
-                         (regexp-quote TeX-grop)
-                         env
-                         "\\*?"
-                         (regexp-quote TeX-grcl)
-                         "[[:space:]]*"
-                         (LaTeX-extract-key-value-label "reflabel"))
-               1 LaTeX-auto-label))
-            ;; Tell RefTeX:
-            (when (and (fboundp 'reftex-add-label-environments)
-                       (boundp 'reftex-label-regexps))
-              (reftex-add-label-environments
-               `((,env
-                  ?l ,LaTeX-listing-label "~\\pageref{%s}"
-                  LaTeX-fancyvrb-reftex-label-context-function
-                  (regexp "[Ll]isting" "[Vv]erbatim"
-                          "[Cc]ode"    "Quell\\(code\\|text\\)"))
-
-                 (,(concat env "*")
-                  ?l ,LaTeX-listing-label "~\\pageref{%s}"
-                  LaTeX-fancyvrb-reftex-label-context-function
-                  (regexp "[Ll]isting" "[Vv]erbatim"
-                          "[Cc]ode"    "Quell\\(code\\|text\\)"))))
-              (add-to-list 'reftex-label-regexps
-                           (concat
-                            (regexp-quote TeX-esc)
-                            "begin[[:space:]]*"
-                            (regexp-quote TeX-grop)
-                            (concat env "\\*?")
-                            (regexp-quote TeX-grcl)
-                            "[[:space:]]*"
-                            (LaTeX-extract-key-value-label "reflabel" 1))
-                           t))))
+             (LaTeX-add-environments
+              `(,env (lambda (env)
+                       (let ((options (TeX-read-key-val
+                                       t LaTeX-fancyvrb-key-val-options-local))
+                             (file (TeX-read-string "Output file: ")))
+                         (LaTeX-insert-environment
+                          env
+                          (concat
+                           (unless (zerop (length options))
+                             (concat LaTeX-optop options LaTeX-optcl))
+                           (concat TeX-grop file TeX-grcl))))))))
+            ((string= type "SaveVerbatim")
+             (TeX-auto-add-regexp `(,(concat "\\\\begin{"
+                                             env
+                                             "}"
+                                             LaTeX-fancyvrb-key-val-skip-regexp
+                                             "{\\([^}]+\\)}")
+                                    1 LaTeX-auto-fancyvrb-saveverbatim)))
+            (t
+             ;; Regular verbatim environments have a starred
+             ;; version; so add them here; the non-starred additions
+             ;; to `LaTeX-verbatim-environments-local' and
+             ;; `LaTeX-indent-environment-list' are done outside
+             ;; (cond ...):
+             (LaTeX-add-environments
+              `(,env LaTeX-env-args
+                     [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                     LaTeX-fancyvrb-env-reflabel-key-val))
+             (LaTeX-add-environments
+              `(,(concat env "*") LaTeX-env-args
+                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                LaTeX-fancyvrb-env-reflabel-key-val))
+             (add-to-list 'LaTeX-verbatim-environments-local (concat env "*"))
+             (add-to-list 'LaTeX-indent-environment-list
+                          `(,(concat env "*") current-indentation) t)
+             ;; Tell AUCTeX about label values to reflabel key:
+             (add-to-list 'LaTeX-label-alist
+                          (cons env 'LaTeX-listing-label) t)
+             (add-to-list 'LaTeX-label-alist
+                          (cons (concat env "*") 'LaTeX-listing-label) t)
+             (TeX-auto-add-regexp
+              `(,(concat  (regexp-quote TeX-esc)
+                          "begin[[:space:]]*"
+                          (regexp-quote TeX-grop)
+                          env
+                          "\\*?"
+                          (regexp-quote TeX-grcl)
+                          "[[:space:]]*"
+                          (LaTeX-extract-key-value-label "reflabel"))
+                1 LaTeX-auto-label))
+             ;; Tell RefTeX:
+             (when (and (fboundp 'reftex-add-label-environments)
+                        (boundp 'reftex-label-regexps))
+               (reftex-add-label-environments
+                `((,env
+                   ?l ,LaTeX-listing-label "~\\pageref{%s}"
+                   LaTeX-fancyvrb-reftex-label-context-function
+                   (regexp "[Ll]isting" "[Vv]erbatim"
+                           "[Cc]ode"    "Quell\\(code\\|text\\)"))
+
+                  (,(concat env "*")
+                   ?l ,LaTeX-listing-label "~\\pageref{%s}"
+                   LaTeX-fancyvrb-reftex-label-context-function
+                   (regexp "[Ll]isting" "[Vv]erbatim"
+                           "[Cc]ode"    "Quell\\(code\\|text\\)"))))
+               (add-to-list 'reftex-label-regexps
+                            (concat
+                             (regexp-quote TeX-esc)
+                             "begin[[:space:]]*"
+                             (regexp-quote TeX-grop)
+                             (concat env "\\*?")
+                             (regexp-quote TeX-grcl)
+                             "[[:space:]]*"
+                             (LaTeX-extract-key-value-label "reflabel" 1))
+                            t))))
       ;; These apply for all environments defined:
       (add-to-list 'LaTeX-verbatim-environments-local env)
       (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) 
t)))
@@ -422,7 +422,7 @@ update only various AUCTeX variables for verbatim 
environments."
     (reftex-compile-variables))
   ;; Update font-lock:
   (when (and (fboundp 'font-latex-set-syntactic-keywords)
-            (eq TeX-install-font-lock 'font-latex-setup))
+             (eq TeX-install-font-lock 'font-latex-setup))
     (font-latex-set-syntactic-keywords)))
 
 (defun LaTeX-fancyvrb-arg-file-relative (optional)
@@ -442,35 +442,35 @@ to that key.  The label value is inserted only if the key 
is
 value-less; user entered label values are recognized and
 respected.  OPTIONAL is ignored."
   (let ((p (point-marker))
-       (s (make-marker)))
+        (s (make-marker)))
     (set-marker s (save-excursion
-                   (LaTeX-find-matching-begin)
-                   (re-search-forward (regexp-quote LaTeX-optop)
-                                      (line-end-position)
-                                      t)))
+                    (LaTeX-find-matching-begin)
+                    (re-search-forward (regexp-quote LaTeX-optop)
+                                       (line-end-position)
+                                       t)))
     ;; Search for the reflabel and a potential value:
     (when (marker-position s)
       (re-search-backward
        (concat
-       "\\(\\<reflabel\\>\\)"
-       ;; Check if the key already has a label value:
-       "\\("
-       "[[:space:]]*=[[:space:]]*"
-       (regexp-quote TeX-grop)
-       "?"
-       "[[:alnum:]:._-]"
-       "\\)?")
+        "\\(\\<reflabel\\>\\)"
+        ;; Check if the key already has a label value:
+        "\\("
+        "[[:space:]]*=[[:space:]]*"
+        (regexp-quote TeX-grop)
+        "?"
+        "[[:alnum:]:._-]"
+        "\\)?")
        s t)
       ;; Insert a label value only if the key is value-less:
       (when (and (not (match-string 2))
-                (match-string 1))
-       (goto-char (match-end 1))
-       (insert "="
-               TeX-grop
-               (format "%s" (LaTeX-label (LaTeX-current-environment)
-                                         'environment
-                                         t))
-               TeX-grcl)))
+                 (match-string 1))
+        (goto-char (match-end 1))
+        (insert "="
+                TeX-grop
+                (format "%s" (LaTeX-label (LaTeX-current-environment)
+                                          'environment
+                                          t))
+                TeX-grcl)))
     ;; At any rate, go to where we started and clean up:
     (goto-char p)
     (set-marker p nil)
@@ -482,22 +482,22 @@ The context string is the first line of the verbatim 
environment.
 If no reflabel key is found, an error is issued.
 ENV is the name of current environment as a string."
   (let* ((envstart (save-excursion
-                    (re-search-backward (concat "\\\\begin[[:space:]]*{"
-                                                env
-                                                "}")
-                                        nil t)))
-        (label-key (save-excursion
-                     (re-search-backward "\\<reflabel[ \t\n\r%]*=[ \t\n\r%]*"
-                                         envstart t))))
+                     (re-search-backward (concat "\\\\begin[[:space:]]*{"
+                                                 env
+                                                 "}")
+                                         nil t)))
+         (label-key (save-excursion
+                      (re-search-backward "\\<reflabel[ \t\n\r%]*=[ \t\n\r%]*"
+                                          envstart t))))
     (if label-key
-       (save-excursion
-         (goto-char envstart)
-         (re-search-forward (regexp-quote LaTeX-optop) label-key t)
-         (up-list)
-         (forward-line)
-         ;; Return the first line of verbatim env:
-         (buffer-substring-no-properties (point)
-                                         (line-end-position)))
+        (save-excursion
+          (goto-char envstart)
+          (re-search-forward (regexp-quote LaTeX-optop) label-key t)
+          (up-list)
+          (forward-line)
+          ;; Return the first line of verbatim env:
+          (buffer-substring-no-properties (point)
+                                          (line-end-position)))
       (error "No label found"))))
 
 (defvar LaTeX-fancyvrb-key-val-label-regexp
@@ -525,7 +525,7 @@ ENV is the name of current environment as a string."
 
    ;; Activate the buffer-local version of key-vals.
    (setq LaTeX-fancyvrb-key-val-options-local
-        (copy-alist LaTeX-fancyvrb-key-val-options))
+         (copy-alist LaTeX-fancyvrb-key-val-options))
 
    (TeX-add-symbols
     ;; Verbatim material in footnotes
@@ -535,13 +535,13 @@ ENV is the name of current environment as a string."
     ;; \Verb also has a starred version:
     '("Verb*" [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local] 
TeX-arg-verb)
     '("DefineShortVerb" (TeX-arg-eval
-                        TeX-read-string
-                        (TeX-argument-prompt nil nil "Character")
-                        TeX-esc))
+                         TeX-read-string
+                         (TeX-argument-prompt nil nil "Character")
+                         TeX-esc))
     '("UndefineShortVerb" (TeX-arg-eval
-                          TeX-read-string
-                          (TeX-argument-prompt nil nil "Character")
-                          TeX-esc))
+                           TeX-read-string
+                           (TeX-argument-prompt nil nil "Character")
+                           TeX-esc))
     ;; Verbatim environments
     '("fvset" (TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local))
     ;; Changing individual line formatting
@@ -557,11 +557,11 @@ ENV is the name of current environment as a string."
       LaTeX-fancyvrb-arg-define-environment)
     '("RecustomVerbatimEnvironment"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Verbatim environment")
-                   LaTeX-fancyvrb-base-environments)
+                    (TeX-argument-prompt nil nil "Verbatim environment")
+                    LaTeX-fancyvrb-base-environments)
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Based on environment")
-                   LaTeX-fancyvrb-base-environments)
+                    (TeX-argument-prompt nil nil "Based on environment")
+                    LaTeX-fancyvrb-base-environments)
       (TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local))
 
     '("CustomVerbatimCommand"
@@ -574,24 +574,24 @@ ENV is the name of current environment as a string."
       [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Save name"))))
-          (LaTeX-add-fancyvrb-saveverbs name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Save name"))))
+           (LaTeX-add-fancyvrb-saveverbs name)
+           (format "%s" name))))
       TeX-arg-verb)
     '("UseVerb" (TeX-arg-eval
-                completing-read
-                (TeX-argument-prompt nil nil "Saved name")
-                (LaTeX-fancyvrb-saveverb-list)))
+                 completing-read
+                 (TeX-argument-prompt nil nil "Saved name")
+                 (LaTeX-fancyvrb-saveverb-list)))
     '("UseVerbatim" (TeX-arg-eval completing-read
-                                 (TeX-argument-prompt nil nil "Saved name")
-                                 (LaTeX-fancyvrb-saveverbatim-list)))
+                                  (TeX-argument-prompt nil nil "Saved name")
+                                  (LaTeX-fancyvrb-saveverbatim-list)))
     '("LUseVerbatim" (TeX-arg-eval completing-read
-                                  (TeX-argument-prompt nil nil "Saved name")
-                                  (LaTeX-fancyvrb-saveverbatim-list)))
+                                   (TeX-argument-prompt nil nil "Saved name")
+                                   (LaTeX-fancyvrb-saveverbatim-list)))
     '("BUseVerbatim" (TeX-arg-eval completing-read
-                                  (TeX-argument-prompt nil nil "Saved name")
-                                  (LaTeX-fancyvrb-saveverbatim-list)))
+                                   (TeX-argument-prompt nil nil "Saved name")
+                                   (LaTeX-fancyvrb-saveverbatim-list)))
 
     ;; Writing and reading verbatim files
     '("VerbatimInput" [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
@@ -622,59 +622,59 @@ ENV is the name of current environment as a string."
       LaTeX-fancyvrb-env-reflabel-key-val)
     '("SaveVerbatim"
       (lambda (env)
-       (let ((options (TeX-read-key-val t 
LaTeX-fancyvrb-key-val-options-local))
-             (name (TeX-read-string "Save name: ")))
-         (LaTeX-insert-environment
-          env
-          (concat
-           (unless (zerop (length options))
-             (concat LaTeX-optop options LaTeX-optcl))
-           (concat TeX-grop name TeX-grcl)))
-         (LaTeX-add-fancyvrb-saveverbatims name))))
+        (let ((options (TeX-read-key-val t 
LaTeX-fancyvrb-key-val-options-local))
+              (name (TeX-read-string "Save name: ")))
+          (LaTeX-insert-environment
+           env
+           (concat
+            (unless (zerop (length options))
+              (concat LaTeX-optop options LaTeX-optcl))
+            (concat TeX-grop name TeX-grcl)))
+          (LaTeX-add-fancyvrb-saveverbatims name))))
     '("VerbatimOut"
       (lambda (env)
-       (let ((options (TeX-read-key-val t 
LaTeX-fancyvrb-key-val-options-local))
-             (file (TeX-read-string "Output file: ")))
-         (LaTeX-insert-environment
-          env
-          (concat (unless (zerop (length options))
-                    (concat LaTeX-optop options LaTeX-optcl))
-                  (concat TeX-grop file TeX-grcl)))))))
+        (let ((options (TeX-read-key-val t 
LaTeX-fancyvrb-key-val-options-local))
+              (file (TeX-read-string "Output file: ")))
+          (LaTeX-insert-environment
+           env
+           (concat (unless (zerop (length options))
+                     (concat LaTeX-optop options LaTeX-optcl))
+                   (concat TeX-grop file TeX-grcl)))))))
 
    (let ((envs '("BVerbatim" "BVerbatim*"
-                "LVerbatim" "LVerbatim*"
-                "Verbatim"  "Verbatim*")))
+                 "LVerbatim" "LVerbatim*"
+                 "Verbatim"  "Verbatim*")))
      ;; Add pre-defined environments to `LaTeX-label-alist':
      (dolist (env envs)
        (add-to-list 'LaTeX-label-alist (cons env 'LaTeX-listing-label) t))
 
      ;; Tell RefTeX
      (when (and (fboundp 'reftex-add-label-environments)
-               (fboundp 'reftex-compile-variables)
-               (boundp 'reftex-label-regexps))
+                (fboundp 'reftex-compile-variables)
+                (boundp 'reftex-label-regexps))
        (dolist (env envs)
-        (reftex-add-label-environments
-         `((,env ?l ,LaTeX-listing-label "~\\pageref{%s}"
-                 LaTeX-fancyvrb-reftex-label-context-function
-                 (regexp "[Ll]isting" "[Vv]erbatim"
-                         "[Cc]ode"    "Quell\\(code\\|text\\)")))))
+         (reftex-add-label-environments
+          `((,env ?l ,LaTeX-listing-label "~\\pageref{%s}"
+                  LaTeX-fancyvrb-reftex-label-context-function
+                  (regexp "[Ll]isting" "[Vv]erbatim"
+                          "[Cc]ode"    "Quell\\(code\\|text\\)")))))
 
        (unless (string-match "\\<reflabel"
-                            (mapconcat #'identity
-                                       reftex-label-regexps
-                                       "|"))
-        (make-local-variable 'reftex-label-regexps)
-        (add-to-list 'reftex-label-regexps
-                     (concat
-                      (regexp-quote TeX-esc)
-                      "begin[[:space:]]*"
-                      (regexp-quote TeX-grop)
-                      "[BL]?Verbatim\\*?"
-                      (regexp-quote TeX-grcl)
-                      "[[:space:]]*"
-                      (LaTeX-extract-key-value-label "reflabel" 1))
-                     t)
-        (reftex-compile-variables))))
+                             (mapconcat #'identity
+                                        reftex-label-regexps
+                                        "|"))
+         (make-local-variable 'reftex-label-regexps)
+         (add-to-list 'reftex-label-regexps
+                      (concat
+                       (regexp-quote TeX-esc)
+                       "begin[[:space:]]*"
+                       (regexp-quote TeX-grop)
+                       "[BL]?Verbatim\\*?"
+                       (regexp-quote TeX-grcl)
+                       "[[:space:]]*"
+                       (LaTeX-extract-key-value-label "reflabel" 1))
+                      t)
+         (reftex-compile-variables))))
 
    (LaTeX-add-counters
     "FancyVerbLine")
@@ -702,27 +702,27 @@ ENV is the name of current environment as a string."
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (fboundp 'font-latex-set-syntactic-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (fboundp 'font-latex-set-syntactic-keywords)
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("CustomVerbatimCommand"       "|{\\{{")
-                               ("RecustomVerbatimCommand"     "|{\\{{")
-                               ("DefineVerbatimEnvironment"   "{{{")
-                               ("RecustomVerbatimEnvironment" "{{{")
-                               ("DefineShortVerb"   "{")
-                               ("UndefineShortVerb" "{")
-                               ("fvset"             "{"))
-                             'function)
+                                ("RecustomVerbatimCommand"     "|{\\{{")
+                                ("DefineVerbatimEnvironment"   "{{{")
+                                ("RecustomVerbatimEnvironment" "{{{")
+                                ("DefineShortVerb"   "{")
+                                ("UndefineShortVerb" "{")
+                                ("fvset"             "{"))
+                              'function)
      (font-latex-add-keywords '(("VerbatimInput"  "[{")
-                               ("BVerbatimInput" "[{")
-                               ("LVerbatimInput" "[{"))
-                             'reference)
+                                ("BVerbatimInput" "[{")
+                                ("LVerbatimInput" "[{"))
+                              'reference)
      (font-latex-add-keywords '(("Verb" "*[") ; The second argument is 
verbatim.
-                               ("SaveVerb"     "[{")
-                               ("UseVerb"      "{")
-                               ("UseVerbatim"  "{")
-                               ("LUseVerbatim" "{")
-                               ("BUseVerbatim" "{"))
-                             'textual)
+                                ("SaveVerb"     "[{")
+                                ("UseVerb"      "{")
+                                ("UseVerbatim"  "{")
+                                ("LUseVerbatim" "{")
+                                ("BUseVerbatim" "{"))
+                              'textual)
      (font-latex-set-syntactic-keywords)))
  TeX-dialect)
 
diff --git a/style/fbb.el b/style/fbb.el
index e1f5796..7a052ae 100644
--- a/style/fbb.el
+++ b/style/fbb.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "fbb"
@@ -65,19 +65,19 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textlf"    "{")
-                               ("texttlf"   "{")
-                               ("textosf"   "{")
-                               ("texttosf"  "{")
-                               ("textsu"    "{"))
-                             'type-command)
+                                ("texttlf"   "{")
+                                ("textosf"   "{")
+                                ("texttosf"  "{")
+                                ("textsu"    "{"))
+                              'type-command)
      (font-latex-add-keywords '(("lfstyle"   "")
-                               ("tlfstyle"  "")
-                               ("osfstyle"  "")
-                               ("tosfstyle" "")
-                               ("sufigures" ""))
-                             'type-declaration)))
+                                ("tlfstyle"  "")
+                                ("osfstyle"  "")
+                                ("tosfstyle" "")
+                                ("sufigures" ""))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-fbb-package-options
diff --git a/style/fbox.el b/style/fbox.el
index 367d042..dc4e211 100644
--- a/style/fbox.el
+++ b/style/fbox.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "fbox"
@@ -49,10 +49,10 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("fbox"    "*[{")
-                               ("fparbox" "*[{"))
-                             'function)))
+                                ("fparbox" "*[{"))
+                              'function)))
  TeX-dialect)
 
 ;;; fbox.el ends here
diff --git a/style/filecontents.el b/style/filecontents.el
index cb4ac56..3c8713a 100644
--- a/style/filecontents.el
+++ b/style/filecontents.el
@@ -45,17 +45,17 @@
 
    (make-local-variable 'LaTeX-indent-environment-list)
    (add-to-list 'LaTeX-indent-environment-list
-               '("filecontents" current-indentation) t)
+                '("filecontents" current-indentation) t)
    (add-to-list 'LaTeX-indent-environment-list
-               '("filecontents*" current-indentation) t))
+                '("filecontents*" current-indentation) t))
  TeX-dialect)
 
 (defun LaTeX-env-filecontents (environment)
   "Insert ENVIRONMENT with filename for contents."
   (LaTeX-insert-environment environment
-                           (concat TeX-grop
-                                   (TeX-read-string "File: ")
-                                   TeX-grcl))
+                            (concat TeX-grop
+                                    (TeX-read-string "File: ")
+                                    TeX-grcl))
   (delete-horizontal-space))
 
 (defvar LaTeX-filecontents-package-options nil
diff --git a/style/flashcards.el b/style/flashcards.el
index 0df4cbf..c163847 100644
--- a/style/flashcards.el
+++ b/style/flashcards.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "flashcards"
@@ -57,13 +57,13 @@
    (LaTeX-add-environments '("flashcard" ["Header"] "Front side"))
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("cardfrontstyle" "[{")
-                               ("cardfrontfoot" "{")
-                               ("cardbackstyle" "[{")
-                               ("cardfrontheadstyle" "[{")
-                               ("cardfrontfootstyle" "[{"))
-                             'variable)))
+                                ("cardfrontfoot" "{")
+                                ("cardbackstyle" "[{")
+                                ("cardfrontheadstyle" "[{")
+                                ("cardfrontfootstyle" "[{"))
+                              'variable)))
  TeX-dialect)
 
 ;;; flashcards.el ends here
diff --git a/style/floatrow.el b/style/floatrow.el
index 6523f71..4f61606 100644
--- a/style/floatrow.el
+++ b/style/floatrow.el
@@ -70,33 +70,33 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function reftex-compile-variables
-                 "reftex"
-                 ())
+                  "reftex"
+                  ())
 
 (defvar LaTeX-floatrow-key-val-options
   '(;; 3.1.1 Float Style
     ("style" ("plain" "plaintop" "Plaintop"
-             "ruled" "Ruled"
-             "boxed" "Boxed" "BOXED"
-             "shadowbox" "Shadowbox" "SHADOWBOX"
-             "doublebox" "Doublebox" "DOUBLEBOX"
-             "wshadowbox" "Wshadowbox" "WSHADOWBOX"))
+              "ruled" "Ruled"
+              "boxed" "Boxed" "BOXED"
+              "shadowbox" "Shadowbox" "SHADOWBOX"
+              "doublebox" "Doublebox" "DOUBLEBOX"
+              "wshadowbox" "Wshadowbox" "WSHADOWBOX"))
     ;; 3.1.2 Font Settings
     ("font" ("scriptsize" "footnotesize" "small" "normalsize" "large"
-            "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf"
-            "rm" "sf" "tt"))
+             "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf"
+             "rm" "sf" "tt"))
     ("footfont" ("scriptsize" "footnotesize" "small" "normalsize" "large"
-                "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf"
-                "rm" "sf" "tt"))
+                 "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf"
+                 "rm" "sf" "tt"))
     ;; 3.1.3 Position of Caption
     ("capposition" ("top" "TOP" "bottom" "beside"))
     ;; 3.1.4 Position of Beside Caption
     ("capbesideposition" ("left" "right" "inside" "outside"
-                         "top" "bottom" "center"))
+                          "top" "bottom" "center"))
     ;; 3.1.5 Defining The Width of Beside Caption
     ("capbesidewidth" ("none" "sidefil"))
     ;; 3.1.6 Defining Width of Object
@@ -114,7 +114,7 @@
     ("objectset" ("justified" "centering" "raggedright" "RaggedRight" 
"raggedleft"))
     ;; 3.1.12 Defining Float Margins
     ("margins" ("centering" "raggedright" "raggedleft"
-               "hangright" "hanginside" "hangoutside"))
+                "hangright" "hanginside" "hangoutside"))
     ;; 3.1.13 Defining Float Separators
     ("floatrowsep" ("columnsep" "quad" "qquad" "hfil" "hfill" "none"))
     ("capbesidesep" ("columnsep" "quad" "qquad" "hfil" "hfill" "none"))
@@ -126,7 +126,7 @@
     ("rowpostcode" ("none" "thickrule" "rule" "lowrule" "captionskip"))
     ;; 3.1.15 Defining Float Frames
     ("framestyle" ("fbox" "colorbox" "FRcolorbox" "corners"
-                  "doublebox" "shadowbox" "wshadowbox"))
+                   "doublebox" "shadowbox" "wshadowbox"))
     ("frameset")
     ("framearound" ("none" "object" "all" "row" "none"))
     ("framefit" ("yes" "no"))
@@ -151,15 +151,15 @@
 (make-variable-buffer-local 'LaTeX-floatrow-key-val-options-local)
 
 (defvar LaTeX-floatrow-supported-float-types
-  '("figure" "table"                             ; Standard LaTeX
-    "widefigure" "widetable" "widefloat"         ; Standard figure* & table*
-    "wrapfigure" "wraptable" "wrapfloat"         ; wrapfig.sty
+  '("figure" "table"                              ; Standard LaTeX
+    "widefigure" "widetable" "widefloat"          ; Standard figure* & table*
+    "wrapfigure" "wraptable" "wrapfloat"          ; wrapfig.sty
     "rotfigure"  "rottable"  "rotfloat"           ; rotating.sty
     "widerotfigure" "widerottable" "widerotfloat" ; for 2-col & wide
     "figurerow"  "tablerow"  "floatrow"           ; inside floatrow env's
     "capbesidefigure" "capbesidetable"            ; floats with beside captions
     "capbesidefloat"
-    "longtable"                                          ; longtable.sty
+    "longtable"                                   ; longtable.sty
     "subfigure" "subtable" "sub")                 ; subcaption.sty
   "List of float types supported by floatrow.sty.")
 
@@ -178,16 +178,16 @@
       "\\\\Declare"
       "\\("
       (mapconcat #'identity
-                '("FloatStyle"         ; 3.6.1 Float Style Option (style=)
-                  "FloatFont"          ; 3.6.2 Float Font Option (font=)
-                  "FloatVCode"         ; 3.6.3 Option for Float Rules/Skips 
(precode= etc.)
-                  "ColorBox"           ; 3.6.4 Settings for Colored Frame 
(colorframeset=)
-                  "CBoxCorners"        ;       colorframecorners=
-                  "ObjectSet"          ; 3.6.5 Object Justification Option 
(objectset=)
-                  "MarginSet"          ; 3.6.6 Option for Float Box 
Alignment/Settings (margins=)
-                  "FloatSeparators"    ; 3.6.7 Float Separators Options 
(floatrowsep=, capbesidesep=)
-                  "FloatFootnoterule") ; 3.6.8 Option for Footnote Rule's 
Style (footnoterule=)
-                "\\|")
+                 '("FloatStyle"         ; 3.6.1 Float Style Option (style=)
+                   "FloatFont"          ; 3.6.2 Float Font Option (font=)
+                   "FloatVCode"         ; 3.6.3 Option for Float Rules/Skips 
(precode= etc.)
+                   "ColorBox"           ; 3.6.4 Settings for Colored Frame 
(colorframeset=)
+                   "CBoxCorners"        ;       colorframecorners=
+                   "ObjectSet"          ; 3.6.5 Object Justification Option 
(objectset=)
+                   "MarginSet"          ; 3.6.6 Option for Float Box 
Alignment/Settings (margins=)
+                   "FloatSeparators"    ; 3.6.7 Float Separators Options 
(floatrowsep=, capbesidesep=)
+                   "FloatFootnoterule") ; 3.6.8 Option for Footnote Rule's 
Style (footnoterule=)
+                 "\\|")
       "\\)"
       "{\\([^}]+\\)}")
     (0 1 2) LaTeX-auto-floatrow-DeclareNewOption)
@@ -219,9 +219,9 @@
 (defun LaTeX-floatrow-auto-prepare ()
   "Clear various \"LaTeX-floatrow\" variables before parsing."
   (setq LaTeX-auto-floatrow-newfloatcommand       nil
-       LaTeX-auto-floatrow-DeclareNewOption      nil
-       LaTeX-auto-floatrow-newseparatedlabel-ref nil
-       LaTeX-auto-floatrow-DeclareNewFloatType   nil))
+        LaTeX-auto-floatrow-DeclareNewOption      nil
+        LaTeX-auto-floatrow-newseparatedlabel-ref nil
+        LaTeX-auto-floatrow-DeclareNewFloatType   nil))
 
 (defun LaTeX-floatrow-auto-cleanup ()
   "Process parsed results from floatrow package."
@@ -237,44 +237,44 @@
     (dolist (cmd (mapcar #'car (LaTeX-floatrow-newfloatcommand-list)))
       (TeX-add-symbols `(,cmd LaTeX-floatrow-arg-floatbox))
       (when (and (featurep 'font-latex)
-                (eq TeX-install-font-lock 'font-latex-setup))
-       (font-latex-add-keywords `((,cmd "[[["))
-                                'textual))))
+                 (eq TeX-install-font-lock 'font-latex-setup))
+        (font-latex-add-keywords `((,cmd "[[["))
+                                 'textual))))
   ;;
   ;; Process new label/ref commands:
   (when (LaTeX-floatrow-newseparatedlabel-ref-list)
     (let (floatrow-run-reftex-compile-vars)
       (dolist (elt (LaTeX-floatrow-newseparatedlabel-ref-list))
-       (let ((cmd (car elt))
-             (type (cadr elt)))
-         (if (string= type "ref")
-             ;; More fun w/ referencing macros:
-             (TeX-add-symbols `(,cmd TeX-arg-ref))
-           ;; Less fun w/ label defining macros.  Add cmd to
-           ;; TeX-symbol-list:
-           (TeX-add-symbols `(,cmd TeX-arg-define-label))
-           ;; For AUCTeX, parse the argument of the new macro and add
-           ;; it to `LaTeX-auto-label':
-           (TeX-auto-add-regexp
-            `(,(concat "\\\\" cmd "{\\([^\n\r%\\{}]+\\)}") 1 LaTeX-auto-label))
-           ;; For RefTeX, append cmd to `reftex-label-regexps and set
-           ;; floatrow-run-reftex-compile-vars to t:
-           (when (and (boundp 'reftex-label-regexps)
-                      (fboundp 'reftex-compile-variables)
-                      (not (string-match
-                            cmd
-                            (mapconcat #'identity reftex-label-regexps "|"))))
-             (add-to-list (make-local-variable 'reftex-label-regexps)
-                          (concat "\\\\" cmd "{\\(?1:[^}]*\\)}") t)
-             (setq floatrow-run-reftex-compile-vars t)))
-         ;; Fontify macros as reference:
-         (when (and (featurep 'font-latex)
-                    (eq TeX-install-font-lock 'font-latex-setup))
-           (font-latex-add-keywords `((,cmd "{"))
-                                    'reference))))
+        (let ((cmd (car elt))
+              (type (cadr elt)))
+          (if (string= type "ref")
+              ;; More fun w/ referencing macros:
+              (TeX-add-symbols `(,cmd TeX-arg-ref))
+            ;; Less fun w/ label defining macros.  Add cmd to
+            ;; TeX-symbol-list:
+            (TeX-add-symbols `(,cmd TeX-arg-define-label))
+            ;; For AUCTeX, parse the argument of the new macro and add
+            ;; it to `LaTeX-auto-label':
+            (TeX-auto-add-regexp
+             `(,(concat "\\\\" cmd "{\\([^\n\r%\\{}]+\\)}") 1 
LaTeX-auto-label))
+            ;; For RefTeX, append cmd to `reftex-label-regexps and set
+            ;; floatrow-run-reftex-compile-vars to t:
+            (when (and (boundp 'reftex-label-regexps)
+                       (fboundp 'reftex-compile-variables)
+                       (not (string-match
+                             cmd
+                             (mapconcat #'identity reftex-label-regexps "|"))))
+              (add-to-list (make-local-variable 'reftex-label-regexps)
+                           (concat "\\\\" cmd "{\\(?1:[^}]*\\)}") t)
+              (setq floatrow-run-reftex-compile-vars t)))
+          ;; Fontify macros as reference:
+          (when (and (featurep 'font-latex)
+                     (eq TeX-install-font-lock 'font-latex-setup))
+            (font-latex-add-keywords `((,cmd "{"))
+                                     'reference))))
       ;; Run `reftex-compile-variables' if needed only once:
       (when floatrow-run-reftex-compile-vars
-       (reftex-compile-variables))))
+        (reftex-compile-variables))))
   ;;
   ;; Process new floattypes:
   (when (LaTeX-floatrow-DeclareNewFloatType-list)
@@ -294,52 +294,52 @@
 (defun LaTeX-floatrow-update-key-val-options ()
   "Update buffer-local key-val options before offering for completion."
   (let ((vcode-keys '("precode" "rowprecode" "midcode" "postcode" 
"rowpostcode"))
-       (sep-keys '("floatrowsep" "capbesidesep")))
+        (sep-keys '("floatrowsep" "capbesidesep")))
     (dolist (keyvals (LaTeX-floatrow-DeclareNewOption-list))
       (let* ((key (cond ((string= (nth 1 keyvals) "FloatStyle")
-                        "style")
-                       ((string= (nth 1 keyvals) "FloatFont")
-                        "font")
-                       ((string= (nth 1 keyvals) "FloatVCode")
-                        "precode")
-                       ((string= (nth 1 keyvals) "ColorBox")
-                        "colorframeset")
-                       ((string= (nth 1 keyvals) "CBoxCorners")
-                        "colorframecorners")
-                       ((string= (nth 1 keyvals) "ObjectSet")
-                        "objectset")
-                       ((string= (nth 1 keyvals) "MarginSet")
-                        "margins")
-                       ((string= (nth 1 keyvals) "FloatSeparators")
-                        "floatrowsep")
-                       ((string= (nth 1 keyvals) "FloatFootnoterule")
-                        "footnoterule")
-                       (t nil)))
-            (val (nth 2 keyvals))
-            (val-match (cadr (assoc key LaTeX-floatrow-key-val-options-local)))
-            (temp (copy-alist LaTeX-floatrow-key-val-options-local))
-            (opts (cond ((string= key "precode")
-                         (dolist (x vcode-keys)
-                           (setq temp (assq-delete-all (car (assoc x temp)) 
temp)))
-                         temp)
-                        ((string= key "floatrowsep")
-                         (dolist (x sep-keys)
-                           (setq temp (assq-delete-all (car (assoc x temp)) 
temp)))
-                         temp)
-                        (t
-                         (assq-delete-all (car (assoc key temp)) temp)))))
-       (cond ((string= key "precode")
-              (dolist (x vcode-keys)
-                (cl-pushnew (list x (TeX-delete-duplicate-strings (append 
(list val) val-match)))
-                            opts :test #'equal)))
-             ((string= key "floatrowsep")
-              (dolist (x sep-keys)
-                (cl-pushnew (list x (TeX-delete-duplicate-strings (append 
(list val) val-match)))
-                            opts :test #'equal)))
-             (t
-              (cl-pushnew (list key (TeX-delete-duplicate-strings (append 
(list val) val-match)))
-                          opts :test #'equal)))
-       (setq LaTeX-floatrow-key-val-options-local (copy-alist opts))))))
+                         "style")
+                        ((string= (nth 1 keyvals) "FloatFont")
+                         "font")
+                        ((string= (nth 1 keyvals) "FloatVCode")
+                         "precode")
+                        ((string= (nth 1 keyvals) "ColorBox")
+                         "colorframeset")
+                        ((string= (nth 1 keyvals) "CBoxCorners")
+                         "colorframecorners")
+                        ((string= (nth 1 keyvals) "ObjectSet")
+                         "objectset")
+                        ((string= (nth 1 keyvals) "MarginSet")
+                         "margins")
+                        ((string= (nth 1 keyvals) "FloatSeparators")
+                         "floatrowsep")
+                        ((string= (nth 1 keyvals) "FloatFootnoterule")
+                         "footnoterule")
+                        (t nil)))
+             (val (nth 2 keyvals))
+             (val-match (cadr (assoc key 
LaTeX-floatrow-key-val-options-local)))
+             (temp (copy-alist LaTeX-floatrow-key-val-options-local))
+             (opts (cond ((string= key "precode")
+                          (dolist (x vcode-keys)
+                            (setq temp (assq-delete-all (car (assoc x temp)) 
temp)))
+                          temp)
+                         ((string= key "floatrowsep")
+                          (dolist (x sep-keys)
+                            (setq temp (assq-delete-all (car (assoc x temp)) 
temp)))
+                          temp)
+                         (t
+                          (assq-delete-all (car (assoc key temp)) temp)))))
+        (cond ((string= key "precode")
+               (dolist (x vcode-keys)
+                 (cl-pushnew (list x (TeX-delete-duplicate-strings (append 
(list val) val-match)))
+                             opts :test #'equal)))
+              ((string= key "floatrowsep")
+               (dolist (x sep-keys)
+                 (cl-pushnew (list x (TeX-delete-duplicate-strings (append 
(list val) val-match)))
+                             opts :test #'equal)))
+              (t
+               (cl-pushnew (list key (TeX-delete-duplicate-strings (append 
(list val) val-match)))
+                           opts :test #'equal)))
+        (setq LaTeX-floatrow-key-val-options-local (copy-alist opts))))))
 
 (defun LaTeX-floatrow-arg-floatbox (optional)
   "Query and insert arguments of float box commands from floatrow.sty.
@@ -348,33 +348,33 @@ If OPTIONAL is non-nil, indicate optional argument during 
query."
   ;; "height" is given.  let-bind `TeX-arg-*-brace' for
   ;; `TeX-argument-insert':
   (let* ((TeX-arg-opening-brace "[")
-        (TeX-arg-closing-brace "]")
-        (TeX-last-optional-rejected nil)
-        (width (LaTeX-check-insert-macro-default-style
-                (completing-read
-                 (TeX-argument-prompt t nil "Width")
-                 (mapcar (lambda (x) (concat TeX-esc (car x)))
-                         (LaTeX-length-list)))))
-        (TeX-last-optional-rejected (or (not width)
-                                        (and width (string= width ""))))
-        (height (LaTeX-check-insert-macro-default-style
-                 (completing-read
-                  (TeX-argument-prompt t nil "Height")
-                  (mapcar (lambda (x) (concat TeX-esc (car x)))
-                          (LaTeX-length-list)))))
-        (TeX-last-optional-rejected (or (not height)
-                                        (and height (string= height ""))))
-        (vertpos (LaTeX-check-insert-macro-default-style
-                  (if (string= height "")
-                      ""
-                    (completing-read
-                     (TeX-argument-prompt t nil "Vertical alignment")
-                     '("t" "c" "b" "s"))))))
+         (TeX-arg-closing-brace "]")
+         (TeX-last-optional-rejected nil)
+         (width (LaTeX-check-insert-macro-default-style
+                 (completing-read
+                  (TeX-argument-prompt t nil "Width")
+                  (mapcar (lambda (x) (concat TeX-esc (car x)))
+                          (LaTeX-length-list)))))
+         (TeX-last-optional-rejected (or (not width)
+                                         (and width (string= width ""))))
+         (height (LaTeX-check-insert-macro-default-style
+                  (completing-read
+                   (TeX-argument-prompt t nil "Height")
+                   (mapcar (lambda (x) (concat TeX-esc (car x)))
+                           (LaTeX-length-list)))))
+         (TeX-last-optional-rejected (or (not height)
+                                         (and height (string= height ""))))
+         (vertpos (LaTeX-check-insert-macro-default-style
+                   (if (string= height "")
+                       ""
+                     (completing-read
+                      (TeX-argument-prompt t nil "Vertical alignment")
+                      '("t" "c" "b" "s"))))))
     (and width (TeX-argument-insert width t))
     ;; Insert an extra pair of brackets if only `height' is given,
     ;; otherwise it will become `width'
     (when (and width (string= width "")
-              height (not (string= height "")))
+               height (not (string= height "")))
       (insert "[]"))
     (and height (TeX-argument-insert height t))
     (and vertpos (TeX-argument-insert vertpos t)))
@@ -382,14 +382,14 @@ If OPTIONAL is non-nil, indicate optional argument during 
query."
   ;; float-type; if we're inside (sub)?floatrow*?, then check for the
   ;; next outer environment:
   (let* ((currenv (if (string-match "floatrow\\*?\\_>" 
(LaTeX-current-environment))
-                     (LaTeX-current-environment 2)
-                   (LaTeX-current-environment)))
-        (caption (TeX-read-string
-                  (TeX-argument-prompt optional nil "Caption")))
-        (short-caption
-         (when (>= (length caption) LaTeX-short-caption-prompt-length)
-           (TeX-read-string
-            (TeX-argument-prompt t nil "Short caption")))))
+                      (LaTeX-current-environment 2)
+                    (LaTeX-current-environment)))
+         (caption (TeX-read-string
+                   (TeX-argument-prompt optional nil "Caption")))
+         (short-caption
+          (when (>= (length caption) LaTeX-short-caption-prompt-length)
+            (TeX-read-string
+             (TeX-argument-prompt t nil "Short caption")))))
     (indent-according-to-mode)
     ;; The final result will look like this with * being point:
     ;;   \ffigbox{*}{%
@@ -401,30 +401,30 @@ If OPTIONAL is non-nil, indicate optional argument during 
query."
       ;; We are inside the 1. mandatory arg: Save the pos & insert `}{':
       (insert TeX-grcl TeX-grop)
       (if (and caption (not (string= caption "")))
-         (progn
-           ;; If caption, move to EOL, delete any spaces and hide the line end
-           (end-of-line)
-           (delete-horizontal-space)
-           (insert "%")
-           ;; Add a newline and the caption
-           (newline-and-indent)
-           (insert (LaTeX-compose-caption-macro caption short-caption))
-           ;; If we have a caption, then we probably also want a
-           ;; label.  Hide EOL end and proceed to enter a label
-           (insert "%")
-           (newline-and-indent)
-           (when (LaTeX-label currenv 'environment)
-             ;; Move point to end of line and hide EOL
-             (end-of-line)
-             (delete-horizontal-space)
-             (insert "%")
-             (newline-and-indent))
-           ;; Now close the group
-           (insert TeX-grcl)
-           (indent-according-to-mode)
-           (end-of-line))
-       ;; Otherwise, only insert a }
-       (insert TeX-grcl)))))
+          (progn
+            ;; If caption, move to EOL, delete any spaces and hide the line end
+            (end-of-line)
+            (delete-horizontal-space)
+            (insert "%")
+            ;; Add a newline and the caption
+            (newline-and-indent)
+            (insert (LaTeX-compose-caption-macro caption short-caption))
+            ;; If we have a caption, then we probably also want a
+            ;; label.  Hide EOL end and proceed to enter a label
+            (insert "%")
+            (newline-and-indent)
+            (when (LaTeX-label currenv 'environment)
+              ;; Move point to end of line and hide EOL
+              (end-of-line)
+              (delete-horizontal-space)
+              (insert "%")
+              (newline-and-indent))
+            ;; Now close the group
+            (insert TeX-grcl)
+            (indent-according-to-mode)
+            (end-of-line))
+        ;; Otherwise, only insert a }
+        (insert TeX-grcl)))))
 
 (defun LaTeX-floatrow-env-init ()
   "Replace AUCTeX entries in the variable `LaTeX-environment-list'.
@@ -434,21 +434,21 @@ replace them with the ones offered by the style.  Original
 entries are available under \"rawfigure*?\" and \"rawtable*?\"."
   (LaTeX-environment-list)
   (dolist (env '("figure" "figure*" "table" "table*"))
-         (setq LaTeX-environment-list
-               (assq-delete-all (car (assoc env LaTeX-environment-list))
-                                LaTeX-environment-list))
-         (LaTeX-add-environments `(,env LaTeX-floatrow-env-figure)
-                                 `(,(concat "raw" env) 
LaTeX-floatrow-env-figure-raw))))
+          (setq LaTeX-environment-list
+                (assq-delete-all (car (assoc env LaTeX-environment-list))
+                                 LaTeX-environment-list))
+          (LaTeX-add-environments `(,env LaTeX-floatrow-env-figure)
+                                  `(,(concat "raw" env) 
LaTeX-floatrow-env-figure-raw))))
 
 (defun LaTeX-floatrow-env-figure (environment)
   "Create floating ENVIRONMENT suitable for floatrow macros."
   (let ((float (and LaTeX-float
-                   (TeX-read-string
-                    (TeX-argument-prompt t nil "Float position")
-                    LaTeX-float))))
+                    (TeX-read-string
+                     (TeX-argument-prompt t nil "Float position")
+                     LaTeX-float))))
     (LaTeX-insert-environment environment
-                             (unless (zerop (length float))
-                               (concat LaTeX-optop float LaTeX-optcl)))))
+                              (unless (zerop (length float))
+                                (concat LaTeX-optop float LaTeX-optcl)))))
 
 (defun LaTeX-floatrow-env-figure-raw (env)
   "Create raw floating ENV with floatrow.sty.
@@ -473,10 +473,10 @@ it in square brackets.  PROMPT replaces the standard one. 
 KEY is
 a string and corresponds to first parsed element in
 `LaTeX-floatrow-DeclareNewOption-regexp'."
   (let ((val (TeX-read-string
-             (TeX-argument-prompt optional prompt "New value option"))))
+              (TeX-argument-prompt optional prompt "New value option"))))
     (LaTeX-add-floatrow-DeclareNewOptions
      (list (concat TeX-esc "Declare" key TeX-grop val TeX-grcl)
-          key val))
+           key val))
     (LaTeX-floatrow-update-key-val-options)
     (TeX-argument-insert val optional)
     (TeX-argument-insert
@@ -487,12 +487,12 @@ a string and corresponds to first parsed element in
 If OPTIONAL is non-nil, insert the argument in brackets.  TYPE is
 the string \"label\" or \"ref\"."
   (let ((cmd (TeX-read-string
-             (if (string= type "label")
-                 (TeX-argument-prompt optional nil "Label command: \\" t)
-               (TeX-argument-prompt optional nil "Reference command: \\" t)))))
+              (if (string= type "label")
+                  (TeX-argument-prompt optional nil "Label command: \\" t)
+                (TeX-argument-prompt optional nil "Reference command: \\" 
t)))))
     (LaTeX-add-floatrow-newseparatedlabel-refs (list cmd type))
     (if (string= type "label")
-       (TeX-add-symbols `(,cmd TeX-arg-define-label))
+        (TeX-add-symbols `(,cmd TeX-arg-define-label))
       (TeX-add-symbols `(,cmd TeX-arg-ref)))
     (TeX-argument-insert cmd optional TeX-esc)))
 
@@ -503,9 +503,9 @@ CLEANUP in non-nil, skip the query and insert process as we 
are
 inside the function `LaTeX-floatrow-auto-cleanup' and process
 only the parsed items."
   (let ((type (if cleanup
-                 (mapcar #'car (LaTeX-floatrow-DeclareNewFloatType-list))
-               (list (TeX-read-string
-                      (TeX-argument-prompt optional nil "Environment 
type"))))))
+                  (mapcar #'car (LaTeX-floatrow-DeclareNewFloatType-list))
+                (list (TeX-read-string
+                       (TeX-argument-prompt optional nil "Environment 
type"))))))
     ;; If not inside `LaTeX-floatrow-auto-cleanup', add user input to
     ;; list of new floats and insert it
     (unless cleanup
@@ -522,16 +522,16 @@ only the parsed items."
     ;; different flavors of type to it as well
     (dolist (elt type)
       (LaTeX-add-environments `(,elt LaTeX-floatrow-env-figure)
-                             `(,(concat "raw" elt) 
LaTeX-floatrow-env-figure-raw))
+                              `(,(concat "raw" elt) 
LaTeX-floatrow-env-figure-raw))
       (add-to-list 'LaTeX-floatrow-supported-float-types elt t)
       (add-to-list 'LaTeX-floatrow-supported-float-types (concat "wide" elt) t)
       (add-to-list 'LaTeX-floatrow-supported-float-types (concat elt "row") t)
       (add-to-list 'LaTeX-floatrow-supported-float-types (concat "capbeside" 
elt) t)
       (when (boundp 'LaTeX-caption-supported-float-types)
-       (add-to-list 'LaTeX-caption-supported-float-types elt t)
-       (add-to-list 'LaTeX-caption-supported-float-types (concat "wide" elt) t)
-       (add-to-list 'LaTeX-caption-supported-float-types (concat elt "row") t)
-       (add-to-list 'LaTeX-caption-supported-float-types (concat "capbeside" 
elt) t)))))
+        (add-to-list 'LaTeX-caption-supported-float-types elt t)
+        (add-to-list 'LaTeX-caption-supported-float-types (concat "wide" elt) 
t)
+        (add-to-list 'LaTeX-caption-supported-float-types (concat elt "row") t)
+        (add-to-list 'LaTeX-caption-supported-float-types (concat "capbeside" 
elt) t)))))
 
 (TeX-add-style-hook
  "floatrow"
@@ -545,7 +545,7 @@ only the parsed items."
 
    ;; Activate the buffer-local version of key-vals
    (setq LaTeX-floatrow-key-val-options-local
-        (copy-alist LaTeX-floatrow-key-val-options))
+         (copy-alist LaTeX-floatrow-key-val-options))
 
    ;; Add pre-defined float commands:
    (LaTeX-add-floatrow-newfloatcommands
@@ -557,35 +557,35 @@ only the parsed items."
     ;; \floatbox[<preamble>]{<captype>}[<width>][<height>][<vert 
pos>]{<caption>}{<object>}
     '("floatbox"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Preamble")
-                    '("\\capbeside" "\\nocapbeside" "\\captop") ]
+        (TeX-argument-prompt t nil "Preamble")
+        '("\\capbeside" "\\nocapbeside" "\\captop") ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Float type")
-                   LaTeX-floatrow-supported-float-types)
+                    (TeX-argument-prompt nil nil "Float type")
+                    LaTeX-floatrow-supported-float-types)
       LaTeX-floatrow-arg-floatbox)
 
     ;; 2.2 Creation of Personal Commands for Float Boxes
     '("newfloatcommand"
       (TeX-arg-eval
        (lambda ()
-        (let ((cmd (TeX-read-string
-                    (TeX-argument-prompt nil nil "Command"))))
-          (LaTeX-add-floatrow-newfloatcommands cmd)
-          (TeX-add-symbols
-           `(,cmd LaTeX-floatrow-arg-floatbox))
-          (format "%s" cmd))))
+         (let ((cmd (TeX-read-string
+                     (TeX-argument-prompt nil nil "Command"))))
+           (LaTeX-add-floatrow-newfloatcommands cmd)
+           (TeX-add-symbols
+            `(,cmd LaTeX-floatrow-arg-floatbox))
+           (format "%s" cmd))))
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Float type")
-                   '("figure" "table"))
+                    (TeX-argument-prompt nil nil "Float type")
+                    '("figure" "table"))
       [ 2 ])
 
     '("renewfloatcommand"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Command")
-                   (LaTeX-floatrow-newfloatcommand-list))
+                    (TeX-argument-prompt nil nil "Command")
+                    (LaTeX-floatrow-newfloatcommand-list))
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Float type")
-                   '("figure" "table"))
+                    (TeX-argument-prompt nil nil "Float type")
+                    '("figure" "table"))
       [ 2 ])
 
 
@@ -609,8 +609,8 @@ only the parsed items."
     ;; 3 Float Layout Settings
     '("floatsetup"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Float type")
-                    LaTeX-floatrow-supported-float-types ]
+        (TeX-argument-prompt t nil "Float type")
+        LaTeX-floatrow-supported-float-types ]
       (TeX-arg-key-val LaTeX-floatrow-key-val-options-local))
 
     ;; 3.2 Settings for Current Float Environment
@@ -620,8 +620,8 @@ only the parsed items."
     ;; 3.3 Clearing of Settings for Current Float Type
     '("clearfloatsetup"
       (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Float type")
-                    LaTeX-floatrow-supported-float-types))
+                    (TeX-argument-prompt nil nil "Float type")
+                    LaTeX-floatrow-supported-float-types))
 
     ;; 3.4 Temporary Clearing of All Float Settings
     '("killfloatstyle" 0)
@@ -629,37 +629,37 @@ only the parsed items."
     ;; 3.6.1 Float Style Option (style=)
     '("DeclareFloatStyle"
       (LaTeX-floatrow-arg-declare-new-options "New style option"
-                                             "FloatStyle"))
+                                              "FloatStyle"))
 
     ;; 3.6.2 Float Font Option (font=)
     '("DeclareFloatFont"
       (LaTeX-floatrow-arg-declare-new-options "New font option"
-                                             "FloatFont"))
+                                              "FloatFont"))
 
     ;; 3.6.3 Option for Float Rules/Skips (precode= etc.)
     '("DeclareFloatVCode"
       (LaTeX-floatrow-arg-declare-new-options "New rules/skip option"
-                                             "FloatVCode"))
+                                              "FloatVCode"))
 
     ;; 3.6.4 Settings for Colored Frame (colorframeset=)
     '("DeclareColorBox"
       (LaTeX-floatrow-arg-declare-new-options "New colored frame option"
-                                             "ColorBox"))
+                                              "ColorBox"))
 
     ;; (colorframecorners=)
     '("DeclareCBoxCorners"
       (LaTeX-floatrow-arg-declare-new-options "New colored corner option"
-                                             "CBoxCorners"))
+                                              "CBoxCorners"))
 
     ;; 3.6.5 Object Justification Option (objectset=)
     '("DeclareObjectSet"
       (LaTeX-floatrow-arg-declare-new-options "New object justification"
-                                             "ObjectSet"))
+                                              "ObjectSet"))
 
     ;; 3.6.6 Option for Float Box Alignment/Settings (margins=)
     '("DeclareMarginSet"
       (LaTeX-floatrow-arg-declare-new-options "New alignment option"
-                                             "MarginSet"))
+                                              "MarginSet"))
 
     '("setfloatmargins" 2)
     '("setfloatmargins*" 2)
@@ -672,21 +672,21 @@ only the parsed items."
     ;; 3.6.7 Float Separators Options (floatrowsep=, capbesidesep=)
     '("DeclareFloatSeparators"
       (LaTeX-floatrow-arg-declare-new-options "New separator option"
-                                             "FloatSeparators"))
+                                              "FloatSeparators"))
 
     ;; 3.6.8 Option for Footnote Rule's Style (footnoterule=)
     '("DeclareFloatFootnoterule"
       (LaTeX-floatrow-arg-declare-new-options "New footnote rule option"
-                                             "FloatFootnoterule"))
+                                              "FloatFootnoterule"))
 
     ;; 4 Creation of New Float Types
     '("DeclareNewFloatType"
       (LaTeX-floatrow-arg-declare-new-floattype)
       (TeX-arg-key-val (("placement" ("tbp" "t" "b" "p"))
-                       ("name")
-                       ("fileext")
-                       ("within" ("chapter" "section" "subsection"))
-                       ("relatedcapstyle" ("yes" "no")))))
+                        ("name")
+                        ("fileext")
+                        ("within" ("chapter" "section" "subsection"))
+                        ("relatedcapstyle" ("yes" "no")))))
 
     ;; 6.2 Support of The Label-Sublabel References
     '("newseparatedlabel"
@@ -711,34 +711,34 @@ only the parsed items."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("floatbox"  "[{[[[")
-                               ("ffigbox"   "[[[")
-                               ("ttabbox"   "[[[")
-                               ("fcapside"  "[[["))
-                             'textual)
+                                ("ffigbox"   "[[[")
+                                ("ttabbox"   "[[[")
+                                ("fcapside"  "[[["))
+                              'textual)
      (font-latex-add-keywords '(("newfloatcommand"           "{{[[")
-                               ("renewfloatcommand"         "{{[[")
-                               ("buildFBBOX"                "{{")
-                               ("floatsetup"                "[{")
-                               ("thisfloatsetup"            "{")
-                               ("clearfloatsetup"           "{")
-                               ("killfloatstyle"            "")
-                               ("DeclareFloatStyle"         "{{")
-                               ("DeclareFloatFont"          "{{")
-                               ("DeclareFloatVCode"         "{{")
-                               ("DeclareColorBox"           "{{")
-                               ("DeclareCBoxCorners"        "{{")
-                               ("DeclareObjectSet"          "{{")
-                               ("DeclareMarginSet"          "{{")
-                               ("DeclareFloatSeparators"    "{{")
-                               ("DeclareFloatFootnoterule"  "{{")
-                               ("newseparatedlabel"         "{{{")
-                               ("newseparatedref"           "{{")
-                               ("makelabelseparator"        "{")
-                               ("DeclareNewFloatType"       "{{")
-                               ("RawFloats"                 ""))
-                             'function)))
+                                ("renewfloatcommand"         "{{[[")
+                                ("buildFBBOX"                "{{")
+                                ("floatsetup"                "[{")
+                                ("thisfloatsetup"            "{")
+                                ("clearfloatsetup"           "{")
+                                ("killfloatstyle"            "")
+                                ("DeclareFloatStyle"         "{{")
+                                ("DeclareFloatFont"          "{{")
+                                ("DeclareFloatVCode"         "{{")
+                                ("DeclareColorBox"           "{{")
+                                ("DeclareCBoxCorners"        "{{")
+                                ("DeclareObjectSet"          "{{")
+                                ("DeclareMarginSet"          "{{")
+                                ("DeclareFloatSeparators"    "{{")
+                                ("DeclareFloatFootnoterule"  "{{")
+                                ("newseparatedlabel"         "{{{")
+                                ("newseparatedref"           "{{")
+                                ("makelabelseparator"        "{")
+                                ("DeclareNewFloatType"       "{{")
+                                ("RawFloats"                 ""))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-floatrow-package-options nil
diff --git a/style/foils.el b/style/foils.el
index 15b940c..e87c26b 100644
--- a/style/foils.el
+++ b/style/foils.el
@@ -40,20 +40,20 @@
 (defun LaTeX-style-foils nil
   "Prompt for and insert foiltex options."
   (let* ((date (timezone-parse-date (current-time-string)))
-        (year   (string-to-number (aref date 0)))
-        (month  (string-to-number (aref date 1)))
-        (day    (string-to-number (aref date 2)))
-        (title (TeX-read-string "Title: ")))
+         (year   (string-to-number (aref date 0)))
+         (month  (string-to-number (aref date 1)))
+         (day    (string-to-number (aref date 2)))
+         (title (TeX-read-string "Title: ")))
     (save-excursion
       (goto-char (point-max))
       (re-search-backward ".begin.document.")
       (insert TeX-esc "title"
-             TeX-grop title TeX-grcl "\n")
+              TeX-grop title TeX-grcl "\n")
       (insert TeX-esc "author"
-             TeX-grop (user-full-name) TeX-grcl "\n")
+              TeX-grop (user-full-name) TeX-grcl "\n")
       (insert TeX-esc "date" TeX-grop
-             (format "%d-%02d-%02d" year month day)
-             TeX-grcl "\n")
+              (format "%d-%02d-%02d" year month day)
+              TeX-grcl "\n")
       (insert "" TeX-esc "MyLogo" TeX-grop TeX-grcl "\n")
       (insert "%" TeX-esc "Restriction" TeX-grop TeX-grcl "\n")
       (insert "%" TeX-esc "rightfooter" TeX-grop TeX-grcl "\n")
diff --git a/style/fontaxes.el b/style/fontaxes.el
index 1765dfc..62db15a 100644
--- a/style/fontaxes.el
+++ b/style/fontaxes.el
@@ -38,8 +38,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "fontaxes"
diff --git a/style/fontenc.el b/style/fontenc.el
index 6bb6132..69d20fd 100644
--- a/style/fontenc.el
+++ b/style/fontenc.el
@@ -47,8 +47,8 @@
 (defun LaTeX-fontenc-package-options ()
   "Prompt for package options for the fontenc package."
   (mapconcat 'identity
-            (TeX-completing-read-multiple
-             "Encoding(s): "
-             LaTeX-fontenc-package-options-list) ","))
+             (TeX-completing-read-multiple
+              "Encoding(s): "
+              LaTeX-fontenc-package-options-list) ","))
 
 ;;; fontenc.el ends here
diff --git a/style/fontspec.el b/style/fontspec.el
index cd3cd40..a618ca9 100644
--- a/style/fontspec.el
+++ b/style/fontspec.el
@@ -39,8 +39,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-color-definecolor-list "color" ())
 (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
@@ -85,88 +85,88 @@
     ("LetterSpace")
     ;; 16 OpenType options
     ("Ligatures" ("Required"      "RequiredOff"
-                 "Common"        "CommonOff"
-                 "Contextual"    "ContextualOff"
-                 "Rare"          "RareOff"
-                 "Discretionary" "DiscretionaryOff"
-                 "Historic"      "HistoricOff"
-                 "TeX"
-                 "ResetAll"))
+                  "Common"        "CommonOff"
+                  "Contextual"    "ContextualOff"
+                  "Rare"          "RareOff"
+                  "Discretionary" "DiscretionaryOff"
+                  "Historic"      "HistoricOff"
+                  "TeX"
+                  "ResetAll"))
     ("Letters" ("Uppercase"           "UppercaseOff"
-               "SmallCaps"           "SmallCapsOff"
-               "PetiteCaps"          "PetiteCapsOff"
-               "UppercaseSmallCaps"  "UppercaseSmallCapsOff"
-               "UppercasePetiteCaps" "UppercasePetiteCapsOff"
-               "Unicase"             "UnicaseOff"
-               "ResetAll"))
+                "SmallCaps"           "SmallCapsOff"
+                "PetiteCaps"          "PetiteCapsOff"
+                "UppercaseSmallCaps"  "UppercaseSmallCapsOff"
+                "UppercasePetiteCaps" "UppercasePetiteCapsOff"
+                "Unicase"             "UnicaseOff"
+                "ResetAll"))
     ("Numbers" ("Uppercase"    "UppercaseOff"
-               "Lowercase"    "LowercaseOff"
-               "Lining"       "LiningOff"
-               "OldStyle"     "OldStyleOff"
-               "Proportional" "ProportionalOff"
-               "Monospaced"   "MonospacedOff"
-               "SlashedZero"  "SlashedZeroOff"
-               "Arabic"       "ArabicOff"
-               "ResetAll"))
+                "Lowercase"    "LowercaseOff"
+                "Lining"       "LiningOff"
+                "OldStyle"     "OldStyleOff"
+                "Proportional" "ProportionalOff"
+                "Monospaced"   "MonospacedOff"
+                "SlashedZero"  "SlashedZeroOff"
+                "Arabic"       "ArabicOff"
+                "ResetAll"))
     ("Contextuals" ("Swash"       "SwashOff"
-                   "Alternate"   "AlternateOff"
-                   "WordInitial" "WordInitialOff"
-                   "WordFinal"   "WordFinalOff"
-                   "LineFinal"   "LineFinalOff"
-                   "Inner"       "InnerOff"
-                   "ResetAll"))
+                    "Alternate"   "AlternateOff"
+                    "WordInitial" "WordInitialOff"
+                    "WordFinal"   "WordFinalOff"
+                    "LineFinal"   "LineFinalOff"
+                    "Inner"       "InnerOff"
+                    "ResetAll"))
     ("VerticalPosition" ("Superior"           "SuperiorOff"
-                        "Inferior"           "InferiorOff"
-                        "Numerator"          "NumeratorOff"
-                        "Denominator"        "DenominatorOff"
-                        "ScientificInferior" "ScientificInferiorOff"
-                        "Ordinal"            "OrdinalOff"
-                        "ResetAll"))
+                         "Inferior"           "InferiorOff"
+                         "Numerator"          "NumeratorOff"
+                         "Denominator"        "DenominatorOff"
+                         "ScientificInferior" "ScientificInferiorOff"
+                         "Ordinal"            "OrdinalOff"
+                         "ResetAll"))
     ("Fraction" ("On" "Off" "Reset" "Alternate" "AlternateOff" "ResetAll"))
     ("StylisticSet")
     ("CharacterVariant")
     ("Alternate" ("Random"))
     ("Style" ("Alternate"      "AlternateOff"
-             "Italic"         "ItalicOff"
-             "Ruby"           "RubyOff"
-             "Swash"          "SwashOff"
-             "Cursive"        "CursiveOff"
-             "Historic"       "HistoricOff"
-             "TitlingCaps"    "TitlingCapsOff"
-             "HorizontalKana" "HorizontalKanaOff"
-             "VerticalKana"   "VerticalKanaOff"
-             "ResetAll"))
+              "Italic"         "ItalicOff"
+              "Ruby"           "RubyOff"
+              "Swash"          "SwashOff"
+              "Cursive"        "CursiveOff"
+              "Historic"       "HistoricOff"
+              "TitlingCaps"    "TitlingCapsOff"
+              "HorizontalKana" "HorizontalKanaOff"
+              "VerticalKana"   "VerticalKanaOff"
+              "ResetAll"))
     ("Diacritics" ("MarkToBase" "MarkToBaseOff"
-                  "MarkToMark" "MarkToMarkOff"
-                  "AboveBase"  "AboveBaseOff"
-                  "BelowBase"  "BelowBaseOff"
-                  "ResetAll"))
+                   "MarkToMark" "MarkToMarkOff"
+                   "AboveBase"  "AboveBaseOff"
+                   "BelowBase"  "BelowBaseOff"
+                   "ResetAll"))
     ("Kerning" ("Uppercase" "UppercaseOff" "On" "Off" "Reset" "ResetAll"))
     ("CharacterWidth" ("Proportional"          "ProportionalOff"
-                      "Full"                  "FullOff"
-                      "Half"                  "HalfOff"
-                      "Third"                 "ThirdOff"
-                      "Quarter"               "QuarterOff"
-                      "AlternateProportional" "AlternateProportionalOff"
-                      "AlternateHalf"         "AlternateHalfOff"
-                      "ResetAll"))
+                       "Full"                  "FullOff"
+                       "Half"                  "HalfOff"
+                       "Third"                 "ThirdOff"
+                       "Quarter"               "QuarterOff"
+                       "AlternateProportional" "AlternateProportionalOff"
+                       "AlternateHalf"         "AlternateHalfOff"
+                       "ResetAll"))
     ("Annotation")
     ("CJKShape" ("Traditional"
-                "Simplified"
-                "JIS1978"
-                "JIS1983"
-                "JIS1990"
-                "Expert"
-                "NLC"))
+                 "Simplified"
+                 "JIS1978"
+                 "JIS1983"
+                 "JIS1990"
+                 "Expert"
+                 "NLC"))
     ("Vertical" ("RotatedGlyphs"         "RotatedGlyphsOff"
-                "AlternatesForRotation" "AlternatesForRotationOff"
-                "Alternates"            "AlternatesOff"
-                "KanaAlternates"        "KanaAlternatesOff"
-                "Kerning"               "KerningOff"
-                "AlternateMetrics"      "AlternateMetricsOff"
-                "HalfMetrics"           "HalfMetricsOff"
-                "ProportionalMetrics"   "ProportionalMetricsOff"
-                "ResetAll"))
+                 "AlternatesForRotation" "AlternatesForRotationOff"
+                 "Alternates"            "AlternatesOff"
+                 "KanaAlternates"        "KanaAlternatesOff"
+                 "Kerning"               "KerningOff"
+                 "AlternateMetrics"      "AlternateMetricsOff"
+                 "HalfMetrics"           "HalfMetricsOff"
+                 "ProportionalMetrics"   "ProportionalMetricsOff"
+                 "ResetAll"))
     ;; 25 Going behind fontspec's back: Offer only an excerpt of all
     ;; possible tags:
     ("RawFeature" ("frac" "lnum" "onum" "pnum" "smcp" "tnum" "zero")))
@@ -189,19 +189,19 @@ Customize `LaTeX-fontspec-arg-font-search' in order to 
decide how
 to retrieve the list of fonts."
   (unless LaTeX-fontspec-font-list
     (when (if (eq LaTeX-fontspec-arg-font-search 'ask)
-             (not (y-or-n-p "Find font yourself? "))
-           LaTeX-fontspec-arg-font-search)
+              (not (y-or-n-p "Find font yourself? "))
+            LaTeX-fontspec-arg-font-search)
       (message "Searching for fonts...")
       (with-temp-buffer
-       (shell-command "luaotfload-tool --list=basename" t)
-       ;; Search for the font base names and full names, and add them to
-       ;; `LaTeX-fontspec-font-list'.  The list is in the form
-       ;;     <base name><TAB><full name><TAB><version>
-       (while
-           (re-search-forward "^\\([^\n\r\t]*\\)\t\\([^\n\r\t]*\\)\t.*$" nil t)
-         (add-to-list 'LaTeX-fontspec-font-list (match-string-no-properties 1))
-         (add-to-list 'LaTeX-fontspec-font-list
-                      (match-string-no-properties 2))))
+        (shell-command "luaotfload-tool --list=basename" t)
+        ;; Search for the font base names and full names, and add them to
+        ;; `LaTeX-fontspec-font-list'.  The list is in the form
+        ;;     <base name><TAB><full name><TAB><version>
+        (while
+            (re-search-forward "^\\([^\n\r\t]*\\)\t\\([^\n\r\t]*\\)\t.*$" nil 
t)
+          (add-to-list 'LaTeX-fontspec-font-list (match-string-no-properties 
1))
+          (add-to-list 'LaTeX-fontspec-font-list
+                       (match-string-no-properties 2))))
       (message "Searching for fonts...done")))
   (TeX-argument-insert
    (completing-read
@@ -215,15 +215,15 @@ to retrieve the list of fonts."
   ;; key=values for coloring.  Prefer xcolor.sty if both packages are
   ;; loaded.
   (when (or (member "xcolor" (TeX-style-list))
-           (member "color" (TeX-style-list)))
+            (member "color" (TeX-style-list)))
     (let* ((colorcmd (if (member "xcolor" (TeX-style-list))
-                        #'LaTeX-xcolor-definecolor-list
-                      #'LaTeX-color-definecolor-list))
-          (tmp (copy-alist LaTeX-fontspec-font-features)))
+                         #'LaTeX-xcolor-definecolor-list
+                       #'LaTeX-color-definecolor-list))
+           (tmp (copy-alist LaTeX-fontspec-font-features)))
       (setq tmp (assq-delete-all (car (assoc "Color" tmp)) tmp))
       (push (list "Color" (mapcar #'car (funcall colorcmd))) tmp)
       (setq LaTeX-fontspec-font-features-local
-           (copy-alist tmp)))))
+            (copy-alist tmp)))))
 
 ;; Setup for \newfontfamily and \newfontface:
 (TeX-auto-add-type "fontspec-newfontcmd" "LaTeX")
@@ -244,9 +244,9 @@ to retrieve the list of fonts."
     (TeX-add-symbols mac)
     ;; Cater for fontification
     (when (and (featurep 'font-latex)
-              (eq TeX-install-font-lock 'font-latex-setup))
+               (eq TeX-install-font-lock 'font-latex-setup))
       (font-latex-add-keywords `((,mac ""))
-                              'type-declaration)))
+                               'type-declaration)))
   ;; Update values of Color key:
   (LaTeX-fontspec-update-font-features))
 
@@ -267,7 +267,7 @@ to retrieve the list of fonts."
 
    ;; Activate the buffer local version of font features:
    (setq LaTeX-fontspec-font-features-local
-        (copy-alist LaTeX-fontspec-font-features))
+         (copy-alist LaTeX-fontspec-font-features))
 
    (TeX-add-symbols
     ;; 4.3 Commands for old-style and lining numbers: \oldstylenums is
@@ -336,14 +336,14 @@ to retrieve the list of fonts."
     ;; 23 Defining new features
     '("newAATfeature"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Existing feature")
-                   LaTeX-fontspec-font-features-local)
+                    (TeX-argument-prompt nil nil "Existing feature")
+                    LaTeX-fontspec-font-features-local)
       "New option" 2)
 
     '("newopentypefeature"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Existing feature")
-                   LaTeX-fontspec-font-features-local)
+                    (TeX-argument-prompt nil nil "Existing feature")
+                    LaTeX-fontspec-font-features-local)
       "New option" t)
 
     '("newfontfeature" "New feature" t)
@@ -355,21 +355,21 @@ to retrieve the list of fonts."
     ;; 26 Renaming existing features & options
     '("aliasfontfeature"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Existing feature")
-                   LaTeX-fontspec-font-features-local)
+                    (TeX-argument-prompt nil nil "Existing feature")
+                    LaTeX-fontspec-font-features-local)
       "New name")
 
     '("aliasfontfeatureoption"
       (TeX-arg-eval
        (lambda ()
-        (let* ((key (completing-read
-                     (TeX-argument-prompt nil nil "Feature")
-                     LaTeX-fontspec-font-features-local))
-               (val (completing-read
-                     (TeX-argument-prompt nil nil "Existing name")
-                     (cadr (assoc key LaTeX-fontspec-font-features-local)))))
-          (TeX-argument-insert key nil)
-          (format "%s" val))))
+         (let* ((key (completing-read
+                      (TeX-argument-prompt nil nil "Feature")
+                      LaTeX-fontspec-font-features-local))
+                (val (completing-read
+                      (TeX-argument-prompt nil nil "Existing name")
+                      (cadr (assoc key LaTeX-fontspec-font-features-local)))))
+           (TeX-argument-insert key nil)
+           (format "%s" val))))
       "New name") )
 
    (LaTeX-add-environments
@@ -378,34 +378,34 @@ to retrieve the list of fonts."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("fontspec"    "[{[")
-                               ("setmainfont" "[{[")
-                               ("setsansfont" "[{[")
-                               ("setmonofont" "[{[")
-                               ("newfontfamily" "\\[{[")
-                               ("newfontface"   "\\[{[")
-                               ("setmathrm" "[{[")
-                               ("setmathsf" "[{[")
-                               ("setmathtt" "[{[")
-                               ("setboldmathrm" "[{[")
-                               ("defaultfontfeatures" "+[{")
-                               ("addfontfeature"  "{")
-                               ("addfontfeatures" "{")
-                               ("newfontscript"   "{{")
-                               ("newfontlanguage" "{{")
-                               ("emfontdeclare"   "{")
-                               ("strongfontdeclare"  "{")
-                               ("newAATfeature"      "{{{{")
-                               ("newopentypefeature" "{{{")
-                               ("newfontfeature"     "{{")
-                               ("aliasfontfeature"   "{{")
-                               ("aliasfontfeatureoption" "{{{"))
-                             'function)
+                                ("setmainfont" "[{[")
+                                ("setsansfont" "[{[")
+                                ("setmonofont" "[{[")
+                                ("newfontfamily" "\\[{[")
+                                ("newfontface"   "\\[{[")
+                                ("setmathrm" "[{[")
+                                ("setmathsf" "[{[")
+                                ("setmathtt" "[{[")
+                                ("setboldmathrm" "[{[")
+                                ("defaultfontfeatures" "+[{")
+                                ("addfontfeature"  "{")
+                                ("addfontfeatures" "{")
+                                ("newfontscript"   "{{")
+                                ("newfontlanguage" "{{")
+                                ("emfontdeclare"   "{")
+                                ("strongfontdeclare"  "{")
+                                ("newAATfeature"      "{{{{")
+                                ("newopentypefeature" "{{{")
+                                ("newfontfeature"     "{{")
+                                ("aliasfontfeature"   "{{")
+                                ("aliasfontfeatureoption" "{{{"))
+                              'function)
      (font-latex-add-keywords '(("liningnums"    "{"))
-                             'type-command)
+                              'type-command)
      (font-latex-add-keywords '(("strong"    "{"))
-                             'bold-command)))
+                              'bold-command)))
  TeX-dialect)
 
 (defvar LaTeX-fontspec-package-options
diff --git a/style/footmisc.el b/style/footmisc.el
index 49ce381..dc3a807 100644
--- a/style/footmisc.el
+++ b/style/footmisc.el
@@ -33,8 +33,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "footmisc"
@@ -66,7 +66,7 @@
                                 ("DefineFNsymbols*" "{[{")
                                 ("DefineFNsymbolsTM" "{{")
                                 ("DefineFNsymbolsTM*" "{{")
-                               ("setfnsymbol" "{")) 'function)
+                                ("setfnsymbol" "{")) 'function)
      (font-latex-add-keywords '(("footnoteref")) 'reference)))
  TeX-dialect)
 
diff --git a/style/french.el b/style/french.el
index f664f83..d3f4178 100644
--- a/style/french.el
+++ b/style/french.el
@@ -42,9 +42,9 @@
  "french"
  (lambda ()
    (when (and (member "babel" TeX-active-styles)
-             (not (member "frenchpro" TeX-active-styles))
-             (not (member "frenchle" TeX-active-styles))
-             (not (member "mlp" TeX-active-styles)))
+              (not (member "frenchpro" TeX-active-styles))
+              (not (member "frenchle" TeX-active-styles))
+              (not (member "mlp" TeX-active-styles)))
      (TeX-run-style-hooks "frenchb")))
  TeX-dialect)
 
diff --git a/style/frenchb.el b/style/frenchb.el
index a59432d..31c30b8 100644
--- a/style/frenchb.el
+++ b/style/frenchb.el
@@ -70,11 +70,11 @@
     "StandardLayout")
    (unless (eq (car TeX-quote-language) 'override)
      (setq TeX-quote-language
-          `("french" "\\og "
-            (lambda ()
-              (concat "\\fg"
-                      (unless (member "xspace" TeX-active-styles) "{}")))
-            ,TeX-quote-after-quote)))
+           `("french" "\\og "
+             (lambda ()
+               (concat "\\fg"
+                       (unless (member "xspace" TeX-active-styles) "{}")))
+             ,TeX-quote-after-quote)))
    (run-hooks 'TeX-language-fr-hook))
  TeX-dialect)
 
diff --git a/style/fvextra.el b/style/fvextra.el
index 71a4ab8..b966f70 100644
--- a/style/fvextra.el
+++ b/style/fvextra.el
@@ -40,8 +40,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-color-definecolor-list "color" ())
 (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
@@ -55,15 +55,15 @@
     ("curlyquotes" ("true" "false"))
     ("extra" ("true" "false"))
     ("fontencoding" (;; Reset to default document font encoding
-                    "none"
-                    ;; 128+ glyph encodings (text)
-                    "OT1" "OT2" "OT3" "OT4" "OT6"
-                    ;; 256 glyph encodings (text)
-                    "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5"
-                    ;; 256 glyph encodings (text extended)
-                    "X2"
-                    ;; Other encodings
-                    "LY1" "LV1" "LGR"))
+                     "none"
+                     ;; 128+ glyph encodings (text)
+                     "OT1" "OT2" "OT3" "OT4" "OT6"
+                     ;; 256 glyph encodings (text)
+                     "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5"
+                     ;; 256 glyph encodings (text extended)
+                     "X2"
+                     ;; Other encodings
+                     "LY1" "LV1" "LGR"))
     ("highlightcolor")
     ("highlightlines")
     ("linenos" ("true" "false"))
@@ -114,30 +114,30 @@
   "Update `LaTeX-fancyvrb-key-val-options-local' with key=vals from 
\"fvextra.sty\"."
   ;; Delete the key "numbers" from `LaTeX-fancyvrb-key-val-options-local':
   (setq LaTeX-fancyvrb-key-val-options-local
-       (assq-delete-all (car (assoc "numbers" 
LaTeX-fancyvrb-key-val-options-local))
-                        LaTeX-fancyvrb-key-val-options-local))
+        (assq-delete-all (car (assoc "numbers" 
LaTeX-fancyvrb-key-val-options-local))
+                         LaTeX-fancyvrb-key-val-options-local))
   ;; Add the key with "both" value:
   (add-to-list 'LaTeX-fancyvrb-key-val-options-local
-              '("numbers" ("none" "left" "right" "both")))
+               '("numbers" ("none" "left" "right" "both")))
   ;; Add color values to resp. keys:
   (when (or (member "xcolor" (TeX-style-list))
-           (member "color" (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 '("highlightcolor"
-                  "rulecolor"
-                  "fillcolor"
-                  "tabcolor"
-                  "spacecolor"))
-          (tmp (copy-alist LaTeX-fancyvrb-key-val-options-local)))
+                         #'LaTeX-xcolor-definecolor-list
+                       #'LaTeX-color-definecolor-list))
+           (keys '("highlightcolor"
+                   "rulecolor"
+                   "fillcolor"
+                   "tabcolor"
+                   "spacecolor"))
+           (tmp (copy-alist LaTeX-fancyvrb-key-val-options-local)))
       (dolist (x keys)
-       (setq tmp (assq-delete-all (car (assoc x tmp)) tmp))
-       (if (string= x "highlightcolor")
-           (cl-pushnew (list x (mapcar #'car (funcall colorcmd))) tmp :test 
#'equal)
-         (cl-pushnew (list x (append '("none") (mapcar #'car (funcall 
colorcmd)))) tmp :test #'equal)))
+        (setq tmp (assq-delete-all (car (assoc x tmp)) tmp))
+        (if (string= x "highlightcolor")
+            (cl-pushnew (list x (mapcar #'car (funcall colorcmd))) tmp :test 
#'equal)
+          (cl-pushnew (list x (append '("none") (mapcar #'car (funcall 
colorcmd)))) tmp :test #'equal)))
       (setq LaTeX-fancyvrb-key-val-options-local
-           (copy-alist tmp)))))
+            (copy-alist tmp)))))
 
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-fvextra-update-key-val t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
@@ -151,8 +151,8 @@
 
    ;; Append `LaTeX-fvextra-key-val' to `LaTeX-fancyvrb-key-val-options-local':
    (setq LaTeX-fancyvrb-key-val-options-local
-        (append LaTeX-fvextra-key-val-options
-                LaTeX-fancyvrb-key-val-options-local))
+         (append LaTeX-fvextra-key-val-options
+                 LaTeX-fancyvrb-key-val-options-local))
 
    (TeX-add-symbols
     ;; 4.1 Inline formatting with \fvinlineset
@@ -179,17 +179,17 @@
 
    ;; Add \EscVerb*? to `LaTeX-verbatim-macros-with-braces-local':
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local
-               "EscVerb" t)
+                "EscVerb" t)
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local
-               "EscVerb*" t)
+                "EscVerb*" t)
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("fvinlineset" "{"))
-                             'function)
+                              'function)
      (font-latex-add-keywords '(("EscVerb"     "*["))
-                             'textual)))
+                              'textual)))
  TeX-dialect)
 
 (defvar LaTeX-fvextra-package-options nil
diff --git a/style/geometry.el b/style/geometry.el
index 7a2fb49..a1d1783 100644
--- a/style/geometry.el
+++ b/style/geometry.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-geometry-always-key-val-options
   '(("layout") ("layoutwidth") ("layoutheight") ("layoutsize")
@@ -61,19 +61,19 @@
 
 (defvar LaTeX-geometry-preamble-key-val-options
   '(("paper" ("a0paper" "a1paper" "a2paper" "a3paper" "a4paper"
-             "a5paper" "a6paper" "b0paper" "b1paper" "b2paper"
-             "b3paper" "b4paper" "b5paper" "b6paper" "c0paper"
-             "c1paper" "c2paper" "c3paper" "c4paper" "c5paper"
-             "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j"
-             "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper"
-             "ansiepaper"))
+              "a5paper" "a6paper" "b0paper" "b1paper" "b2paper"
+              "b3paper" "b4paper" "b5paper" "b6paper" "c0paper"
+              "c1paper" "c2paper" "c3paper" "c4paper" "c5paper"
+              "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j"
+              "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper"
+              "ansiepaper"))
     ("papername" ("a0paper" "a1paper" "a2paper" "a3paper" "a4paper"
-                 "a5paper" "a6paper" "b0paper" "b1paper" "b2paper"
-                 "b3paper" "b4paper" "b5paper" "b6paper" "c0paper"
-                 "c1paper" "c2paper" "c3paper" "c4paper" "c5paper"
-                 "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j"
-                 "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper"
-                 "ansiepaper"))
+                  "a5paper" "a6paper" "b0paper" "b1paper" "b2paper"
+                  "b3paper" "b4paper" "b5paper" "b6paper" "c0paper"
+                  "c1paper" "c2paper" "c3paper" "c4paper" "c5paper"
+                  "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j"
+                  "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper"
+                  "ansiepaper"))
     ("a0paper") ("a1paper") ("a2paper") ("a3paper") ("a4paper") ("a5paper")
     ("a6paper") ("b0paper") ("b1paper") ("b2paper") ("b3paper") ("b4paper")
     ("b5paper") ("b6paper") ("c0paper") ("c1paper") ("c2paper") ("c3paper")
@@ -82,7 +82,7 @@
     ("ansidpaper") ("ansiepaper") ("screen") ("paperwidth") ("paperheight")
     ("papersize") ("landscape") ("portrait")
     ("driver" ("dvips" "dvipdfm" "dvipdfmx" "xdvipdfmx"
-              "pdftex" "luatex" "vtex" "xetex" "auto" "none"))
+               "pdftex" "luatex" "vtex" "xetex" "auto" "none"))
     ("dvips") ("dvipdfm") ("dvipdfmx") ("xdvipdfmx") ("pdftex") ("luatex")
     ("xetex") ("vtex") ("verbose") ("reset")
     ("mag") ("truedimen") ("pass") ("showframe") ("showcrop"))
@@ -99,7 +99,7 @@ package.")
 
 (defun LaTeX-geometry-auto-prepare ()
   "Clear `LaTeX-auto-geometry-savegeometry' before parsing."
-  (setq        LaTeX-auto-geometry-savegeometry nil))
+  (setq LaTeX-auto-geometry-savegeometry nil))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-geometry-auto-prepare t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
@@ -115,8 +115,8 @@ package.")
    (TeX-add-symbols
     '("geometry"
       (TeX-arg-eval TeX-read-key-val nil
-                   (append LaTeX-geometry-preamble-key-val-options
-                           LaTeX-geometry-always-key-val-options)))
+                    (append LaTeX-geometry-preamble-key-val-options
+                            LaTeX-geometry-always-key-val-options)))
     '("newgeometry"
       (TeX-arg-key-val LaTeX-geometry-always-key-val-options))
 
@@ -125,35 +125,35 @@ package.")
     '("savegeometry"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string "Name: ")))
-          (LaTeX-add-geometry-savegeometries name)
-          (format "%s" name)))))
+         (let ((name (TeX-read-string "Name: ")))
+           (LaTeX-add-geometry-savegeometries name)
+           (format "%s" name)))))
 
     '("loadgeometry"
       (TeX-arg-eval
        (lambda ()
-        (completing-read "Name: "
-                         (LaTeX-geometry-savegeometry-list))))))
+         (completing-read "Name: "
+                          (LaTeX-geometry-savegeometry-list))))))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("geometry"      "{")
-                               ("newgeometry"   "{")
-                               ("savegeometry"  "{")
-                               ("loadgeometry"  "{"))
-                             'function))
+                                ("newgeometry"   "{")
+                                ("savegeometry"  "{")
+                                ("loadgeometry"  "{"))
+                              'function))
 
    ;; Option management
    (if (and (LaTeX-provided-package-options-member "geometry" "dvipdfmx")
-           (not (eq TeX-engine 'xetex)))
+            (not (eq TeX-engine 'xetex)))
        (setq TeX-PDF-from-DVI "Dvipdfmx")))
  TeX-dialect)
 
 (defun LaTeX-geometry-package-options ()
   "Prompt for package options for the geometry package."
   (TeX-read-key-val t
-                   (append LaTeX-geometry-preamble-key-val-options
-                           LaTeX-geometry-always-key-val-options)))
+                    (append LaTeX-geometry-preamble-key-val-options
+                            LaTeX-geometry-always-key-val-options)))
 
 ;;; geometry.el ends here
diff --git a/style/german.el b/style/german.el
index 74df22b..9ae3328 100644
--- a/style/german.el
+++ b/style/german.el
@@ -13,12 +13,12 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (declare-function font-latex-add-to-syntax-alist
-                 "font-latex"
-                 (list))
+                  "font-latex"
+                  (list))
 
 (defvar LaTeX-german-mode-syntax-table
   (copy-syntax-table LaTeX-mode-syntax-table)
@@ -35,23 +35,23 @@
    ;; variables are to be deleted in future versions. (now = 2005-04-01)
    (unless (eq (car TeX-quote-language) 'override)
      (let ((open-quote (if (and (boundp 'LaTeX-german-open-quote)
-                               LaTeX-german-open-quote)
-                          LaTeX-german-open-quote
-                        "\"`"))
-          (close-quote (if (and (boundp 'LaTeX-german-close-quote)
-                                LaTeX-german-close-quote)
-                           LaTeX-german-close-quote
-                         "\"'"))
-          (q-after-q (if (and (boundp 'LaTeX-german-quote-after-quote)
-                              LaTeX-german-quote-after-quote)
-                         LaTeX-german-quote-after-quote
-                       t)))
+                                LaTeX-german-open-quote)
+                           LaTeX-german-open-quote
+                         "\"`"))
+           (close-quote (if (and (boundp 'LaTeX-german-close-quote)
+                                 LaTeX-german-close-quote)
+                            LaTeX-german-close-quote
+                          "\"'"))
+           (q-after-q (if (and (boundp 'LaTeX-german-quote-after-quote)
+                               LaTeX-german-quote-after-quote)
+                          LaTeX-german-quote-after-quote
+                        t)))
        (setq TeX-quote-language
-            `("german" ,open-quote ,close-quote ,q-after-q))))
+             `("german" ,open-quote ,close-quote ,q-after-q))))
    (setq LaTeX-babel-hyphen-language "german")
    ;; Fontification of quotation marks.
    (when (and (eq TeX-install-font-lock 'font-latex-setup)
-             (featurep 'font-latex))
+              (featurep 'font-latex))
      (font-latex-add-quotes '("\"`" "\"'"))
      (font-latex-add-quotes '("\">" "\"<" german))
      ;; Prevent "| from leading to color bleed.
diff --git a/style/gloss-italian.el b/style/gloss-italian.el
index 6c328b9..68bbcb4 100644
--- a/style/gloss-italian.el
+++ b/style/gloss-italian.el
@@ -34,11 +34,11 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (declare-function LaTeX-polyglossia-lang-option-member
-                 "polyglossia" (language option))
+                  "polyglossia" (language option))
 
 (defvar TeX-language-it-hook nil
   "Hook run for Italian texts.")
@@ -53,18 +53,18 @@
       LaTeX-env-args [TeX-arg-key-val LaTeX-polyglossia-italian-options-list]))
 
    (when (or (LaTeX-polyglossia-lang-option-member "italian" 
"babelshorthands=true")
-            (LaTeX-polyglossia-lang-option-member "italian" "babelshorthands"))
+             (LaTeX-polyglossia-lang-option-member "italian" 
"babelshorthands"))
      (unless (eq (car TeX-quote-language) 'override)
        (let ((open-quote (if (and (boundp 'LaTeX-italian-open-quote)
-                                 LaTeX-italian-open-quote)
-                            LaTeX-italian-open-quote
-                          "\"<"))
-            (close-quote (if (and (boundp 'LaTeX-italian-close-quote)
-                                  LaTeX-italian-close-quote)
-                             LaTeX-italian-close-quote
-                           "\">")))
-        (setq TeX-quote-language
-              `("italian" ,open-quote ,close-quote ,TeX-quote-after-quote))))
+                                  LaTeX-italian-open-quote)
+                             LaTeX-italian-open-quote
+                           "\"<"))
+             (close-quote (if (and (boundp 'LaTeX-italian-close-quote)
+                                   LaTeX-italian-close-quote)
+                              LaTeX-italian-close-quote
+                            "\">")))
+         (setq TeX-quote-language
+               `("italian" ,open-quote ,close-quote ,TeX-quote-after-quote))))
 
      ;; Fontification of quotation marks.
      (when (fboundp 'font-latex-add-quotes)
diff --git a/style/graphicx.el b/style/graphicx.el
index 42087bf..d7a6f04 100644
--- a/style/graphicx.el
+++ b/style/graphicx.el
@@ -38,8 +38,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-graphicx-key-val-options
   '(("bb")
@@ -93,25 +93,25 @@ If `TeX-engine' is set to symbol 'default (while
 is non-nil, add the keys \"page\" and \"pagebox\" to list of
 key-val's."
   (let ((crm-local-completion-map
-        (remove (assoc 32 crm-local-completion-map)
-                crm-local-completion-map))
-       (minibuffer-local-completion-map
-        (remove (assoc 32 minibuffer-local-completion-map)
-                minibuffer-local-completion-map)))
+         (remove (assoc 32 crm-local-completion-map)
+                 crm-local-completion-map))
+        (minibuffer-local-completion-map
+         (remove (assoc 32 minibuffer-local-completion-map)
+                 minibuffer-local-completion-map)))
     (TeX-argument-insert
      (TeX-read-key-val optional
-                      (if (and (or (and (eq TeX-engine 'default)
-                                        (not (TeX-PDF-from-DVI)))
-                                   (eq TeX-engine 'luatex))
-                               TeX-PDF-mode)
-                          (append '(("page")
-                                    ("pagebox" ("mediabox"
-                                                "cropbox"
-                                                "bleedbox"
-                                                "trimbox"
-                                                "artbox")))
-                                  LaTeX-graphicx-key-val-options)
-                        LaTeX-graphicx-key-val-options))
+                       (if (and (or (and (eq TeX-engine 'default)
+                                         (not (TeX-PDF-from-DVI)))
+                                    (eq TeX-engine 'luatex))
+                                TeX-PDF-mode)
+                           (append '(("page")
+                                     ("pagebox" ("mediabox"
+                                                 "cropbox"
+                                                 "bleedbox"
+                                                 "trimbox"
+                                                 "artbox")))
+                                   LaTeX-graphicx-key-val-options)
+                         LaTeX-graphicx-key-val-options))
      optional)))
 
 (defun LaTeX-includegraphics-extensions-list ()
@@ -119,54 +119,54 @@ key-val's."
 Return value is a list of regexps."
   (let ((temp (copy-sequence LaTeX-includegraphics-extensions)))
     (cond (;; 'default TeX-engine:
-          (eq TeX-engine 'default)
-          (if ;; we want to produce a pdf
-              (if TeX-PDF-mode
-                  ;; Return t if default compiler produces PDF,
-                  ;; nil for "Dvips" or "Dvipdfmx"
-                  (not (TeX-PDF-from-DVI))
-                ;; t if pdftex is used in dvi-mode
-                TeX-DVI-via-PDFTeX)
-              ;; We're using pdflatex in pdf-mode
-              (TeX-delete-duplicate-strings
-               (append LaTeX-includegraphics-pdftex-extensions
-                       temp))
-            ;; We're generating a .dvi to process with dvips or dvipdfmx
-            (progn
-              ;; dvipdfmx can handle jpeg, pdf and png for image formats.
-              (unless (and TeX-PDF-mode
-                           (string= (TeX-PDF-from-DVI) "Dvipdfmx"))
-                (dolist (x '("jpe?g" "pdf" "png"))
-                  (setq temp (delete x temp))))
-              (TeX-delete-duplicate-strings
-               (append LaTeX-includegraphics-dvips-extensions
-                       temp)))))
-         ;; Running luatex in pdf or dvi-mode:
-         ((eq TeX-engine 'luatex)
-          (if TeX-PDF-mode
-              (TeX-delete-duplicate-strings
-               (append LaTeX-includegraphics-pdftex-extensions
-                       temp))
-            (progn
-              (dolist (x '("jpe?g" "pdf" "png"))
-                (setq temp (delete x temp)))
-              (TeX-delete-duplicate-strings
-               (append LaTeX-includegraphics-dvips-extensions
-                       temp)))))
-         ;; Running xetex in any mode:
-         ((eq TeX-engine 'xetex)
-          (TeX-delete-duplicate-strings
-           (append LaTeX-includegraphics-xetex-extensions
-                   temp)))
-         ;; For anything else
-         (t
-          (if (and TeX-PDF-mode
-                   (string= (TeX-PDF-from-DVI) "Dvipdfmx"))
-              ;; dvipdfmx can handle the same image formats as dvips.
-              (TeX-delete-duplicate-strings
-               (append LaTeX-includegraphics-dvips-extensions
-                       temp))
-            temp)))))
+           (eq TeX-engine 'default)
+           (if ;; we want to produce a pdf
+               (if TeX-PDF-mode
+                   ;; Return t if default compiler produces PDF,
+                   ;; nil for "Dvips" or "Dvipdfmx"
+                   (not (TeX-PDF-from-DVI))
+                 ;; t if pdftex is used in dvi-mode
+                 TeX-DVI-via-PDFTeX)
+               ;; We're using pdflatex in pdf-mode
+               (TeX-delete-duplicate-strings
+                (append LaTeX-includegraphics-pdftex-extensions
+                        temp))
+             ;; We're generating a .dvi to process with dvips or dvipdfmx
+             (progn
+               ;; dvipdfmx can handle jpeg, pdf and png for image formats.
+               (unless (and TeX-PDF-mode
+                            (string= (TeX-PDF-from-DVI) "Dvipdfmx"))
+                 (dolist (x '("jpe?g" "pdf" "png"))
+                   (setq temp (delete x temp))))
+               (TeX-delete-duplicate-strings
+                (append LaTeX-includegraphics-dvips-extensions
+                        temp)))))
+          ;; Running luatex in pdf or dvi-mode:
+          ((eq TeX-engine 'luatex)
+           (if TeX-PDF-mode
+               (TeX-delete-duplicate-strings
+                (append LaTeX-includegraphics-pdftex-extensions
+                        temp))
+             (progn
+               (dolist (x '("jpe?g" "pdf" "png"))
+                 (setq temp (delete x temp)))
+               (TeX-delete-duplicate-strings
+                (append LaTeX-includegraphics-dvips-extensions
+                        temp)))))
+          ;; Running xetex in any mode:
+          ((eq TeX-engine 'xetex)
+           (TeX-delete-duplicate-strings
+            (append LaTeX-includegraphics-xetex-extensions
+                    temp)))
+          ;; For anything else
+          (t
+           (if (and TeX-PDF-mode
+                    (string= (TeX-PDF-from-DVI) "Dvipdfmx"))
+               ;; dvipdfmx can handle the same image formats as dvips.
+               (TeX-delete-duplicate-strings
+                (append LaTeX-includegraphics-dvips-extensions
+                        temp))
+             temp)))))
 
 (defun LaTeX-includegraphics-extensions (&optional list)
   "Return appropriate extensions for input files to \\includegraphics.
@@ -187,19 +187,19 @@ May be reset with `\\[universal-argument] 
\\[TeX-normal-mode]'.")
 Offers all graphic files found in the TeX search path.  See
 `LaTeX-includegraphics-read-file' for more."
   (let ((LaTeX-includegraphics-extensions
-        (LaTeX-includegraphics-extensions-list)))
+         (LaTeX-includegraphics-extensions-list)))
     (unless LaTeX-includegraphics-global-files
       (message "Searching for graphic files...")
       (setq LaTeX-includegraphics-global-files
-           (TeX-search-files-by-type
-            'graphics 'global t
-            LaTeX-includegraphics-strip-extension-flag))
+            (TeX-search-files-by-type
+             'graphics 'global t
+             LaTeX-includegraphics-strip-extension-flag))
       (message "Searching for graphic files...done"))
     (completing-read
      "Image file: "
      (append
       (TeX-search-files-by-type 'graphics 'local t
-                               LaTeX-includegraphics-strip-extension-flag)
+                                LaTeX-includegraphics-strip-extension-flag)
       LaTeX-includegraphics-global-files)
      nil nil nil)))
 
@@ -214,7 +214,7 @@ subdirectories and inserts the relative file name.  See
     "Image file: " nil nil nil nil
     (lambda (fname)
       (or (file-directory-p fname)
-         (string-match (LaTeX-includegraphics-extensions) fname))))
+          (string-match (LaTeX-includegraphics-extensions) fname))))
    (TeX-master-directory)))
 
 (defun LaTeX-arg-includegraphics (optional)
@@ -222,9 +222,9 @@ subdirectories and inserts the relative file name.  See
   (let ((image-file (funcall LaTeX-includegraphics-read-file)))
     (TeX-argument-insert
      (if LaTeX-includegraphics-strip-extension-flag
-        (replace-regexp-in-string (LaTeX-includegraphics-extensions)
-                                  ""
-                                  image-file)
+         (replace-regexp-in-string (LaTeX-includegraphics-extensions)
+                                   ""
+                                   image-file)
        image-file)
      optional)))
 
@@ -236,49 +236,49 @@ subdirectories and inserts the relative file name.  See
 
     '("resizebox"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Width")
-                   (append '("\\width" "!")
-                           (mapcar
-                            (lambda (x) (concat TeX-esc (car x)))
-                            (LaTeX-length-list))))
+                    (TeX-argument-prompt nil nil "Width")
+                    (append '("\\width" "!")
+                            (mapcar
+                             (lambda (x) (concat TeX-esc (car x)))
+                             (LaTeX-length-list))))
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Height")
-                   (append '("\\height" "\\totalheight" "\\depth" "!")
-                           (mapcar
-                            (lambda (x) (concat TeX-esc (car x)))
-                            (LaTeX-length-list))))
+                    (TeX-argument-prompt nil nil "Height")
+                    (append '("\\height" "\\totalheight" "\\depth" "!")
+                            (mapcar
+                             (lambda (x) (concat TeX-esc (car x)))
+                             (LaTeX-length-list))))
       "Argument")
 
     '("resizebox*"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Width")
-                   (append '("\\width" "!")
-                           (mapcar
-                            (lambda (x) (concat TeX-esc (car x)))
-                            (LaTeX-length-list))))
+                    (TeX-argument-prompt nil nil "Width")
+                    (append '("\\width" "!")
+                            (mapcar
+                             (lambda (x) (concat TeX-esc (car x)))
+                             (LaTeX-length-list))))
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Height")
-                   (append '("\\height" "\\totalheight" "\\depth" "!")
-                           (mapcar
-                            (lambda (x) (concat TeX-esc (car x)))
-                            (LaTeX-length-list))))
+                    (TeX-argument-prompt nil nil "Height")
+                    (append '("\\height" "\\totalheight" "\\depth" "!")
+                            (mapcar
+                             (lambda (x) (concat TeX-esc (car x)))
+                             (LaTeX-length-list))))
       "Argument")
 
     '("rotatebox" (TeX-arg-conditional (member "graphics" (TeX-style-list))
-                                      ()
-                                      ([ TeX-arg-key-val (("x") ("y") 
("origin") ("units")) ]))
+                                       ()
+                                       ([ TeX-arg-key-val (("x") ("y") 
("origin") ("units")) ]))
       "Angle" "Argument")
 
     '("scalebox" "Horizontal scale" [ "Vertical scale" ] "Argument")
 
     '("includegraphics" (TeX-arg-conditional (member "graphics" 
(TeX-style-list))
-                                            (["llx,lly"] ["urx,ury"])
-                                            ([ 
LaTeX-arg-graphicx-includegraphics-key-val ]))
+                                             (["llx,lly"] ["urx,ury"])
+                                             ([ 
LaTeX-arg-graphicx-includegraphics-key-val ]))
       LaTeX-arg-includegraphics)
 
     '("includegraphics*" (TeX-arg-conditional (member "graphics" 
(TeX-style-list))
-                                             (["llx,lly"] ["urx,ury"])
-                                             ([ 
LaTeX-arg-graphicx-includegraphics-key-val ]))
+                                              (["llx,lly"] ["urx,ury"])
+                                              ([ 
LaTeX-arg-graphicx-includegraphics-key-val ]))
       LaTeX-arg-includegraphics)
 
     '("graphicspath" t)
@@ -289,22 +289,22 @@ subdirectories and inserts the relative file name.  See
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("reflectbox" "{")
-                               ("resizebox" "*{{{")
-                               ("rotatebox" "[{{")
-                               ("scalebox" "{[{"))
-                             'textual)
+                                ("resizebox" "*{{{")
+                                ("rotatebox" "[{{")
+                                ("scalebox" "{[{"))
+                              'textual)
      (font-latex-add-keywords '(("includegraphics" "*[[{"))
-                             'reference)
+                              'reference)
      (font-latex-add-keywords '(("graphicspath"              "{")
-                               ("DeclareGraphicsExtensions" "{")
-                               ("DeclareGraphicsRule"       "{{{{"))
-                             'function))
+                                ("DeclareGraphicsExtensions" "{")
+                                ("DeclareGraphicsRule"       "{{{{"))
+                              'function))
 
    ;; Option management
    (if (and (LaTeX-provided-package-options-member "graphicx" "dvipdfmx")
-           (not (eq TeX-engine 'xetex)))
+            (not (eq TeX-engine 'xetex)))
        (setq TeX-PDF-from-DVI "Dvipdfmx")))
  TeX-dialect)
 
diff --git a/style/harvard.el b/style/harvard.el
index fdd3233..6373af3 100644
--- a/style/harvard.el
+++ b/style/harvard.el
@@ -56,10 +56,10 @@
       (TeX-arg-eval completing-read "Citation style: " '(("agsm") ("dcu"))))
     '("citationmode"
       (TeX-arg-eval completing-read "Citation mode: "
-                   '(("full") ("abbr") ("default"))))
+                    '(("full") ("abbr") ("default"))))
     '("harvardparenthesis"
       (TeX-arg-eval completing-read "Harvardparenthesis: "
-                   '(("round") ("curly") ("angle") ("square"))))
+                    '(("round") ("curly") ("angle") ("square"))))
     '("bibliographystyle"
       (TeX-arg-eval
        completing-read "Bibliography style: "
@@ -69,52 +69,52 @@
       "Complete citation" "Year" TeX-arg-define-cite))
 
    (setq TeX-complete-list
-        (append '(("\\\\citeasnoun\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
-                   1 LaTeX-bibitem-list "}")
-                  ("\\\\citeasnoun{\\([^{}\n\r\\%,]*\\)" 1
-                   LaTeX-bibitem-list "}")
-                  ("\\\\possessivecite\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
-                   1 LaTeX-bibitem-list "}")
-                  ("\\\\possessivecite{\\([^{}\n\r\\%,]*\\)" 1
-                   LaTeX-bibitem-list "}")
-                  ("\\\\citename\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
-                   1 LaTeX-bibitem-list "}")
-                  ("\\\\citename{\\([^{}\n\r\\%,]*\\)" 1
-                   LaTeX-bibitem-list "}")
-                  ("\\\\citeaffixed\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
-                   1 LaTeX-bibitem-list "}")
-                  ("\\\\citeaffixed{\\([^{}\n\r\\%,]*\\)" 1
-                   LaTeX-bibitem-list "}")
-                  ("\\\\citeaffixed{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
-                   2 LaTeX-bibitem-list)
-                  ("\\\\citeyear\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
-                   1 LaTeX-bibitem-list "}")
-                  ("\\\\citeyear{\\([^{}\n\r\\%,]*\\)" 1
-                   LaTeX-bibitem-list "}")
-                  ("\\\\citeyear{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
-                   2 LaTeX-bibitem-list))
-                TeX-complete-list))
+         (append '(("\\\\citeasnoun\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
+                    1 LaTeX-bibitem-list "}")
+                   ("\\\\citeasnoun{\\([^{}\n\r\\%,]*\\)" 1
+                    LaTeX-bibitem-list "}")
+                   ("\\\\possessivecite\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
+                    1 LaTeX-bibitem-list "}")
+                   ("\\\\possessivecite{\\([^{}\n\r\\%,]*\\)" 1
+                    LaTeX-bibitem-list "}")
+                   ("\\\\citename\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
+                    1 LaTeX-bibitem-list "}")
+                   ("\\\\citename{\\([^{}\n\r\\%,]*\\)" 1
+                    LaTeX-bibitem-list "}")
+                   ("\\\\citeaffixed\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
+                    1 LaTeX-bibitem-list "}")
+                   ("\\\\citeaffixed{\\([^{}\n\r\\%,]*\\)" 1
+                    LaTeX-bibitem-list "}")
+                   ("\\\\citeaffixed{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
+                    2 LaTeX-bibitem-list)
+                   ("\\\\citeyear\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
+                    1 LaTeX-bibitem-list "}")
+                   ("\\\\citeyear{\\([^{}\n\r\\%,]*\\)" 1
+                    LaTeX-bibitem-list "}")
+                   ("\\\\citeyear{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
+                    2 LaTeX-bibitem-list))
+                 TeX-complete-list))
 
    (setq LaTeX-auto-regexp-list
-        (append '(("\\\\harvarditem{\\([a-zA-Z][^%#'()={}]*\\)}{\\([0-9][^, 
%\"#'()={}]*\\)}{\\([a-zA-Z][^, %\"#'()={}]*\\)}" 3 LaTeX-auto-bibitem)
-                  
("\\\\harvarditem\\[[^][\n\r]+\\]{\\([a-zA-Z][^%#'()={}]*\\)}{\\([0-9][^, 
%\"#'()={}]*\\)}{\\([a-zA-Z][^, %\"#'()={}]*\\)}" 3 LaTeX-auto-bibitem)
-                  )
-                LaTeX-auto-regexp-list))
+         (append '(("\\\\harvarditem{\\([a-zA-Z][^%#'()={}]*\\)}{\\([0-9][^, 
%\"#'()={}]*\\)}{\\([a-zA-Z][^, %\"#'()={}]*\\)}" 3 LaTeX-auto-bibitem)
+                   
("\\\\harvarditem\\[[^][\n\r]+\\]{\\([a-zA-Z][^%#'()={}]*\\)}{\\([0-9][^, 
%\"#'()={}]*\\)}{\\([a-zA-Z][^, %\"#'()={}]*\\)}" 3 LaTeX-auto-bibitem)
+                   )
+                 LaTeX-auto-regexp-list))
 
    (setq LaTeX-item-list
-        (cons '("thebibliography" . LaTeX-item-harvardbib)
-              LaTeX-item-list))
+         (cons '("thebibliography" . LaTeX-item-harvardbib)
+               LaTeX-item-list))
 
    ;; Tell RefTeX
    (when (and LaTeX-reftex-cite-format-auto-activate
-             (fboundp 'reftex-set-cite-format))
+              (fboundp 'reftex-set-cite-format))
      (reftex-set-cite-format 'harvard)))
  TeX-dialect)
 
 (defun LaTeX-env-harvardbib (environment &optional _ignore)
   "Insert ENVIRONMENT with label for harvarditem."
   (LaTeX-insert-environment environment
-                           (concat TeX-grop "xx" TeX-grcl))
+                            (concat TeX-grop "xx" TeX-grcl))
   (end-of-line 0)
   (delete-char 1)
   (delete-horizontal-space)
@@ -126,8 +126,8 @@
   (TeX-insert-macro "harvarditem"))
 
 (defvar LaTeX-harvard-package-options '("full" "abbr" "default"
-                                       "agsmcite" "dcucite" "round"
-                                       "curly" "angle" "square" "none")
+                                        "agsmcite" "dcucite" "round"
+                                        "curly" "angle" "square" "none")
   "Package options for the harvard package.")
 
 ;; harvard.el ends here
diff --git a/style/hologo.el b/style/hologo.el
index d1cbdbe..373ba9d 100644
--- a/style/hologo.el
+++ b/style/hologo.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-hologo-logo-names
   '("(La)TeX"
@@ -101,9 +101,9 @@
 
 (defvar LaTeX-hologo-key-val-options-local
   '(("variant" ("sf" "sc"                          ; BibTeX
-               "lift"                             ; SliTeX
-               "narrow" "simple"                  ; SliTeX, ConTeXt
-               "space"  "hyphen" "runtogether"))) ; plainTeX
+                "lift"                             ; SliTeX
+                "narrow" "simple"                  ; SliTeX, ConTeXt
+                "space"  "hyphen" "runtogether"))) ; plainTeX
   "Local key=value options for hologo macros.")
 
 (TeX-add-style-hook
@@ -113,10 +113,10 @@
 
     ;; Insert logo macros
     '("hologo" (TeX-arg-eval completing-read
-                            "Logo name: " LaTeX-hologo-logo-names))
+                             "Logo name: " LaTeX-hologo-logo-names))
 
     '("Hologo" (TeX-arg-eval completing-read
-                            "Logo name: " LaTeX-hologo-logo-names))
+                             "Logo name: " LaTeX-hologo-logo-names))
 
     ;; Setup macros
     '("hologoSetup" (TeX-arg-key-val LaTeX-hologo-key-val-options-global))
@@ -124,93 +124,93 @@
     '("hologoLogoSetup"
       (TeX-arg-eval
        (lambda ()
-        (let* ((logo   (completing-read "Logo name: " LaTeX-hologo-logo-names))
-               (keyval (TeX-read-key-val
-                        nil
-                        (cond ((string= logo "BibTeX")
-                               (append '(("variant" ("sf" "sc")))
-                                       LaTeX-hologo-key-val-options-global))
-                              ((string= logo "ConTeXt")
-                               (append '(("variant" ("narrow" "simple")))
-                                       LaTeX-hologo-key-val-options-global))
-                              ((string= logo "plainTeX")
-                               (append '(("variant" ("space" "hyphen" 
"runtogether")))
-                                       LaTeX-hologo-key-val-options-global))
-                              ((or (string= logo "SLiTeX")
-                                   (string= logo "SliTeX"))
-                               (append '(("variant" ("lift" "narrow" "lift")))
-                                       LaTeX-hologo-key-val-options-global))
-                              (t
-                               LaTeX-hologo-key-val-options-global)))))
-          (TeX-argument-insert logo nil)
-          (format "%s" keyval)))))
+         (let* ((logo   (completing-read "Logo name: " 
LaTeX-hologo-logo-names))
+                (keyval (TeX-read-key-val
+                         nil
+                         (cond ((string= logo "BibTeX")
+                                (append '(("variant" ("sf" "sc")))
+                                        LaTeX-hologo-key-val-options-global))
+                               ((string= logo "ConTeXt")
+                                (append '(("variant" ("narrow" "simple")))
+                                        LaTeX-hologo-key-val-options-global))
+                               ((string= logo "plainTeX")
+                                (append '(("variant" ("space" "hyphen" 
"runtogether")))
+                                        LaTeX-hologo-key-val-options-global))
+                               ((or (string= logo "SLiTeX")
+                                    (string= logo "SliTeX"))
+                                (append '(("variant" ("lift" "narrow" "lift")))
+                                        LaTeX-hologo-key-val-options-global))
+                               (t
+                                LaTeX-hologo-key-val-options-global)))))
+           (TeX-argument-insert logo nil)
+           (format "%s" keyval)))))
 
     '("hologoDriverSetup" (TeX-arg-eval completing-read
-                                       "Driver: "
-                                       '("pdftex"  "luatex"
-                                         "dvipdfm" "dvipdfmx"
-                                         "dvips"   "dvipsone" "xdvi"
-                                         "xetex"   "vtex"     
"driverfallback")))
+                                        "Driver: "
+                                        '("pdftex"  "luatex"
+                                          "dvipdfm" "dvipdfmx"
+                                          "dvips"   "dvipsone" "xdvi"
+                                          "xetex"   "vtex"     
"driverfallback")))
 
     '("hologoFontSetup"
       (TeX-arg-key-val (("general") ("bibsf")
-                       ("rm") ("sc") ("sf") ("sy") ("logo"))))
+                        ("rm") ("sc") ("sf") ("sy") ("logo"))))
 
     '("hologoLogoFontSetup"
       (TeX-arg-eval
        (lambda ()
-        (let* ((logo   (completing-read "Logo name: "
-                                        '("BibTeX"
-                                          "ExTeX"
-                                          "SliTeX"
-                                          "AmS"
-                                          "NTS"
-                                          "KOMAScript"
-                                          "METAFONT"
-                                          "METAPOST")))
-               (keyval (TeX-read-key-val
-                        nil
-                        (cond ((string= logo "BibTeX")
-                               '(("bibsf") ("sc")))
-                              ((string= logo "ExTeX")
-                               '(("rm") ("sy")))
-                              ((string= logo "SliTeX")
-                               '(("rm") ("sc")))
-                              ((or (string= logo "AmS")
-                                   (string= logo "NTS"))
-                               '(("sy")))
-                              ((string= logo "KOMAScript")
-                               '(("sf")))
-                              ((or (string= logo "METAFONT")
-                                   (string= logo "METAPOST"))
-                               '(("logo")))
-                              (t
-                               nil)))))
-          (TeX-argument-insert logo nil)
-          (format "%s" keyval)))))
+         (let* ((logo   (completing-read "Logo name: "
+                                         '("BibTeX"
+                                           "ExTeX"
+                                           "SliTeX"
+                                           "AmS"
+                                           "NTS"
+                                           "KOMAScript"
+                                           "METAFONT"
+                                           "METAPOST")))
+                (keyval (TeX-read-key-val
+                         nil
+                         (cond ((string= logo "BibTeX")
+                                '(("bibsf") ("sc")))
+                               ((string= logo "ExTeX")
+                                '(("rm") ("sy")))
+                               ((string= logo "SliTeX")
+                                '(("rm") ("sc")))
+                               ((or (string= logo "AmS")
+                                    (string= logo "NTS"))
+                                '(("sy")))
+                               ((string= logo "KOMAScript")
+                                '(("sf")))
+                               ((or (string= logo "METAFONT")
+                                    (string= logo "METAPOST"))
+                                '(("logo")))
+                               (t
+                                nil)))))
+           (TeX-argument-insert logo nil)
+           (format "%s" keyval)))))
 
     ;; Additional user macros
     '("hologoVariant"
       (TeX-arg-eval completing-read
-                   "Logo name: " LaTeX-hologo-logo-names)
+                    "Logo name: " LaTeX-hologo-logo-names)
       (TeX-arg-eval
        (lambda ()
-        (let ((setup (TeX-read-key-val
-                      nil
-                      (append LaTeX-hologo-key-val-options-local
-                              LaTeX-hologo-key-val-options-global))))
-          (format "%s" setup)))))
+         (let ((setup (TeX-read-key-val
+                       nil
+                       (append LaTeX-hologo-key-val-options-local
+                               LaTeX-hologo-key-val-options-global))))
+           (format "%s" setup)))))
 
     '("HologoVariant"
       (TeX-arg-eval completing-read
-                   "Logo name: " LaTeX-hologo-logo-names)
+                    "Logo name: " LaTeX-hologo-logo-names)
       (TeX-arg-eval
        (lambda ()
-        (let ((setup (TeX-read-key-val
-                      nil
-                      (append LaTeX-hologo-key-val-options-local
-                              LaTeX-hologo-key-val-options-global))))
-          (format "%s" setup)))))
+         (let ((setup (TeX-read-key-val
+                       nil
+                       (append LaTeX-hologo-key-val-options-local
+                               LaTeX-hologo-key-val-options-global))))
+           (format "%s" setup)))))
 
     '("hologoList" 0)
 
@@ -218,20 +218,20 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("hologo"   "{")
-                               ("Hologo"   "{"))
-                             'textual)
+                                ("Hologo"   "{"))
+                              'textual)
      (font-latex-add-keywords '(("hologoSetup"         "{")
-                               ("hologoLogoSetup"     "{{")
-                               ("hologoDriverSetup"   "{")
-                               ("hologoFontSetup"     "{")
-                               ("hologoLogoFontSetup" "{{")
-                               ("hologoVariant"       "{{")
-                               ("HologoVariant"       "{{")
-                               ("hologoList"          "")
-                               ("hologoEntry"         "{{{"))
-                             'function)))
+                                ("hologoLogoSetup"     "{{")
+                                ("hologoDriverSetup"   "{")
+                                ("hologoFontSetup"     "{")
+                                ("hologoLogoFontSetup" "{{")
+                                ("hologoVariant"       "{{")
+                                ("HologoVariant"       "{{")
+                                ("hologoList"          "")
+                                ("hologoEntry"         "{{{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-hologo-package-options nil
diff --git a/style/hyperref.el b/style/hyperref.el
index b2dfa0a..21b9d1d 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -35,11 +35,11 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 (defvar LaTeX-hyperref-package-options-list
   '(;; See https://www.tug.org/applications/hyperref/manual.html#x1-40003
@@ -286,7 +286,7 @@
    ;; `LaTeX-document-regexp':
    (unless (string-match-p "Form" LaTeX-document-regexp)
      (set (make-local-variable 'LaTeX-document-regexp)
-         (concat LaTeX-document-regexp "\\|" "Form")))
+          (concat LaTeX-document-regexp "\\|" "Form")))
 
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
@@ -297,26 +297,26 @@
    ;; In hyperref package, \url macro is redefined and \url|...| can't be used,
    ;; while it's possible when only url package (required by hyperref) is 
loaded
    (setq LaTeX-verbatim-macros-with-delims-local
-        (remove "url"  LaTeX-verbatim-macros-with-delims-local))
+         (remove "url"  LaTeX-verbatim-macros-with-delims-local))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("href" "[{{")
-                               ("nolinkurl" "{")
-                               ("hyperbaseurl" "{")
-                               ("hyperimage" "{{")
-                               ("hyperdef" "{{{")
-                               ("hyperref" "{{{{")
-                               ("hyperlink" "{{")
-                               ("hypertarget" "{{")
-                               ("autoref" "*{")
-                               ("ref" "*{")
-                               ("pageref" "*{")
-                               ("autopageref" "*{"))
-                             'reference)
+                                ("nolinkurl" "{")
+                                ("hyperbaseurl" "{")
+                                ("hyperimage" "{{")
+                                ("hyperdef" "{{{")
+                                ("hyperref" "{{{{")
+                                ("hyperlink" "{{")
+                                ("hypertarget" "{{")
+                                ("autoref" "*{")
+                                ("ref" "*{")
+                                ("pageref" "*{")
+                                ("autopageref" "*{"))
+                              'reference)
      (font-latex-add-keywords '(("hypersetup" "{"))
-                             'function)
+                              'function)
      ;; For syntactic fontification, e.g. verbatim constructs.
      (font-latex-set-syntactic-keywords))
 
@@ -327,8 +327,8 @@
 
    ;; Activate RefTeX reference style.
    (and LaTeX-reftex-ref-style-auto-activate
-       (fboundp 'reftex-ref-style-activate)
-       (reftex-ref-style-activate "Hyperref")))
+        (fboundp 'reftex-ref-style-activate)
+        (reftex-ref-style-activate "Hyperref")))
  TeX-dialect)
 
 (defun LaTeX-hyperref-package-options ()
diff --git a/style/icelandic.el b/style/icelandic.el
index 622b00a..b3cf1e4 100644
--- a/style/icelandic.el
+++ b/style/icelandic.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (defvar LaTeX-icelandic-mode-syntax-table
   (copy-syntax-table LaTeX-mode-syntax-table)
diff --git a/style/ifluatex.el b/style/ifluatex.el
index 3986fdd..c32de5c 100644
--- a/style/ifluatex.el
+++ b/style/ifluatex.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defun LaTeX-ifluatex-set-TeX-exit-mark (_optional)
   "Discard OPTIONAL and set `TeX-exit-mark' to current point."
@@ -61,10 +61,10 @@
    (setq TeX-check-engine-list nil)
 
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("luatexversion")
-                               ("luatexrevision"))
-                             'function)))
+                                ("luatexrevision"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-ifluatex-package-options nil
diff --git a/style/imakeidx.el b/style/imakeidx.el
index f14cfeb..325631e 100644
--- a/style/imakeidx.el
+++ b/style/imakeidx.el
@@ -60,9 +60,9 @@
    ;; if `imakeidx' is loaded after `fancyhdr'.
    (unless (member "fancyhdr" TeX-active-styles)
      (setq LaTeX-imakeidx-indexsetup-options
-          (append LaTeX-imakeidx-indexsetup-options
-                  `(("firstpagestyle" ,(LaTeX-pagestyle-list)))
-                  '(("headers")))))
+           (append LaTeX-imakeidx-indexsetup-options
+                   `(("firstpagestyle" ,(LaTeX-pagestyle-list)))
+                   '(("headers")))))
 
    (TeX-add-symbols
     '("makeindex" [ (TeX-arg-key-val LaTeX-imakeidx-makeindex-options) ])
@@ -88,11 +88,11 @@
    ;; Completion for the |see macro and RefTeX support taken from
    ;; `makeidx.el'
    (setq TeX-complete-list
-        (append
-         '(("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list))
-         TeX-complete-list))
+         (append
+          '(("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list))
+          TeX-complete-list))
    (and (fboundp 'reftex-add-index-macros)
-       (reftex-add-index-macros '(default))))
+        (reftex-add-index-macros '(default))))
  TeX-dialect)
 
 (defvar LaTeX-imakeidx-package-options
diff --git a/style/index.el b/style/index.el
index d541341..0d83566 100644
--- a/style/index.el
+++ b/style/index.el
@@ -56,29 +56,29 @@
 
    ;; Parsing index macros
    (setq LaTeX-auto-regexp-list
-        (append
+         (append
 
-         ;; The first regexp is faster, but less accurate
-         ;;'(("\\\\index\\*?\\[[^{}]*\\]{\\([^}]*\\)"
-         ;;   1 LaTeX-auto-index-entry))
+          ;; The first regexp is faster, but less accurate
+          ;;'(("\\\\index\\*?\\[[^{}]*\\]{\\([^}]*\\)"
+          ;;   1 LaTeX-auto-index-entry))
 
-         ;; The second regexp is very good, but slower.
-         
'(("\\\\index\\*?\\[[^{}]*\\]{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
-            1 LaTeX-auto-index-entry))
+          ;; The second regexp is very good, but slower.
+          
'(("\\\\index\\*?\\[[^{}]*\\]{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
+             1 LaTeX-auto-index-entry))
 
-         LaTeX-auto-regexp-list))
+          LaTeX-auto-regexp-list))
 
    ;; Completion for the index entries in \index and |see commands
    (setq TeX-complete-list
-        (append
-         '(("\\\\index\\*?\\(\\[[^][{}]*\\]\\)?{\\([^{}\n\r]*\\)" 
-            2 LaTeX-index-entry-list)
-           ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list))
-         TeX-complete-list))
+         (append
+          '(("\\\\index\\*?\\(\\[[^][{}]*\\]\\)?{\\([^{}\n\r]*\\)" 
+             2 LaTeX-index-entry-list)
+            ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list))
+          TeX-complete-list))
 
    ;; RefTeX support
    (and (fboundp 'reftex-add-index-macros)
-       (reftex-add-index-macros '(index))))
+        (reftex-add-index-macros '(index))))
  TeX-dialect)
 
 (defvar LaTeX-index-package-options nil
diff --git a/style/inputenc.el b/style/inputenc.el
index 613f2dc..c04d477 100644
--- a/style/inputenc.el
+++ b/style/inputenc.el
@@ -35,39 +35,39 @@
   ;; separate the condition in three to silence the byte compiler
   (if (boundp 'latex-inputenc-coding-alist)
       (when (fboundp 'latexenc-coding-system-to-inputenc)
-       (when (fboundp 'latexenc-inputenc-to-coding-system)
-         (let ((default (latexenc-coding-system-to-inputenc
-                         (or coding-system-for-write
-                             buffer-file-coding-system)))
-               (selected 'undecided))
-           (setq selected (completing-read
-                           (if default
-                               (format "Input encoding (default %s): " default)
-                             "Input encoding: ")
-                           (mapcar 'car latex-inputenc-coding-alist)
-                           nil
-                           nil
-                           nil
-                           nil
-                           default))
-
-           ;; if necessary offer to set the coding system for saving
-           ;; this buffer based on the selected input encoding
-           (when (and (null
-                       (coding-system-equal
-                        (coding-system-base
-                         (or coding-system-for-write
-                             buffer-file-coding-system))
-                        (coding-system-base
-                         (latexenc-inputenc-to-coding-system selected))))
-                      (y-or-n-p "Set coding system for saving this buffer? ")
-                      (set-buffer-file-coding-system
-                       (coding-system-base
-                        (latexenc-inputenc-to-coding-system selected)))
-                      (message nil)))
-
-           ;; return selected input encoding
-           selected)))
+        (when (fboundp 'latexenc-inputenc-to-coding-system)
+          (let ((default (latexenc-coding-system-to-inputenc
+                          (or coding-system-for-write
+                              buffer-file-coding-system)))
+                (selected 'undecided))
+            (setq selected (completing-read
+                            (if default
+                                (format "Input encoding (default %s): " 
default)
+                              "Input encoding: ")
+                            (mapcar 'car latex-inputenc-coding-alist)
+                            nil
+                            nil
+                            nil
+                            nil
+                            default))
+
+            ;; if necessary offer to set the coding system for saving
+            ;; this buffer based on the selected input encoding
+            (when (and (null
+                        (coding-system-equal
+                         (coding-system-base
+                          (or coding-system-for-write
+                              buffer-file-coding-system))
+                         (coding-system-base
+                          (latexenc-inputenc-to-coding-system selected))))
+                       (y-or-n-p "Set coding system for saving this buffer? ")
+                       (set-buffer-file-coding-system
+                        (coding-system-base
+                         (latexenc-inputenc-to-coding-system selected)))
+                       (message nil)))
+
+            ;; return selected input encoding
+            selected)))
     (TeX-read-string "Input encoding: ")))
 
 (defun LaTeX-arg-inputenc-inputenc (_optional)
diff --git a/style/italian.el b/style/italian.el
index 6a6a996..0d202b5 100644
--- a/style/italian.el
+++ b/style/italian.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (defvar TeX-language-it-hook nil
   "Hook run for Italian texts.")
@@ -49,15 +49,15 @@
    ;; variables are to be deleted in future versions. (now = 2005-04-01)
    (unless (eq (car TeX-quote-language) 'override)
      (let ((open-quote (if (and (boundp 'LaTeX-italian-open-quote)
-                               LaTeX-italian-open-quote)
-                          LaTeX-italian-open-quote
-                        "\"<"))
-          (close-quote (if (and (boundp 'LaTeX-italian-close-quote)
-                                LaTeX-italian-close-quote)
-                           LaTeX-italian-close-quote
-                         "\">")))
+                                LaTeX-italian-open-quote)
+                           LaTeX-italian-open-quote
+                         "\"<"))
+           (close-quote (if (and (boundp 'LaTeX-italian-close-quote)
+                                 LaTeX-italian-close-quote)
+                            LaTeX-italian-close-quote
+                          "\">")))
        (setq TeX-quote-language
-            `("italian" ,open-quote ,close-quote ,TeX-quote-after-quote))))
+             `("italian" ,open-quote ,close-quote ,TeX-quote-after-quote))))
    ;; Fontification of quotation marks.
    (when (fboundp 'font-latex-add-quotes)
      (font-latex-add-quotes '("\"<" "\">" french)))
diff --git a/style/jarticle.el b/style/jarticle.el
index 16f897d..d293ff0 100644
--- a/style/jarticle.el
+++ b/style/jarticle.el
@@ -18,7 +18,7 @@
  (lambda ()
    (LaTeX-largest-level-set "section")
    (LaTeX-add-counters "part" "section" "subsection" "subsubsection" 
"paragraph"
-                      "subparagraph" "figure" "table")
+                       "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings")
    (LaTeX-add-environments "abstract"))
  TeX-dialect)
diff --git a/style/jbook.el b/style/jbook.el
index 831aa9a..b1e7daa 100644
--- a/style/jbook.el
+++ b/style/jbook.el
@@ -18,7 +18,7 @@
  (lambda ()
    (LaTeX-largest-level-set "part")
    (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection"
-                      "paragraph" "subparagraph" "figure" "table")
+                       "paragraph" "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings"))
  TeX-dialect)
 
diff --git a/style/jreport.el b/style/jreport.el
index 9f8a333..613f3ff 100644
--- a/style/jreport.el
+++ b/style/jreport.el
@@ -18,7 +18,7 @@
  (lambda ()
    (LaTeX-largest-level-set "chapter")
    (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection"
-                      "paragraph" "subparagraph" "figure" "table")
+                       "paragraph" "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings")
    (LaTeX-add-environments "abstract"))
  TeX-dialect)
diff --git a/style/jsarticle.el b/style/jsarticle.el
index 7a3aac7..519aa7e 100644
--- a/style/jsarticle.el
+++ b/style/jsarticle.el
@@ -22,7 +22,7 @@
  (lambda ()
    (LaTeX-largest-level-set "section")
    (LaTeX-add-counters "part" "section" "subsection" "subsubsection" 
"paragraph"
-                      "subparagraph" "figure" "table")
+                       "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings")
    (LaTeX-add-environments "abstract"))
  TeX-dialect)
diff --git a/style/jsbook.el b/style/jsbook.el
index 28530fb..161e81d 100644
--- a/style/jsbook.el
+++ b/style/jsbook.el
@@ -23,11 +23,11 @@
  (lambda ()
    (if (LaTeX-provided-class-options-member "jsbook" "report")
        (progn
-        (LaTeX-largest-level-set "chapter")
-        (LaTeX-add-environments "abstract"))
+         (LaTeX-largest-level-set "chapter")
+         (LaTeX-add-environments "abstract"))
      (LaTeX-largest-level-set "part"))
    (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection"
-                      "paragraph" "subparagraph" "figure" "table")
+                       "paragraph" "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings"))
  TeX-dialect)
 
diff --git a/style/jsreport.el b/style/jsreport.el
index 0c05c20..1a71f1b 100644
--- a/style/jsreport.el
+++ b/style/jsreport.el
@@ -51,7 +51,7 @@
  (lambda ()
    (LaTeX-largest-level-set "chapter")
    (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection"
-                      "paragraph" "subparagraph" "figure" "table")
+                       "paragraph" "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings")
    (LaTeX-add-environments "abstract"))
  TeX-dialect)
diff --git a/style/jurabib.el b/style/jurabib.el
index 64e4ee3..e9d4868 100644
--- a/style/jurabib.el
+++ b/style/jurabib.el
@@ -40,8 +40,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar reftex-cite-format-builtin)
 
@@ -50,58 +50,58 @@
  (lambda ()
    ;; Taken from natbib.el and adapted.
    (let ((citecmds
-         '(("cite" . 2) ("cite*" . 2)
-           ("citetitle" . 2) ("fullcite" . 2)
-           ("citet" . 1) ("citealt" . 1)
-           ("citep" . 2) ("citealp" . 2)
-           ("citeauthor" . 2) ("citeyear" . 2)
-           ("footcite" . 2) ("footcite*" . 2)
-           ("footcitetitle" . 2) ("footfullcite" . 2)
-           ("footcitet" . 1) ("footcitealt" . 1)
-           ("footcitep" . 2) ("footcitealp" . 2)
-           ("footciteauthor" . 2) ("footciteyear" . 2))))
+          '(("cite" . 2) ("cite*" . 2)
+            ("citetitle" . 2) ("fullcite" . 2)
+            ("citet" . 1) ("citealt" . 1)
+            ("citep" . 2) ("citealp" . 2)
+            ("citeauthor" . 2) ("citeyear" . 2)
+            ("footcite" . 2) ("footcite*" . 2)
+            ("footcitetitle" . 2) ("footfullcite" . 2)
+            ("footcitet" . 1) ("footcitealt" . 1)
+            ("footcitep" . 2) ("footcitealp" . 2)
+            ("footciteauthor" . 2) ("footciteyear" . 2))))
      ;; Add these symbols
      (apply 
       'TeX-add-symbols
       (mapcar
        (lambda (cmd)
-        (cond 
-         ((= (cdr cmd) 0)
-          ;; No optional arguments
-          (list (car cmd) 'TeX-arg-cite))
-         ((= (cdr cmd) 1)
-          ;; Just one optional argument, the post note
-          (list
-           (car cmd)
-           '(TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
-           'TeX-arg-cite))
-         ((= (cdr cmd) 2)
-          ;; Pre and post notes
-          (list
-           (car cmd)
-           '(TeX-arg-conditional TeX-arg-cite-note-p (natbib-note-args) nil)
-           'TeX-arg-cite))))
+         (cond 
+          ((= (cdr cmd) 0)
+           ;; No optional arguments
+           (list (car cmd) 'TeX-arg-cite))
+          ((= (cdr cmd) 1)
+           ;; Just one optional argument, the post note
+           (list
+            (car cmd)
+            '(TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
+            'TeX-arg-cite))
+          ((= (cdr cmd) 2)
+           ;; Pre and post notes
+           (list
+            (car cmd)
+            '(TeX-arg-conditional TeX-arg-cite-note-p (natbib-note-args) nil)
+            'TeX-arg-cite))))
        citecmds))
      ;; Special cases
      (TeX-add-symbols
       ;; FIXME: Completing read for field.
       '("citefield" ; \citefield[]{}{}
-       (TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
-       "Field" TeX-arg-cite)
+        (TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
+        "Field" TeX-arg-cite)
       '("footcitefield" ; \footcitefield[]{}{}
-       (TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
-       "Field" TeX-arg-cite))
+        (TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
+        "Field" TeX-arg-cite))
 
      ;; Make an entry in TeX-complete-list
      (add-to-list
       'TeX-complete-list
       (list
        (concat "\\\\\\(" 
-              (mapconcat (lambda (x) (regexp-quote (car x)))
-                         (append citecmds
-                                 '(("citefield") ("footcitefield"))) "\\|")
-              "\\)\\(\\[[^]\n\r\\%]*\\]\\)*{\\([^{}\n\r\\%,]*,\\)*"
-              "\\([^{}\n\r\\%,]*\\)")
+               (mapconcat (lambda (x) (regexp-quote (car x)))
+                          (append citecmds
+                                  '(("citefield") ("footcitefield"))) "\\|")
+               "\\)\\(\\[[^]\n\r\\%]*\\]\\)*{\\([^{}\n\r\\%,]*,\\)*"
+               "\\([^{}\n\r\\%,]*\\)")
        4 'LaTeX-bibitem-list "}"))
 
      ;; Add further symbols
@@ -119,63 +119,63 @@
 
      ;; Fontification
      (when (and (featurep 'font-latex)
-               (eq TeX-install-font-lock 'font-latex-setup))
+                (eq TeX-install-font-lock 'font-latex-setup))
        (font-latex-add-keywords '(("cite" "*[[{")
-                                 ("citetitle" "[[{")
-                                 ("fullcite" "[[{")
-                                 ("citet" "[{")
-                                 ("citealt" "[{")
-                                 ("citep" "[[{")
-                                 ("citealp" "[[{")
-                                 ("citeauthor" "[[{")
-                                 ("citeyear" "[[{")
-                                 ("footcite" "[[{")
-                                 ("footcite*" "[[{")
-                                 ("footcitetitle" "[[{")
-                                 ("footfullcite" "[[{")
-                                 ("footcitet" "[{")
-                                 ("footcitealt" "[{")
-                                 ("footcitep" "[[{")
-                                 ("footcitealp" "[[{")
-                                 ("footciteauthor" "[[{")
-                                 ("footciteyear" "[[{")
-                                 ("citefield" "[{{")
-                                 ("footcitefield" "[{{"))
-                               'reference)
+                                  ("citetitle" "[[{")
+                                  ("fullcite" "[[{")
+                                  ("citet" "[{")
+                                  ("citealt" "[{")
+                                  ("citep" "[[{")
+                                  ("citealp" "[[{")
+                                  ("citeauthor" "[[{")
+                                  ("citeyear" "[[{")
+                                  ("footcite" "[[{")
+                                  ("footcite*" "[[{")
+                                  ("footcitetitle" "[[{")
+                                  ("footfullcite" "[[{")
+                                  ("footcitet" "[{")
+                                  ("footcitealt" "[{")
+                                  ("footcitep" "[[{")
+                                  ("footcitealp" "[[{")
+                                  ("footciteauthor" "[[{")
+                                  ("footciteyear" "[[{")
+                                  ("citefield" "[{{")
+                                  ("footcitefield" "[{{"))
+                                'reference)
        (font-latex-add-keywords '(("citeswithoutentry" "{")
-                                 ("nextcitefull" "{")
-                                 ("nextcitenotitle" "{")
-                                 ("nextcitereset" "{")
-                                 ("nextciteshort" "{"))
-                               'function)
+                                  ("nextcitefull" "{")
+                                  ("nextcitenotitle" "{")
+                                  ("nextcitereset" "{")
+                                  ("nextciteshort" "{"))
+                                'function)
        (font-latex-add-keywords '(("citenotitlefortype" "{")
-                                 ("citetitlefortype" "{")
-                                 ("jurabibsetup" "{"))
-                               'variable))
+                                  ("citetitlefortype" "{")
+                                  ("jurabibsetup" "{"))
+                                'variable))
 
      ;; Tell RefTeX (Thanks, Carsten)
      (when (and LaTeX-reftex-cite-format-auto-activate
-               (fboundp 'reftex-set-cite-format))
+                (fboundp 'reftex-set-cite-format))
        ;; Check if RefTeX supports jurabib.
        (if (assoc 'jurabib reftex-cite-format-builtin)
-          ;; Yes, use the provided default.
-          (reftex-set-cite-format 'jurabib)
-        ;; No, set it by hand.
-        (reftex-set-cite-format
-         '((?\C-m . "\\cite{%l}")
-           (?c    . "\\cite[?][]{%l}")
-           (?t    . "\\citet{%l}")
-           (?p    . "\\citep{%l}")
-           (?e    . "\\citep[e.g.][?]{%l}")
-           (?s    . "\\citep[see][?]{%l}")
-           (?u    . "\\fullcite{%l}")
-           (?i    . "\\citetitle{%l}")
-           (?a    . "\\citeauthor{%l}")
-           (?e    . "\\citefield{?}{%l}")
-           (?y    . "\\citeyear{%l}")
-           (?f    . "\\footcite{%l}")
-           (?F    . "\\footcite[?][]{%l}")
-           (?l    . "\\footfullcite{%l}"))))))
+           ;; Yes, use the provided default.
+           (reftex-set-cite-format 'jurabib)
+         ;; No, set it by hand.
+         (reftex-set-cite-format
+          '((?\C-m . "\\cite{%l}")
+            (?c    . "\\cite[?][]{%l}")
+            (?t    . "\\citet{%l}")
+            (?p    . "\\citep{%l}")
+            (?e    . "\\citep[e.g.][?]{%l}")
+            (?s    . "\\citep[see][?]{%l}")
+            (?u    . "\\fullcite{%l}")
+            (?i    . "\\citetitle{%l}")
+            (?a    . "\\citeauthor{%l}")
+            (?e    . "\\citefield{?}{%l}")
+            (?y    . "\\citeyear{%l}")
+            (?f    . "\\footcite{%l}")
+            (?F    . "\\footcite[?][]{%l}")
+            (?l    . "\\footfullcite{%l}"))))))
 
    ;; FIXME: The following list is the edited output of
    ;; `TeX-auto-generate' which probably includes internal macros of
diff --git a/style/kpfonts.el b/style/kpfonts.el
index 22e0d60..e789ce8 100644
--- a/style/kpfonts.el
+++ b/style/kpfonts.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 ;; These are generated by the minor mode or easy menu:
 (defvar LaTeX-kpfonts-mode-map)
 (defvar LaTeX-kpfonts-mode-menu)
@@ -418,84 +418,84 @@ the sequence by initializing this variable.")
 ;; AUCTeX with `C-u C-c C-n' would create duplicate entries in menu.
 (setq LaTeX-kpfonts-menu
       '("Kpfonts"
-       ("Insert Font"
-        ["Math Upright"             (TeX-font nil ?\C-h) :keys "C-c C-f C-h"]
-        ["Math Fraktur"             (TeX-font nil ?\C-k) :keys "C-c C-f C-k"]
-        ["Math Script"              (TeX-font nil ?\C-p) :keys "C-c C-f C-p"]
-        ["Slanted Small Caps"       (TeX-font nil ?\C-l) :keys "C-c C-f C-l"]
-        ["Other Small Caps"         (TeX-font nil ?\C-o) :keys "C-c C-f C-o"]
-        ["Other Slanted Small Caps" (TeX-font nil ?\C-q) :keys "C-c C-f C-q"])
-       ("Replace Font"
-        ["Math Upright"             (TeX-font t ?\C-h) :keys "C-u C-c C-f C-h"]
-        ["Math Fraktur"             (TeX-font t ?\C-k) :keys "C-u C-c C-f C-k"]
-        ["Math Script"              (TeX-font t ?\C-p) :keys "C-u C-c C-f C-p"]
-        ["Slanted Small Caps"       (TeX-font t ?\C-l) :keys "C-u C-c C-f C-l"]
-        ["Other Small Caps"         (TeX-font t ?\C-o) :keys "C-u C-c C-f C-o"]
-        ["Other Slanted Small Caps" (TeX-font t ?\C-q) :keys "C-u C-c C-f 
C-q"])
-       ["Delete Font"              (TeX-font t ?\C-d) :keys "C-c C-f C-d"]
-       "-"
-       ("Other Greek Lowercase") ("Slanted Greek Lowercase")
-       ("Upright Greek Lowercase") ("Other Greek Uppercase")
-       ("Slanted Greek Uppercase") ("Upright Greek Uppercase") ("Integrals")
-       ("Mapping") ("Arrows") ("Neg Arrows") ("Binary Op") ("Relational")
-       ("Neg Rel") ("Delimeters") ("Accents") ("Misc")))
+        ("Insert Font"
+         ["Math Upright"             (TeX-font nil ?\C-h) :keys "C-c C-f C-h"]
+         ["Math Fraktur"             (TeX-font nil ?\C-k) :keys "C-c C-f C-k"]
+         ["Math Script"              (TeX-font nil ?\C-p) :keys "C-c C-f C-p"]
+         ["Slanted Small Caps"       (TeX-font nil ?\C-l) :keys "C-c C-f C-l"]
+         ["Other Small Caps"         (TeX-font nil ?\C-o) :keys "C-c C-f C-o"]
+         ["Other Slanted Small Caps" (TeX-font nil ?\C-q) :keys "C-c C-f C-q"])
+        ("Replace Font"
+         ["Math Upright"             (TeX-font t ?\C-h) :keys "C-u C-c C-f 
C-h"]
+         ["Math Fraktur"             (TeX-font t ?\C-k) :keys "C-u C-c C-f 
C-k"]
+         ["Math Script"              (TeX-font t ?\C-p) :keys "C-u C-c C-f 
C-p"]
+         ["Slanted Small Caps"       (TeX-font t ?\C-l) :keys "C-u C-c C-f 
C-l"]
+         ["Other Small Caps"         (TeX-font t ?\C-o) :keys "C-u C-c C-f 
C-o"]
+         ["Other Slanted Small Caps" (TeX-font t ?\C-q) :keys "C-u C-c C-f 
C-q"])
+        ["Delete Font"              (TeX-font t ?\C-d) :keys "C-c C-f C-d"]
+        "-"
+        ("Other Greek Lowercase") ("Slanted Greek Lowercase")
+        ("Upright Greek Lowercase") ("Other Greek Uppercase")
+        ("Slanted Greek Uppercase") ("Upright Greek Uppercase") ("Integrals")
+        ("Mapping") ("Arrows") ("Neg Arrows") ("Binary Op") ("Relational")
+        ("Neg Rel") ("Delimeters") ("Accents") ("Misc")))
 
 (let ((math (reverse LaTeX-kpfonts-default))
       (map LaTeX-kpfonts-keymap)
       (unicode (and LaTeX-math-menu-unicode (fboundp 'decode-char))))
   (while math
     (let* ((entry (car math))
-          (key (nth 0 entry))
-          (prefix
-           (and unicode
-                (nth 3 entry)))
-          value menu name)
+           (key (nth 0 entry))
+           (prefix
+            (and unicode
+                 (nth 3 entry)))
+           value menu name)
       (setq math (cdr math))
       (if (and prefix
-              (setq prefix (decode-char 'ucs (nth 3 entry))))
-         (setq prefix (concat (string prefix) " \\"))
-       (setq prefix "\\"))
+               (setq prefix (decode-char 'ucs (nth 3 entry))))
+          (setq prefix (concat (string prefix) " \\"))
+        (setq prefix "\\"))
       (if (listp (cdr entry))
-         (setq value (nth 1 entry)
-               menu (nth 2 entry))
-       (setq value (cdr entry)
-             menu nil))
+          (setq value (nth 1 entry)
+                menu (nth 2 entry))
+        (setq value (cdr entry)
+              menu nil))
       (if (stringp value)
-         (progn
-           (setq name (intern (concat "LaTeX-kpfonts-" value)))
-           (fset name (list 'lambda (list 'arg) (list 'interactive "*P")
-                            (list 'LaTeX-math-insert value 'arg))))
-       (setq name value))
+          (progn
+            (setq name (intern (concat "LaTeX-kpfonts-" value)))
+            (fset name (list 'lambda (list 'arg) (list 'interactive "*P")
+                             (list 'LaTeX-math-insert value 'arg))))
+        (setq name value))
       (if key
-         (progn
-           (setq key (cond ((numberp key) (char-to-string key))
-                           ((stringp key) (read-kbd-macro key))
-                           (t (vector key))))
-           (define-key map key name)))
+          (progn
+            (setq key (cond ((numberp key) (char-to-string key))
+                            ((stringp key) (read-kbd-macro key))
+                            (t (vector key))))
+            (define-key map key name)))
       (if menu
-         (let ((parent LaTeX-kpfonts-menu))
-           (if (listp menu)
-               (progn
-                 (while (cdr menu)
-                   (let ((sub (assoc (car menu) LaTeX-kpfonts-menu)))
-                     (if sub
-                         (setq parent sub)
-                       (setcdr parent (cons (list (car menu)) (cdr parent))))
-                     (setq menu (cdr menu))))
-                 (setq menu (car menu))))
-           (let ((sub (assoc menu parent)))
-             (if sub
-                 (if (stringp value)
-                     (setcdr sub (cons (vector (concat prefix value)
-                                               name t)
-                                       (cdr sub)))
-                   (error "Cannot have multiple special kpfonts menu items"))
-               (setcdr parent
-                       (cons (if (stringp value)
-                                 (list menu (vector (concat prefix value)
-                                                    name t))
-                               (vector menu name t))
-                             (cdr parent)))))))))
+          (let ((parent LaTeX-kpfonts-menu))
+            (if (listp menu)
+                (progn
+                  (while (cdr menu)
+                    (let ((sub (assoc (car menu) LaTeX-kpfonts-menu)))
+                      (if sub
+                          (setq parent sub)
+                        (setcdr parent (cons (list (car menu)) (cdr parent))))
+                      (setq menu (cdr menu))))
+                  (setq menu (car menu))))
+            (let ((sub (assoc menu parent)))
+              (if sub
+                  (if (stringp value)
+                      (setcdr sub (cons (vector (concat prefix value)
+                                                name t)
+                                        (cdr sub)))
+                    (error "Cannot have multiple special kpfonts menu items"))
+                (setcdr parent
+                        (cons (if (stringp value)
+                                  (list menu (vector (concat prefix value)
+                                                     name t))
+                                (vector menu name t))
+                              (cdr parent)))))))))
   ;; Make the kpfonts prefix char available if it has not been used as a 
prefix.
   (unless (lookup-key map (LaTeX-kpfonts-abbrev-prefix))
     (define-key map (LaTeX-kpfonts-abbrev-prefix) 'self-insert-command)))
@@ -554,34 +554,34 @@ following commands are defined:
 
    ;; New fonts by `kpfonts'.
    (setq TeX-font-list
-        (append
-         TeX-font-list
-         '(;; Math fonts
-           (?\C-h "" "" "\\mathup{"   "}")
-           (?\C-k "" "" "\\mathfrak{" "}")
-           (?\C-p "" "" "\\mathscr{"  "}")
-           ;; Text fonts
-           (?\C-l "\\textscsl{"      "}")
-           (?\C-o "\\textothersc{"   "}")
-           (?\C-q "\\textotherscsl{" "}"))))
+         (append
+          TeX-font-list
+          '(;; Math fonts
+            (?\C-h "" "" "\\mathup{"   "}")
+            (?\C-k "" "" "\\mathfrak{" "}")
+            (?\C-p "" "" "\\mathscr{"  "}")
+            ;; Text fonts
+            (?\C-l "\\textscsl{"      "}")
+            (?\C-o "\\textothersc{"   "}")
+            (?\C-q "\\textotherscsl{" "}"))))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textscsl" "{")
-                               ("textothersc" "{")
-                               ("textotherscsl" "{"))
-                             'bold-command)
+                                ("textothersc" "{")
+                                ("textotherscsl" "{"))
+                              'bold-command)
      (font-latex-add-keywords '(("textscsl" "{")
-                               ("textotherscsl" "{"))
-                             'italic-command)
+                                ("textotherscsl" "{"))
+                              'italic-command)
      (font-latex-add-keywords '(("scslshape")
-                               ("otherscshape")
-                               ("otherscslshape"))
-                             'bold-declaration)
+                                ("otherscshape")
+                                ("otherscslshape"))
+                              'bold-declaration)
      (font-latex-add-keywords '(("scslshape")
-                               ("otherscslshape"))
-                             'italic-declaration)))
+                                ("otherscslshape"))
+                              'italic-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-kpfonts-package-options
diff --git a/style/latexinfo.el b/style/latexinfo.el
index b79ef38..0232399 100644
--- a/style/latexinfo.el
+++ b/style/latexinfo.el
@@ -50,15 +50,15 @@ We ignore next, previous and up fields.")
 
 (or (assq 'LaTeXinfo-mode minor-mode-map-alist)
     (setq minor-mode-map-alist
-         (cons (cons 'LaTeXinfo-mode LaTeXinfo-mode-map)
-               minor-mode-map-alist)))
+          (cons (cons 'LaTeXinfo-mode LaTeXinfo-mode-map)
+                minor-mode-map-alist)))
 
 (defun TeX-arg-latexinfo-index (optional &optional prompt)
   "Prompt for a LaTeXinfo index type with completion."
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "Index")
-                   '(("cp") ("vr") ("fn") ("tp") ("pg") ("ky"))
-                   nil t)
+                    '(("cp") ("vr") ("fn") ("tp") ("pg") ("ky"))
+                    nil t)
    optional))
 
 (defun LaTeX-item-latexinfo-menu ()
@@ -73,113 +73,113 @@ This fails when the user types in the label of something 
else"
   (let ((node-name (completing-read "Goto Node: " (LaTeX-label-list))))
     (goto-char (point-min))
     (if (re-search-forward
-        (concat
-         TeX-esc "node[ \\t]+" node-name ","
-         "\\|"
-         TeX-esc "label{" LaTeX-section-label node-name
-         "\\|"
-         TeX-esc "label{" node-name
-         )
-        (point-max) t)
-       (beginning-of-line 1)
+         (concat
+          TeX-esc "node[ \\t]+" node-name ","
+          "\\|"
+          TeX-esc "label{" LaTeX-section-label node-name
+          "\\|"
+          TeX-esc "label{" node-name
+          )
+         (point-max) t)
+        (beginning-of-line 1)
     (error "No such node"))))
 
 ;;; Hook
 
 (TeX-add-style-hook "latexinfo"
- (function
-  (lambda ()
-    (require 'latexinfo)
-    (require 'latexinfo-structure)
-
-    (require 'min-map)
-    (setq LaTeXinfo-mode t)
-    
-    (TeX-auto-add-regexp TeX-latexinfo-node-regexp)
-
-    (TeX-add-symbols
-     '("node"
-       (TeX-arg-literal " ")
-       (TeX-arg-free TeX-arg-define-label "Node name")
-       (TeX-arg-literal ", ")
-       (TeX-arg-free TeX-arg-ref "Next node")
-       (TeX-arg-literal ", ")
-       (TeX-arg-free TeX-arg-ref "Previous node")
-       (TeX-arg-literal ", ")
-       (TeX-arg-free TeX-arg-ref "Up node"))
-     '("setfilename" TeX-arg-file)
-
-     '("var" t)
-     '("dfn" t)
-     '("emph" t)
-     '("kbd" t)
-     '("code" t)
-     '("samp" t)
-     '("key" t)
-     '("ctrl" t)
-     '("file" t)
-
-     '("comment"
-       (TeX-arg-literal " ")
-       (TeX-arg-free "Comment"))
-     '("c"
-       (TeX-arg-literal " ")
-       (TeX-arg-free "Comment"))
-
-     '("cindex" t)
-     '("cpsubindex" 2)
-     '("cpindexbold" t)
-
-     '("newindex" TeX-arg-latexinfo-index)
-
-     '("br" nil)
-     '("w" "Text")
-     '("dots" nil)
-     '("refill" nil)
-     '("bullet" nil)
-     '("copyright" nil)
-     '("sp" nil)
-
-     '("xref" TeX-arg-ref)
-     '("pxref" TeX-arg-ref)
-     '("inforef"
-       (TeX-arg-literal "{")
-       (TeX-arg-free "Name of node")
-       (TeX-arg-literal ", ")
-       (TeX-arg-free "Name for note")
-       (TeX-arg-literal ", ")
-       (TeX-arg-free TeX-arg-file "Info file")
-       (TeX-arg-literal "}")))
-
-    (LaTeX-add-environments "menu" "tex" "ignore" "ifinfo" "iftex"
-                           "example" "same" "display" "format")
-
-    ; Menu's have a special kind of items
-    (make-local-variable 'LaTeX-item-list)
-    (setq LaTeX-item-list (cons '("menu" . LaTeX-item-latexinfo-menu)
-                               LaTeX-item-list))
-
-    (make-local-variable 'TeX-font-list)
-    (setq TeX-font-list
-         (list (list ?\C-b (concat TeX-esc "b{") "}")
-               (list ?\C-c (concat TeX-esc "sc{") "}")
-               (list ?\C-e (concat TeX-esc "emph{") "}")
-               (list ?\C-i (concat TeX-esc "i{") "}")
-               (list ?\C-r (concat TeX-esc "r{") "}")
-               (list ?\C-s (concat TeX-esc "samp{") "}")
-               (list ?\C-t (concat TeX-esc "t{") "}")
-               (list ?s    (concat TeX-esc "strong{") "}")
-               (list ?\C-f (concat TeX-esc "file{") "}")
-               (list ?\C-d (concat TeX-esc "dfn{") "}")
-               (list ?\C-v (concat TeX-esc "var{") "}")
-               (list ?k    (concat TeX-esc "key{") "}")
-               (list ?\C-k (concat TeX-esc "kbd{") "}")
-               (list ?c    (concat TeX-esc "code{") "}")
-               (list ?C    (concat TeX-esc "cite{") "}")))
-
-    ;; need the following stuff to let xref and pxref work
-    (make-local-variable 'LaTeX-section-label)
-    (setq LaTeX-section-label "")))
- TeX-dialect)
+                    (function
+                     (lambda ()
+                       (require 'latexinfo)
+                       (require 'latexinfo-structure)
+
+                       (require 'min-map)
+                       (setq LaTeXinfo-mode t)
+                       
+                       (TeX-auto-add-regexp TeX-latexinfo-node-regexp)
+
+                       (TeX-add-symbols
+                        '("node"
+                          (TeX-arg-literal " ")
+                          (TeX-arg-free TeX-arg-define-label "Node name")
+                          (TeX-arg-literal ", ")
+                          (TeX-arg-free TeX-arg-ref "Next node")
+                          (TeX-arg-literal ", ")
+                          (TeX-arg-free TeX-arg-ref "Previous node")
+                          (TeX-arg-literal ", ")
+                          (TeX-arg-free TeX-arg-ref "Up node"))
+                        '("setfilename" TeX-arg-file)
+
+                        '("var" t)
+                        '("dfn" t)
+                        '("emph" t)
+                        '("kbd" t)
+                        '("code" t)
+                        '("samp" t)
+                        '("key" t)
+                        '("ctrl" t)
+                        '("file" t)
+
+                        '("comment"
+                          (TeX-arg-literal " ")
+                          (TeX-arg-free "Comment"))
+                        '("c"
+                          (TeX-arg-literal " ")
+                          (TeX-arg-free "Comment"))
+
+                        '("cindex" t)
+                        '("cpsubindex" 2)
+                        '("cpindexbold" t)
+
+                        '("newindex" TeX-arg-latexinfo-index)
+
+                        '("br" nil)
+                        '("w" "Text")
+                        '("dots" nil)
+                        '("refill" nil)
+                        '("bullet" nil)
+                        '("copyright" nil)
+                        '("sp" nil)
+
+                        '("xref" TeX-arg-ref)
+                        '("pxref" TeX-arg-ref)
+                        '("inforef"
+                          (TeX-arg-literal "{")
+                          (TeX-arg-free "Name of node")
+                          (TeX-arg-literal ", ")
+                          (TeX-arg-free "Name for note")
+                          (TeX-arg-literal ", ")
+                          (TeX-arg-free TeX-arg-file "Info file")
+                          (TeX-arg-literal "}")))
+
+                       (LaTeX-add-environments "menu" "tex" "ignore" "ifinfo" 
"iftex"
+                                               "example" "same" "display" 
"format")
+
+                                        ; Menu's have a special kind of items
+                       (make-local-variable 'LaTeX-item-list)
+                       (setq LaTeX-item-list (cons '("menu" . 
LaTeX-item-latexinfo-menu)
+                                                   LaTeX-item-list))
+
+                       (make-local-variable 'TeX-font-list)
+                       (setq TeX-font-list
+                             (list (list ?\C-b (concat TeX-esc "b{") "}")
+                                   (list ?\C-c (concat TeX-esc "sc{") "}")
+                                   (list ?\C-e (concat TeX-esc "emph{") "}")
+                                   (list ?\C-i (concat TeX-esc "i{") "}")
+                                   (list ?\C-r (concat TeX-esc "r{") "}")
+                                   (list ?\C-s (concat TeX-esc "samp{") "}")
+                                   (list ?\C-t (concat TeX-esc "t{") "}")
+                                   (list ?s    (concat TeX-esc "strong{") "}")
+                                   (list ?\C-f (concat TeX-esc "file{") "}")
+                                   (list ?\C-d (concat TeX-esc "dfn{") "}")
+                                   (list ?\C-v (concat TeX-esc "var{") "}")
+                                   (list ?k    (concat TeX-esc "key{") "}")
+                                   (list ?\C-k (concat TeX-esc "kbd{") "}")
+                                   (list ?c    (concat TeX-esc "code{") "}")
+                                   (list ?C    (concat TeX-esc "cite{") "}")))
+
+                       ;; need the following stuff to let xref and pxref work
+                       (make-local-variable 'LaTeX-section-label)
+                       (setq LaTeX-section-label "")))
+                    TeX-dialect)
 
 ;;; latexinfo.el ends here
diff --git a/style/letter.el b/style/letter.el
index a76a9d1..c51be18 100644
--- a/style/letter.el
+++ b/style/letter.el
@@ -30,8 +30,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-letter-class-options
   '("a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper"
@@ -77,120 +77,120 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("name" "{")
-                               ("address" "{")
-                               ("signature" "{")
-                               ("opening" "{")
-                               ("closing" "{")
-                               ("location" "{")
-                               ("telephone" "{")
-                               ("cc" "{")
-                               ("encl" "{")
-                               ("ps" "{"))
-                             'function)))
+                                ("address" "{")
+                                ("signature" "{")
+                                ("opening" "{")
+                                ("closing" "{")
+                                ("location" "{")
+                                ("telephone" "{")
+                                ("cc" "{")
+                                ("encl" "{")
+                                ("ps" "{"))
+                              'function)))
  TeX-dialect)
 
 (defun LaTeX-env-recipient (environment)
   "Insert ENVIRONMENT and prompt for recipient and address."
   (let ((sender (TeX-read-string "Sender: " (user-full-name)))
-       (sender-address (TeX-read-string "Sender address: "
-                                        LaTeX-letter-sender-address))
-       (recipient (TeX-read-string "Recipient: "))
-       (address (TeX-read-string "Recipient address: "))
-       (signature (TeX-read-string "Signature: "))
-       (opening (TeX-read-string "Opening: "))
-       (closing (TeX-read-string "Closing: "))
-       (date (TeX-read-string "Date: " (LaTeX-today)))
-       (func (if (fboundp 'indent-relative-first-indent-point)
-                 'indent-relative-first-indent-point
-               'indent-relative-maybe)))
+        (sender-address (TeX-read-string "Sender address: "
+                                         LaTeX-letter-sender-address))
+        (recipient (TeX-read-string "Recipient: "))
+        (address (TeX-read-string "Recipient address: "))
+        (signature (TeX-read-string "Signature: "))
+        (opening (TeX-read-string "Opening: "))
+        (closing (TeX-read-string "Closing: "))
+        (date (TeX-read-string "Date: " (LaTeX-today)))
+        (func (if (fboundp 'indent-relative-first-indent-point)
+                  'indent-relative-first-indent-point
+                'indent-relative-maybe)))
 
     (insert TeX-esc "name" TeX-grop sender TeX-grcl)
     (newline-and-indent)
     (if (not (zerop (length sender-address)))
-       (progn
-         (setq LaTeX-letter-sender-address sender-address)
-         (insert TeX-esc "address" TeX-grop sender-address TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (setq LaTeX-letter-sender-address sender-address)
+          (insert TeX-esc "address" TeX-grop sender-address TeX-grcl)
+          (newline-and-indent)))
     (if (not (zerop (length signature)))
-       (progn
-         (insert TeX-esc "signature" TeX-grop signature TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (insert TeX-esc "signature" TeX-grop signature TeX-grcl)
+          (newline-and-indent)))
     (if (not (zerop (length date)))
-       (progn
-         (insert TeX-esc "renewcommand" TeX-grop TeX-esc "today" TeX-grcl
-                 TeX-grop date TeX-grcl)
-         (newline-and-indent)))
+        (progn
+          (insert TeX-esc "renewcommand" TeX-grop TeX-esc "today" TeX-grcl
+                  TeX-grop date TeX-grcl)
+          (newline-and-indent)))
     (newline-and-indent)
 
     (let ((indentation (current-column)))
       (LaTeX-insert-environment
        environment
        (concat TeX-grop recipient
-              (if (not (zerop (length address)))
-                  (concat
-                   (if (not (zerop (length recipient)))
-                       (concat " " TeX-esc TeX-esc " "))
-                   address))
-              TeX-grcl))
-      (save-excursion                  ; Fix indentation of address
-       (if (search-backward TeX-grcl nil 'move)
-           (let ((addr-end (point-marker)))
-             (if (search-backward TeX-grop nil 'move)
-                 (let ((addr-column (current-column)))
-                   (while (search-forward
-                           (concat TeX-esc TeX-esc)
-                           (marker-position addr-end) 'move)
-                     (progn
-                       (newline)
-                       (indent-to addr-column))))))))
+               (if (not (zerop (length address)))
+                   (concat
+                    (if (not (zerop (length recipient)))
+                        (concat " " TeX-esc TeX-esc " "))
+                    address))
+               TeX-grcl))
+      (save-excursion                   ; Fix indentation of address
+        (if (search-backward TeX-grcl nil 'move)
+            (let ((addr-end (point-marker)))
+              (if (search-backward TeX-grop nil 'move)
+                  (let ((addr-column (current-column)))
+                    (while (search-forward
+                            (concat TeX-esc TeX-esc)
+                            (marker-position addr-end) 'move)
+                      (progn
+                        (newline)
+                        (indent-to addr-column))))))))
       (insert "\n")
       (indent-to indentation))
     (insert TeX-esc "opening"
-           TeX-grop
-           (if (zerop (length opening))
-               (concat TeX-esc " ")
-             opening)
-           TeX-grcl "\n")
+            TeX-grop
+            (if (zerop (length opening))
+                (concat TeX-esc " ")
+              opening)
+            TeX-grcl "\n")
 
     (funcall func)
     (save-excursion
       (insert "\n" TeX-esc "closing"
-             TeX-grop
-             (if (zerop (length closing))
-                 (concat TeX-esc " ")
-               closing)
-             TeX-grcl "\n")
+              TeX-grop
+              (if (zerop (length closing))
+                  (concat TeX-esc " ")
+                closing)
+              TeX-grcl "\n")
       (funcall func))))
 
 (defun LaTeX-today nil
   "Return a string representing todays date according to flavor."
   (interactive)
   (let ((ctime-string (current-time-string))
-       (month-alist '(("Jan". "01")
-                      ("Feb" . "02")
-                      ("Mar" . "03")
-                      ("Apr" . "04")
-                      ("May" . "05")
-                      ("Jun" . "06")
-                      ("Jul" . "07")
-                      ("Aug" . "08")
-                      ("Sep" . "09")
-                      ("Oct" . "10")
-                      ("Nov" . "11")
-                      ("Dec" . "12"))))
+        (month-alist '(("Jan". "01")
+                       ("Feb" . "02")
+                       ("Mar" . "03")
+                       ("Apr" . "04")
+                       ("May" . "05")
+                       ("Jun" . "06")
+                       ("Jul" . "07")
+                       ("Aug" . "08")
+                       ("Sep" . "09")
+                       ("Oct" . "10")
+                       ("Nov" . "11")
+                       ("Dec" . "12"))))
     (string-match
      "^\\S-+\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-+\\S-+\\s-+\\(\\S-+\\)"
      ctime-string)
     (let ((year (substring ctime-string (match-beginning 3) (match-end 3)))
-         (month (substring ctime-string (match-beginning 1) (match-end 1)))
-         (day (substring ctime-string (match-beginning 2) (match-end 2))))
+          (month (substring ctime-string (match-beginning 1) (match-end 1)))
+          (day (substring ctime-string (match-beginning 2) (match-end 2))))
       (if (assoc month month-alist)
-         (progn
-           (setq month (cdr (assoc month month-alist)))
-           (if (> 2 (length day))
-               (setq day (concat "0" day)))))
+          (progn
+            (setq month (cdr (assoc month month-alist)))
+            (if (> 2 (length day))
+                (setq day (concat "0" day)))))
       (format "%s-%s-%s" year month day))))
 
 ;;; letter.el ends here
diff --git a/style/lettrine.el b/style/lettrine.el
index a342793..074ec94 100644
--- a/style/lettrine.el
+++ b/style/lettrine.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-lettrine-key-val-options
   '(("lines")
@@ -79,16 +79,16 @@
 
    ;; Lengths and dimensions:
    (LaTeX-add-lengths "DefaultFindent"
-                     "DefaultNindent"
-                     "DefaultSlope"
-                     "DiscardVskip"
-                     "LettrineWidth"
-                     "LettrineHeight"
-                     "LettrineDepth")
+                      "DefaultNindent"
+                      "DefaultSlope"
+                      "DiscardVskip"
+                      "LettrineWidth"
+                      "LettrineHeight"
+                      "LettrineDepth")
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("lettrine" "[{{")) 'textual)))
  TeX-dialect)
 
diff --git a/style/listings.el b/style/listings.el
index c5012b1..50f0907 100644
--- a/style/listings.el
+++ b/style/listings.el
@@ -52,18 +52,18 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 ;; The following are options taken from chapter 4 of the listings
 ;; manual (2007/02/22 Version 1.4).
 (defvar LaTeX-listings-key-val-options
   '(;; Space and placement
     ("float" ("t" "b" "p" "h")) ; Support [*] as an optional prefix and that
-                               ; tbph are not exclusive.
+                                ; tbph are not exclusive.
     ("floatplacement" ("t" "b" "p" "h"))
     ("aboveskip")
     ("belowskip")
@@ -147,10 +147,10 @@
     ("breakautoindent" ("true" "false"))
     ;; Frames
     ("frame" ("none" "leftline" "topline" "bottomline" "lines" "single"
-             "shadowbox"
-             ;; Alternative to the above values.  A subset of trblTRBL can be
-             ;; given.
-             "t" "r" "b" "l" "T" "R" "B" "L"))
+              "shadowbox"
+              ;; Alternative to the above values.  A subset of trblTRBL can be
+              ;; given.
+              "t" "r" "b" "l" "T" "R" "B" "L"))
     ("frameround" ("t" "f")) ; The input actually has to be four times {t,f}.
     ("framesep")
     ("rulesep")
@@ -171,8 +171,8 @@
     ("indexstyle")
     ;; Column alignment
     ("columns" ("fixed" "flexible" "fullflexible" "spaceflexible")) ;
-                                       ; Also supports an optional
-                                       ; argument with {c,l,r}.
+                                        ; Also supports an optional
+                                        ; argument with {c,l,r}.
     ("flexiblecolumns" ("true" "false"))
     ("keepspaces" ("true" "false"))
     ("basewidth")
@@ -257,9 +257,9 @@ from `listings' package.")
 
 (defvar LaTeX-listings-lstnewenvironment-regexp
   `(,(concat "\\\\lstnewenvironment"
-            "[ \t\n\r]*{\\([A-Za-z0-9]+\\)}%?"
-            "[ \t\n\r]*\\[?\\([0-9]?\\)\\]?%?"
-            "[ \t\n\r]*\\(\\[\\)?")
+             "[ \t\n\r]*{\\([A-Za-z0-9]+\\)}%?"
+             "[ \t\n\r]*\\[?\\([0-9]?\\)\\]?%?"
+             "[ \t\n\r]*\\(\\[\\)?")
     (1 2 3) LaTeX-auto-listings-lstnewenvironment)
   "Matches the argument of `\\lstnewenvironment' from `listings.sty'.")
 
@@ -284,14 +284,14 @@ from `listings' package.")
   "Update the \"style\" key from `LaTeX-listings-key-val-options-local'
 with user-defined values via the \"lstdefinestyle\" macro."
   (let* ((elt (assoc "style" LaTeX-listings-key-val-options-local))
-        (key (car elt))
-        (temp (copy-alist LaTeX-listings-key-val-options-local))
-        (opts (assq-delete-all (car (assoc key temp)) temp)))
+         (key (car elt))
+         (temp (copy-alist LaTeX-listings-key-val-options-local))
+         (opts (assq-delete-all (car (assoc key temp)) temp)))
     (cl-pushnew (list key (TeX-delete-duplicate-strings
-                          (mapcar #'car (LaTeX-listings-lstdefinestyle-list))))
-               opts :test #'equal)
+                           (mapcar #'car 
(LaTeX-listings-lstdefinestyle-list))))
+                opts :test #'equal)
     (setq LaTeX-listings-key-val-options-local
-         (copy-alist opts))))
+          (copy-alist opts))))
 
 (defun LaTeX-listings-auto-prepare ()
   "Clear temporary variable from `listings.sty' before parsing."
@@ -303,42 +303,42 @@ with user-defined values via the \"lstdefinestyle\" 
macro."
 \"\\lstdefinestyle\"."
   (dolist (env-args LaTeX-auto-listings-lstnewenvironment)
     (let ((env  (car   env-args))
-         (args (cadr  env-args))
-         (opt  (nth 2 env-args)))
+          (args (cadr  env-args))
+          (opt  (nth 2 env-args)))
       (cond (;; opt. 1st argument and mandatory argument(s)
-            (and args (not (string-equal args ""))
-                 opt  (not (string-equal opt  "")))
-            (LaTeX-add-environments
-             `(,env
-               LaTeX-env-args
-               [TeX-arg-key-val LaTeX-listings-key-val-options-local]
-               (LaTeX-env-label-as-keyval "caption")
-               ,(1- (string-to-number args)))))
-           (;; mandatory argument(s) only
-            (and args (not (string-equal args ""))
-                 (string-equal opt ""))
-            (LaTeX-add-environments
-             (list env (string-to-number args))))
-           (t ; No args
-            (LaTeX-add-environments (list env))))
+             (and args (not (string-equal args ""))
+                  opt  (not (string-equal opt  "")))
+             (LaTeX-add-environments
+              `(,env
+                LaTeX-env-args
+                [TeX-arg-key-val LaTeX-listings-key-val-options-local]
+                (LaTeX-env-label-as-keyval "caption")
+                ,(1- (string-to-number args)))))
+            (;; mandatory argument(s) only
+             (and args (not (string-equal args ""))
+                  (string-equal opt ""))
+             (LaTeX-add-environments
+              (list env (string-to-number args))))
+            (t ; No args
+             (LaTeX-add-environments (list env))))
       (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) 
t)
       (add-to-list 'LaTeX-verbatim-environments-local env t)
       (add-to-list 'LaTeX-label-alist `(,env . LaTeX-listing-label) t)
       ;; Add new env to parser for labels in opt. argument:
       (TeX-auto-add-regexp `(,(concat "\\\\begin{" env "}"
-                                     (LaTeX-extract-key-value-label))
-                            1 LaTeX-auto-label))
+                                      (LaTeX-extract-key-value-label))
+                             1 LaTeX-auto-label))
       ;; Tell RefTeX
       (when (fboundp 'reftex-add-label-environments)
-       (reftex-add-label-environments
-        `((,env ?l "lst:" "~\\ref{%s}"
-                LaTeX-listings-reftex-label-context-function
-                (regexp "[Ll]isting")))))
+        (reftex-add-label-environments
+         `((,env ?l "lst:" "~\\ref{%s}"
+                 LaTeX-listings-reftex-label-context-function
+                 (regexp "[Ll]isting")))))
       ;; Fontification
       (when (and (fboundp 'font-latex-add-keywords)
-                (eq TeX-install-font-lock 'font-latex-setup))
-       ;; Tell font-lock about the update.
-       (font-latex-set-syntactic-keywords))
+                 (eq TeX-install-font-lock 'font-latex-setup))
+        ;; Tell font-lock about the update.
+        (font-latex-set-syntactic-keywords))
       ;; Add new env's to `ispell-tex-skip-alist': skip the entire env
       (TeX-ispell-skip-setcdr `(,(cons env (concat "\\\\end{" env "}"))))))
   (when (LaTeX-listings-lstdefinestyle-list)
@@ -353,32 +353,32 @@ with user-defined values via the \"lstdefinestyle\" 
macro."
 The context string is the value given to the caption key.  If no
 caption key is found, an error is issued."
   (let* ((envstart (save-excursion
-                    (re-search-backward (concat "\\\\begin{" env "}")
-                                        nil t)))
-        (capt-key (save-excursion
-                    (re-search-backward "caption[ \t\n\r%]*=[ \t\n\r%]*"
-                                        envstart t)))
-        capt-start capt-end)
+                     (re-search-backward (concat "\\\\begin{" env "}")
+                                         nil t)))
+         (capt-key (save-excursion
+                     (re-search-backward "caption[ \t\n\r%]*=[ \t\n\r%]*"
+                                         envstart t)))
+         capt-start capt-end)
     (if capt-key
-       (save-excursion
-         (goto-char capt-key)
-         (re-search-forward
-          "caption[ \t\n\r%]*=[ \t\n\r%]*" nil t)
-         (cond (;; Short caption inside [] is available, extract it only
-                (looking-at-p (regexp-quote (concat TeX-grop LaTeX-optop)))
-                (forward-char)
-                (setq capt-start (1+ (point)))
-                (setq capt-end (1- (progn (forward-sexp) (point)))))
-               ;; Extract the entire caption which is enclosed in braces
-               ((looking-at-p TeX-grop)
-                (setq capt-start (1+ (point)))
-                (setq capt-end (1- (progn (forward-sexp) (point)))))
-               ;; Extract everything to next comma ,
-               (t
-                (setq capt-start (point))
-                (setq capt-end (progn (skip-chars-forward "^,") (point)))))
-         ;; Return the extracted string
-         (buffer-substring-no-properties capt-start capt-end))
+        (save-excursion
+          (goto-char capt-key)
+          (re-search-forward
+           "caption[ \t\n\r%]*=[ \t\n\r%]*" nil t)
+          (cond (;; Short caption inside [] is available, extract it only
+                 (looking-at-p (regexp-quote (concat TeX-grop LaTeX-optop)))
+                 (forward-char)
+                 (setq capt-start (1+ (point)))
+                 (setq capt-end (1- (progn (forward-sexp) (point)))))
+                ;; Extract the entire caption which is enclosed in braces
+                ((looking-at-p TeX-grop)
+                 (setq capt-start (1+ (point)))
+                 (setq capt-end (1- (progn (forward-sexp) (point)))))
+                ;; Extract everything to next comma ,
+                (t
+                 (setq capt-start (point))
+                 (setq capt-end (progn (skip-chars-forward "^,") (point)))))
+          ;; Return the extracted string
+          (buffer-substring-no-properties capt-start capt-end))
       (error "No caption found"))))
 
 (TeX-add-style-hook
@@ -392,7 +392,7 @@ caption key is found, an error is issued."
 
    ;; Local version of key-val options:
    (setq LaTeX-listings-key-val-options-local
-        (copy-alist LaTeX-listings-key-val-options))
+         (copy-alist LaTeX-listings-key-val-options))
 
    ;; New symbols
    (TeX-add-symbols
@@ -400,10 +400,10 @@ caption key is found, an error is issued."
     '("lstdefinestyle"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string "Style name: ")))
-          (LaTeX-add-listings-lstdefinestyles name)
-          (LaTeX-listings-update-style-key)
-          (format "%s" name))))
+         (let ((name (TeX-read-string "Style name: ")))
+           (LaTeX-add-listings-lstdefinestyles name)
+           (LaTeX-listings-update-style-key)
+           (format "%s" name))))
       (TeX-arg-key-val LaTeX-listings-key-val-options-local))
     '("lstinline" [TeX-arg-key-val LaTeX-listings-key-val-options-local]
       TeX-arg-verb-delim-or-brace)
@@ -433,7 +433,7 @@ caption key is found, an error is issued."
 
    ;; Filling
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("lstlisting" current-indentation) t)
+                '("lstlisting" current-indentation) t)
    (add-to-list 'LaTeX-verbatim-environments-local "lstlisting")
    (add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline")
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "lstinline")
@@ -444,28 +444,28 @@ caption key is found, an error is issued."
    (when (fboundp 'reftex-add-label-environments)
      (reftex-add-label-environments
       '(("lstlisting" ?l "lst:" "~\\ref{%s}"
-        LaTeX-listings-reftex-label-context-function
-        (regexp "[Ll]isting")))))
+         LaTeX-listings-reftex-label-context-function
+         (regexp "[Ll]isting")))))
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("lstnewenvironment" "{[[{{")) 'function)
      (font-latex-add-keywords '(("lstinputlisting" "[{")) 'reference)
      (font-latex-add-keywords '(("lstinline" "[")
-                               ("lstlistoflistings" ""))
-                             'textual)
+                                ("lstlistoflistings" ""))
+                              'textual)
      (font-latex-add-keywords '(("lstalias" "{{")
-                               ("lstdefinestyle" "{{")
-                               ("lstset" "{"))
-                             'variable)))
+                                ("lstdefinestyle" "{{")
+                                ("lstset" "{"))
+                              'variable)))
  TeX-dialect)
 
 (defvar LaTeX-listings-package-options '("draft" "final" "savemem"
-                                        "noaspects"
-                                        ;; procnames is mentioned in
-                                        ;; Section 5.2
-                                        "procnames")
+                                         "noaspects"
+                                         ;; procnames is mentioned in
+                                         ;; Section 5.2
+                                         "procnames")
   "Package options for the listings package.")
 
 ;;; listings.el ends here
diff --git a/style/longtable.el b/style/longtable.el
index 27b6195..4e7ea30 100644
--- a/style/longtable.el
+++ b/style/longtable.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-longtable-skipping-regexp
   (regexp-opt '("[l]" "[r]" "[c]" ""))
@@ -57,23 +57,23 @@ insert line break macro."
 (defun LaTeX-env-longtable (environment)
   "Insert a longtable-like ENVIRONMENT with caption and label."
   (let* ((pos (completing-read (TeX-argument-prompt t nil "Position")
-                              '(("l") ("r") ("c"))))
-        (fmt (TeX-read-string "Format: " LaTeX-default-format))
-        (caption (TeX-read-string "Caption: "))
-        (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
-                         (TeX-read-string "(Optional) Short caption: "))))
+                               '(("l") ("r") ("c"))))
+         (fmt (TeX-read-string "Format: " LaTeX-default-format))
+         (caption (TeX-read-string "Caption: "))
+         (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
+                          (TeX-read-string "(Optional) Short caption: "))))
     (setq LaTeX-default-format fmt)
     (LaTeX-insert-environment environment
-                             (concat
-                              (unless (zerop (length pos))
-                                (concat LaTeX-optop pos LaTeX-optcl))
-                              (concat TeX-grop fmt TeX-grcl)))
+                              (concat
+                               (unless (zerop (length pos))
+                                 (concat LaTeX-optop pos LaTeX-optcl))
+                               (concat TeX-grop fmt TeX-grcl)))
     ;; top caption -- do nothing if user skips caption
     (unless (zerop (length caption))
       ;; insert `\caption[short-caption]{caption':
       (insert TeX-esc "caption")
       (when (and short-caption (not (string= short-caption "")))
-       (insert LaTeX-optop short-caption LaTeX-optcl))
+        (insert LaTeX-optop short-caption LaTeX-optcl))
       (insert TeX-grop caption)
       ;; ask for a label and insert it
       (LaTeX-label environment 'environment)
@@ -115,7 +115,7 @@ insert line break macro."
    ;; Use the enhanced table formatting.  Append to
    ;; `LaTeX-indent-environment-list' in order not to override custom settings.
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("longtable" LaTeX-indent-tabular) t)
+                '("longtable" LaTeX-indent-tabular) t)
 
    ;; Append longtable to `LaTeX-label-alist', in order not to override 
possible
    ;; custome values.
@@ -126,12 +126,12 @@ insert line break macro."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      ;; Actually, `\caption*{}' macro takes only one mandatory
      ;; argument, not an optional one, the following is a workaround
      ;; to fontify correctly also the standard `\caption[]{}' macro.
      (font-latex-add-keywords '(("caption" "*[{"))
-                             'textual)))
+                              'textual)))
  TeX-dialect)
 
 ;; `longtable.sty' has two options "errorshow" and "pausing", both for
diff --git a/style/ltugboat.el b/style/ltugboat.el
index 3499d6d..25464c4 100644
--- a/style/ltugboat.el
+++ b/style/ltugboat.el
@@ -37,25 +37,25 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defun LaTeX-env-ltugboat-verbatim (environment)
   "Insert verbatim environment with an optional argument."
   (let* ((crm-separator (regexp-quote TeX-esc))
-        (opts (mapconcat #'identity
-                         (TeX-completing-read-multiple
-                          (TeX-argument-prompt t nil "command(s)")
-                          '("\\tiny"  "\\scriptsize" "\\footnotesize"
-                            "\\small" "\\normalsize" "\\large"
-                            "\\Large" "\\LARGE"      "\\huge"
-                            "\\Huge"  "\\makevmeta"  "\\ruled")
-                          nil nil TeX-esc)
-                         TeX-esc)))
+         (opts (mapconcat #'identity
+                          (TeX-completing-read-multiple
+                           (TeX-argument-prompt t nil "command(s)")
+                           '("\\tiny"  "\\scriptsize" "\\footnotesize"
+                             "\\small" "\\normalsize" "\\large"
+                             "\\Large" "\\LARGE"      "\\huge"
+                             "\\Huge"  "\\makevmeta"  "\\ruled")
+                           nil nil TeX-esc)
+                          TeX-esc)))
     (LaTeX-insert-environment environment
-                             (when (and opts
-                                        (not (string= opts "")))
-                               (concat LaTeX-optop opts LaTeX-optcl)))))
+                              (when (and opts
+                                         (not (string= opts "")))
+                                (concat LaTeX-optop opts LaTeX-optcl)))))
 
 (TeX-add-style-hook
  "ltugboat"
@@ -68,20 +68,20 @@
    ;; Preliminaries: ltugboat.cls suppresses \part & \subparagraph
    (LaTeX-largest-level-set "section")
    (LaTeX-add-counters "section" "subsection" "subsubsection" "paragraph"
-                      "figure" "table")
+                       "figure" "table")
 
    ;; 6 Divisions of the paper
    (TeX-add-symbols
     '("nameref" TeX-arg-ref))
 
    (setq TeX-complete-list
-        (append
-         '(("\\\\nameref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
-         TeX-complete-list))
+         (append
+          '(("\\\\nameref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
+          TeX-complete-list))
 
    ;; 6.1 Abstracts
    (LaTeX-add-environments '("abstract")
-                          '("longabstract"))
+                           '("longabstract"))
 
    ;; 6.2 Appendices: Cater for appendix environment and don't indent
    ;; the content
@@ -89,7 +89,7 @@
 
    (unless (string-match-p "appendix" LaTeX-document-regexp)
      (set (make-local-variable 'LaTeX-document-regexp)
-         (concat LaTeX-document-regexp "\\|" "appendix")))
+          (concat LaTeX-document-regexp "\\|" "appendix")))
 
    (TeX-add-symbols
     ;; 7 Titles, addresses and so on
@@ -242,15 +242,15 @@
     ;; 10.2 Other special typesetting
     '("Dash" 0)
     '("cs" (TeX-arg-eval let ((macro (completing-read
-                                     (TeX-argument-prompt nil nil
-                                                          "Command")
-                                     (TeX-symbol-list))))
-                        (format "%s" macro)))
+                                      (TeX-argument-prompt nil nil
+                                                           "Command")
+                                      (TeX-symbol-list))))
+                         (format "%s" macro)))
     '("env" (TeX-arg-eval let ((env (completing-read
-                                    (TeX-argument-prompt nil nil
-                                                         "Environment")
-                                    (LaTeX-environment-list))))
-                         (format "%s" env)))
+                                     (TeX-argument-prompt nil nil
+                                                          "Environment")
+                                     (LaTeX-environment-list))))
+                          (format "%s" env)))
     '("meta"      "Text")
     '("tubbraced" "Text")
     '("nth"       "Number")
@@ -258,30 +258,30 @@
     ;; 12 Bibliography
     '("SetBibJustification"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Justification")
-                   '("\\raggedright"  "\\sloppy"))))
+                    (TeX-argument-prompt nil nil "Justification")
+                    '("\\raggedright"  "\\sloppy"))))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("shortTitle"   "{")
-                               ("shortAuthor"  "{")
-                               ("netaddress"   "{")
-                               ("personalURL"  "{")
-                               ("ORCID"        "{")
-                               ("contributor"  "{")
-                               ("acro"         "{")
-                               ("cs"           "{")
-                               ("env"          "{")
-                               ("meta"         "{")
-                               ("tubbraced"    "{")
-                               ("nth"          "{"))
-                             'textual)
+                                ("shortAuthor"  "{")
+                                ("netaddress"   "{")
+                                ("personalURL"  "{")
+                                ("ORCID"        "{")
+                                ("contributor"  "{")
+                                ("acro"         "{")
+                                ("cs"           "{")
+                                ("env"          "{")
+                                ("meta"         "{")
+                                ("tubbraced"    "{")
+                                ("nth"          "{"))
+                              'textual)
      (font-latex-add-keywords '(("makesignature"   "")
-                               ("SetBibJustification"  "{"))
-                             'function)
+                                ("SetBibJustification"  "{"))
+                              'function)
      (font-latex-add-keywords '(("nameref" "{"))
-                             'reference)))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-ltugboat-class-options
diff --git a/style/ltxguide.el b/style/ltxguide.el
index 8c4bdbd..50b5ee3 100644
--- a/style/ltxguide.el
+++ b/style/ltxguide.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-article-class-options)
 
@@ -92,27 +92,27 @@ For decl environment provided by ltxguide.cls."
 
    ;; Enable `LaTeX-insert-item' in decl-environments:
    (add-to-list 'LaTeX-item-list
-               '("decl" . LaTeX-item-ltxguide-decl)
-               t)
+                '("decl" . LaTeX-item-ltxguide-decl)
+                t)
 
    ;; Make the next 2 macros stay in their own line:
    (LaTeX-paragraph-commands-add-locally '("NEWdescription"
-                                          "NEWfeature"))
+                                           "NEWfeature"))
 
    ;; Verbatim-like macros with braces as delimiters:
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "URL")
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("m"              "{")
-                               ("arg"            "{")
-                               ("oarg"           "{")
-                               ("NEWfeature"     "{")
-                               ("NEWdescription" "{"))
-                             'textual)
+                                ("arg"            "{")
+                                ("oarg"           "{")
+                                ("NEWfeature"     "{")
+                                ("NEWdescription" "{"))
+                              'textual)
      (font-latex-add-keywords '(("URL" ""))
-                             'reference)))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-ltxguide-class-options
diff --git a/style/ltxtable.el b/style/ltxtable.el
index 5b3d49c..f73c0e7 100644
--- a/style/ltxtable.el
+++ b/style/ltxtable.el
@@ -36,17 +36,17 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function reftex-compile-variables
-                 "reftex"
-                 ())
+                  "reftex"
+                  ())
 
 (defvar LaTeX-ltxtable-file-regexp
   `(,(concat "\\\\LTXtable"
-            "{\\(?:[^}]+\\)}"
-            "{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}")
+             "{\\(?:[^}]+\\)}"
+             "{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}")
     1 TeX-auto-file)
   "Matches the file argument of \\LTXtable marco from ltxtable package.
 The regexp for the 2. argument is the same as for \"input\" and
@@ -62,9 +62,9 @@ The regexp for the 2. argument is the same as for \"input\" 
and
       (TeX-arg-length "Width" "1.0\\linewidth")
       (TeX-arg-eval
        (lambda ()
-        (let ((longtable (file-relative-name
-                          (read-file-name "File with longtable: "))))
-          (format "%s" longtable))))))
+         (let ((longtable (file-relative-name
+                           (read-file-name "File with longtable: "))))
+           (format "%s" longtable))))))
 
    ;; Make sure that \LTXtable stays in its own line:
    (LaTeX-paragraph-commands-add-locally "LTXtable")
@@ -77,16 +77,16 @@ The regexp for the 2. argument is the same as for \"input\" 
and
    ;; `reftex-include-file-commands' and run
    ;; `reftex-compile-variables'.  Do this all only once.
    (when (and (boundp 'reftex-include-file-commands)
-             (not (string-match "LTXtable"
-                                (mapconcat #'identity 
reftex-include-file-commands "|"))))
+              (not (string-match "LTXtable"
+                                 (mapconcat #'identity 
reftex-include-file-commands "|"))))
      (add-to-list 'reftex-include-file-commands "LTXtable{\\(?:[^}]+\\)}" t)
      (reftex-compile-variables))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("LTXtable"  "{{"))
-                             'textual)))
+                              'textual)))
  TeX-dialect)
 
 (defvar LaTeX-ltxtable-package-options nil
diff --git a/style/luacode.el b/style/luacode.el
index d544424..b5eb8c5 100644
--- a/style/luacode.el
+++ b/style/luacode.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "luacode"
@@ -54,15 +54,15 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("luadirect" "{")
-                               ("luaexec" "{")
-                               ("luastring" "{")
-                               ("luastringN" "{")
-                               ("luastringO" "{")
-                               ("LuaCodeDebugOn")
-                               ("LuaCodeDebugOff"))
-                             'function)))
+                                ("luaexec" "{")
+                                ("luastring" "{")
+                                ("luastringN" "{")
+                                ("luastringO" "{")
+                                ("LuaCodeDebugOn")
+                                ("LuaCodeDebugOff"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-luacode-package-options nil
diff --git a/style/luatextra.el b/style/luatextra.el
index 5ce6f11..1fe804d 100644
--- a/style/luatextra.el
+++ b/style/luatextra.el
@@ -35,9 +35,9 @@
  "luatextra"
  (lambda ()
    (TeX-run-style-hooks "ifluatex" "fontspec"
-                       ;; FIXME: yet to be written:
-                       ;; "luatexbase"
-                       "metalogo" "luacode"))
+                        ;; FIXME: yet to be written:
+                        ;; "luatexbase"
+                        "metalogo" "luacode"))
  TeX-dialect)
 
 (defvar LaTeX-luatextra-package-options nil
diff --git a/style/makeidx.el b/style/makeidx.el
index f233cc0..4fe7ce4 100644
--- a/style/makeidx.el
+++ b/style/makeidx.el
@@ -37,13 +37,13 @@
 
    ;; Completion for the |see macro
    (setq TeX-complete-list
-        (append
-         '(("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list))
-         TeX-complete-list))
+         (append
+          '(("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list))
+          TeX-complete-list))
 
    ;; RefTeX support
    (and (fboundp 'reftex-add-index-macros)
-       (reftex-add-index-macros '(default))))
+        (reftex-add-index-macros '(default))))
  TeX-dialect)
 
 (defvar LaTeX-makeidx-package-options nil
diff --git a/style/marginnote.el b/style/marginnote.el
index d11927b..045baff 100644
--- a/style/marginnote.el
+++ b/style/marginnote.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "marginnote"
@@ -58,9 +58,9 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("marginnote"  "[{["))
-                             'reference)))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-marginnote-package-options
diff --git a/style/mathtools.el b/style/mathtools.el
index d4b266c..704e827 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -42,8 +42,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-amsmath-package-options)
 
@@ -102,10 +102,10 @@
 
 (defvar LaTeX-mathtools-DeclarePairedDelimiter-regexp
   `(,(concat "\\\\DeclarePairedDelimiter\\(?:X\\|XPP\\)?"
-            "{?"
-            "\\\\\\([a-zA-Z]+\\)"
-            "}?"
-            "\\(?:\\[\\([0-9]+\\)\\]\\)?")
+             "{?"
+             "\\\\\\([a-zA-Z]+\\)"
+             "}?"
+             "\\(?:\\[\\([0-9]+\\)\\]\\)?")
     (1 2) LaTeX-auto-mathtools-DeclarePairedDelimiter)
   "Match the arguments of \\DeclarePairedDelimiterX? from mathtools package.")
 
@@ -120,32 +120,32 @@
 (defun LaTeX-mathtools-auto-prepare ()
   "Clear various variables for mathtools package before parsing."
   (setq LaTeX-auto-mathtools-newtagform             nil
-       LaTeX-auto-mathtools-DeclarePairedDelimiter nil
-       LaTeX-auto-mathtools-newgathered            nil))
+        LaTeX-auto-mathtools-DeclarePairedDelimiter nil
+        LaTeX-auto-mathtools-newgathered            nil))
 
 (defun LaTeX-mathtools-auto-cleanup ()
   "Process the parsed elements for mathtools package."
   (when (LaTeX-mathtools-DeclarePairedDelimiter-list)
     (dolist (delim (LaTeX-mathtools-DeclarePairedDelimiter-list))
       (let ((cmd (car delim))
-           (arg (cadr delim)))
-       (TeX-add-symbols `(,cmd [ LaTeX-mathtools-arg-mathsize-completion ]
-                               ,(if (string= arg "")
-                                    1
-                                  (string-to-number arg)))
-                        `(,(concat cmd "*")
-                          ,(if (string= arg "")
-                               1
-                             (string-to-number arg)))))))
+            (arg (cadr delim)))
+        (TeX-add-symbols `(,cmd [ LaTeX-mathtools-arg-mathsize-completion ]
+                                ,(if (string= arg "")
+                                     1
+                                   (string-to-number arg)))
+                         `(,(concat cmd "*")
+                           ,(if (string= arg "")
+                                1
+                              (string-to-number arg)))))))
   (when (LaTeX-mathtools-newgathered-list)
     (dolist (env (mapcar #'car (LaTeX-mathtools-newgathered-list)))
       (LaTeX-add-environments env)
       (add-to-list 'LaTeX-item-list
-                  `(,env . LaTeX-item-equation) t)
+                   `(,env . LaTeX-item-equation) t)
       (add-to-list 'LaTeX-label-alist
-                  `(,env . LaTeX-amsmath-label) t)
+                   `(,env . LaTeX-amsmath-label) t)
       (when (fboundp 'reftex-add-label-environments)
-       (reftex-add-label-environments `((,env ?e nil nil t)))))))
+        (reftex-add-label-environments `((,env ?e nil nil t)))))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-mathtools-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-mathtools-auto-cleanup t)
@@ -157,7 +157,7 @@ If OPTIONAL, insert it as optional argument in brackets."
   (TeX-argument-insert
    (completing-read
     (TeX-argument-prompt optional nil
-                        (concat "Math style: " TeX-esc) t)
+                         (concat "Math style: " TeX-esc) t)
     '("displaystyle" "textstyle"
       "scriptstyle"  "scriptscriptstyle"))
    optional TeX-esc))
@@ -168,24 +168,24 @@ If OPTIONAL, insert it as optional argument in brackets."
   (TeX-argument-insert
    (completing-read
     (TeX-argument-prompt optional nil
-                        (concat "Size command: " TeX-esc) t)
+                         (concat "Size command: " TeX-esc) t)
     '("big" "Big" "bigg" "Bigg"))
    optional TeX-esc))
 
 (defun LaTeX-mathtools-arg-declarepaireddelimiter (optional &optional X)
   "Query and insert various \\DeclarePairedDelimiter macros from mathtools 
package."
   (let ((cmd (TeX-read-string (concat "Command: " TeX-esc)))
-       (arg (when X (TeX-read-string
-                     (TeX-argument-prompt t nil "Number of arguments")))))
+        (arg (when X (TeX-read-string
+                      (TeX-argument-prompt t nil "Number of arguments")))))
     (TeX-add-symbols `(,cmd [ LaTeX-mathtools-arg-mathsize-completion ]
-                           ,(if X
-                                ;; This is no precaution, arg has to be > 0
-                                (string-to-number arg)
-                              1))
-                    `(,(concat cmd "*")
-                      ,(if X
-                           (string-to-number arg)
-                         1)))
+                            ,(if X
+                                 ;; This is no precaution, arg has to be > 0
+                                 (string-to-number arg)
+                               1))
+                     `(,(concat cmd "*")
+                       ,(if X
+                            (string-to-number arg)
+                          1)))
     (LaTeX-add-mathtools-DeclarePairedDelimiters
      `(,cmd ,(if X arg "")))
     (TeX-argument-insert cmd optional TeX-esc)
@@ -198,27 +198,27 @@ If both arguments are given, insert them in brackets.  If 
only a
 width is given, insert it prefixed with a pair of empty
 brackets."
   (let ((pos (TeX-read-string
-             (TeX-argument-prompt t nil "Position (t, b or c (default))")))
-       (width (completing-read
-               (TeX-argument-prompt t nil "Width")
-               (mapcar
-                (lambda (x) (concat TeX-esc (car x)))
-                (LaTeX-length-list)))))
+              (TeX-argument-prompt t nil "Position (t, b or c (default))")))
+        (width (completing-read
+                (TeX-argument-prompt t nil "Width")
+                (mapcar
+                 (lambda (x) (concat TeX-esc (car x)))
+                 (LaTeX-length-list)))))
     (LaTeX-insert-environment
      env
      (cond (;; both arguments
-           (and pos   (not (string= pos ""))
-                width (not (string= width "")))
-           (format "[%s][%s]" pos width))
-          (;; pos not empty, width empty
-           (and pos (not (string= pos ""))
-                (string= width ""))
-           (format "[%s]" pos))
-          (;; pos empty, width not
-           (and (string= pos "")
-                width (not (string= width "")))
-           (format "[][%s]" width))
-          (t nil)))))
+            (and pos   (not (string= pos ""))
+                 width (not (string= width "")))
+            (format "[%s][%s]" pos width))
+           (;; pos not empty, width empty
+            (and pos (not (string= pos ""))
+                 (string= width ""))
+            (format "[%s]" pos))
+           (;; pos empty, width not
+            (and (string= pos "")
+                 width (not (string= width "")))
+            (format "[][%s]" width))
+           (t nil)))))
 
 (defun LaTeX-mathtools-env-cases (env)
   "Insert various cases ENVs incl. an ampersand from mathtools package."
@@ -310,20 +310,20 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
     '("newtagform"
       (TeX-arg-eval
        (lambda ()
-        (let ((newtag (TeX-read-string
-                       (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-mathtools-newtagforms newtag)
-          (format "%s" newtag))))
-       [ "Inner format" ] "Left" "Right")
+         (let ((newtag (TeX-read-string
+                        (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-mathtools-newtagforms newtag)
+           (format "%s" newtag))))
+      [ "Inner format" ] "Left" "Right")
     '("renewtagform"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-mathtools-newtagform-list))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-mathtools-newtagform-list))
       [ "Inner format" ] "Left" "Right")
     '("usetagform"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-mathtools-newtagform-list)))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-mathtools-newtagform-list)))
     ;; 3.2.2 Showing only referenced tags
     '("refeq" TeX-arg-ref)
     '("noeqref" TeX-arg-ref)
@@ -343,9 +343,9 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
     '("xleftrightharpoons" ["Below"] "Above")
     ;; 3.3.2 Braces and brackets
     '("underbracket" [ (TeX-arg-length "Rule thickness") ]
-                    [ (TeX-arg-length "Bracket height") ] t)
+      [ (TeX-arg-length "Bracket height") ] t)
     '("overbracket"  [ (TeX-arg-length "Rule thickness") ]
-                    [ (TeX-arg-length "Bracket height") ] t)
+      [ (TeX-arg-length "Bracket height") ] t)
     '("underbrace" 1)
     '("overbrace" 1)
     '("LaTeXunderbrace" 1)
@@ -384,13 +384,13 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
     '("reDeclarePairedDelimiterInnerWrapper"
       (TeX-arg-eval
        (lambda ()
-        (let ((cmd (completing-read
-                    (concat "Command: " TeX-esc)
-                    (mapcar #'car 
(LaTeX-mathtools-DeclarePairedDelimiter-list)))))
-          (concat TeX-esc cmd))))
+         (let ((cmd (completing-read
+                     (concat "Command: " TeX-esc)
+                     (mapcar #'car 
(LaTeX-mathtools-DeclarePairedDelimiter-list)))))
+           (concat TeX-esc cmd))))
       (TeX-arg-eval completing-read
-                   "star or nostar: "
-                   '("star" "nostar"))
+                    "star or nostar: "
+                    '("star" "nostar"))
       t)
     ;; 3.7.1 Left and right parentheses
     '("lparen" TeX-arg-insert-right-brace-maybe)
@@ -410,20 +410,20 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
     '("newgathered"
       (TeX-arg-eval
        (lambda ()
-        (let ((env (TeX-read-string
-                    (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-environments env)
-          (LaTeX-add-mathtools-newgathereds env)
-          (add-to-list 'LaTeX-item-list
-                       `(,env . LaTeX-item-equation) t)
-          (add-to-list 'LaTeX-label-alist
-                       `(,env . LaTeX-amsmath-label) t)
-          (format "%s" env))))
+         (let ((env (TeX-read-string
+                     (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-environments env)
+           (LaTeX-add-mathtools-newgathereds env)
+           (add-to-list 'LaTeX-item-list
+                        `(,env . LaTeX-item-equation) t)
+           (add-to-list 'LaTeX-label-alist
+                        `(,env . LaTeX-amsmath-label) t)
+           (format "%s" env))))
       3)
     '("renewgathered"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-mathtools-newgathered-list))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-mathtools-newgathered-list))
       3)
     ;; 4.6 Split fractions
     '("splitfrac" 2)
@@ -435,58 +435,58 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
    (add-to-list 'TeX-braces-association '("\\lparen" . "\\rparen") t)
 
    (setq LaTeX-item-list
-        (append '(("multlined"   . LaTeX-item-equation)
-                  ("lgathered"   . LaTeX-item-equation)
-                  ("rgathered"   . LaTeX-item-equation)
-                  ("spreadlines" . LaTeX-item-equation)
-                  ("matrix*"     . LaTeX-item-equation)
-                  ("pmatrix*"    . LaTeX-item-equation)
-                  ("bmatrix*"    . LaTeX-item-equation)
-                  ("Bmatrix*"    . LaTeX-item-equation)
-                  ("vmatrix*"    . LaTeX-item-equation)
-                  ("Vmatrix*"    . LaTeX-item-equation)
-                  ("dcases"      . LaTeX-mathtools-item-cases)
-                  ("dcases*"     . LaTeX-mathtools-item-cases)
-                  ("rcases"      . LaTeX-mathtools-item-cases)
-                  ("rcases*"     . LaTeX-mathtools-item-cases)
-                  ("drcases"     . LaTeX-mathtools-item-cases)
-                  ("drcases*"    . LaTeX-mathtools-item-cases)
-                  ("cases*"      . LaTeX-mathtools-item-cases))
-                LaTeX-item-list))
+         (append '(("multlined"   . LaTeX-item-equation)
+                   ("lgathered"   . LaTeX-item-equation)
+                   ("rgathered"   . LaTeX-item-equation)
+                   ("spreadlines" . LaTeX-item-equation)
+                   ("matrix*"     . LaTeX-item-equation)
+                   ("pmatrix*"    . LaTeX-item-equation)
+                   ("bmatrix*"    . LaTeX-item-equation)
+                   ("Bmatrix*"    . LaTeX-item-equation)
+                   ("vmatrix*"    . LaTeX-item-equation)
+                   ("Vmatrix*"    . LaTeX-item-equation)
+                   ("dcases"      . LaTeX-mathtools-item-cases)
+                   ("dcases*"     . LaTeX-mathtools-item-cases)
+                   ("rcases"      . LaTeX-mathtools-item-cases)
+                   ("rcases*"     . LaTeX-mathtools-item-cases)
+                   ("drcases"     . LaTeX-mathtools-item-cases)
+                   ("drcases*"    . LaTeX-mathtools-item-cases)
+                   ("cases*"      . LaTeX-mathtools-item-cases))
+                 LaTeX-item-list))
 
    (setq LaTeX-label-alist
-        (append '(("lgathered" . LaTeX-amsmath-label)
-                  ("rgathered" . LaTeX-amsmath-label)
-                  ("multlined" . LaTeX-amsmath-label))
-                LaTeX-label-alist))
+         (append '(("lgathered" . LaTeX-amsmath-label)
+                   ("rgathered" . LaTeX-amsmath-label)
+                   ("multlined" . LaTeX-amsmath-label))
+                 LaTeX-label-alist))
 
    ;; RefTeX support: Add env's with `reftex-add-label-environments'
    (when (fboundp 'reftex-add-label-environments)
      (let ((envs '(("lgathered"  ?e nil nil t)
-                  ("rgathered"  ?e nil nil t)
-                  ("multlined"  ?e nil nil t))))
+                   ("rgathered"  ?e nil nil t)
+                   ("multlined"  ?e nil nil t))))
        (dolist (env envs)
-        (reftex-add-label-environments `(,env)))))
+         (reftex-add-label-environments `(,env)))))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("mathtoolsset"  "{")
-                               ("newtagform"    "{[{{")
-                               ("renewtagform"  "{[{{")
-                               ("DeclarePairedDelimiter"     "|{\\{{")
-                               ("DeclarePairedDelimiterX"    "|{\\[{{{")
-                               ("DeclarePairedDelimiterXPP"  "|{\\[{{{{{")
-                               ("reDeclarePairedDelimiterInnerWrapper" 
"|{\\{{")
-                               ("DeclareMathSizes"           "{{{{")
-                               ("newgathered"                "{{{{")
-                               ("renewgathered"              "{{{{"))
-                             'function)
+                                ("newtagform"    "{[{{")
+                                ("renewtagform"  "{[{{")
+                                ("DeclarePairedDelimiter"     "|{\\{{")
+                                ("DeclarePairedDelimiterX"    "|{\\[{{{")
+                                ("DeclarePairedDelimiterXPP"  "|{\\[{{{{{")
+                                ("reDeclarePairedDelimiterInnerWrapper" 
"|{\\{{")
+                                ("DeclareMathSizes"           "{{{{")
+                                ("newgathered"                "{{{{")
+                                ("renewgathered"              "{{{{"))
+                              'function)
      (font-latex-add-keywords '(("usetagform" "{"))
-                             'variable)
+                              'variable)
      (font-latex-add-keywords '(("refeq"   "{")
-                               ("noeqref" "{"))
-                             'reference)))
+                                ("noeqref" "{"))
+                              'reference)))
  TeX-dialect)
 
 ;;; mathtools.el ends here
diff --git a/style/mdframed.el b/style/mdframed.el
index e4483e2..edf2892 100644
--- a/style/mdframed.el
+++ b/style/mdframed.el
@@ -45,8 +45,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-color-definecolor-list "color" ())
 (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
@@ -175,10 +175,10 @@
       "[ \t\n\r%]*"
       "\\(?:\\[[^][]*"
         "\\(?:{[^}{]*"
-         "\\(?:{[^}{]*"
-           "\\(?:{[^}{]*}[^}{]*\\)*"
-         "}[^}{]*\\)*"
-       "}[^][]*\\)*"
+          "\\(?:{[^}{]*"
+            "\\(?:{[^}{]*}[^}{]*\\)*"
+          "}[^}{]*\\)*"
+        "}[^][]*\\)*"
       "\\]\\)?"
       "[ \t\n\r%]*"
       "{\\([^}]+\\)}")
@@ -204,10 +204,10 @@
       "[ \t\n\r%]*"
       "\\(?:\\[[^][]*"
         "\\(?:{[^}{]*"
-         "\\(?:{[^}{]*"
-           "\\(?:{[^}{]*}[^}{]*\\)*"
-         "}[^}{]*\\)*"
-       "}[^][]*\\)*"
+          "\\(?:{[^}{]*"
+            "\\(?:{[^}{]*}[^}{]*\\)*"
+          "}[^}{]*\\)*"
+        "}[^][]*\\)*"
       "\\]\\)?"
       "[ \t\n\r%]*"
       "{\\([^}]+\\)}")
@@ -219,46 +219,46 @@
   ;; 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)))
+           (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)))
       (cl-pushnew (list key (TeX-delete-duplicate-strings
-                            (append val (mapcar #'car 
(LaTeX-mdframed-mdfdefinestyle-list)))))
-                 opts :test #'equal)
+                             (append val (mapcar #'car 
(LaTeX-mdframed-mdfdefinestyle-list)))))
+                  opts :test #'equal)
       (setq LaTeX-mdframed-key-val-options-local
-           (copy-alist opts))))
+            (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)))
+            (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)))
+                         #'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)
-       (setq tmp (assq-delete-all (car (assoc x tmp)) tmp))
-       (cl-pushnew (list x (mapcar #'car (funcall colorcmd))) tmp :test 
#'equal))
+        (setq tmp (assq-delete-all (car (assoc x tmp)) tmp))
+        (cl-pushnew (list x (mapcar #'car (funcall colorcmd))) tmp :test 
#'equal))
       (setq LaTeX-mdframed-key-val-options-local
-           (copy-alist tmp)))))
+            (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))
+        LaTeX-auto-mdframed-mdfdefinestyle nil
+        LaTeX-auto-mdframed-mdtheorem      nil))
 
 (defun LaTeX-mdframed-auto-cleanup ()
   "Process parsed elements for mdframed package."
@@ -268,10 +268,10 @@
     (TeX-ispell-skip-setcdr `((,env ispell-tex-arg-end 0))))
   (dolist (newenv (LaTeX-mdframed-mdtheorem-list))
     (let ((env (car newenv))
-         (new (cadr 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-add-environments (list (concat env "*") (vector "Heading"))))))
   (LaTeX-mdframed-update-style-key))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-mdframed-auto-prepare t)
@@ -289,7 +289,7 @@
 
    ;; Local version of key-val options
    (setq LaTeX-mdframed-key-val-options-local
-        (copy-alist LaTeX-mdframed-key-val-options))
+         (copy-alist LaTeX-mdframed-key-val-options))
 
    ;; 4. Commands
    (TeX-add-symbols
@@ -300,19 +300,19 @@
       [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
       (TeX-arg-eval
        (lambda ()
-        (let ((env (TeX-read-string
-                    (TeX-argument-prompt nil 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-arg-end 0)))
-          (format "%s" env)))))
+         (let ((env (TeX-read-string
+                     (TeX-argument-prompt nil 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-arg-end 0)))
+           (format "%s" env)))))
 
     '("renewmdenv"
       [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Environment")
-                   (LaTeX-mdframed-newmdenv-list)))
+                    (TeX-argument-prompt nil nil "Environment")
+                    (LaTeX-mdframed-newmdenv-list)))
 
     '("surroundwithmdframed"
       [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
@@ -320,35 +320,35 @@
 
     '("mdflength"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Length")
-                   '(("skipabove")
-                     ("skipbelow")
-                     ("leftmargin")
-                     ("rightmargin")
-                     ("innerleftmargin")
-                     ("innerrightmargin")
-                     ("innertopmargin")
-                     ("innerbottommargin")
-                     ("linewidth")
-                     ("innerlinewidth")
-                     ("middlelinewidth")
-                     ("outerlinewidth"))))
+                    (TeX-argument-prompt nil 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 nil nil "Style name"))))
-          (LaTeX-add-mdframed-mdfdefinestyles style)
-          (LaTeX-mdframed-update-style-key)
-          (format "%s" style))))
+         (let ((style (TeX-read-string
+                       (TeX-argument-prompt nil 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 nil nil "Style name")
-                   (LaTeX-mdframed-mdfdefinestyle-list))
+                    (TeX-argument-prompt nil nil "Style name")
+                    (LaTeX-mdframed-mdfdefinestyle-list))
       (TeX-arg-key-val LaTeX-mdframed-key-val-options-local))
 
     ;; 6.11. Title commands inside the environment
@@ -361,34 +361,34 @@
       [ TeX-arg-key-val LaTeX-mdframed-key-val-options-local ]
       (TeX-arg-eval
        (lambda ()
-        (let ((nthm (TeX-read-string
-                     (TeX-argument-prompt nil nil "Environment"))))
-          (LaTeX-add-environments (list nthm (vector "Heading")))
-          (format "%s" nthm))))
+         (let ((nthm (TeX-read-string
+                      (TeX-argument-prompt nil 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"))
-                       "") ])
+                                        (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 nil nil "Environment"))))
-          (LaTeX-add-environments (list nthm (vector "Heading"))
-                                  (list (concat nthm "*") (vector "Heading")))
-          (format "%s" nthm))))
+         (let ((nthm (TeX-read-string
+                      (TeX-argument-prompt nil 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"))
-                       "") ]))
+                                        (backward-char 2)
+                                        (preceding-char)) ?\])
+                                  ()
+                                (TeX-arg-counter t "Within counter"))
+                        "") ]))
 
    ;; Main environment defined by mdframed.sty
    (LaTeX-add-environments
@@ -397,27 +397,27 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("newmdenv"             "[{")
-                               ("renewmdenv"           "[{")
-                               ("surroundwithmdframed" "[{")
-                               ("mdfsetup"             "[{")
-                               ("mdfdefinestyle"       "{{")
-                               ("mdfapptodefinestyle"  "{{")
-                               ("newmdtheoremenv"      "[{[{[")
-                               ("mdtheorem"            "[{[{["))
-                             'function)
+                                ("renewmdenv"           "[{")
+                                ("surroundwithmdframed" "[{")
+                                ("mdfsetup"             "[{")
+                                ("mdfdefinestyle"       "{{")
+                                ("mdfapptodefinestyle"  "{{")
+                                ("newmdtheoremenv"      "[{[{[")
+                                ("mdtheorem"            "[{[{["))
+                              'function)
      (font-latex-add-keywords '(("mdfsubtitle"          "[{"))
-                             'sectioning-5)
+                              'sectioning-5)
      (font-latex-add-keywords '(("mdflength"            "{"))
-                             'variable)))
+                              'variable)))
  TeX-dialect)
 
 (defvar LaTeX-mdframed-package-options-list
   '(("xcolor")
     ("framemethod" ("default" "tex" "latex" "none" "0"
-                   "tikz" "pgf" "1"
-                   "pstricks" "ps" "postscript" "2"))
+                    "tikz" "pgf" "1"
+                    "pstricks" "ps" "postscript" "2"))
     ("tikz") ("TikZ")
     ("ps") ("pstricks") ("PSTricks"))
   "Package options for the framed package.")
diff --git a/style/mdwlist.el b/style/mdwlist.el
index 2c4b067..8335c02 100644
--- a/style/mdwlist.el
+++ b/style/mdwlist.el
@@ -33,8 +33,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "mdwlist"
@@ -54,16 +54,16 @@
    (setq LaTeX-end-regexp (concat LaTeX-end-regexp "\\|suspend\\b"))
    (make-local-variable 'paragraph-start)
    (setq paragraph-start (concat paragraph-start
-                                "\\|[ \t]*" TeX-comment-start-regexp "*[ \t]*"
-                                (regexp-quote TeX-esc)
-                                "\\(resume\\b\\|suspend\\b\\)"))
+                                 "\\|[ \t]*" TeX-comment-start-regexp "*[ \t]*"
+                                 (regexp-quote TeX-esc)
+                                 "\\(resume\\b\\|suspend\\b\\)"))
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("makecompactlist" "{{")
-                               ("suspend" "[{")
-                               ("resume" "[{["))
-                             'function)))
+                                ("suspend" "[{")
+                                ("resume" "[{["))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-mdwlist-package-options nil
diff --git a/style/menukeys.el b/style/menukeys.el
index 7d68097..ac375ea 100644
--- a/style/menukeys.el
+++ b/style/menukeys.el
@@ -37,8 +37,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
 
@@ -89,8 +89,8 @@
 (defun LaTeX-menukeys-auto-prepare ()
   "Clear various `LaTeX-auto-menukeys-*' variables before parsing."
   (setq LaTeX-auto-menukeys-newmenustyle nil
-       LaTeX-auto-menukeys-newmenucolortheme nil
-       LaTeX-auto-menukeys-newmenumacro nil))
+        LaTeX-auto-menukeys-newmenucolortheme nil
+        LaTeX-auto-menukeys-newmenumacro nil))
 
 (defun LaTeX-menukeys-auto-cleanup ()
   "Process the parsed elements for menukeys package.
@@ -104,28 +104,28 @@ current separator.  These renew-commands are also removed 
first
 from the variable `TeX-symbol-list' before being re-added."
   (dolist (x (apply #'append LaTeX-menukeys-newmenumacro-list))
     (let ((macro (nth 0 x))
-         (sep   (nth 1 x))
-         (renew (when (string= (nth 2 x) "renew")
-                  (nth 2 x))))
+          (sep   (nth 1 x))
+          (renew (when (string= (nth 2 x) "renew")
+                   (nth 2 x))))
       ;; When we are renewmenumacro'ing, delete the entry first from the
       ;; variable `TeX-symbol-list' and then add the new spec:
       (when renew
-       (setq TeX-symbol-list
-             (assq-delete-all (car (assoc macro (TeX-symbol-list))) 
TeX-symbol-list)))
+        (setq TeX-symbol-list
+              (assq-delete-all (car (assoc macro (TeX-symbol-list))) 
TeX-symbol-list)))
       (TeX-add-symbols
        `(,macro [ TeX-arg-eval completing-read
-                              (TeX-argument-prompt t nil
-                                                   ,(concat "Input separator "
-                                                            "(default "
-                                                            (if (and sep (not 
(string= sep "")))
-                                                                sep
-                                                              ",")
-                                                            ")"))
-                              LaTeX-menukeys-input-separators-list ] t ))
+                               (TeX-argument-prompt t nil
+                                                    ,(concat "Input separator "
+                                                             "(default "
+                                                             (if (and sep (not 
(string= sep "")))
+                                                                 sep
+                                                               ",")
+                                                             ")"))
+                               LaTeX-menukeys-input-separators-list ] t ))
       (when (and (featurep 'font-latex)
-                (eq TeX-install-font-lock 'font-latex-setup))
-       (font-latex-add-keywords `((,macro "[{"))
-                                'textual)))))
+                 (eq TeX-install-font-lock 'font-latex-setup))
+        (font-latex-add-keywords `((,macro "[{"))
+                                 'textual)))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-menukeys-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-menukeys-auto-cleanup t)
@@ -138,16 +138,16 @@ to the name of known macros via `TeX-add-symbols'.  If
 font-latex.el is loaded, also use `font-latex-add-keywords' on
 macro.  If RENEW is non-nil, query for an already defined macro."
   (let ((macro (if renew
-                  (completing-read
-                   (concat "Macro: " TeX-esc)
-                   (TeX-delete-duplicate-strings (mapcar #'car 
(LaTeX-menukeys-newmenumacro-list))))
-                (TeX-read-string (concat "Macro: " TeX-esc))))
-       (sep   (completing-read
-               (TeX-argument-prompt optional nil "Input separator (default ,)")
-               LaTeX-menukeys-input-separators-list))
-       (style (completing-read
-               (TeX-argument-prompt optional nil "Style")
-               (LaTeX-menukeys-newmenustyle-list))))
+                   (completing-read
+                    (concat "Macro: " TeX-esc)
+                    (TeX-delete-duplicate-strings (mapcar #'car 
(LaTeX-menukeys-newmenumacro-list))))
+                 (TeX-read-string (concat "Macro: " TeX-esc))))
+        (sep   (completing-read
+                (TeX-argument-prompt optional nil "Input separator (default 
,)")
+                LaTeX-menukeys-input-separators-list))
+        (style (completing-read
+                (TeX-argument-prompt optional nil "Style")
+                (LaTeX-menukeys-newmenustyle-list))))
     (TeX-argument-insert (concat TeX-esc macro) optional)
     (when (and sep (not (string= sep "")))
       (insert (format "[%s]" sep)))
@@ -156,21 +156,21 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
     ;; variable `TeX-symbol-list' and then add the new spec:
     (when renew
       (setq TeX-symbol-list
-           (assq-delete-all (car (assoc macro (TeX-symbol-list))) 
TeX-symbol-list)))
+            (assq-delete-all (car (assoc macro (TeX-symbol-list))) 
TeX-symbol-list)))
     (TeX-add-symbols
      `(,macro [ TeX-arg-eval completing-read
-                            (TeX-argument-prompt t nil
-                                                 ,(concat "Input separator "
-                                                         "(default "
-                                                         (if (and sep (not 
(string= sep "")))
-                                                             sep
-                                                           ",")
-                                                         ")"))
-                            LaTeX-menukeys-input-separators-list ] t ))
+                             (TeX-argument-prompt t nil
+                                                  ,(concat "Input separator "
+                                                          "(default "
+                                                          (if (and sep (not 
(string= sep "")))
+                                                              sep
+                                                            ",")
+                                                          ")"))
+                             LaTeX-menukeys-input-separators-list ] t ))
     (when (and (featurep 'font-latex)
-              (eq TeX-install-font-lock 'font-latex-setup))
+               (eq TeX-install-font-lock 'font-latex-setup))
       (font-latex-add-keywords `((,macro       "[{"))
-                              'textual))))
+                               'textual))))
 
 (TeX-add-style-hook
  "menukeys"
@@ -197,84 +197,84 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
       ;; \directory [<separator>]{path}
       ;; \keys      [<separator>]{keystrokes}
       '("menu"
-       [ TeX-arg-eval completing-read
-                      (TeX-argument-prompt t nil "Input separator")
-                      LaTeX-menukeys-input-separators-list ]
-       t)
+        [ TeX-arg-eval completing-read
+          (TeX-argument-prompt t nil "Input separator")
+          LaTeX-menukeys-input-separators-list ]
+        t)
 
       '("directory"
-       [ TeX-arg-eval completing-read
-                      (TeX-argument-prompt t nil "Input separator")
-                      LaTeX-menukeys-input-separators-list ]
-       t)
+        [ TeX-arg-eval completing-read
+          (TeX-argument-prompt t nil "Input separator")
+          LaTeX-menukeys-input-separators-list ]
+        t)
 
       '("keys"
-       [ TeX-arg-eval completing-read
-                      (TeX-argument-prompt t nil "Input separator")
-                      LaTeX-menukeys-input-separators-list ]
-       t)))
+        [ TeX-arg-eval completing-read
+          (TeX-argument-prompt t nil "Input separator")
+          LaTeX-menukeys-input-separators-list ]
+        t)))
 
    (TeX-add-symbols
     ;; 4.2.1 Predefined styles
     ;; \drawtikzfolder[<front fill>][<draw>]
     '("drawtikzfolder"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Front color")
-                    (LaTeX-xcolor-definecolor-list) ]
+        (TeX-argument-prompt t nil "Front color")
+        (LaTeX-xcolor-definecolor-list) ]
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Line color")
-                    (LaTeX-xcolor-definecolor-list) ] )
+        (TeX-argument-prompt t nil "Line color")
+        (LaTeX-xcolor-definecolor-list) ] )
 
     ;; 4.2.2 Declaring styles
     ;; \newmenustylesimple*{<name>}[<pre>]{<style>}[<sep>][<post>]{<theme>}
     '("newmenustylesimple"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-menukeys-newmenustyles name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-menukeys-newmenustyles name)
+           (format "%s" name))))
       [ t ] nil [ nil ] [ nil ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color theme")
-                   (LaTeX-menukeys-newmenucolortheme-list)))
+                    (TeX-argument-prompt nil nil "Color theme")
+                    (LaTeX-menukeys-newmenucolortheme-list)))
 
     '("newmenustylesimple*"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-menukeys-newmenustyles name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-menukeys-newmenustyles name)
+           (format "%s" name))))
       [ t ] nil [ nil ] [ nil ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color theme")
-                   (LaTeX-menukeys-newmenucolortheme-list)))
+                    (TeX-argument-prompt nil nil "Color theme")
+                    (LaTeX-menukeys-newmenucolortheme-list)))
 
     ;; 
\newmenustyle*{<name>}[<pre>]{<first>}[<sep>]{<mid>}{<last>}{<single>}[<post>]{<theme>}
     '("newmenustyle"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-menukeys-newmenustyles name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-menukeys-newmenustyles name)
+           (format "%s" name))))
       [ t ] nil [ nil ] nil nil nil [ nil ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color theme")
-                   (LaTeX-menukeys-newmenucolortheme-list)))
+                    (TeX-argument-prompt nil nil "Color theme")
+                    (LaTeX-menukeys-newmenucolortheme-list)))
 
     '("newmenustyle*"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-menukeys-newmenustyles name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-menukeys-newmenustyles name)
+           (format "%s" name))))
       [ t ] nil [ nil ] nil nil nil [ nil ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color theme")
-                   (LaTeX-menukeys-newmenucolortheme-list)))
+                    (TeX-argument-prompt nil nil "Color theme")
+                    (LaTeX-menukeys-newmenucolortheme-list)))
 
     '("CurrentMenuElement" 0)
 
@@ -282,72 +282,72 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
     '("copymenustyle"
       (TeX-arg-eval
        (lambda ()
-        (let ((copy (TeX-read-string
-                     (TeX-argument-prompt nil nil "Copy")))
-              (orig (completing-read
-                     (TeX-argument-prompt nil nil "Original")
-                     (LaTeX-menukeys-newmenustyle-list))))
-          (LaTeX-add-menukeys-newmenustyles copy)
-          (TeX-argument-insert copy nil)
-          (format "%s" orig)))))
+         (let ((copy (TeX-read-string
+                      (TeX-argument-prompt nil nil "Copy")))
+               (orig (completing-read
+                      (TeX-argument-prompt nil nil "Original")
+                      (LaTeX-menukeys-newmenustyle-list))))
+           (LaTeX-add-menukeys-newmenustyles copy)
+           (TeX-argument-insert copy nil)
+           (format "%s" orig)))))
 
     ;; 4.2.4 Changing styles
     ;; \changemenuelement*{name}{element}{definition}
     '("changemenuelement"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-menukeys-newmenustyle-list))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-menukeys-newmenustyle-list))
       2)
 
     '("changemenuelement*"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-menukeys-newmenustyle-list))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-menukeys-newmenustyle-list))
       2)
 
     ;; Same arguments as \newmenustylesimple
     '("renewmenustylesimple"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-menukeys-newmenustyle-list))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-menukeys-newmenustyle-list))
       [ t ] nil [ nil ] [ nil ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color theme")
-                   (LaTeX-menukeys-newmenucolortheme-list)))
+                    (TeX-argument-prompt nil nil "Color theme")
+                    (LaTeX-menukeys-newmenucolortheme-list)))
 
     '("providemenustylesimple"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-menukeys-newmenustyles name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-menukeys-newmenustyles name)
+           (format "%s" name))))
       [ t ] nil [ nil ] [ nil ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color theme")
-                   (LaTeX-menukeys-newmenucolortheme-list)))
+                    (TeX-argument-prompt nil nil "Color theme")
+                    (LaTeX-menukeys-newmenucolortheme-list)))
 
     ;; Same arguments as \newmenustyle
     '("providemenustyle"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-menukeys-newmenustyle-list))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-menukeys-newmenustyle-list))
       [ t ] nil [ nil ] nil nil nil [ nil ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color theme")
-                   (LaTeX-menukeys-newmenucolortheme-list)))
+                    (TeX-argument-prompt nil nil "Color theme")
+                    (LaTeX-menukeys-newmenucolortheme-list)))
 
     '("renewmenustyle"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-menukeys-newmenustyles name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-menukeys-newmenustyles name)
+           (format "%s" name))))
       [ t ] nil [ nil ] nil nil nil [ nil ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color theme")
-                   (LaTeX-menukeys-newmenucolortheme-list)))
+                    (TeX-argument-prompt nil nil "Color theme")
+                    (LaTeX-menukeys-newmenucolortheme-list)))
 
     ;; 4.3 Color themes
     ;; 4.3.2 Create a theme
@@ -355,117 +355,117 @@ macro.  If RENEW is non-nil, query for an already 
defined macro."
     '("newmenucolortheme"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-menukeys-newmenucolorthemes name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-menukeys-newmenucolorthemes name)
+           (format "%s" name))))
       (TeX-arg-eval
        (lambda ()
-        (let ((model (completing-read
-                      (TeX-argument-prompt nil nil "Model")
-                      (LaTeX-xcolor-color-models))))
-          (TeX-argument-insert model nil)
-          (if (string= model "named")
-              (let ((bg (completing-read
-                         (TeX-argument-prompt nil nil "Node background color")
-                         (LaTeX-xcolor-definecolor-list)))
-                    (br (completing-read
-                         (TeX-argument-prompt nil nil "Node border color")
-                         (LaTeX-xcolor-definecolor-list)))
-                    (txt (completing-read
-                          (TeX-argument-prompt nil nil "Node text color")
-                          (LaTeX-xcolor-definecolor-list))))
-                (TeX-argument-insert bg nil)
-                (TeX-argument-insert br nil)
-                (format "%s" txt))
-            (let ((bg (TeX-read-string
-                       (TeX-argument-prompt nil nil "Node background color 
spec")))
-                  (br (TeX-read-string
-                       (TeX-argument-prompt nil nil "Node border color spec")))
-                  (txt (TeX-read-string
-                        (TeX-argument-prompt nil nil "Node text color spec"))))
-              (TeX-argument-insert bg nil)
-              (TeX-argument-insert br nil)
-              (format "%s" txt))))))
+         (let ((model (completing-read
+                       (TeX-argument-prompt nil nil "Model")
+                       (LaTeX-xcolor-color-models))))
+           (TeX-argument-insert model nil)
+           (if (string= model "named")
+               (let ((bg (completing-read
+                          (TeX-argument-prompt nil nil "Node background color")
+                          (LaTeX-xcolor-definecolor-list)))
+                     (br (completing-read
+                          (TeX-argument-prompt nil nil "Node border color")
+                          (LaTeX-xcolor-definecolor-list)))
+                     (txt (completing-read
+                           (TeX-argument-prompt nil nil "Node text color")
+                           (LaTeX-xcolor-definecolor-list))))
+                 (TeX-argument-insert bg nil)
+                 (TeX-argument-insert br nil)
+                 (format "%s" txt))
+             (let ((bg (TeX-read-string
+                        (TeX-argument-prompt nil nil "Node background color 
spec")))
+                   (br (TeX-read-string
+                        (TeX-argument-prompt nil nil "Node border color 
spec")))
+                   (txt (TeX-read-string
+                         (TeX-argument-prompt nil nil "Node text color 
spec"))))
+               (TeX-argument-insert bg nil)
+               (TeX-argument-insert br nil)
+               (format "%s" txt))))))
       (TeX-arg-conditional (y-or-n-p "With additional optional arguments? ")
-                          ( [ 3 ] )
-                        (ignore)))
+                           ( [ 3 ] )
+                           (ignore)))
 
     ;; 4.3.3 Copy a theme
     '("copymenucolortheme"
       (TeX-arg-eval
        (lambda ()
-        (let ((copy (TeX-read-string
-                     (TeX-argument-prompt nil nil "Copy")))
-              (orig (completing-read
-                     (TeX-argument-prompt nil nil "Original")
-                     (LaTeX-menukeys-newmenucolortheme-list))))
-          (LaTeX-add-menukeys-newmenucolorthemes copy)
-          (TeX-argument-insert copy nil)
-          (format "%s" orig)))))
+         (let ((copy (TeX-read-string
+                      (TeX-argument-prompt nil nil "Copy")))
+               (orig (completing-read
+                      (TeX-argument-prompt nil nil "Original")
+                      (LaTeX-menukeys-newmenucolortheme-list))))
+           (LaTeX-add-menukeys-newmenucolorthemes copy)
+           (TeX-argument-insert copy nil)
+           (format "%s" orig)))))
 
     ;; 4.3.4 Change a theme
     '("changemenucolor"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-menukeys-newmenucolortheme-list))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-menukeys-newmenucolortheme-list))
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Element")
-                   '("bg" "br" "txt"))
+                    (TeX-argument-prompt nil nil "Element")
+                    '("bg" "br" "txt"))
       (TeX-arg-eval
        (lambda ()
-        (let ((model (completing-read
-                      (TeX-argument-prompt nil nil "Model")
-                      (LaTeX-xcolor-color-models))))
-          (TeX-argument-insert model nil)
-          (if (string= model "named")
-              (let ((color (completing-read
-                            (TeX-argument-prompt nil nil "Color")
-                            (LaTeX-xcolor-definecolor-list))))
-                (format "%s" color))
-            (let ((color (TeX-read-string
-                          (TeX-argument-prompt nil nil "Color spec"))))
-              (format "%s" color)))))))
+         (let ((model (completing-read
+                       (TeX-argument-prompt nil nil "Model")
+                       (LaTeX-xcolor-color-models))))
+           (TeX-argument-insert model nil)
+           (if (string= model "named")
+               (let ((color (completing-read
+                             (TeX-argument-prompt nil nil "Color")
+                             (LaTeX-xcolor-definecolor-list))))
+                 (format "%s" color))
+             (let ((color (TeX-read-string
+                           (TeX-argument-prompt nil nil "Color spec"))))
+               (format "%s" color)))))))
 
     ;; Same arguments as \newmenucolortheme
     '("renewmenucolortheme"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Name"))))
-          (LaTeX-add-menukeys-newmenucolorthemes name)
-          (format "%s" name))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Name"))))
+           (LaTeX-add-menukeys-newmenucolorthemes name)
+           (format "%s" name))))
       (TeX-arg-eval
        (lambda ()
-        (let ((model (completing-read
-                      (TeX-argument-prompt nil nil "Model")
-                      (LaTeX-xcolor-color-models))))
-          (TeX-argument-insert model nil)
-          (if (string= model "named")
-              (let ((bg (completing-read
-                         (TeX-argument-prompt nil nil "Node background color")
-                         (LaTeX-xcolor-definecolor-list)))
-                    (br (completing-read
-                         (TeX-argument-prompt nil nil "Node border color")
-                         (LaTeX-xcolor-definecolor-list)))
-                    (txt (completing-read
-                          (TeX-argument-prompt nil nil "Node text color")
-                          (LaTeX-xcolor-definecolor-list))))
-                (TeX-argument-insert bg nil)
-                (TeX-argument-insert br nil)
-                (format "%s" txt))
-            (let ((bg (TeX-read-string
-                       (TeX-argument-prompt nil nil "Node background color 
spec")))
-                  (br (TeX-read-string
-                       (TeX-argument-prompt nil nil "Node border color spec")))
-                  (txt (TeX-read-string
-                        (TeX-argument-prompt nil nil "Node text color spec"))))
-              (TeX-argument-insert bg nil)
-              (TeX-argument-insert br nil)
-              (format "%s" txt))))))
+         (let ((model (completing-read
+                       (TeX-argument-prompt nil nil "Model")
+                       (LaTeX-xcolor-color-models))))
+           (TeX-argument-insert model nil)
+           (if (string= model "named")
+               (let ((bg (completing-read
+                          (TeX-argument-prompt nil nil "Node background color")
+                          (LaTeX-xcolor-definecolor-list)))
+                     (br (completing-read
+                          (TeX-argument-prompt nil nil "Node border color")
+                          (LaTeX-xcolor-definecolor-list)))
+                     (txt (completing-read
+                           (TeX-argument-prompt nil nil "Node text color")
+                           (LaTeX-xcolor-definecolor-list))))
+                 (TeX-argument-insert bg nil)
+                 (TeX-argument-insert br nil)
+                 (format "%s" txt))
+             (let ((bg (TeX-read-string
+                        (TeX-argument-prompt nil nil "Node background color 
spec")))
+                   (br (TeX-read-string
+                        (TeX-argument-prompt nil nil "Node border color 
spec")))
+                   (txt (TeX-read-string
+                         (TeX-argument-prompt nil nil "Node text color 
spec"))))
+               (TeX-argument-insert bg nil)
+               (TeX-argument-insert br nil)
+               (format "%s" txt))))))
       (TeX-arg-conditional (y-or-n-p "With additional optional arguments? ")
-                          ( [ 3 ] )
-                        (ignore)))
+                           ( [ 3 ] )
+                           (ignore)))
 
     ;; 4.4 Menu macros
     ;; 4.4.2 Defining or changing menu macros
@@ -481,56 +481,56 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
    ;; 2 : No argment, three macros: \<key>, \<key>win, \<key>mac
    (unless (LaTeX-provided-package-options-member "menukeys" 
"definekeys=false")
      (let ((keycmds '(("shift" . 0)   ("capslock" . 2)  ("tab" . 2)
-                     ("esc" . 2)     ("ctrl" . 2)      ("alt" . 2)
-                     ("AltGr" . 0)   ("cmd"   . 0)     ("Space" . 0)
-                     ("SPACE" . 0)   ("return" . 2)    ("enter"  . 2)
-                     ("winmenu" . 0) ("backspace" . 0) ("del" . 0)
-                     ("arrowkeyup" . 0)   ("arrowkeydown" . 0)
-                     ("arrowkeyleft" . 0) ("arrowkeyright" . 0)
-                     ("arrowkey" . 1)
-                     ;; Text inside some keys:
-                     ("ctrlname" . 0) ("delname" . 0) ("spacename" . 0)))
-          (os '("mac" "win"))
-          collector)
+                      ("esc" . 2)     ("ctrl" . 2)      ("alt" . 2)
+                      ("AltGr" . 0)   ("cmd"   . 0)     ("Space" . 0)
+                      ("SPACE" . 0)   ("return" . 2)    ("enter"  . 2)
+                      ("winmenu" . 0) ("backspace" . 0) ("del" . 0)
+                      ("arrowkeyup" . 0)   ("arrowkeydown" . 0)
+                      ("arrowkeyleft" . 0) ("arrowkeyright" . 0)
+                      ("arrowkey" . 1)
+                      ;; Text inside some keys:
+                      ("ctrlname" . 0) ("delname" . 0) ("spacename" . 0)))
+           (os '("mac" "win"))
+           collector)
        (dolist (cmd keycmds)
-        (cond
-         ((= (cdr cmd) 0)
-          (push (car cmd) collector))
-         ((= (cdr cmd) 1)
-          (push (list (car cmd) '(TeX-arg-eval completing-read
-                                                  "Direction: "
-                                                  '("^" "v" ">" "<")))
-                   collector))
-         ((= (cdr cmd) 2)
-          (push (car cmd) collector)
-          (dolist (x os)
-            (push (concat (car cmd) x) collector)))))
+         (cond
+          ((= (cdr cmd) 0)
+           (push (car cmd) collector))
+          ((= (cdr cmd) 1)
+           (push (list (car cmd) '(TeX-arg-eval completing-read
+                                                "Direction: "
+                                                '("^" "v" ">" "<")))
+                 collector))
+          ((= (cdr cmd) 2)
+           (push (car cmd) collector)
+           (dolist (x os)
+             (push (concat (car cmd) x) collector)))))
        (apply #'TeX-add-symbols collector)))
 
    ;; Fontification:
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("menu"            "[{")
-                               ("directory"       "[{")
-                               ("keys"            "[{")
-                               ("drawtikzfolder"  "[["))
-                             'textual)
+                                ("directory"       "[{")
+                                ("keys"            "[{")
+                                ("drawtikzfolder"  "[["))
+                              'textual)
      (font-latex-add-keywords '(("newmenustylesimple"       "*{[{[[{")
-                               ("newmenustyle"             "*{[{[{{{[{")
-                               ("copymenustyle"            "{{")
-                               ("changemenuelement"        "*{{{")
-                               ("renewmenustylesimple"     "{[{[[{")
-                               ("providemenustylesimple"   "{[{[[{")
-                               ("providemenustyle"         "{[{[{{{[{")
-                               ("renewmenustyle"           "{[{[{{{[{")
-                               ("newmenucolortheme"        "{{{{{[[[")
-                               ("copymenucolortheme"       "{{")
-                               ("changemenucolor"          "{{{{")
-                               ("renewmenucolortheme"      "{{{{{[[[")
-                               ("newmenumacro"             "|{\\[{")
-                               ("providemenumacro"         "|{\\[{")
-                               ("renewmenumacro"           "|{\\[{"))
-                             'function)))
+                                ("newmenustyle"             "*{[{[{{{[{")
+                                ("copymenustyle"            "{{")
+                                ("changemenuelement"        "*{{{")
+                                ("renewmenustylesimple"     "{[{[[{")
+                                ("providemenustylesimple"   "{[{[[{")
+                                ("providemenustyle"         "{[{[{{{[{")
+                                ("renewmenustyle"           "{[{[{{{[{")
+                                ("newmenucolortheme"        "{{{{{[[[")
+                                ("copymenucolortheme"       "{{")
+                                ("changemenucolor"          "{{{{")
+                                ("renewmenucolortheme"      "{{{{{[[[")
+                                ("newmenumacro"             "|{\\[{")
+                                ("providemenumacro"         "|{\\[{")
+                                ("renewmenumacro"           "|{\\[{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-menukeys-package-options-list
diff --git a/style/metalogo.el b/style/metalogo.el
index 04d2cfb..fc6233c 100644
--- a/style/metalogo.el
+++ b/style/metalogo.el
@@ -33,8 +33,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "metalogo"
@@ -49,11 +49,11 @@
     ;; Commands
     '("setlogokern"
       (TeX-arg-eval completing-read "Kern parameters: "
-                   '(("Te") ("eX") ("La") ("aT") ("Xe") ("eT") ("eL") ("X2")))
+                    '(("Te") ("eX") ("La") ("aT") ("Xe") ("eT") ("eL") ("X2")))
       (TeX-arg-length "Dimension"))
     '("setlogodrop"
       [TeX-arg-eval completing-read "Drop parameters: "
-                   '(("TeX") ("Xe") ("XeTeX"))]
+                    '(("TeX") ("Xe") ("XeTeX"))]
       (TeX-arg-length "Dimension"))
     '("setLaTeXa" 1)
     '("setLaTeXee" 1)
@@ -69,21 +69,21 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '( ;; Logos
-                               ("LaTeXe")
-                               ("XeTeX")
-                               ("XeLaTeX")
-                               ("LuaTeX")
-                               ("LuaLaTeX")
-                               ;; Commands
-                               ("setlogokern" "{{")
-                               ("setlogodrop" "[{")
-                               ("setLaTeXa" "{")
-                               ("setLaTeXee" "{")
-                               ("seteverylogo" "{")
-                               ("everylogo" "{"))
-                             'function)))
+                                ("LaTeXe")
+                                ("XeTeX")
+                                ("XeLaTeX")
+                                ("LuaTeX")
+                                ("LuaLaTeX")
+                                ;; Commands
+                                ("setlogokern" "{{")
+                                ("setlogodrop" "[{")
+                                ("setLaTeXa" "{")
+                                ("setLaTeXee" "{")
+                                ("seteverylogo" "{")
+                                ("everylogo" "{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-metalogo-package-options nil
diff --git a/style/mflogo.el b/style/mflogo.el
index f7b1c5e..3e70976 100644
--- a/style/mflogo.el
+++ b/style/mflogo.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "mflogo"
@@ -48,11 +48,11 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textlogo" "{"))
-                             'type-command)
+                              'type-command)
      (font-latex-add-keywords '(("logofamily" ""))
-                             'type-declaration)))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-mflogo-package-options nil
diff --git a/style/minted.el b/style/minted.el
index 7c7c33e..9a919cc 100644
--- a/style/minted.el
+++ b/style/minted.el
@@ -35,16 +35,16 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 (declare-function LaTeX-color-definecolor-list "color" ())
 (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
 (declare-function LaTeX-add-newfloat-DeclareFloatingEnvironments
-                 "newfloat" (&rest newfloat-declarefloatingenvironments))
+                  "newfloat" (&rest newfloat-declarefloatingenvironments))
 
 (defvar font-latex-syntactic-keywords-extra)
 
@@ -94,8 +94,8 @@
     ("fontfamily" ("tt" "courier" "helvetica"))
     ("fontseries" ("auto"))
     ("fontsize" ("auto" "\\tiny" "\\large" "\\scriptsize" "\\Large"
-                "\\footnotesize" "\\LARGE" "\\small" "\\huge"
-                "\\normalsize" "\\Huge"))
+                 "\\footnotesize" "\\LARGE" "\\small" "\\huge"
+                 "\\normalsize" "\\Huge"))
     ("fontshape" ("auto"))
     ("formatcom")
     ("frame" ("none" "leftline" "topline" "bottomline" "lines" "single"))
@@ -134,14 +134,14 @@
     ;; remains.  I couldn't figure out why, so for now, I add the
     ;; styles from Pygments version 2.5.2 here.
     ("style" ("abap" "algol" "algol_nu" "arduino" "autumn"
-             "borland" "bw" "colorful" "default" "emacs"
-             "friendly" "fruity" "igor" "inkpot" "lovelace"
-             "manni" "monokai" "murphy" "native" "paraiso-dark"
-             "paraiso-light" "pastie" "perldoc"
-             "rainbow_dash" "rrt" "sas"
-             "solarized-dark" "solarized-light" "stata"
-             "stata-dark" "stata-light"
-             "tango" "trac" "vim" "vs" "xcode"))
+              "borland" "bw" "colorful" "default" "emacs"
+              "friendly" "fruity" "igor" "inkpot" "lovelace"
+              "manni" "monokai" "murphy" "native" "paraiso-dark"
+              "paraiso-light" "pastie" "perldoc"
+              "rainbow_dash" "rrt" "sas"
+              "solarized-dark" "solarized-light" "stata"
+              "stata-dark" "stata-light"
+              "tango" "trac" "vim" "vs" "xcode"))
     ("stepnumber")
     ("stepnumberfromfirst")
     ("stepnumberoffsetvalues" ("true" "false"))
@@ -170,16 +170,16 @@
 Update the variable `LaTeX-minted-language-list' if still nil."
   (or LaTeX-minted-language-list
       (when LaTeX-minted-pygmentize-program
-       (with-temp-buffer
-         (shell-command (concat LaTeX-minted-pygmentize-program " -L lexers")
-                        (current-buffer))
-         (goto-char (point-min))
-         (let (languages)
-           (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t)
-             (dolist (lang (split-string (match-string 1) "[[:space:],]" t))
-               (push lang languages)))
-           (setq LaTeX-minted-language-list languages))
-         LaTeX-minted-language-list))))
+        (with-temp-buffer
+          (shell-command (concat LaTeX-minted-pygmentize-program " -L lexers")
+                         (current-buffer))
+          (goto-char (point-min))
+          (let (languages)
+            (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t)
+              (dolist (lang (split-string (match-string 1) "[[:space:],]" t))
+                (push lang 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.
@@ -187,7 +187,7 @@ 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))
+                    (LaTeX-minted-language-list))
    optional))
 
 (defvar LaTeX-minted-style-list nil
@@ -198,16 +198,16 @@ brackets.  PROMPT replaces the standard one."
 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))))
+        (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.
@@ -215,7 +215,7 @@ 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))
+                    (LaTeX-minted-style-list))
    optional))
 
 (defun LaTeX-minted-update-key-vals ()
@@ -225,19 +225,19 @@ This function checks if one of the packages 
\"xcolor.sty\" or
 color related key.  \"xcolor.sty\" is preferred if both packages
 are loaded."
   (when (or (member "xcolor" (TeX-style-list))
-           (member "color" (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)))
+                         #'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)
-       (setq opts (assq-delete-all (car (assoc key opts)) opts))
-       (push (list key (mapcar #'car (funcall colorcmd)))
-             opts))
+        (setq opts (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)))))
+            (copy-alist opts)))))
 
 (defvar LaTeX-minted-auto-newminted nil)
 (defvar LaTeX-minted-newminted-regexp
@@ -261,24 +261,24 @@ are loaded."
 
 (defun LaTeX-minted-auto-prepare ()
   (setq LaTeX-minted-auto-newminted     nil
-       LaTeX-minted-auto-newmint       nil
-       LaTeX-minted-auto-newmintinline nil
-       LaTeX-minted-auto-newmintedfile nil
-       LaTeX-minted-language-list      nil
-       LaTeX-minted-style-list         nil))
+        LaTeX-minted-auto-newmint       nil
+        LaTeX-minted-auto-newmintinline 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.
   ;; \newminted[envname]{lang}{opts} => new envname/envname* envs.
   (dolist (name-lang LaTeX-minted-auto-newminted)
     (let* ((env (if (> (length (car name-lang)) 0)
-                   (car name-lang)
-                 (concat (cadr name-lang) "code")))
-          (env* (concat env "*")))
+                    (car name-lang)
+                  (concat (cadr name-lang) "code")))
+           (env* (concat env "*")))
       (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-local)))
+                   (list env* 'LaTeX-env-args
+                         '(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)
@@ -287,42 +287,42 @@ are loaded."
   ;; \newmint[macname]{foo}{opts} => \macname[key=vals]|code|
   (dolist (name-lang LaTeX-minted-auto-newmint)
     (let ((lang (if (> (length (car name-lang)) 0)
-                   (car name-lang)
-                 (cadr name-lang))))
+                    (car name-lang)
+                  (cadr name-lang))))
       (add-to-list 'TeX-auto-symbol
-                  `(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local 
]
-                          TeX-arg-verb))
+                   `(,lang [ TeX-arg-key-val 
LaTeX-minted-key-val-options-local ]
+                           TeX-arg-verb))
       (add-to-list 'LaTeX-verbatim-macros-with-delims-local lang)
       (when (and (fboundp 'font-latex-add-keywords)
-                (eq TeX-install-font-lock 'font-latex-setup))
-       (font-latex-add-keywords `((,lang "[")) 'textual))))
+                 (eq TeX-install-font-lock 'font-latex-setup))
+        (font-latex-add-keywords `((,lang "[")) 'textual))))
   ;; \newmintinline{foo}{opts} => \fooinline[key=vals]|code| or
   ;;                              \fooinline[key=vals]{code}
   ;; \newmintinline[macname]{foo}{opts} => \macname[key=vals]|code| or
   ;;                                       \macname[key=vals]{code}
   (dolist (name-lang LaTeX-minted-auto-newmintinline)
     (let ((lang (if (> (length (car name-lang)) 0)
-                   (car name-lang)
-                 (concat (cadr name-lang) "inline"))))
+                    (car name-lang)
+                  (concat (cadr name-lang) "inline"))))
       (add-to-list 'TeX-auto-symbol
-                  `(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local 
]
-                          TeX-arg-verb-delim-or-brace))
+                   `(,lang [ TeX-arg-key-val 
LaTeX-minted-key-val-options-local ]
+                           TeX-arg-verb-delim-or-brace))
       (add-to-list 'LaTeX-verbatim-macros-with-delims-local lang)
       (add-to-list 'LaTeX-verbatim-macros-with-braces-local lang)
       (when (and (fboundp 'font-latex-add-keywords)
-                (eq TeX-install-font-lock 'font-latex-setup))
-       (font-latex-add-keywords `((,lang "[")) 'textual))))
+                 (eq TeX-install-font-lock 'font-latex-setup))
+        (font-latex-add-keywords `((,lang "[")) 'textual))))
   ;; \newmintedfile{foo}{opts} => \foofile[key=vals]{file-name}
   ;; \newmintedfile[macname]{foo}{opts} => \macname[key=vals]{file-name}
   (dolist (name-lang LaTeX-minted-auto-newmintedfile)
     (let ((lang (if (> (length (car name-lang)) 0)
-                   (car name-lang)
-                 (concat (cadr name-lang) "file"))))
+                    (car name-lang)
+                  (concat (cadr name-lang) "file"))))
       (add-to-list 'TeX-auto-symbol
-                  `(,lang [ TeX-arg-key-val LaTeX-minted-key-val-options-local 
]
-                          TeX-arg-file))))
+                   `(,lang [ TeX-arg-key-val 
LaTeX-minted-key-val-options-local ]
+                           TeX-arg-file))))
   (when (and (fboundp 'font-latex-set-syntactic-keywords)
-            (eq TeX-install-font-lock 'font-latex-setup))
+             (eq TeX-install-font-lock 'font-latex-setup))
     ;; Refresh font-locking so that the verbatim envs take effect.
     (font-latex-set-syntactic-keywords))
   ;; Also update the key=vals
@@ -338,38 +338,38 @@ TYPE is one of the symbols `brace' or `delim' indicating 
how
 verbatim text is enclosed after the macro.  MACRO is a string or
 a list of strings."
   (let ((syntax (if (eq type 'brace)
-                   '((1 "|") (2 "|"))
-                 '((1 "\"") (2 ".") (3 "\""))))
-       regexp)
+                    '((1 "|") (2 "|"))
+                  '((1 "\"") (2 ".") (3 "\""))))
+        regexp)
     (when (listp macro)
       (setq macro (regexp-opt macro "\\(?:")))
     (setq regexp `(,(concat
-                    ;; The backslash
-                    (regexp-quote TeX-esc)
-                    ;; Name of the macro(s)
-                    macro
-                    ;; The optional argument
-                    "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
-                    ;; The first mandatory argument
-                    "\\(?:{[^}]+}\\)"
-                    ;; With 'brace, allow braced sub-groups otherwise
-                    ;; we stop matching too early.  With 'delim, copy
-                    ;; font-latex.el:
-                    (if (eq type 'brace)
-                        (concat "\\({\\)"
-                                  "\\(?:[^}{]*"
-                                    "\\(?:{[^}{]*"
-                                      "\\(?:{[^}{]*"
-                                        "\\(?:{[^}{]*}[^}{]*\\)*"
-                                      "}[^}{]*\\)*"
-                                    "}[^}{]*\\)*"
-                                  "\\)"
-                                "\\(}\\)")
-                      (concat
-                       ;; Opening delimiter
-                       "\\([^a-z@*\n\f{]\\).*?"
-                       ;; Closing delimiter
-                       "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)")))))
+                     ;; The backslash
+                     (regexp-quote TeX-esc)
+                     ;; Name of the macro(s)
+                     macro
+                     ;; The optional argument
+                     "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
+                     ;; The first mandatory argument
+                     "\\(?:{[^}]+}\\)"
+                     ;; With 'brace, allow braced sub-groups otherwise
+                     ;; we stop matching too early.  With 'delim, copy
+                     ;; font-latex.el:
+                     (if (eq type 'brace)
+                         (concat "\\({\\)"
+                                   "\\(?:[^}{]*"
+                                     "\\(?:{[^}{]*"
+                                       "\\(?:{[^}{]*"
+                                         "\\(?:{[^}{]*}[^}{]*\\)*"
+                                       "}[^}{]*\\)*"
+                                     "}[^}{]*\\)*"
+                                   "\\)"
+                                 "\\(}\\)")
+                       (concat
+                        ;; Opening delimiter
+                        "\\([^a-z@*\n\f{]\\).*?"
+                        ;; Closing delimiter
+                        "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)")))))
     (add-to-list 'font-latex-syntactic-keywords-extra (append regexp syntax))))
 
 (TeX-add-style-hook
@@ -378,7 +378,7 @@ a list of strings."
 
    ;; Activate local-version of key=vals
    (setq LaTeX-minted-key-val-options-local
-        (copy-alist LaTeX-minted-key-val-options))
+         (copy-alist LaTeX-minted-key-val-options))
 
    ;; New symbols
    (TeX-add-symbols
@@ -421,21 +421,21 @@ a list of strings."
    ;; 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"))
+           (LaTeX-provided-package-options-member "minted" "newfloat=true"))
        (progn
-        (TeX-run-style-hooks "newfloat")
-        (LaTeX-add-newfloat-DeclareFloatingEnvironments
-         '("listing" "verbatim")))
+         (TeX-run-style-hooks "newfloat")
+         (LaTeX-add-newfloat-DeclareFloatingEnvironments
+          '("listing" "verbatim")))
      (LaTeX-add-environments '("listing" ["Float Position"]))
      (TeX-add-symbols '("listoflistings")
-                     '("listingscaption")
-                     '("listoflistingscaption"))
+                      '("listingscaption")
+                      '("listoflistingscaption"))
      (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-                 '("listing" current-indentation) t)
+                  '("listing" current-indentation) t)
      (add-to-list 'LaTeX-label-alist '("listing" . LaTeX-listing-label) t)
      (when (fboundp 'reftex-add-label-environments)
        (reftex-add-label-environments
-       '(("listing" ?l "lst:" "~\\ref{%s}" caption nil nil)))))
+        '(("listing" ?l "lst:" "~\\ref{%s}" caption nil nil)))))
 
    ;; Add to the auto parser
    (TeX-auto-add-regexp LaTeX-minted-newminted-regexp)
@@ -445,42 +445,42 @@ a list of strings."
 
    ;; Filling
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("minted" current-indentation) t)
+                '("minted" current-indentation) t)
    (add-to-list 'LaTeX-verbatim-environments-local "minted")
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("usemintedstyle"  "[{")
-                               ("setminted"       "[{")
-                               ("setmintedinline" "[{")
-                               ("newminted"       "[{{")
-                               ("newmint"         "[{{")
-                               ("newmintinline"   "[{{")
-                               ("newmintedfile"   "[{{"))
-                             'function)
+                                ("setminted"       "[{")
+                                ("setmintedinline" "[{")
+                                ("newminted"       "[{{")
+                                ("newmint"         "[{{")
+                                ("newmintinline"   "[{{")
+                                ("newmintedfile"   "[{{"))
+                              'function)
      (font-latex-add-keywords '(("inputminted" "[{{")
-                               ("mint"        "[{")
-                               ("mintinline"  "[{"))
-                             'textual)
+                                ("mint"        "[{")
+                                ("mintinline"  "[{"))
+                              'textual)
      ;; Add \mint & \mintinline to
      ;; `font-latex-syntactic-keywords-extra' and cater for their
      ;; special syntax: \mint[optional]{lang}{verbatim} or
      ;;                 \mint[optional]{lang}|verbatim|
      (LaTeX-minted-add-syntactic-keywords-extra 'brace
-                                               '("mint" "mintinline"))
+                                                '("mint" "mintinline"))
      (LaTeX-minted-add-syntactic-keywords-extra 'delim
-                                               '("mint" "mintinline"))
+                                                '("mint" "mintinline"))
      ;; Tell font-lock about the update.
      (font-latex-set-syntactic-keywords)))
  TeX-dialect)
 
 (defvar LaTeX-minted-package-options '("chapter"     "cache"
-                                      "cachedir"    "finalizecache"
-                                      "frozencache" "draft"
-                                      "final"       "kpsewhich"
-                                      "langlinenos" "newfloat"
-                                      "outputdir"   "section")
+                                       "cachedir"    "finalizecache"
+                                       "frozencache" "draft"
+                                       "final"       "kpsewhich"
+                                       "langlinenos" "newfloat"
+                                       "outputdir"   "section")
   "Package options for the minted package.")
 
 ;;; minted.el ends here
diff --git a/style/mn2e.el b/style/mn2e.el
index 2aa6937..c923687 100644
--- a/style/mn2e.el
+++ b/style/mn2e.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "mn2e"
@@ -127,14 +127,14 @@
     "bsp")
    (if (LaTeX-provided-class-options-member "mn2e" "useAMS")
        (TeX-add-symbols
-       ;; 4.5.4 Upright Greek characters
-       "upi"
-       "umu"
-       "upartial"
-       "leqslant"
-       "geqslant"
-       "la"
-       "ga"))
+        ;; 4.5.4 Upright Greek characters
+        "upi"
+        "umu"
+        "upartial"
+        "leqslant"
+        "geqslant"
+        "la"
+        "ga"))
    (LaTeX-add-environments
     "keywords"
     "abstract"
@@ -160,19 +160,19 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("author" "[{")
-                               ("title" "[{")
-                               ("newauthor")
-                               ("nokeywords" "{")
-                               ("plate" "{")
-                               ("contcaption" "{")
-                               ("pagerange" "{")
-                               ("volume" "{")
-                               ("pubyear" "{")
-                               ("journal")
-                               ("bsp"))
-                             'function)))
+                                ("title" "[{")
+                                ("newauthor")
+                                ("nokeywords" "{")
+                                ("plate" "{")
+                                ("contcaption" "{")
+                                ("pagerange" "{")
+                                ("volume" "{")
+                                ("pubyear" "{")
+                                ("journal")
+                                ("bsp"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-mn2e-class-options
diff --git a/style/mnras.el b/style/mnras.el
index 95294bc..7307f03 100644
--- a/style/mnras.el
+++ b/style/mnras.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "mnras"
@@ -170,11 +170,11 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("author" "[{")
-                               ("title" "[{")
-                               ("newauthor"))
-                             'function))))
+                                ("title" "[{")
+                                ("newauthor"))
+                              'function))))
 
 (defvar LaTeX-mnras-class-options
   '("letters"  "onecolumn" "doublespacing" "referee" "galley" "landscape"
diff --git a/style/moodle.el b/style/moodle.el
index c7dfeec..b61310e 100644
--- a/style/moodle.el
+++ b/style/moodle.el
@@ -40,8 +40,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-moodle-key-val-options
   '(("points")
@@ -56,67 +56,67 @@
   (LaTeX-insert-environment
    env
    (let ((opts (TeX-read-key-val
-               t
-               (cond (;; 3.3.1 Multiple Choice
-                      (string= env "multi")
-                      (append '(("shuffle"   ("true" "false"))
-                                ("numbering" ("alph" "Alph" "arabic"
-                                              "roman" "Roman" "none"))
-                                ("single"    ("true" "false"))
-                                ("multiple"  ("true" "false")))
-                              (when (string= "cloze" 
(LaTeX-current-environment))
-                                '(("vertical" ("true" "false"))
-                                  ("horizonal" ("true" "false"))))
-                              LaTeX-moodle-key-val-options))
-                     ;; 3.3.3 Short Answer
-                     ((string= env "shortanswer")
-                      (append '(("case sensitive" ("true" "false"))
-                                ("usecase"        ("true" "false")))
-                              (when (string= "cloze" 
(LaTeX-current-environment))
-                                '(("vertical" ("true" "false"))
-                                  ("horizonal" ("true" "false"))))
-                              LaTeX-moodle-key-val-options))
-                     ;; 3.3.4 Essay Questions
-                     ((string= env "essay")
-                      (append '(("response required" ("true" "false"))
-                                ("response format"   ("html" "file"
-                                                      "html+file"
-                                                      "text" "monospaced"))
-                                ("response field lines")
-                                ("attachments allowed"  ("0" "1" "2" "3"
-                                                         "unlimited"))
-                                ("attachments required" ("0" "1" "2" "3"))
-                                ("response template"))
-                              (when (string= "cloze" 
(LaTeX-current-environment))
-                                '(("vertical" ("true" "false"))
-                                  ("horizonal" ("true" "false"))))
-                              LaTeX-moodle-key-val-options))
-                     ;; 3.4 Matching Questions
-                     ((string= env "matching")
-                      (append '(("shuffle"       ("true" "false"))
-                                ("drag and drop" ("true" "false"))
-                                ("dd"            ("true" "false")))
-                              LaTeX-moodle-key-val-options))
-                     (t (append
-                         (when (string= "cloze" (LaTeX-current-environment))
-                           '(("vertical" ("true" "false"))
-                             ("horizonal" ("true" "false"))))
-                         LaTeX-moodle-key-val-options)))))
-        (qname (unless (string= "cloze" (LaTeX-current-environment))
-                 (TeX-read-string (TeX-argument-prompt nil nil "Question 
name")))))
+                t
+                (cond (;; 3.3.1 Multiple Choice
+                       (string= env "multi")
+                       (append '(("shuffle"   ("true" "false"))
+                                 ("numbering" ("alph" "Alph" "arabic"
+                                               "roman" "Roman" "none"))
+                                 ("single"    ("true" "false"))
+                                 ("multiple"  ("true" "false")))
+                               (when (string= "cloze" 
(LaTeX-current-environment))
+                                 '(("vertical" ("true" "false"))
+                                   ("horizonal" ("true" "false"))))
+                               LaTeX-moodle-key-val-options))
+                      ;; 3.3.3 Short Answer
+                      ((string= env "shortanswer")
+                       (append '(("case sensitive" ("true" "false"))
+                                 ("usecase"        ("true" "false")))
+                               (when (string= "cloze" 
(LaTeX-current-environment))
+                                 '(("vertical" ("true" "false"))
+                                   ("horizonal" ("true" "false"))))
+                               LaTeX-moodle-key-val-options))
+                      ;; 3.3.4 Essay Questions
+                      ((string= env "essay")
+                       (append '(("response required" ("true" "false"))
+                                 ("response format"   ("html" "file"
+                                                       "html+file"
+                                                       "text" "monospaced"))
+                                 ("response field lines")
+                                 ("attachments allowed"  ("0" "1" "2" "3"
+                                                          "unlimited"))
+                                 ("attachments required" ("0" "1" "2" "3"))
+                                 ("response template"))
+                               (when (string= "cloze" 
(LaTeX-current-environment))
+                                 '(("vertical" ("true" "false"))
+                                   ("horizonal" ("true" "false"))))
+                               LaTeX-moodle-key-val-options))
+                      ;; 3.4 Matching Questions
+                      ((string= env "matching")
+                       (append '(("shuffle"       ("true" "false"))
+                                 ("drag and drop" ("true" "false"))
+                                 ("dd"            ("true" "false")))
+                               LaTeX-moodle-key-val-options))
+                      (t (append
+                          (when (string= "cloze" (LaTeX-current-environment))
+                            '(("vertical" ("true" "false"))
+                              ("horizonal" ("true" "false"))))
+                          LaTeX-moodle-key-val-options)))))
+         (qname (unless (string= "cloze" (LaTeX-current-environment))
+                  (TeX-read-string (TeX-argument-prompt nil nil "Question 
name")))))
      (concat
       (when (and opts (not (string= opts "")))
-       (format "[%s]" opts))
+        (format "[%s]" opts))
       (when (and qname (not (string= qname "")))
-       (format "{%s}" qname)))))
+        (format "{%s}" qname)))))
   (if (TeX-active-mark)
       (progn
-       (LaTeX-find-matching-begin)
-       (end-of-line 1))
+        (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]*$"))
+                            "^[ \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'
@@ -134,9 +134,9 @@
   ;; The inserted \item may have outdented the first line to the
   ;; right.  Fill it, if appropriate.
   (when (and (not (looking-at "$"))
-            (not (assoc env LaTeX-indent-environment-list))
-            (> (- (line-end-position) (line-beginning-position))
-               (current-fill-column)))
+             (not (assoc env LaTeX-indent-environment-list))
+             (> (- (line-end-position) (line-beginning-position))
+                (current-fill-column)))
     (LaTeX-fill-paragraph nil)))
 
 (defun LaTeX-moodle-item-argument ()
@@ -147,15 +147,15 @@
   ;; Add * to `LaTeX-moodle-key-val-options' in multi environment and
   ;; query for the key=values:
   (let ((opts
-        (TeX-read-key-val t (if (string= "multi" (LaTeX-current-environment))
-                                (append '(("*")) LaTeX-moodle-key-val-options)
-                              LaTeX-moodle-key-val-options))))
+         (TeX-read-key-val t (if (string= "multi" (LaTeX-current-environment))
+                                 (append '(("*")) LaTeX-moodle-key-val-options)
+                               LaTeX-moodle-key-val-options))))
     ;; Insert key=values; if * is chosen, drop []:
     (when (and opts (not (string= opts "")))
       (delete-horizontal-space)
       (if (string= opts "*")
-         (insert opts)
-       (insert LaTeX-optop opts LaTeX-optcl))))
+          (insert opts)
+        (insert LaTeX-optop opts LaTeX-optcl))))
   (just-one-space)
   ;; Bonus point: Insert the macro \answer in matching environment:
   (when (string= "matching" (LaTeX-current-environment))
@@ -171,14 +171,14 @@
     ;; 3.2 Quiz and Question Environments
     '("quiz"
       (lambda (environment)
-       (LaTeX-insert-environment
-        environment
-        (let ((opts (TeX-read-key-val t LaTeX-moodle-key-val-options))
-              (bank (TeX-read-string (TeX-argument-prompt nil nil "Question 
bank name"))))
-          (concat
-           (when (and opts (not (string= opts "")))
-             (format "[%s]" opts))
-           (format "{%s}" bank))))))
+        (LaTeX-insert-environment
+         environment
+         (let ((opts (TeX-read-key-val t LaTeX-moodle-key-val-options))
+               (bank (TeX-read-string (TeX-argument-prompt nil nil "Question 
bank name"))))
+           (concat
+            (when (and opts (not (string= opts "")))
+              (format "[%s]" opts))
+            (format "{%s}" bank))))))
     ;; 3.5 Cloze Questions
     '("cloze" "Question bank name"))
 
@@ -191,9 +191,9 @@
     '("moodleset"
       (TeX-arg-eval
        (lambda ()
-        (let ((opts (TeX-read-key-val nil
-                                      (append '(("ppi")) 
LaTeX-moodle-key-val-options))))
-          (format "%s" opts)))))
+         (let ((opts (TeX-read-key-val nil
+                                       (append '(("ppi")) 
LaTeX-moodle-key-val-options))))
+           (format "%s" opts)))))
 
     ;; 5 Graphics
     '("ghostscriptcommand" "File name")
@@ -202,16 +202,16 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("moodleset"          "{")
-                               ("ghostscriptcommand" "{")
-                               ("imagemagickcommand" "{")
-                               ("opensslcommand"     "{"))
-                             'function)
+                                ("ghostscriptcommand" "{")
+                                ("imagemagickcommand" "{")
+                                ("opensslcommand"     "{"))
+                              'function)
      (font-latex-add-keywords '(("answer" "")
-                               ;; Cater for a fontified starred \item
-                               ("item"   "*["))
-                             'textual)))
+                                ;; Cater for a fontified starred \item
+                                ("item"   "*["))
+                              'textual)))
  TeX-dialect)
 
 (defvar LaTeX-moodle-package-options
diff --git a/style/multind.el b/style/multind.el
index e602253..68a4ab6 100644
--- a/style/multind.el
+++ b/style/multind.el
@@ -40,24 +40,24 @@
 
    ;; Parsing index macros
    (setq LaTeX-auto-regexp-list
-        (append
-         ;; The first regexp is faster, but less accurate
-         ;; '(("\\\\index\\*?{[^{}]*}{\\([^}]*\\)" 1 LaTeX-auto-index-entry))
-         ;; The second regexp is very good, but slower
-         
'(("\\\\index\\*?{[^{}]*}{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
-            1 LaTeX-auto-index-entry))
-         LaTeX-auto-regexp-list))
+         (append
+          ;; The first regexp is faster, but less accurate
+          ;; '(("\\\\index\\*?{[^{}]*}{\\([^}]*\\)" 1 LaTeX-auto-index-entry))
+          ;; The second regexp is very good, but slower
+          
'(("\\\\index\\*?{[^{}]*}{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
+             1 LaTeX-auto-index-entry))
+          LaTeX-auto-regexp-list))
 
    ;; Completion for index entries in the |see and \index commands
    (setq TeX-complete-list 
-        (append
-         '(("\\\\index{[^{}]*}{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list)
-           ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list))
-         TeX-complete-list))
+         (append
+          '(("\\\\index{[^{}]*}{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list)
+            ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list))
+          TeX-complete-list))
 
    ;; RefTeX support
    (and (fboundp 'reftex-add-index-macros)
-       (reftex-add-index-macros '(multind))))
+        (reftex-add-index-macros '(multind))))
  TeX-dialect)
 
 (defvar LaTeX-multind-package-options nil
diff --git a/style/multirow.el b/style/multirow.el
index 6b7155f..d5108b8 100644
--- a/style/multirow.el
+++ b/style/multirow.el
@@ -33,8 +33,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "multirow"
@@ -49,7 +49,7 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("multirow" "{[{")) 'function)))
  TeX-dialect)
 
diff --git a/style/nameref.el b/style/nameref.el
index 8535522..ffbb928 100644
--- a/style/nameref.el
+++ b/style/nameref.el
@@ -33,8 +33,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "nameref"
@@ -45,17 +45,17 @@
     '("Nameref" TeX-arg-ref))
 
    (setq TeX-complete-list
-        (append
-         '(("\\\\\\(?:N\\|n\\)ameref\\*?{\\([^{}\n\r\\%,]*\\)" 1 
LaTeX-label-list "}"))
-         TeX-complete-list))
+         (append
+          '(("\\\\\\(?:N\\|n\\)ameref\\*?{\\([^{}\n\r\\%,]*\\)" 1 
LaTeX-label-list "}"))
+          TeX-complete-list))
 
-   ;, Fontification
+                                        ;, Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (fboundp 'font-latex-set-syntactic-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (fboundp 'font-latex-set-syntactic-keywords)
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("nameref" "*{")
-                               ("Nameref" "{"))
-                             'reference)))
+                                ("Nameref" "{"))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-nameref-package-options nil
diff --git a/style/natbib.el b/style/natbib.el
index 42c6416..5481629 100644
--- a/style/natbib.el
+++ b/style/natbib.el
@@ -31,8 +31,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "natbib"
@@ -41,41 +41,41 @@
    ;; optional note arguments we consider useful.  Prompting for those
    ;; arguments will still depend upon `TeX-arg-cite-note-p'.
    (let  ((citecmds
-          '(("cite" . 0)
-            ("citet" . 1) ("citet*" . 1) ("citealt" . 1) ("citealt*" . 1)
-            ("citep" . 2) ("citep*" . 2) ("citealp" . 2) ("citealp*" . 2)
-            ("citeauthor" . 0) ("citeauthor*" . 0) ("citefullauthor" . 0)
-            ("citeyear" . 0) ("citeyearpar" . 0)
-            ("shortcites" . 0)
-            ;; 2.4 Extended Citation Commands
-            ("citenum" . 0)
-            ;; 2.5 Forcing Upper Cased Name
-            ("Citet" . 1) ("Citet*" . 1) ("Citealt" . 1) ("Citealt*" . 1)
-            ("Citep" . 2) ("Citep*" . 2) ("Citealp" . 2) ("Citealp*" . 2)
-            ;; 2.6 Citation Aliasing
-            ("citetalias" . 1) ("citepalias" . 2))))
+           '(("cite" . 0)
+             ("citet" . 1) ("citet*" . 1) ("citealt" . 1) ("citealt*" . 1)
+             ("citep" . 2) ("citep*" . 2) ("citealp" . 2) ("citealp*" . 2)
+             ("citeauthor" . 0) ("citeauthor*" . 0) ("citefullauthor" . 0)
+             ("citeyear" . 0) ("citeyearpar" . 0)
+             ("shortcites" . 0)
+             ;; 2.4 Extended Citation Commands
+             ("citenum" . 0)
+             ;; 2.5 Forcing Upper Cased Name
+             ("Citet" . 1) ("Citet*" . 1) ("Citealt" . 1) ("Citealt*" . 1)
+             ("Citep" . 2) ("Citep*" . 2) ("Citealp" . 2) ("Citealp*" . 2)
+             ;; 2.6 Citation Aliasing
+             ("citetalias" . 1) ("citepalias" . 2))))
 
      ;; Add these symbols
      (apply
       #'TeX-add-symbols
       (mapcar
        (lambda (cmd)
-        (cond
-         ((= (cdr cmd) 0)
-          ;; No optional arguments
-          (list (car cmd) 'TeX-arg-cite))
-         ((= (cdr cmd) 1)
-          ;; Just one optional argument, the post note
-          (list
-           (car cmd)
-           '(TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
-           'TeX-arg-cite))
-         ((= (cdr cmd) 2)
-          ;; Pre and post notes
-          (list
-           (car cmd)
-           '(TeX-arg-conditional TeX-arg-cite-note-p 
([LaTeX-arg-natbib-notes]) nil)
-           'TeX-arg-cite))))
+         (cond
+          ((= (cdr cmd) 0)
+           ;; No optional arguments
+           (list (car cmd) 'TeX-arg-cite))
+          ((= (cdr cmd) 1)
+           ;; Just one optional argument, the post note
+           (list
+            (car cmd)
+            '(TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
+            'TeX-arg-cite))
+          ((= (cdr cmd) 2)
+           ;; Pre and post notes
+           (list
+            (car cmd)
+            '(TeX-arg-conditional TeX-arg-cite-note-p 
([LaTeX-arg-natbib-notes]) nil)
+            'TeX-arg-cite))))
        citecmds))
 
      ;; Make an entry in TeX-complete-list
@@ -83,9 +83,9 @@
       'TeX-complete-list
       (list
        (concat "\\\\\\("
-              (mapconcat (lambda (x) (regexp-quote (car x)))
-                         citecmds "\\|")
-              
"\\)\\(\\[[^]\n\r\\%]*\\]\\)*{\\([^{}\n\r\\%,]*,\\)*\\([^{}\n\r\\%,]*\\)")
+               (mapconcat (lambda (x) (regexp-quote (car x)))
+                          citecmds "\\|")
+               
"\\)\\(\\[[^]\n\r\\%]*\\]\\)*{\\([^{}\n\r\\%,]*,\\)*\\([^{}\n\r\\%,]*\\)")
        4 'LaTeX-bibitem-list "}")))
 
    ;; Add the other symbols
@@ -98,18 +98,18 @@
 
     ;; 2.9 Selecting Citation Punctuation
     '("setcitestyle" (TeX-arg-key-val
-                     (;; Citation mode (fourth argument of \bibpunct):
-                      ("authoryear") ("numbers") ("super")
-                      ;; Braces (first and second arguments of \bibpunct):
-                      ("round") ("square") ("open") ("close")
-                      ;; Between citations (third argument of \bibpunct):
-                      ("semicolon") ("comma") ("citesep")
-                      ;; Between author and year (fifth argument of \bibpunct):
-                      ("aysep")
-                      ;; Between years with common author (sixth argument of 
\bibpunct):
-                      ("yysep")
-                      ;; Text before post-note (optional argument of 
\bibpunct):
-                      ("notesep"))))
+                      (;; Citation mode (fourth argument of \bibpunct):
+                       ("authoryear") ("numbers") ("super")
+                       ;; Braces (first and second arguments of \bibpunct):
+                       ("round") ("square") ("open") ("close")
+                       ;; Between citations (third argument of \bibpunct):
+                       ("semicolon") ("comma") ("citesep")
+                       ;; Between author and year (fifth argument of 
\bibpunct):
+                       ("aysep")
+                       ;; Between years with common author (sixth argument of 
\bibpunct):
+                       ("yysep")
+                       ;; Text before post-note (optional argument of 
\bibpunct):
+                       ("notesep"))))
     '("bibpunct" ["Post note separator"]
       "Opening bracket"
       "Closing bracket"
@@ -119,9 +119,9 @@
       "Punctuation between years for common authors")
 
     '("citestyle" (TeX-arg-eval completing-read
-                               (TeX-argument-prompt nil nil "Style")
-                               '("plain" "plainnat" "agu" "egu"
-                                 "agms" "dcu" "kluwer" "cospar" "nature")))
+                                (TeX-argument-prompt nil nil "Style")
+                                '("plain" "plainnat" "agu" "egu"
+                                  "agms" "dcu" "kluwer" "cospar" "nature")))
 
     ;; 2.12 Other Formatting Options
     "bibsection"
@@ -140,35 +140,35 @@
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("cite"           "*[[{")
-                               ("citet"          "*[[{")
-                               ("citealt"        "*[[{")
-                               ("citep"          "*[[{")
-                               ("citealp"        "*[[{")
-                               ("citeauthor"     "*[[{")
-                               ("citefullauthor" "[[{")
-                               ("citeyear"       "[[{")
-                               ("citeyearpar"    "[[{")
-                               ("shortcites"     "{")
-                               ("citenum"        "{")
-                               ("Citet"          "*[[{")
-                               ("Citealt"        "*[[{")
-                               ("Citep"          "*[[{")
-                               ("Citealp"        "*[[{")
-                               ("Citeauthor"     "*[[{")
-                               ("citetalias"     "*[[{")
-                               ("citepalias"     "*[[{"))
-                             'reference)
+                                ("citet"          "*[[{")
+                                ("citealt"        "*[[{")
+                                ("citep"          "*[[{")
+                                ("citealp"        "*[[{")
+                                ("citeauthor"     "*[[{")
+                                ("citefullauthor" "[[{")
+                                ("citeyear"       "[[{")
+                                ("citeyearpar"    "[[{")
+                                ("shortcites"     "{")
+                                ("citenum"        "{")
+                                ("Citet"          "*[[{")
+                                ("Citealt"        "*[[{")
+                                ("Citep"          "*[[{")
+                                ("Citealp"        "*[[{")
+                                ("Citeauthor"     "*[[{")
+                                ("citetalias"     "*[[{")
+                                ("citepalias"     "*[[{"))
+                              'reference)
      (font-latex-add-keywords '(("defcitealias"   "{{")
-                               ("bibpunct"       "[{{{{{{")
-                               ("setcitestyle"   "{")
-                               ("citestyle"      "{"))
-                             'function))
+                                ("bibpunct"       "[{{{{{{")
+                                ("setcitestyle"   "{")
+                                ("citestyle"      "{"))
+                              'function))
 
    ;; Tell RefTeX
    (when (and LaTeX-reftex-cite-format-auto-activate
-             (fboundp 'reftex-set-cite-format))
+              (fboundp 'reftex-set-cite-format))
      (reftex-set-cite-format 'natbib)))
  TeX-dialect)
 
@@ -177,23 +177,23 @@
 If OPTIONAL is non-nil, insert them in brackets, otherwise in
 braces."
   (let ((pre (TeX-read-string
-             (TeX-argument-prompt optional nil "Pre-note")))
-       (post (TeX-read-string
-              (TeX-argument-prompt optional nil "Post-note"))))
+              (TeX-argument-prompt optional nil "Pre-note")))
+        (post (TeX-read-string
+               (TeX-argument-prompt optional nil "Post-note"))))
     (TeX-argument-insert pre optional)
     (TeX-argument-insert post optional)
     ;; pre is given, post is empty: Make sure that we insert an
     ;; extra pair of `[]', otherwise pre becomes post
     (when (and pre (not (string= pre ""))
-              (string= post ""))
+               (string= post ""))
       (insert LaTeX-optop LaTeX-optcl))))
 
 (defvar LaTeX-natbib-package-options '("numbers" "super" "authoryear"
-                                      "round" "square" "angle" "curly"
-                                      "comma" "colon" "nobibstyle"
-                                      "bibstyle" "openbib" "sectionbib"
-                                      "sort" "sort&compress"
-                                      "longnamesfirst" "nonamebreak")
+                                       "round" "square" "angle" "curly"
+                                       "comma" "colon" "nobibstyle"
+                                       "bibstyle" "openbib" "sectionbib"
+                                       "sort" "sort&compress"
+                                       "longnamesfirst" "nonamebreak")
   "Package options for the natbib package.")
 
 ;; natbib.el ends here
diff --git a/style/newfloat.el b/style/newfloat.el
index e34e02e..82adbdb 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -60,8 +60,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-newfloat-key-val-options
   '(("fileext")
@@ -80,13 +80,13 @@
 
 (defvar LaTeX-newfloat-DeclareFloatingEnvironment-regex
   `(,(concat "\\\\DeclareFloatingEnvironment"
-            "[ \t\n\r%]*"
-            "\\["
-            "[ \t\n\r%{}a-zA-Z0-9=,-]*"
-            "\\]"
-            "[ \t\n\r%]*"
-            "{\\([^}]+\\)}"
-            "\\(?:[ %]*{\\([^}]*\\)}\\)?")
+             "[ \t\n\r%]*"
+             "\\["
+             "[ \t\n\r%{}a-zA-Z0-9=,-]*"
+             "\\]"
+             "[ \t\n\r%]*"
+             "{\\([^}]+\\)}"
+             "\\(?:[ %]*{\\([^}]*\\)}\\)?")
     (1 2) LaTeX-auto-newfloat-DeclareFloatingEnvironment)
   "Matches the argument of `\\DeclareFloatingEnvironment' from
 `newfloat.sty'.")
@@ -108,37 +108,37 @@ If `caption.el' is loaded, add the new floating 
environment to
 \"listofENVs\" and \"listofENVes\"."
   (dolist (flt-type (LaTeX-newfloat-DeclareFloatingEnvironment-list))
     (let ((flt  (car  flt-type))
-         (type (cadr flt-type)))
+          (type (cadr flt-type)))
       (cond ((string-equal type "figure")
-            (LaTeX-add-environments `(,flt LaTeX-env-figure))
-            (add-to-list 'LaTeX-label-alist `(,flt . LaTeX-figure-label) t)
-            (when (fboundp 'reftex-add-label-environments)
-              (reftex-add-label-environments
-               `((,flt ?f ,LaTeX-figure-label "~\\ref{%s}" caption nil nil)))))
-           ((string-equal type "table")
-            (LaTeX-add-environments `(,flt LaTeX-env-figure))
-            (add-to-list 'LaTeX-label-alist `(,flt . LaTeX-table-label) t)
-            (when (fboundp 'reftex-add-label-environments)
-              (reftex-add-label-environments
-               `((,flt ?t ,LaTeX-table-label "~\\ref{%s}" caption nil nil)))))
-           ((string-equal type "verbatim")
-            (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 . LaTeX-listing-label) t)
-            (when (fboundp 'reftex-add-label-environments)
-              (reftex-add-label-environments
-               `((,flt ?l "lst:" "~\\ref{%s}" caption nil nil)))))
-           (t
-            (LaTeX-add-environments `(,flt ["Float Position"]))))
+             (LaTeX-add-environments `(,flt LaTeX-env-figure))
+             (add-to-list 'LaTeX-label-alist `(,flt . LaTeX-figure-label) t)
+             (when (fboundp 'reftex-add-label-environments)
+               (reftex-add-label-environments
+                `((,flt ?f ,LaTeX-figure-label "~\\ref{%s}" caption nil 
nil)))))
+            ((string-equal type "table")
+             (LaTeX-add-environments `(,flt LaTeX-env-figure))
+             (add-to-list 'LaTeX-label-alist `(,flt . LaTeX-table-label) t)
+             (when (fboundp 'reftex-add-label-environments)
+               (reftex-add-label-environments
+                `((,flt ?t ,LaTeX-table-label "~\\ref{%s}" caption nil nil)))))
+            ((string-equal type "verbatim")
+             (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 . LaTeX-listing-label) t)
+             (when (fboundp 'reftex-add-label-environments)
+               (reftex-add-label-environments
+                `((,flt ?l "lst:" "~\\ref{%s}" caption nil nil)))))
+            (t
+             (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))
+        (add-to-list (make-local-variable 'LaTeX-caption-supported-float-types)
+                     flt))
       (if (string-equal "e" (substring flt -1))
-         (TeX-add-symbols (concat "listof" flt "s"))
-       (TeX-add-symbols
-        (concat "listof" flt "s")
-        (concat "listof" flt "es"))))))
+          (TeX-add-symbols (concat "listof" flt "s"))
+        (TeX-add-symbols
+         (concat "listof" flt "s")
+         (concat "listof" flt "es"))))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-newfloat-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-newfloat-auto-cleanup t)
@@ -154,13 +154,13 @@ If `caption.el' is loaded, add the new floating 
environment to
    ;; Depending on class, add "within" key to the local options list
    ;; and use it.
    (setq LaTeX-newfloat-key-val-options-local
-        (copy-alist LaTeX-newfloat-key-val-options))
+         (copy-alist LaTeX-newfloat-key-val-options))
 
    (if (< (LaTeX-largest-level) 2)
        (add-to-list 'LaTeX-newfloat-key-val-options-local
-                   '("within" ("chapter" "section" "none")))
+                    '("within" ("chapter" "section" "none")))
      (add-to-list 'LaTeX-newfloat-key-val-options-local
-                 '("within" ("section" "none"))))
+                  '("within" ("section" "none"))))
 
    ;; Commands:
    (TeX-add-symbols
@@ -168,15 +168,15 @@ If `caption.el' is loaded, add the new floating 
environment to
       [TeX-arg-key-val LaTeX-newfloat-key-val-options-local]
       (TeX-arg-eval
        (lambda ()
-        (let ((newfloat (TeX-read-string
-                        (TeX-argument-prompt nil nil "Floating environment"))))
-          (LaTeX-add-newfloat-DeclareFloatingEnvironments newfloat)
-          (format "%s" newfloat)))))
+         (let ((newfloat (TeX-read-string
+                          (TeX-argument-prompt nil nil "Floating 
environment"))))
+           (LaTeX-add-newfloat-DeclareFloatingEnvironments newfloat)
+           (format "%s" newfloat)))))
 
     '("SetupFloatingEnvironment"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Floating environment")
-                   (mapcar 'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+                    (TeX-argument-prompt nil nil "Floating environment")
+                    (mapcar 'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
       (TeX-arg-key-val LaTeX-newfloat-key-val-options-local))
 
     '("ForEachFloatingEnvironment" t)
@@ -184,30 +184,30 @@ If `caption.el' is loaded, add the new floating 
environment to
 
     '("PrepareListOf"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Floating environment")
-                   (mapcar 'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+                    (TeX-argument-prompt nil nil "Floating environment")
+                    (mapcar 'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
       t)
 
     '("newfloatsetup"
       (TeX-arg-eval
        (lambda ()
-        (let ((keyvals (TeX-read-key-val
-                        nil
-                        (append '(("chapterlistsgap"))
-                                (if (< (LaTeX-largest-level) 2)
-                                    '(("within" ("chapter" "section" "none")))
-                                  '(("within" ("section" "none"))))))))
-          (format "%s" keyvals))))))
+         (let ((keyvals (TeX-read-key-val
+                         nil
+                         (append '(("chapterlistsgap"))
+                                 (if (< (LaTeX-largest-level) 2)
+                                     '(("within" ("chapter" "section" "none")))
+                                   '(("within" ("section" "none"))))))))
+           (format "%s" keyvals))))))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("DeclareFloatingEnvironment"  "[{")
-                               ("SetupFloatingEnvironment"    "{{")
-                               ("ForEachFloatingEnvironment"  "*{")
-                               ("PrepareListOf"               "{{")
-                               ("newfloatsetup"               "{"))
-                             'function)))
+                                ("SetupFloatingEnvironment"    "{{")
+                                ("ForEachFloatingEnvironment"  "*{")
+                                ("PrepareListOf"               "{{")
+                                ("newfloatsetup"               "{"))
+                              'function)))
  TeX-dialect)
 
 (defun LaTeX-newfloat-package-options ()
@@ -217,7 +217,7 @@ If `caption.el' is loaded, add the new floating environment 
to
    (append
     '(("chapterlistsgap"))
     (if (< (LaTeX-largest-level) 2)
-       '(("within" ("chapter" "section" "none")))
+        '(("within" ("chapter" "section" "none")))
       '(("within" ("section" "none")))))))
 
 ;;; newfloat.el ends here
diff --git a/style/newpxtext.el b/style/newpxtext.el
index d0929ca..3613e2c 100644
--- a/style/newpxtext.el
+++ b/style/newpxtext.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "newpxtext"
@@ -67,13 +67,13 @@
                                 ("texttlf"   "{")
                                 ("textosf"   "{")
                                 ("texttosf"  "{")
-                               ("textsu"    "{"))
+                                ("textsu"    "{"))
                               'type-command)
      (font-latex-add-keywords '(("lfstyle"   "")
                                 ("tlfstyle"  "")
                                 ("osfstyle"  "")
-                               ("tosfstyle" "")
-                               ("sustyle"   ""))
+                                ("tosfstyle" "")
+                                ("sustyle"   ""))
                               'type-declaration)))
  TeX-dialect)
 
diff --git a/style/newtxtext.el b/style/newtxtext.el
index 578eb77..f80c872 100644
--- a/style/newtxtext.el
+++ b/style/newtxtext.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "newtxtext"
@@ -67,13 +67,13 @@
                                 ("texttlf"   "{")
                                 ("textosf"   "{")
                                 ("texttosf"  "{")
-                               ("textsu"    "{"))
+                                ("textsu"    "{"))
                               'type-command)
      (font-latex-add-keywords '(("lfstyle"   "")
                                 ("tlfstyle"  "")
                                 ("osfstyle"  "")
-                               ("tosfstyle" "")
-                               ("sustyle"   ""))
+                                ("tosfstyle" "")
+                                ("sustyle"   ""))
                               'type-declaration)))
  TeX-dialect)
 
diff --git a/style/newtxttt.el b/style/newtxttt.el
index f9ea0b9..1b63172 100644
--- a/style/newtxttt.el
+++ b/style/newtxttt.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "newtxtt"
@@ -53,12 +53,12 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textttz"    "{"))
-                             'type-command)
+                              'type-command)
      (font-latex-add-keywords '(("ttzfamily"  "")
-                               ("ttz"        ""))
-                             'type-declaration)))
+                                ("ttz"        ""))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-newtxtt-package-options
diff --git a/style/ngerman.el b/style/ngerman.el
index 174eca2..0fd41ac 100644
--- a/style/ngerman.el
+++ b/style/ngerman.el
@@ -13,12 +13,12 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (declare-function font-latex-add-to-syntax-alist
-                 "font-latex"
-                 (list))
+                  "font-latex"
+                  (list))
 
 (defvar LaTeX-german-mode-syntax-table
   (copy-syntax-table LaTeX-mode-syntax-table)
@@ -35,23 +35,23 @@
    ;; variables are to be deleted in future versions. (now = 2005-04-01)
    (unless (eq (car TeX-quote-language) 'override)
      (let ((open-quote (if (and (boundp 'LaTeX-german-open-quote)
-                               LaTeX-german-open-quote)
-                          LaTeX-german-open-quote
-                        "\"`"))
-          (close-quote (if (and (boundp 'LaTeX-german-close-quote)
-                                LaTeX-german-close-quote)
-                           LaTeX-german-close-quote
-                         "\"'"))
-          (q-after-q (if (and (boundp 'LaTeX-german-quote-after-quote)
-                              LaTeX-german-quote-after-quote)
-                         LaTeX-german-quote-after-quote
-                       t)))
+                                LaTeX-german-open-quote)
+                           LaTeX-german-open-quote
+                         "\"`"))
+           (close-quote (if (and (boundp 'LaTeX-german-close-quote)
+                                 LaTeX-german-close-quote)
+                            LaTeX-german-close-quote
+                          "\"'"))
+           (q-after-q (if (and (boundp 'LaTeX-german-quote-after-quote)
+                               LaTeX-german-quote-after-quote)
+                          LaTeX-german-quote-after-quote
+                        t)))
        (setq TeX-quote-language
-            `("ngerman" ,open-quote ,close-quote ,q-after-q))))
+             `("ngerman" ,open-quote ,close-quote ,q-after-q))))
    (setq LaTeX-babel-hyphen-language "ngerman")
    ;; Fontification
    (when (and (eq TeX-install-font-lock 'font-latex-setup)
-             (featurep 'font-latex))
+              (featurep 'font-latex))
      (font-latex-add-quotes '("\"`" "\"'"))
      (font-latex-add-quotes '("\">" "\"<" german))
      ;; Prevent "| from leading to color bleed.
diff --git a/style/nicefrac.el b/style/nicefrac.el
index 2c69a56..ba2dadc 100644
--- a/style/nicefrac.el
+++ b/style/nicefrac.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "nicefrac"
@@ -44,7 +44,7 @@
     '("nicefrac" [ "Font changing command" ] "Numerator" "Denominator"))
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("nicefrac" "[{{")) 'textual)))
  TeX-dialect)
 
diff --git a/style/nomencl.el b/style/nomencl.el
index 3cfc5f8..5a57cda 100644
--- a/style/nomencl.el
+++ b/style/nomencl.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-nomencl-package-options
   '("refeq" "norefeq" "refpage" "norefpage" "prefix" "noprefix" "cfg" "nocfg"
@@ -70,9 +70,9 @@
     '("pagedeclaration" 0))
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("nomenclature" "[{{"))
-                             'reference)))
+                              'reference)))
  TeX-dialect)
 
 ;;; nomencl.el ends here
diff --git a/style/ntheorem.el b/style/ntheorem.el
index 8a125d8..c0ea12c 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -42,16 +42,16 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-color-definecolor-list
-                 "color"
-                 ())
+                  "color"
+                  ())
 
 (declare-function LaTeX-xcolor-definecolor-list
-                 "xcolor"
-                 ())
+                  "xcolor"
+                  ())
 
 (defvar LaTeX-ntheorem-theoremstyle-list
   '(("plain") ("break") ("change") ("changebreak") ("margin")
@@ -85,15 +85,15 @@ defined with \"\\newtheoremlisttype\".")
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument.  Use PROMPT as the prompt string."
   (let* ((crm-separator (regexp-quote TeX-esc))
-        (fontdecl (mapconcat #'identity
-                             (TeX-completing-read-multiple
-                              (TeX-argument-prompt optional prompt "Font 
declaration: \\" t)
-                              LaTeX-ntheorem-fontdecl)
-                             TeX-esc)))
+         (fontdecl (mapconcat #'identity
+                              (TeX-completing-read-multiple
+                               (TeX-argument-prompt optional prompt "Font 
declaration: \\" t)
+                               LaTeX-ntheorem-fontdecl)
+                              TeX-esc)))
     (TeX-argument-insert fontdecl
-                        optional
-                        (when (and fontdecl (not (string= fontdecl "")))
-                          TeX-esc))))
+                         optional
+                         (when (and fontdecl (not (string= fontdecl "")))
+                           TeX-esc))))
 
 (defun LaTeX-ntheorem-env-label (environment)
   "Insert ENVIRONMENT, query for an optional argument and prompt
@@ -107,14 +107,14 @@ RefTeX users should customize or add ENVIRONMENT to
 
   (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
   (add-to-list \\='reftex-label-alist
-              \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
-                nil (\"Lemma\" \"lemma\") nil))"
+               \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
+                 nil (\"Lemma\" \"lemma\") nil))"
   (let ((opthead (TeX-read-string
-                 (TeX-argument-prompt t nil "Heading"))))
+                  (TeX-argument-prompt t nil "Heading"))))
     (LaTeX-insert-environment environment
-                             (when (and opthead
-                                        (not (string= opthead "")))
-                               (format "[%s]" opthead))))
+                              (when (and opthead
+                                         (not (string= opthead "")))
+                                (format "[%s]" opthead))))
   (when (LaTeX-label environment 'environment)
     (LaTeX-newline)
     (indent-according-to-mode)))
@@ -143,13 +143,13 @@ make them available as new environments.  Update
   (dolist (newthm (mapcar 'car (LaTeX-ntheorem-newtheorem-list)))
     (LaTeX-add-environments (list newthm 'LaTeX-ntheorem-env-label))
     (LaTeX-add-environments (list (concat newthm "*")
-                                 'LaTeX-ntheorem-env-label)))
+                                  'LaTeX-ntheorem-env-label)))
   (dolist (newthmstyle (LaTeX-ntheorem-newtheoremstyle-list))
     (add-to-list (make-local-variable 'LaTeX-ntheorem-theoremstyle-list)
-                newthmstyle))
+                 newthmstyle))
   (dolist (newthmlist (LaTeX-ntheorem-newtheoremlisttype-list))
     (add-to-list (make-local-variable 'LaTeX-ntheorem-listtype-list)
-                newthmlist))
+                 newthmlist))
   (when (LaTeX-provided-package-options-member "ntheorem" "thmmarks")
     (dolist (nthm (mapcar 'car (LaTeX-ntheorem-newtheorem-list)))
       (TeX-add-symbols (concat nthm "Symbol"))))
@@ -186,36 +186,36 @@ make them available as new environments.  Update
     '("newtheorem"
       (TeX-arg-eval
        (lambda ()
-        (let ((nthm (TeX-read-string
-                     (TeX-argument-prompt nil nil "Environment"))))
-          (LaTeX-add-ntheorem-newtheorems nthm)
-          (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
-          (LaTeX-add-environments (list (concat nthm "*")
-                                        'LaTeX-ntheorem-env-label))
-          (format "%s" nthm))))
+         (let ((nthm (TeX-read-string
+                      (TeX-argument-prompt nil nil "Environment"))))
+           (LaTeX-add-ntheorem-newtheorems nthm)
+           (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
+           (LaTeX-add-environments (list (concat nthm "*")
+                                         'LaTeX-ntheorem-env-label))
+           (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"))
-                       "") ])
+                                        (backward-char 2)
+                                        (preceding-char)) ?\])
+                                  ()
+                                (TeX-arg-counter t "Within counter"))
+                        "") ])
 
     '("renewtheorem"
       (TeX-arg-eval completing-read "Environment: "
-                   (LaTeX-ntheorem-newtheorem-list))
+                    (LaTeX-ntheorem-newtheorem-list))
       [ 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"))
-                       "") ])
+                                        (backward-char 2)
+                                        (preceding-char)) ?\])
+                                  ()
+                                (TeX-arg-counter t "Within counter"))
+                        "") ])
 
     ;; 2.3 Defining the Layout of Theorem Sets
     '("theoremstyle"
       (TeX-arg-eval completing-read "Style: "
-                   LaTeX-ntheorem-theoremstyle-list))
+                    LaTeX-ntheorem-theoremstyle-list))
 
     '("theorembodyfont"
       (LaTeX-arg-ntheorem-fontdecl "Body font"))
@@ -225,9 +225,9 @@ make them available as new environments.  Update
 
     '("theoremnumbering"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Numbering scheme")
-                   '("arabic" "roman" "Roman" "alph" "Alph"
-                     "greek" "Greek" "fnsymbol")))
+                    (TeX-argument-prompt nil nil "Numbering scheme")
+                    '("arabic" "roman" "Roman" "alph" "Alph"
+                      "greek" "Greek" "fnsymbol")))
 
     '("theoremseparator" "Separator")
 
@@ -248,68 +248,68 @@ make them available as new environments.  Update
 
     '("theoremclass"
       (TeX-arg-eval completing-read "Theorem type: "
-                   (append '(("LaTeX"))
-                           (LaTeX-ntheorem-newtheorem-list))))
+                    (append '(("LaTeX"))
+                            (LaTeX-ntheorem-newtheorem-list))))
 
     ;; 2.3.6 A Standard Set of Theorems
     (when (LaTeX-provided-package-options-member "ntheorem" "standard")
       (let ((env '("Theorem"    "Lemma"     "Proposition"
-                  "Corollary"  "Satz"      "Korollar"
-                  "Definition" "Example"   "Beispiel"
-                  "Anmerkung"  "Bemerkung" "Remark"
-                  "Proof"      "Beweis")))
-       (dolist (elt env)
-         (LaTeX-add-ntheorem-newtheorems elt)
-         (LaTeX-add-environments (list elt 'LaTeX-ntheorem-env-label))
-         (LaTeX-add-environments (list (concat elt "*")
-                                       'LaTeX-ntheorem-env-label)))))
+                   "Corollary"  "Satz"      "Korollar"
+                   "Definition" "Example"   "Beispiel"
+                   "Anmerkung"  "Bemerkung" "Remark"
+                   "Proof"      "Beweis")))
+        (dolist (elt env)
+          (LaTeX-add-ntheorem-newtheorems elt)
+          (LaTeX-add-environments (list elt 'LaTeX-ntheorem-env-label))
+          (LaTeX-add-environments (list (concat elt "*")
+                                        'LaTeX-ntheorem-env-label)))))
 
     ;; 2.3.7 Framed and Boxed Theorems
     '("newframedtheorem"
       (TeX-arg-eval
        (lambda ()
-        (let ((nthm (TeX-read-string
-                     (TeX-argument-prompt nil nil "Environment"))))
-          (LaTeX-add-ntheorem-newtheorems nthm)
-          (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
-          (LaTeX-add-environments (list (concat nthm "*")
-                                        'LaTeX-ntheorem-env-label))
-          (format "%s" nthm))))
+         (let ((nthm (TeX-read-string
+                      (TeX-argument-prompt nil nil "Environment"))))
+           (LaTeX-add-ntheorem-newtheorems nthm)
+           (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
+           (LaTeX-add-environments (list (concat nthm "*")
+                                         'LaTeX-ntheorem-env-label))
+           (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"))
-                       "") ])
+                                        (backward-char 2)
+                                        (preceding-char)) ?\])
+                                  ()
+                                (TeX-arg-counter t "Within counter"))
+                        "") ])
 
     '("newshadedtheorem"
       (TeX-arg-eval
        (lambda ()
-        (let ((nthm (TeX-read-string
-                     (TeX-argument-prompt nil nil "Environment"))))
-          (LaTeX-add-ntheorem-newtheorems nthm)
-          (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
-          (LaTeX-add-environments (list (concat nthm "*")
-                                        'LaTeX-ntheorem-env-label))
-          (format "%s" nthm))))
+         (let ((nthm (TeX-read-string
+                      (TeX-argument-prompt nil nil "Environment"))))
+           (LaTeX-add-ntheorem-newtheorems nthm)
+           (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
+           (LaTeX-add-environments (list (concat nthm "*")
+                                         'LaTeX-ntheorem-env-label))
+           (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"))
-                       "") ])
+                                        (backward-char 2)
+                                        (preceding-char)) ?\])
+                                  ()
+                                (TeX-arg-counter t "Within counter"))
+                        "") ])
     '("shadecolor"
       (TeX-arg-eval
        (lambda ()
-        (let ((color (cond ((member "xcolor" (TeX-style-list))
-                            (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
-                           ((member "color" (TeX-style-list))
-                            (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
-                           (t
-                            (TeX-read-string "Color name: ")))))
-          (format "%s" color)))))
+         (let ((color (cond ((member "xcolor" (TeX-style-list))
+                             (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
+                            ((member "color" (TeX-style-list))
+                             (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
+                            (t
+                             (TeX-read-string "Color name: ")))))
+           (format "%s" color)))))
 
     '("theoremframepreskip"
       (TeX-arg-length "Skip before framed theorem"))
@@ -326,58 +326,58 @@ make them available as new environments.  Update
     ;; 2.4 Generating Theoremlists
     '("listtheorems"
       (TeX-arg-eval mapconcat 'identity
-                   (TeX-completing-read-multiple
-                    "Lists: "
-                    (LaTeX-ntheorem-newtheorem-list)) ","))
+                    (TeX-completing-read-multiple
+                     "Lists: "
+                     (LaTeX-ntheorem-newtheorem-list)) ","))
 
     ;; 2.4.2 Writing Extra Stuff to the Theorem File
     '("addtheoremline"
       (TeX-arg-eval completing-read "Environment: "
-                   (LaTeX-ntheorem-newtheorem-list))
+                    (LaTeX-ntheorem-newtheorem-list))
       t)
 
     '("addtheoremline*"
       (TeX-arg-eval completing-read "Environment: "
-                   (LaTeX-ntheorem-newtheorem-list))
+                    (LaTeX-ntheorem-newtheorem-list))
       t)
 
     '("addtotheoremfile"
       [ TeX-arg-eval completing-read "Environment: "
-                    (LaTeX-ntheorem-newtheorem-list) ]
+        (LaTeX-ntheorem-newtheorem-list) ]
       t)
 
     ;; 2.5.1 Defining New Theorem Layouts
     '("newtheoremstyle"
       (TeX-arg-eval
        (lambda ()
-        (let ((style (TeX-read-string
-                      (TeX-argument-prompt nil nil "Style name"))))
-          (LaTeX-add-ntheorem-newtheoremstyles style)
-          (add-to-list (make-local-variable 'LaTeX-ntheorem-theoremstyle-list)
-                       (list style))
-          (format "%s" style))))
+         (let ((style (TeX-read-string
+                       (TeX-argument-prompt nil nil "Style name"))))
+           (LaTeX-add-ntheorem-newtheoremstyles style)
+           (add-to-list (make-local-variable 'LaTeX-ntheorem-theoremstyle-list)
+                        (list style))
+           (format "%s" style))))
       2)
 
     '("renewtheoremstyle"
       (TeX-arg-eval completing-read "Style name: "
-                   LaTeX-ntheorem-theoremstyle-list)
+                    LaTeX-ntheorem-theoremstyle-list)
       2)
 
     ;; 2.5.2 Defining New Theorem List Layouts
     '("newtheoremlisttype"
       (TeX-arg-eval
        (lambda ()
-        (let ((layout (TeX-read-string
-                      (TeX-argument-prompt nil nil "List layout name"))))
-          (LaTeX-add-ntheorem-newtheoremlisttypes layout)
-          (add-to-list (make-local-variable 'LaTeX-ntheorem-listtype-list)
-                       (list layout))
-          (format "%s" layout))))
+         (let ((layout (TeX-read-string
+                        (TeX-argument-prompt nil nil "List layout name"))))
+           (LaTeX-add-ntheorem-newtheoremlisttypes layout)
+           (add-to-list (make-local-variable 'LaTeX-ntheorem-listtype-list)
+                        (list layout))
+           (format "%s" layout))))
       3)
 
     '("renewtheoremlisttype"
       (TeX-arg-eval completing-read "Style name: "
-                   LaTeX-ntheorem-listtype-list)
+                    LaTeX-ntheorem-listtype-list)
       3)
 
     ;; 2.6 Setting End Marks
@@ -400,40 +400,40 @@ make them available as new environments.  Update
    (dolist (nthm (mapcar 'car (LaTeX-ntheorem-newtheorem-list)))
      (TeX-add-symbols (concat nthm "name")))
 
-;; Fontification
+   ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("newtheorem"             "{[{[")
-                               ("renewtheorem"           "{[{[")
-                               ("theoremstyle"           "{")
-                               ("theorembodyfont"        "{")
-                               ("theoremheaderfont"      "{")
-                               ("theoremnumbering"       "{")
-                               ("theoremseparator"       "{")
-                               ("theorempreskip"         "{")
-                               ("theorempostskip"        "{")
-                               ("theoremsymbol"          "{")
-                               ("theoremindent"          "")
-                               ("theoremprework"         "{")
-                               ("theorempostwork"        "{")
-                               ("theoremclass"           "{")
-                               ("newframedtheorem"       "{[{[")
-                               ("newshadedtheorem"       "*{[{[")
-                               ("shadecolor"             "{")
-                               ("theoremframepreskip"    "{")
-                               ("theoremframepostskip"   "{")
-                               ("theoreminframepreskip"  "{")
-                               ("theoreminframepostskip" "{")
-                               ("listtheorems"           "{")
-                               ("addtheoremline"         "*{{")
-                               ("addtotheoremfile"       "[{")
-                               ("newtheoremstyle"        "{{{")
-                               ("renewtheoremstyle"      "{{{")
-                               ("newtheoremlisttype"     "{{{{")
-                               ("renewtheoremlisttype"   "{{{{"))
-                             'function)
+                                ("renewtheorem"           "{[{[")
+                                ("theoremstyle"           "{")
+                                ("theorembodyfont"        "{")
+                                ("theoremheaderfont"      "{")
+                                ("theoremnumbering"       "{")
+                                ("theoremseparator"       "{")
+                                ("theorempreskip"         "{")
+                                ("theorempostskip"        "{")
+                                ("theoremsymbol"          "{")
+                                ("theoremindent"          "")
+                                ("theoremprework"         "{")
+                                ("theorempostwork"        "{")
+                                ("theoremclass"           "{")
+                                ("newframedtheorem"       "{[{[")
+                                ("newshadedtheorem"       "*{[{[")
+                                ("shadecolor"             "{")
+                                ("theoremframepreskip"    "{")
+                                ("theoremframepostskip"   "{")
+                                ("theoreminframepreskip"  "{")
+                                ("theoreminframepostskip" "{")
+                                ("listtheorems"           "{")
+                                ("addtheoremline"         "*{{")
+                                ("addtotheoremfile"       "[{")
+                                ("newtheoremstyle"        "{{{")
+                                ("renewtheoremstyle"      "{{{")
+                                ("newtheoremlisttype"     "{{{{")
+                                ("renewtheoremlisttype"   "{{{{"))
+                              'function)
      (font-latex-add-keywords '(("thref"                  "{"))
-                             'reference)))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-ntheorem-package-options
diff --git a/style/ocg-p.el b/style/ocg-p.el
index 3f48d84..26f881f 100644
--- a/style/ocg-p.el
+++ b/style/ocg-p.el
@@ -37,8 +37,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 ;; Setup for layer id's defined with
 ;; \begin{ocg}[<opt-arg>]{<layer name>}{<layer id>}{<initial visibility>}:
@@ -47,12 +47,12 @@
 
 (defvar LaTeX-ocgp-ocg-layer-id-regexp
   `(,(concat "\\\\begin{ocg}"
-            "[ \t\n\r%]*"
-            "\\(?:\\[[^]]*\\]\\)?"
-            "[ \t\n\r%]*"
-            "\\(?:{[^}]+}\\)"
-            "[ \t\n\r%]*"
-            "{\\([^}]+\\)}")
+             "[ \t\n\r%]*"
+             "\\(?:\\[[^]]*\\]\\)?"
+             "[ \t\n\r%]*"
+             "\\(?:{[^}]+}\\)"
+             "[ \t\n\r%]*"
+             "{\\([^}]+\\)}")
     1 LaTeX-auto-ocgp-ocg-layer-id))
 
 (defun LaTeX-ocgp-auto-prepare ()
@@ -72,7 +72,7 @@
   "Insert arguments for ocg environment from ocg-p package."
   ;; The optional key-val argument:
   (let ((TeX-arg-opening-brace LaTeX-optop)
-       (TeX-arg-closing-brace LaTeX-optcl))
+        (TeX-arg-closing-brace LaTeX-optcl))
     (TeX-argument-insert
      (TeX-read-key-val t LaTeX-ocgp-env-key-val-options)
      t))
@@ -86,8 +86,8 @@
   ;; Then add the new id to list of know id's and insert it
   (TeX-argument-insert
    (let ((id (completing-read
-             (TeX-argument-prompt optional nil "Layer id")
-             (LaTeX-ocgp-ocg-layer-id-list))))
+              (TeX-argument-prompt optional nil "Layer id")
+              (LaTeX-ocgp-ocg-layer-id-list))))
      (LaTeX-add-ocgp-ocg-layer-ids id)
      id)
    optional)
@@ -100,7 +100,7 @@
 
 (defvar LaTeX-ocgp-mac-key-val-options
   '(("triggerocg" ("onareaenter" "onareaexit" "onmousedown"
-                  "onmouseup"   "allactions")))
+                   "onmouseup"   "allactions")))
   "Key=value options for macros provided by ocg-p package.")
 
 (defun LaTeX-arg-ocgp-layer-id (optional &optional prompt)
@@ -108,33 +108,33 @@
 <SPC> key binding in minibuffer is removed temporarily.
 Completion is still available with <TAB> key."
   (let* ((crm-separator "[ \t]+")
-        (crm-local-completion-map
-         (remove (assoc 32 crm-local-completion-map) crm-local-completion-map))
-        (ids (mapconcat #'identity
-                        (TeX-completing-read-multiple
-                         (TeX-argument-prompt optional prompt "Layer id ('s 
space separated)")
-                         (LaTeX-ocgp-ocg-layer-id-list))
-                        " ")))
+         (crm-local-completion-map
+          (remove (assoc 32 crm-local-completion-map) 
crm-local-completion-map))
+         (ids (mapconcat #'identity
+                         (TeX-completing-read-multiple
+                          (TeX-argument-prompt optional prompt "Layer id ('s 
space separated)")
+                          (LaTeX-ocgp-ocg-layer-id-list))
+                         " ")))
     (TeX-argument-insert ids optional)))
 
 (defun LaTeX-env-ocgp-ocgtabular (environment)
   "Insert ocgtabular ENVIRONMENT with position, column spec's and 2 more 
arguments.
 Just like array and tabular."
   (let ((pos (and LaTeX-default-position ; LaTeX-default-position can
-                                       ; be nil, i.e. do not prompt
-                 (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
-       (fmt (TeX-read-string "Format: " LaTeX-default-format))
-       (dbase (TeX-read-string "Database name: "))
-       (opts (TeX-read-string "Additional options: ")))
+                                        ; be nil, i.e. do not prompt
+                  (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
+        (fmt (TeX-read-string "Format: " LaTeX-default-format))
+        (dbase (TeX-read-string "Database name: "))
+        (opts (TeX-read-string "Additional options: ")))
     (setq LaTeX-default-position pos)
     (setq LaTeX-default-format fmt)
     (LaTeX-insert-environment environment
-                             (concat
-                              (unless (zerop (length pos))
-                                (concat LaTeX-optop pos LaTeX-optcl))
-                              (concat TeX-grop fmt TeX-grcl)
-                              (concat TeX-grop dbase TeX-grcl)
-                              (concat TeX-grop opts TeX-grcl)))
+                              (concat
+                               (unless (zerop (length pos))
+                                 (concat LaTeX-optop pos LaTeX-optcl))
+                               (concat TeX-grop fmt TeX-grcl)
+                               (concat TeX-grop dbase TeX-grcl)
+                               (concat TeX-grop opts TeX-grcl)))
     (LaTeX-item-array t)))
 
 (TeX-add-style-hook
@@ -182,12 +182,12 @@ Just like array and tabular."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("toggleocgs"          "[{{")
-                               ("showocgs"            "[{{")
-                               ("hideocgs"            "[{{")
-                               ("setocgs"             "[{{{{"))
-                             'function)))
+                                ("showocgs"            "[{{")
+                                ("hideocgs"            "[{{")
+                                ("setocgs"             "[{{{{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-ocg-p-package-options '("ocgtabular")
diff --git a/style/ocgx.el b/style/ocgx.el
index ee2af56..340da52 100644
--- a/style/ocgx.el
+++ b/style/ocgx.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "ocgx"
@@ -61,12 +61,12 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("switchocg"  "{{")
-                               ("showocg"    "{{")
-                               ("hideocg"    "{{")
-                               ("actionsocg" "{{{{"))
-                             'function)))
+                                ("showocg"    "{{")
+                                ("hideocg"    "{{")
+                                ("actionsocg" "{{{{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-ocgx-package-options nil
diff --git a/style/overpic.el b/style/overpic.el
index 2d48c9b..52d51d0 100644
--- a/style/overpic.el
+++ b/style/overpic.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 (defvar LaTeX-graphicx-key-val-options)
 (defvar LaTeX-graphicx-package-options)
 
@@ -60,28 +60,28 @@ This function is an variation of
 in `LaTeX-overpic-key-val-options' are offered in addition to the
 ones provided by `LaTeX-graphicx-key-val-options'."
   (let ((crm-local-completion-map
-        (remove (assoc 32 crm-local-completion-map)
-                crm-local-completion-map))
-       (minibuffer-local-completion-map
-        (remove (assoc 32 minibuffer-local-completion-map)
-                minibuffer-local-completion-map)))
+         (remove (assoc 32 crm-local-completion-map)
+                 crm-local-completion-map))
+        (minibuffer-local-completion-map
+         (remove (assoc 32 minibuffer-local-completion-map)
+                 minibuffer-local-completion-map)))
     (TeX-argument-insert
      (TeX-read-key-val optional
-                      (if (and (or (and (eq TeX-engine 'default)
-                                        (not (TeX-PDF-from-DVI)))
-                                   (eq TeX-engine 'luatex))
-                               TeX-PDF-mode)
-                          (append '(("page")
-                                    ("pagebox" ("mediabox"
-                                                "cropbox"
-                                                "bleedbox"
-                                                "trimbox"
-                                                "artbox")))
-                                  LaTeX-overpic-key-val-options
-                                  LaTeX-graphicx-key-val-options)
-                        (append
-                         LaTeX-overpic-key-val-options
-                         LaTeX-graphicx-key-val-options)))
+                       (if (and (or (and (eq TeX-engine 'default)
+                                         (not (TeX-PDF-from-DVI)))
+                                    (eq TeX-engine 'luatex))
+                                TeX-PDF-mode)
+                           (append '(("page")
+                                     ("pagebox" ("mediabox"
+                                                 "cropbox"
+                                                 "bleedbox"
+                                                 "trimbox"
+                                                 "artbox")))
+                                   LaTeX-overpic-key-val-options
+                                   LaTeX-graphicx-key-val-options)
+                         (append
+                          LaTeX-overpic-key-val-options
+                          LaTeX-graphicx-key-val-options)))
      optional)))
 
 
@@ -106,9 +106,9 @@ ones provided by `LaTeX-graphicx-key-val-options'."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("setOverpic" "{"))
-                             'function)))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-overpic-package-options
diff --git a/style/paracol.el b/style/paracol.el
index 943f09a..3ed74b7 100644
--- a/style/paracol.el
+++ b/style/paracol.el
@@ -51,18 +51,18 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defun TeX-arg-paracol-switchcolumn* (optional)
   "Query and insert the column argument of \\switchcolum macro.
 If OPTIONAL is non-nil, insert the result in square brackets."
   (let ((col (TeX-read-string
-             (TeX-argument-prompt optional nil "Column"))))
+              (TeX-argument-prompt optional nil "Column"))))
     (when (and col (not (string= col "")))
       (save-excursion
-       (backward-char 1)
-       (TeX-argument-insert col optional)))))
+        (backward-char 1)
+        (TeX-argument-insert col optional)))))
 
 (TeX-add-style-hook
  "paracol"
@@ -75,24 +75,24 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
     '("paracol" [ "Number left" ] "Number of columns" [ "Text across columns" 
] )
     '("paracol*"
       (lambda (_env)
-       (let ((numleft (TeX-read-string
-                       (TeX-argument-prompt  t  nil "Number left")))
-             (numcol  (TeX-read-string
-                       (TeX-argument-prompt nil nil "Number of columns")))
-             (txt     (TeX-read-string
-                       (TeX-argument-prompt  t  nil "Text across columns"))))
-         (LaTeX-insert-environment
-          ;; Simply feed the function with "paracol", other option is
-          ;; something like:
-          ;; (replace-regexp-in-string (regexp-quote "*") "" env)
-          "paracol"
-          (concat
-           (when (and numleft (not (string= numleft "")))
-             (format "[%s]" numleft))
-           "*"
-           (format "{%s}" numcol)
-           (when (and txt (not (string= txt "")))
-             (format "[%s]" txt)))))))
+        (let ((numleft (TeX-read-string
+                        (TeX-argument-prompt  t  nil "Number left")))
+              (numcol  (TeX-read-string
+                        (TeX-argument-prompt nil nil "Number of columns")))
+              (txt     (TeX-read-string
+                        (TeX-argument-prompt  t  nil "Text across columns"))))
+          (LaTeX-insert-environment
+           ;; Simply feed the function with "paracol", other option is
+           ;; something like:
+           ;; (replace-regexp-in-string (regexp-quote "*") "" env)
+           "paracol"
+           (concat
+            (when (and numleft (not (string= numleft "")))
+              (format "[%s]" numleft))
+            "*"
+            (format "{%s}" numcol)
+            (when (and txt (not (string= txt "")))
+              (format "[%s]" txt)))))))
 
     ;; 7.2 Column-Switching Command and Environments
     ;; \begin{column} body \end{column}
@@ -158,8 +158,8 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
     ;; 7.6 Page-Wise Footnotes
     '("footnotelayout"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Layout")
-                   '("c" "m" "p")))
+                    (TeX-argument-prompt nil nil "Layout")
+                    '("c" "m" "p")))
 
     ;; \footnote*[num]{text}
     ;; \footnotemark*[num]
@@ -184,8 +184,8 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
     ;; command with the same name but different arguments.  We add
     ;; the command only here but not for fontification
     '("columncolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list))
-                                        (TeX-arg-xcolor)
-                                        (TeX-arg-color))
+                                         (TeX-arg-xcolor)
+                                         (TeX-arg-color))
       [ "Column" ] )
 
     ;; \normalcolumncolor[col]
@@ -196,8 +196,8 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
     ;; \colseprulecolor[mode]{color}[col]
     ;; \normalcolseprulecolor[col]
     '("colseprulecolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list))
-                                            (TeX-arg-xcolor)
-                                            (TeX-arg-color))
+                                             (TeX-arg-xcolor)
+                                             (TeX-arg-color))
       [ "Column" ] )
     '("normalcolseprulecolor" [ "Column" ] )
 
@@ -207,19 +207,19 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
     ;; \backgroundcolor{region(x0,y0)(x1,y1)}[mode]{color}
     '("backgroundcolor"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Region")
-                   '("c" "g" "s" "f" "n" "p" "t" "b" "l" "r"
-                     "C" "G" "S" "F" "N" "P" "T" "B" "L" "R"))
+                    (TeX-argument-prompt nil nil "Region")
+                    '("c" "g" "s" "f" "n" "p" "t" "b" "l" "r"
+                      "C" "G" "S" "F" "N" "P" "T" "B" "L" "R"))
       (TeX-arg-conditional (member "xcolor" (TeX-style-list))
-                          (TeX-arg-xcolor)
-                          (TeX-arg-color)))
+                           (TeX-arg-xcolor)
+                           (TeX-arg-color)))
 
     ;; \nobackgroundcolor{region}
     '("nobackgroundcolor"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Region")
-                   '("c" "g" "s" "f" "n" "p" "t" "b" "l" "r"
-                     "C" "G" "S" "F" "N" "P" "T" "B" "L" "R")))
+                    (TeX-argument-prompt nil nil "Region")
+                    '("c" "g" "s" "f" "n" "p" "t" "b" "l" "r"
+                      "C" "G" "S" "F" "N" "P" "T" "B" "L" "R")))
 
     ;; \resetbackgroundcolor
     '("resetbackgroundcolor" 0)
@@ -228,8 +228,8 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
     ;; \addcontentsonly{file}{col}
     '("addcontentsonly"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Content file")
-                   '("toc" "lof" "lot"))
+                    (TeX-argument-prompt nil nil "Content file")
+                    '("toc" "lof" "lot"))
       "Column")
 
     ;; 7.10 Page Flushing Commands
@@ -243,49 +243,49 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(("switchcolumn"                        "*["))
-                             ;; FIXME: Syntax is
-                             ;; \switchcolumn[num]*[text].
-                             ;; font-latex.el doesn't handle the case
-                             ;; where `*' comes after the first `['.
-                             ;; Therefore, we use this compromise to
-                             ;; get something fontified at least.
-                             'textual)
-     (font-latex-add-keywords '(("flushpage"                   "*["))
-                             'warning)
-     (font-latex-add-keywords '(("footnote"                    "*[{")
-                               ("footnotemark"                 "*[")
-                               ("footnotetext"                 "*[{"))
-                             'reference)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("switchcolumn"                 "*["))
+                              ;; FIXME: Syntax is
+                              ;; \switchcolumn[num]*[text].
+                              ;; font-latex.el doesn't handle the case
+                              ;; where `*' comes after the first `['.
+                              ;; Therefore, we use this compromise to
+                              ;; get something fontified at least.
+                              'textual)
+     (font-latex-add-keywords '(("flushpage"                    "*["))
+                              'warning)
+     (font-latex-add-keywords '(("footnote"                     "*[{")
+                                ("footnotemark"                 "*[")
+                                ("footnotetext"                 "*[{"))
+                              'reference)
      (font-latex-add-keywords '(("definecolumnpreamble"         "{{")
-                               ("ensurevspace"                 "{")
-                               ("columnratio"                  "{[")
-                               ("setcolumnwidth"               "{[")
-                               ("twosided"                     "[")
-                               ("marginparthreshold"           "{[")
-                               ;; FIXME: Syntax is
-                               ;; \globalcounter{ctr} or
-                               ;; \globalcounter* We ignore `{' since
-                               ;; font-latex.el doesn't handle a
-                               ;; missing bracket nicely.
-                               ("globalcounter"                "*")
-                               ("definethecounter"             "{{{")
-                               ("synccounter"                  "{")
-                               ("syncallcounters"              "")
-                               ("footnotelayout"               "{")
-                               ("fncounteradjustment"          "")
-                               ("nofncounteradjustment"        "")
-                               ("normalcolumncolor"            "[")
-                               ("coloredwordhyphenated"        "")
-                               ("nocoloredwordhyphenated"      "")
-                               ("colseprulecolor"              "[{[")
-                               ("normalcolseprulecolor"        "[")
-                               ("backgroundcolor"              "{[{")
-                               ("nobackgroundcolor"            "{")
-                               ("resetbackgroundcolor"         "")
-                               ("addcontentsonly"              "{{"))
-                             'function)))
+                                ("ensurevspace"                 "{")
+                                ("columnratio"                  "{[")
+                                ("setcolumnwidth"               "{[")
+                                ("twosided"                     "[")
+                                ("marginparthreshold"           "{[")
+                                ;; FIXME: Syntax is
+                                ;; \globalcounter{ctr} or
+                                ;; \globalcounter* We ignore `{' since
+                                ;; font-latex.el doesn't handle a
+                                ;; missing bracket nicely.
+                                ("globalcounter"                "*")
+                                ("definethecounter"             "{{{")
+                                ("synccounter"                  "{")
+                                ("syncallcounters"              "")
+                                ("footnotelayout"               "{")
+                                ("fncounteradjustment"          "")
+                                ("nofncounteradjustment"        "")
+                                ("normalcolumncolor"            "[")
+                                ("coloredwordhyphenated"        "")
+                                ("nocoloredwordhyphenated"      "")
+                                ("colseprulecolor"              "[{[")
+                                ("normalcolseprulecolor"        "[")
+                                ("backgroundcolor"              "{[{")
+                                ("nobackgroundcolor"            "{")
+                                ("resetbackgroundcolor"         "")
+                                ("addcontentsonly"              "{{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-paracol-package-options nil
diff --git a/style/paralist.el b/style/paralist.el
index 7ca772c..ee5cef8 100644
--- a/style/paralist.el
+++ b/style/paralist.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 ;; Insert an itemize-ish environment and ask for an optional label
 (defun LaTeX-paralist-env-item-opt-label (environment)
@@ -96,20 +96,20 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("setdefaultitem" "{{{{")
-                               ("setdefaultenum" "{{{{")
-                               ("setdefaultleftmargin" "{{{{{{"))
-                             'variable)))
+                                ("setdefaultenum" "{{{{")
+                                ("setdefaultleftmargin" "{{{{{{"))
+                              'variable)))
  TeX-dialect)
 
 (defvar LaTeX-paralist-package-options '("newitem" "olditem" "newenum"
-                                        "oldenum" "alwaysadjust"
-                                        "neveradjust" "neverdecrease"
-                                        "increaseonly" "defblank"
-                                        "pointedenum" "pointlessenum"
-                                        "cfg" "nocfg" "flushright"
-                                        "flushleft")
+                                         "oldenum" "alwaysadjust"
+                                         "neveradjust" "neverdecrease"
+                                         "increaseonly" "defblank"
+                                         "pointedenum" "pointlessenum"
+                                         "cfg" "nocfg" "flushright"
+                                         "flushleft")
   "Package options for the paralist package.")
 
 ;;; paralist.el ends here
diff --git a/style/pdfpages.el b/style/pdfpages.el
index ee267d1..f59096f 100644
--- a/style/pdfpages.el
+++ b/style/pdfpages.el
@@ -38,8 +38,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-pdfpages-key-val-options
   '(;; Main options:
@@ -107,12 +107,12 @@
       (TeX-arg-eval
        (lambda ()
          (let ((pdffile (file-relative-name
-                        (read-file-name
-                         "File to include: " nil nil nil nil
-                         (lambda (pdfs)
-                           (string-match "\\.pdf$" pdfs)))
-                        (TeX-master-directory))))
-          (format "%s" pdffile)))))
+                         (read-file-name
+                          "File to include: " nil nil nil nil
+                          (lambda (pdfs)
+                            (string-match "\\.pdf$" pdfs)))
+                         (TeX-master-directory))))
+           (format "%s" pdffile)))))
 
     ;; \includepdfmerge[<options>]{<file-page-list>}
     ;; The mandatory argument is complex, we just insert a pair of
@@ -128,12 +128,12 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("includepdfset"    "{"))
-                             'function)
+                              'function)
      (font-latex-add-keywords '(("includepdf"       "[{")
-                               ("includepdfmerge"  "[{"))
-                             'reference)))
+                                ("includepdfmerge"  "[{"))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-pdfpages-package-options
diff --git a/style/pdfsync.el b/style/pdfsync.el
index d4f7629..a6a9ab1 100644
--- a/style/pdfsync.el
+++ b/style/pdfsync.el
@@ -35,52 +35,52 @@
 (defun LaTeX-pdfsync-output-page ()
   "Return page number in output file corresponding to buffer position."
   (let* ((line (line-number-at-pos))
-        (master (TeX-active-master))
-        (file (file-name-sans-extension
-               (file-relative-name (buffer-file-name)
-                                   (file-name-directory master))))
-        (pdfsync-file (concat master ".pdfsync"))
-        (buf-live-p (get-file-buffer pdfsync-file))
-        (sync-record "0")
-        (sync-page "1")
-        last-match)
+         (master (TeX-active-master))
+         (file (file-name-sans-extension
+                (file-relative-name (buffer-file-name)
+                                    (file-name-directory master))))
+         (pdfsync-file (concat master ".pdfsync"))
+         (buf-live-p (get-file-buffer pdfsync-file))
+         (sync-record "0")
+         (sync-page "1")
+         last-match)
     (when (file-exists-p pdfsync-file)
       (with-current-buffer (find-file-noselect pdfsync-file)
-       (save-restriction
-         (goto-char (point-min))
-         ;; Narrow region to file in question.
-         (when (not (string= file master))
-           (re-search-forward (concat "^(" file "\\(.tex\\)?$") nil t)
-           (let ((beg (match-beginning 0)))
-             (goto-char beg)
-             (narrow-to-region (line-beginning-position 2)
-                               (progn (forward-sexp) (point))))
-           (goto-char (point-min)))
-         ;; Look for the record number.
-         (catch 'break
-           (while (re-search-forward "^(\\|^l \\([0-9]+\\) \\([0-9]+\\)" nil t)
-             (cond ((string= (match-string 0) "(")
-                    (goto-char (match-beginning 0))
-                    (forward-sexp))
-                   ((> (string-to-number (match-string 2)) line)
-                    (throw 'break nil))
-                   (t
-                    (setq sync-record (match-string 1)
-                          last-match (match-beginning 0))))))
-         ;; Look for the page number.
-         (goto-char (or last-match (point-min)))
-         ;; There might not be any p or s lines for the current file,
-         ;; so make it possible to search further.
-         (widen)
-         (catch 'break
-           (while (re-search-forward "^p \\([0-9]+\\)" nil t)
-             (when (>= (string-to-number (match-string 1))
-                       (string-to-number sync-record))
-               (re-search-backward "^s \\([0-9]+\\)" nil t)
-               (setq sync-page (match-string 1))
-               (throw 'break nil)))))
-       ;; Kill the buffer if it was loaded by us.
-       (unless buf-live-p (kill-buffer (current-buffer)))))
+        (save-restriction
+          (goto-char (point-min))
+          ;; Narrow region to file in question.
+          (when (not (string= file master))
+            (re-search-forward (concat "^(" file "\\(.tex\\)?$") nil t)
+            (let ((beg (match-beginning 0)))
+              (goto-char beg)
+              (narrow-to-region (line-beginning-position 2)
+                                (progn (forward-sexp) (point))))
+            (goto-char (point-min)))
+          ;; Look for the record number.
+          (catch 'break
+            (while (re-search-forward "^(\\|^l \\([0-9]+\\) \\([0-9]+\\)" nil 
t)
+              (cond ((string= (match-string 0) "(")
+                     (goto-char (match-beginning 0))
+                     (forward-sexp))
+                    ((> (string-to-number (match-string 2)) line)
+                     (throw 'break nil))
+                    (t
+                     (setq sync-record (match-string 1)
+                           last-match (match-beginning 0))))))
+          ;; Look for the page number.
+          (goto-char (or last-match (point-min)))
+          ;; There might not be any p or s lines for the current file,
+          ;; so make it possible to search further.
+          (widen)
+          (catch 'break
+            (while (re-search-forward "^p \\([0-9]+\\)" nil t)
+              (when (>= (string-to-number (match-string 1))
+                        (string-to-number sync-record))
+                (re-search-backward "^s \\([0-9]+\\)" nil t)
+                (setq sync-page (match-string 1))
+                (throw 'break nil)))))
+        ;; Kill the buffer if it was loaded by us.
+        (unless buf-live-p (kill-buffer (current-buffer)))))
     sync-page))
 
 (TeX-add-style-hook
diff --git a/style/plext.el b/style/plext.el
index c686792..8b4cf0b 100644
--- a/style/plext.el
+++ b/style/plext.el
@@ -46,36 +46,36 @@
     '("tabular*" LaTeX-plext-env-array))
 
    (set (make-local-variable 'LaTeX-array-skipping-regexp)
-       (concat "\\(?:<[tyz]>\\)?[ \t]*" (regexp-opt '("[t]" "[b]" ""))))
+        (concat "\\(?:<[tyz]>\\)?[ \t]*" (regexp-opt '("[t]" "[b]" ""))))
    (set (make-local-variable 'LaTeX-tabular*-skipping-regexp)
-       (concat "\\(?:<[tyz]>\\)?[ \t]*{[^}]*}[ \t]*"
-               (regexp-opt '("[t]" "[b]" "")))))
+        (concat "\\(?:<[tyz]>\\)?[ \t]*{[^}]*}[ \t]*"
+                (regexp-opt '("[t]" "[b]" "")))))
  TeX-dialect)
 
 (defun LaTeX-plext-env-array (env)
   (let ((dir (TeX-read-string "(Optional) Direction (t or y or z): "))
-       (width (if (string= env "tabular*")
-                  (TeX-read-string "Width: " LaTeX-default-width)))
-       (pos (and LaTeX-default-position ; LaTeX-default-position can
-                                       ; be nil, i.e. do not prompt
-                 (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
-       (fmt (TeX-read-string "Format: " LaTeX-default-format)))
+        (width (if (string= env "tabular*")
+                   (TeX-read-string "Width: " LaTeX-default-width)))
+        (pos (and LaTeX-default-position ; LaTeX-default-position can
+                                        ; be nil, i.e. do not prompt
+                  (TeX-read-string "(Optional) Position: " 
LaTeX-default-position)))
+        (fmt (TeX-read-string "Format: " LaTeX-default-format)))
     (unless (zerop (length dir))
       (setq dir (concat "<" dir ">")))
     (if (string= env "tabular*")
-       (setq LaTeX-default-width width))
+        (setq LaTeX-default-width width))
     (setq LaTeX-default-position pos)
     (setq LaTeX-default-format fmt)
     (LaTeX-insert-environment env
-                             (concat
-                              dir
-                              (if (string= env "tabular*")
-                                  (concat TeX-grop width TeX-grcl))
-                              (unless (zerop (length pos))
-                                (concat LaTeX-optop pos LaTeX-optcl))
-                              (concat TeX-grop fmt TeX-grcl)))
+                              (concat
+                               dir
+                               (if (string= env "tabular*")
+                                   (concat TeX-grop width TeX-grcl))
+                               (unless (zerop (length pos))
+                                 (concat LaTeX-optop pos LaTeX-optcl))
+                               (concat TeX-grop fmt TeX-grcl)))
     (if (string= env "tabular*")
-       (LaTeX-item-tabular* t)
+        (LaTeX-item-tabular* t)
       (LaTeX-item-array t))))
 
 ;;; plext.el ends here.
diff --git a/style/polski.el b/style/polski.el
index 83c4840..e7b10ae 100644
--- a/style/polski.el
+++ b/style/polski.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (defvar LaTeX-polski-package-options
   '("plmath" "nomathsymbols" "MeX" "T1" "QX" "OT1" "OT4" "prefixinginverb"
diff --git a/style/polyglossia.el b/style/polyglossia.el
index e52d54e..64b1bba 100644
--- a/style/polyglossia.el
+++ b/style/polyglossia.el
@@ -41,20 +41,20 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-auto-add-type "polyglossia-lang" "LaTeX")
 
 ;; Self Parsing -- see (info "(auctex)Hacking the Parser").
 (defvar LaTeX-polyglossia-lang-regexp
   (concat "\\\\set\\(defaultlanguage\\|mainlanguage\\|otherlanguages?\\)"
-         "[ \t\n\r]*\\(?:\\[\\(.*\\)\\]\\)?[ \t\n\r]*{\\([A-Za-z, ]+\\)}")
+          "[ \t\n\r]*\\(?:\\[\\(.*\\)\\]\\)?[ \t\n\r]*{\\([A-Za-z, ]+\\)}")
   "Matches languages set with polyglossia macros.")
 
 (defvar LaTeX-polyglossia-setkeys-regexp
   (concat "\\\\setkeys"
-         "[ \t\n\r]*{\\([A-Za-z]+\\)}[ \t\n\r]*{\\([^}]*\\)}")
+          "[ \t\n\r]*{\\([A-Za-z]+\\)}[ \t\n\r]*{\\([^}]*\\)}")
   "Matches polyglossia languages options set using \"\setkeys\".")
 
 (defvar LaTeX-auto-polyglossia-lang nil
@@ -66,8 +66,8 @@
 (defun LaTeX-polyglossia-prepare ()
   "Clear some polyglossia variables before use."
   (setq LaTeX-auto-polyglossia-lang nil
-       LaTeX-auto-polyglossia-setkeys nil
-       LaTeX-polyglossia-lang-list nil))
+        LaTeX-auto-polyglossia-setkeys nil
+        LaTeX-polyglossia-lang-list nil))
 
 (defun LaTeX-polyglossia-cleanup ()
   "Move languages and their options from
@@ -93,22 +93,22 @@
     (mapc
      (lambda (elt)
        (mapc
-       (lambda (language)
-         ;; `opts' is the string of options for `language', set using
-         ;; "\setdefaultlanguage" or "\setotherlanguage".
-         (setq opts (cdr (cdr elt)))
-         ;; `otheropts' is the string of options for `language' set using
-         ;; "\setkeys".
-         (setq otheropts
-               (car (cdr (assoc language LaTeX-auto-polyglossia-setkeys))))
-         (add-to-list
-          'LaTeX-polyglossia-lang-list
-          (append
-           (list language) (list (nth 1 elt))
-           (unless (equal opts '(""))
-             (LaTeX-listify-package-options (car opts)))
-           (if otheropts (LaTeX-listify-package-options otheropts))) t))
-       (LaTeX-listify-package-options (car elt))))
+        (lambda (language)
+          ;; `opts' is the string of options for `language', set using
+          ;; "\setdefaultlanguage" or "\setotherlanguage".
+          (setq opts (cdr (cdr elt)))
+          ;; `otheropts' is the string of options for `language' set using
+          ;; "\setkeys".
+          (setq otheropts
+                (car (cdr (assoc language LaTeX-auto-polyglossia-setkeys))))
+          (add-to-list
+           'LaTeX-polyglossia-lang-list
+           (append
+            (list language) (list (nth 1 elt))
+            (unless (equal opts '(""))
+              (LaTeX-listify-package-options (car opts)))
+            (if otheropts (LaTeX-listify-package-options otheropts))) t))
+        (LaTeX-listify-package-options (car elt))))
      LaTeX-auto-polyglossia-lang)))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-polyglossia-prepare)
@@ -139,7 +139,7 @@ The last language is the default one."
     (mapc
      (lambda (elt)
        (setq default (or (string-equal "defaultlanguage" (nth 1 elt))
-                        (string-equal "mainlanguage" (nth 1 elt))))
+                         (string-equal "mainlanguage" (nth 1 elt))))
        ;; Append the language to the list if it's the default one.
        (add-to-list 'active-languages (car elt) default))
      LaTeX-polyglossia-lang-list)
@@ -169,68 +169,68 @@ second mandatory argument."
   ;; Note: `DEFAULT' is currently ignored because we don't really have a
   ;; mechanism to identify the default polyglossia language.
   (let ((language (funcall
-                  (if multiple
-                      'TeX-completing-read-multiple
-                    'completing-read)
-                  (if multiple "Languages: " "Language: ")
-                  (if setkeys
-                      (LaTeX-polyglossia-active-languages)
-                    LaTeX-polyglossia-language-list)))
-       var  options)
+                   (if multiple
+                       'TeX-completing-read-multiple
+                     'completing-read)
+                   (if multiple "Languages: " "Language: ")
+                   (if setkeys
+                       (LaTeX-polyglossia-active-languages)
+                     LaTeX-polyglossia-language-list)))
+        var  options)
     (if multiple
-       (mapc (lambda (elt) (TeX-run-style-hooks (concat "gloss-" elt)))
-             language)
+        (mapc (lambda (elt) (TeX-run-style-hooks (concat "gloss-" elt)))
+              language)
       (TeX-run-style-hooks (concat "gloss-" language)))
     ;; "\setotherlanguages" doesn't take options, don't prompt for them.
     (setq options
-         (if multiple ""
-           (setq var (intern (format "LaTeX-polyglossia-%s-options-list" 
language)))
-           (if (and (boundp var) (symbol-value var))
-               ;; "\setdefaultlanguage" and "\setotherlanguage" use `options'
-               ;; as first optional argument; "\setkeys" uses `options' as
-               ;; second mandatory argument.
-               (TeX-read-key-val (not setkeys) (symbol-value var))
-             ;; When `LaTeX-polyglossia-<lang>-options-list' is nil or not
-             ;; defined, don't prompt for options.
-             "")))
+          (if multiple ""
+            (setq var (intern (format "LaTeX-polyglossia-%s-options-list" 
language)))
+            (if (and (boundp var) (symbol-value var))
+                ;; "\setdefaultlanguage" and "\setotherlanguage" use `options'
+                ;; as first optional argument; "\setkeys" uses `options' as
+                ;; second mandatory argument.
+                (TeX-read-key-val (not setkeys) (symbol-value var))
+              ;; When `LaTeX-polyglossia-<lang>-options-list' is nil or not
+              ;; defined, don't prompt for options.
+              "")))
     (unless setkeys
       (let ((TeX-arg-opening-brace LaTeX-optop)
-           (TeX-arg-closing-brace LaTeX-optcl))
-       (TeX-argument-insert options t)))
+            (TeX-arg-closing-brace LaTeX-optcl))
+        (TeX-argument-insert options t)))
     (if multiple
-       (setq language (mapconcat 'identity language ",")))
+        (setq language (mapconcat 'identity language ",")))
     (TeX-argument-insert language nil)
     (if setkeys
-       (TeX-argument-insert options nil))))
+        (TeX-argument-insert options nil))))
 
 (defun LaTeX-arg-polyglossiasetup-options (optional)
   "Prompt for setup options of polyglossia package.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one."
   (TeX-arg-key-val optional
-                  '(("language") ;; TODO: add completion in `fontspec.el', see
-                                 ;; "\newfontlanguage"s in 
`fontspec-xetex.sty'.
-                    ("hyphennames")
-                    ("script") ;; TODO: add completion in `fontspec.el', see
-                               ;; "\newfontscript"s in `fontspec-xetex.sty'.
-                    ("direction" ("RL" "LR"))
-                    ("scripttag")
-                    ("langtag")
-                    ("hyphenmins")
-                    ("frenchspacing" ("true" "false"))
-                    ("indentfirst" ("true" "false"))
-                    ("fontsetup" ("true" "false"))
-                    ;; The following options aren't already implemented but are
-                    ;; present in `polyglossia.sty' comments.
-                    ;; ("nouppercase" ("true" "false"))
-                    ;; ("localalph")
-                    ;; ("localnumber")
-                    )))
+                   '(("language") ;; TODO: add completion in `fontspec.el', see
+                                  ;; "\newfontlanguage"s in 
`fontspec-xetex.sty'.
+                     ("hyphennames")
+                     ("script") ;; TODO: add completion in `fontspec.el', see
+                                ;; "\newfontscript"s in `fontspec-xetex.sty'.
+                     ("direction" ("RL" "LR"))
+                     ("scripttag")
+                     ("langtag")
+                     ("hyphenmins")
+                     ("frenchspacing" ("true" "false"))
+                     ("indentfirst" ("true" "false"))
+                     ("fontsetup" ("true" "false"))
+                     ;; The following options aren't already implemented but 
are
+                     ;; present in `polyglossia.sty' comments.
+                     ;; ("nouppercase" ("true" "false"))
+                     ;; ("localalph")
+                     ;; ("localnumber")
+                     )))
 
 (defun LaTeX-polyglossia-load-languages ()
   "Load style files of babel active languages."
   (mapc (lambda (elt) (TeX-run-style-hooks (concat "gloss-" elt)))
-       (LaTeX-polyglossia-active-languages)))
+        (LaTeX-polyglossia-active-languages)))
 
 (TeX-add-style-hook
  "polyglossia"
@@ -250,7 +250,7 @@ argument, otherwise as a mandatory one."
     '("setotherlanguages"  (LaTeX-arg-polyglossia-lang nil  t  nil))
     '("setkeys"            (LaTeX-arg-polyglossia-lang nil nil  t ))
     '("PolyglossiaSetup"   (TeX-arg-eval completing-read "Language: "
-                                        (LaTeX-polyglossia-active-languages))
+                                         (LaTeX-polyglossia-active-languages))
       LaTeX-arg-polyglossiasetup-options)
     "selectbackgroundlanguage"
     '("resetdefaultlanguage" ["argument"] 1)
@@ -269,13 +269,13 @@ argument, otherwise as a mandatory one."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("setdefaultlanguage" "[{")
-                               ("setmainlanguage" "[{")
-                               ("setotherlanguage" "[{")
-                               ("setotherlanguages" "{")
-                               ("setkeys" "{{"))
-                             'function)))
+                                ("setmainlanguage" "[{")
+                                ("setotherlanguage" "[{")
+                                ("setotherlanguages" "{")
+                                ("setkeys" "{{"))
+                              'function)))
  TeX-dialect)
 
 ;; TODO: move each option variable in its specific `gloss-<lang>.el' file.
diff --git a/style/preview.el b/style/preview.el
index f36ca6c..5431c09 100644
--- a/style/preview.el
+++ b/style/preview.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defun LaTeX-preview-arg-ifpreview (_optional)
   "Insert \\else and \\fi part of \\ifPreview command from preview.sty.
@@ -64,23 +64,23 @@ OPTIONAL is ignored."
 
    (TeX-add-symbols
     '("PreviewMacro" (TeX-arg-conditional (y-or-n-p "With optional arguments? 
")
-                                         ( [ t ] [ nil ] )
-                                       ())
+                                          ( [ t ] [ nil ] )
+                                          ())
       TeX-arg-macro)
 
     '("PreviewMacro*" (TeX-arg-conditional (y-or-n-p "With optional arguments? 
")
-                                          ( [ t ] [ nil ] )
-                                        ())
+                                           ( [ t ] [ nil ] )
+                                           ())
       TeX-arg-macro)
 
     '("PreviewEnvironment" (TeX-arg-conditional (y-or-n-p "With optional 
arguments? ")
-                                               ( [ t ] [ nil ] )
-                                             ())
+                                                ( [ t ] [ nil ] )
+                                                ())
       TeX-arg-environment)
 
     '("PreviewEnvironment*" (TeX-arg-conditional (y-or-n-p "With optional 
arguments? ")
-                                                ( [ t ] [ nil ] )
-                                              ())
+                                                 ( [ t ] [ nil ] )
+                                                 ())
       TeX-arg-environment)
 
     '("PreviewSnarfEnvironment" TeX-arg-environment)
@@ -92,11 +92,11 @@ OPTIONAL is ignored."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("PreviewMacro"            "*[[{")
-                               ("PreviewEnvironment"      "*[[{")
-                               ("PreviewSnarfEnvironment" "[{"))
-                             'function)))
+                                ("PreviewEnvironment"      "*[[{")
+                                ("PreviewSnarfEnvironment" "[{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-preview-package-options
diff --git a/style/prosper.el b/style/prosper.el
index 85e9e2e..ca59500 100644
--- a/style/prosper.el
+++ b/style/prosper.el
@@ -66,12 +66,12 @@
   "prosper.el version.")
 
 (defconst LaTeX-prosper-transition-styles '("Split"
-                                         "Blinds"
-                                         "Box"
-                                         "Wipe"
-                                         "Dissolve"
-                                         "Glitter"
-                                         "Replace")
+                                          "Blinds"
+                                          "Box"
+                                          "Wipe"
+                                          "Dissolve"
+                                          "Glitter"
+                                          "Replace")
   "List of transition styles provided by prosper.")
 
 (defconst LaTeX-prosper-slide-styles
@@ -84,10 +84,10 @@
 (defun LaTeX-prosper-insert-title (_optional)
   (newline)
   (mapc (lambda(f)
-         (TeX-insert-macro f)
-         (newline))
-       '("title" "subtitle" "author" "email" "institution" "slideCaption"
-         "Logo" "DefaultTransition"))
+          (TeX-insert-macro f)
+          (newline))
+        '("title" "subtitle" "author" "email" "institution" "slideCaption"
+          "Logo" "DefaultTransition"))
   (LaTeX-insert-environment "document")
   (TeX-insert-macro "maketitle"))
 
@@ -122,13 +122,13 @@
   (insert "[" )
   (insert (LaTeX-prosper-slide-style-prompt) " ")
   (mapc (lambda(f)
-         (if (y-or-n-p (car f))
-             (insert (car (cdr f)) " ")))
-       '(("Draft?" "draft")
-         ("Color Slides?" "slideColor")
-         ("Disable running total on each slide?" "nototal")
-         ("Is the final version going to be PDF?" "pdf")
-         ("Are you going to use Adobe Distiller" "distiller")))
+          (if (y-or-n-p (car f))
+              (insert (car (cdr f)) " ")))
+        '(("Draft?" "draft")
+          ("Color Slides?" "slideColor")
+          ("Disable running total on each slide?" "nototal")
+          ("Is the final version going to be PDF?" "pdf")
+          ("Are you going to use Adobe Distiller" "distiller")))
   (delete-char -1)
   (insert "]"))
 
diff --git a/style/psfig.el b/style/psfig.el
index d8cf78b..09b2ad2 100644
--- a/style/psfig.el
+++ b/style/psfig.el
@@ -15,13 +15,13 @@
  (lambda ()
    ;; probable some of the following symbols may be removed
    (TeX-add-symbols "protect" "figurepath"  "fbox"
-                   "other" "letter" "other" "then" "Sine" "Cosine"
-                   "psdraft" "psfull" "psscalefirst" "psrotatefirst"
-                   "psnodraftbox" "psdraftbox" "pssilent" "psnoisy"
-                   "minmaxtest"
+                    "other" "letter" "other" "then" "Sine" "Cosine"
+                    "psdraft" "psfull" "psscalefirst" "psrotatefirst"
+                    "psnodraftbox" "psdraftbox" "pssilent" "psnoisy"
+                    "minmaxtest"
                     '("psfig" TeX-arg-psfig)
                     '("psfigurepath" t)
-                   )
+                    )
    (LaTeX-add-environments
     '("psfigure" LaTeX-env-psfigure)))
  TeX-dialect)
@@ -29,15 +29,15 @@
 (defun TeX-arg-psfig (_optional)
   "Ask for file, width and length. Insert psfig macro"
   (let ((psfile (read-file-name "PS-file: " "" "" nil))
-       (figwidth (TeX-read-string "Figure width: "))
-       (figheight (TeX-read-string "Figure height: "))
-       )
+        (figwidth (TeX-read-string "Figure width: "))
+        (figheight (TeX-read-string "Figure height: "))
+        )
 
     (insert TeX-grop "figure=" psfile)
     (if (not (zerop (length figwidth)))
-       (insert ",width=" figwidth))
+        (insert ",width=" figwidth))
     (if (not (zerop (length figheight)))
-       (insert ",height=" figheight))
+        (insert ",height=" figheight))
     (insert TeX-grcl)))
 
 
@@ -48,33 +48,33 @@
          (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
                           (TeX-read-string "(Optional) Short caption: ")))
          (label (TeX-read-string "Label: " LaTeX-figure-label))
-         ; gf: ask if this should be centered
+                                        ; gf: ask if this should be centered
          (psfile (read-file-name "PS-file: " "" "" nil))
          (figwidth (TeX-read-string "Figure width: "))
          (figheight (TeX-read-string "Figure height: "))
          )
 
     (setq LaTeX-float (if (zerop (length float))
-                         LaTeX-float
-                       float))
+                          LaTeX-float
+                        float))
 
     (LaTeX-insert-environment "figure"
-                             (concat LaTeX-optop LaTeX-float LaTeX-optcl))
+                              (concat LaTeX-optop LaTeX-float LaTeX-optcl))
 
     (insert TeX-esc "centerline" TeX-grop TeX-esc "psfig" TeX-grop
-           "figure=" psfile)
+            "figure=" psfile)
     (if (not (zerop (length figwidth)))
-       (insert ",width=" figwidth))
+        (insert ",width=" figwidth))
     (if (not (zerop (length figheight)))
-       (insert ",height=" figheight))
+        (insert ",height=" figheight))
     (insert TeX-grcl TeX-grcl)
     (if (zerop (length caption))
-       ()
+        ()
       (newline-and-indent)
       (insert (LaTeX-compose-caption-macro caption short-caption)))
     (if (or (zerop (length label))
-           (equal LaTeX-figure-label label))
-       ()
+            (equal LaTeX-figure-label label))
+        ()
       (newline-and-indent)
       (insert TeX-esc "label" TeX-grop label TeX-grcl))
 
diff --git a/style/pst-node.el b/style/pst-node.el
index be28fb0..183ecd0 100644
--- a/style/pst-node.el
+++ b/style/pst-node.el
@@ -40,11 +40,11 @@
 
 ;; Silence the compiler:
 (declare-function LaTeX-package-parameter-value
-                 "pstricks" (param pname))
+                  "pstricks" (param pname))
 (declare-function LaTeX-package-parameters-pref-and-chosen
-                 "pstricks" (param pname noskip))
+                  "pstricks" (param pname noskip))
 (declare-function LaTeX-package-parameters
-                 "pstricks" (optional pname preparam param))
+                  "pstricks" (optional pname preparam param))
 (declare-function LaTeX-pst-angle  "pstricks" ())
 (declare-function LaTeX-pst-point  "pstricks" ())
 (declare-function LaTeX-pst-arrows "pstricks" ())
@@ -135,7 +135,7 @@
 (defun LaTeX-pstnode-env-psmatrix (env)
   "Return psmatrix environment with arguments."
   (let ((opt (TeX-completing-read-multiple "Options: "
-                                          LaTeX-pstnode-psmatrix-list)))
+                                           LaTeX-pstnode-psmatrix-list)))
     (LaTeX-insert-environment env opt)))
 
 (TeX-add-style-hook
diff --git a/style/pst-plot.el b/style/pst-plot.el
index bcbeb9d..cfad30b 100644
--- a/style/pst-plot.el
+++ b/style/pst-plot.el
@@ -41,7 +41,7 @@
 (declare-function LaTeX-pst-arrows "pstricks" ())
 (declare-function LaTeX-pst-point  "pstricks" ())
 (declare-function TeX-arg-compl-list
-                 "pstricks" (list &optional prompt hist))
+                  "pstricks" (list &optional prompt hist))
 
 (defvar LaTeX-pst-parameters-completion-regexp)
 (defvar LaTeX-pst-parameters-name-list)
diff --git a/style/pstricks.el b/style/pstricks.el
index 7b40256..3e41d64 100644
--- a/style/pstricks.el
+++ b/style/pstricks.el
@@ -390,9 +390,9 @@ package PNAME"
     ("curvature")
     ;; Dots
     ("dotstyle" ("*" "o" "Bo" "x" "+" "B+" "asterisk" "Basterisk" "oplus"
-                "otimes" "|" "B|" "square" "Bsquare" "square*" "diamond"
-                "Bdiamond" "diamond*" "triangle" "Btriangle" "triangle*"
-                "pentagon" "Bpentagon" "pentagon*"))
+                 "otimes" "|" "B|" "square" "Bsquare" "square*" "diamond"
+                 "Bdiamond" "diamond*" "triangle" "Btriangle" "triangle*"
+                 "pentagon" "Bpentagon" "pentagon*"))
     ("dotsize")
     ("dotscale")
     ("dotangle")
@@ -643,8 +643,8 @@ package PNAME"
 (defun LaTeX-pst-macro-newpsobject (&optional _arg)
   "Return \\newpsobject arguments after querying."
   (insert "{" (TeX-read-string "New PSObject Name: ") "}"
-         ;; FIXME: It would be better to use something more confined
-         ;; than `TeX-symbol-list'.
+          ;; FIXME: It would be better to use something more confined
+          ;; than `TeX-symbol-list'.
           "{" (completing-read "Parent Object: " (TeX-symbol-list))
           "}"))
 
@@ -652,9 +652,9 @@ package PNAME"
 (defun LaTeX-pst-env-pspicture (env)
   "Create new pspicure environment."
   (let ((opt (multi-prompt-key-value
-             (TeX-argument-prompt t "Options" nil)
-             '(("showgrid") ("shift"))))
-       (p0 (LaTeX-pst-what "point" "Lower left (default 0,0)" "0,0"))
+              (TeX-argument-prompt t "Options" nil)
+              '(("showgrid") ("shift"))))
+        (p0 (LaTeX-pst-what "point" "Lower left (default 0,0)" "0,0"))
         (p1 (LaTeX-pst-what "point" "Upper right (default 1,1)" "1,1"))
         corn)
     (setq corn (concat (unless (string= "" opt) (format "[%s]" opt))
@@ -688,7 +688,7 @@ package PNAME"
               (setq TeX-auto-symbol
                     (cons (list (nth 1 list)
                                 (cl-caddr (assoc (nth 2 list)
-                                              (TeX-symbol-list))))
+                                                 (TeX-symbol-list))))
                           TeX-auto-symbol)))
              ((string= type "fontdot")
               (add-to-list 'LaTeX-pst-dotstyle-list (nth 1 list) t))
@@ -696,7 +696,7 @@ package PNAME"
               (add-to-list 'LaTeX-pst-style-list (nth 1 list) t))
              ((string= type "color")
               (add-to-list 'LaTeX-pst-color-list (nth 1 list) t)
-             ;; FIXME: Why is an entry with "-" in front added?
+              ;; FIXME: Why is an entry with "-" in front added?
               (add-to-list 'LaTeX-pst-color-list
                            (concat "-" (nth 1 list)) t)))))
    LaTeX-auto-pstricks))
@@ -783,7 +783,7 @@ comma separated list. Point has to be within the sexp to 
modify."
  "pstricks"
  (lambda ()
    (unless (or (member "pst-pdf" TeX-active-styles)
-              (eq TeX-engine 'xetex))
+               (eq TeX-engine 'xetex))
      ;; Leave at user's choice whether to disable `TeX-PDF-mode' or
      ;; not. Instead set up `TeX-PDF-from-DVI' option so that AUCTeX
      ;; takes dvips+ps2pdf route when `TeX-PDF-mode' is enabled.
diff --git a/style/pythontex.el b/style/pythontex.el
index b6aa70d..4c5089d 100644
--- a/style/pythontex.el
+++ b/style/pythontex.el
@@ -42,17 +42,17 @@
 ;; These are provided by `font-latex.el':
 (defvar font-latex-syntactic-keywords-extra)
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 ;; The next two are provided by `newfloat.el':
 (declare-function LaTeX-add-newfloat-DeclareFloatingEnvironments
-                 "newfloat"
-                 (&rest newfloat-declarefloatingenvironments))
+                  "newfloat"
+                  (&rest newfloat-declarefloatingenvironments))
 (declare-function LaTeX-newfloat-auto-cleanup
-                 "newfloat" ())
+                  "newfloat" ())
 
 (defvar LaTeX-pythontex-pygmentize-program (executable-find "pygmentize")
   "Path to pygmentize executable.")
@@ -65,15 +65,15 @@
 Update the variable `LaTeX-pythontex-language-list' if still nil."
   (or LaTeX-pythontex-language-list
       (when LaTeX-pythontex-pygmentize-program
-       (with-temp-buffer
-         (shell-command (concat LaTeX-pythontex-pygmentize-program " -L 
lexers")
-                        (current-buffer))
-         (goto-char (point-min))
-         (let (languages)
-           (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t)
-             (dolist (lang (split-string (match-string 1) "[[:space:],]" t))
-               (push lang languages)))
-           (setq LaTeX-pythontex-language-list languages))))))
+        (with-temp-buffer
+          (shell-command (concat LaTeX-pythontex-pygmentize-program " -L 
lexers")
+                         (current-buffer))
+          (goto-char (point-min))
+          (let (languages)
+            (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t)
+              (dolist (lang (split-string (match-string 1) "[[:space:],]" t))
+                (push lang languages)))
+            (setq LaTeX-pythontex-language-list languages))))))
 
 (defvar LaTeX-pythontex-package-options-list
   `(("usefamily"         ("py" "sympy" "pylab" "rb" "ruby" "jl" "julia" 
"octave"))
@@ -115,20 +115,20 @@ Update the variable `LaTeX-pythontex-language-list' if 
still nil."
 (defun LaTeX-env-pythontex (environment)
   "Insert ENVIRONMENT provided by pythontex package."
   (let ((session (TeX-read-string
-                 (TeX-argument-prompt t nil "Session")))
-       (fvkeyval (TeX-read-key-val t LaTeX-fancyvrb-key-val-options-local)))
+                  (TeX-argument-prompt t nil "Session")))
+        (fvkeyval (TeX-read-key-val t LaTeX-fancyvrb-key-val-options-local)))
     (LaTeX-insert-environment environment
-                             (concat
-                              (when (and session (not (string= session "")))
-                                (concat LaTeX-optop session LaTeX-optcl))
-                              ;; We need an extra pair of brackets
-                              ;; when no session is given but
-                              ;; key=vals are available
-                              (when (and session (string= session "")
-                                         fvkeyval (not (string= fvkeyval "")))
-                                (concat LaTeX-optop LaTeX-optcl))
-                              (when (and fvkeyval (not (string= fvkeyval "")))
-                                (concat LaTeX-optop fvkeyval LaTeX-optcl))))))
+                              (concat
+                               (when (and session (not (string= session "")))
+                                 (concat LaTeX-optop session LaTeX-optcl))
+                               ;; We need an extra pair of brackets
+                               ;; when no session is given but
+                               ;; key=vals are available
+                               (when (and session (string= session "")
+                                          fvkeyval (not (string= fvkeyval "")))
+                                 (concat LaTeX-optop LaTeX-optcl))
+                               (when (and fvkeyval (not (string= fvkeyval "")))
+                                 (concat LaTeX-optop fvkeyval LaTeX-optcl))))))
 
 ;; Setup for \saveprintpythontex & \savestdoutpythontex &
 ;; \savestderrpythontex
@@ -136,11 +136,11 @@ Update the variable `LaTeX-pythontex-language-list' if 
still nil."
 
 (defvar LaTeX-pythontex-savecontent-regexp
   `(,(concat "\\\\"
-            (regexp-opt '("saveprintpythontex"
-                          "savestdoutpythontex"
-                          "savestderrpythontex")
-                        "\\(?:")
-            "{\\([^}]+\\)}")
+             (regexp-opt '("saveprintpythontex"
+                           "savestdoutpythontex"
+                           "savestderrpythontex")
+                         "\\(?:")
+             "{\\([^}]+\\)}")
     1 LaTeX-auto-pythontex-savecontent)
   "Matches the argument of \\save(print|stdout|stderr)pythontex macros.")
 
@@ -155,7 +155,7 @@ Update the variable `LaTeX-pythontex-language-list' if 
still nil."
 (defun LaTeX-pythontex-auto-prepare ()
   "Clear various `LaTeX-auto-pythontex-*' before parsing."
   (setq LaTeX-auto-pythontex-savecontent nil
-       LaTeX-auto-pythontex-setpythontexlistingenv nil))
+        LaTeX-auto-pythontex-setpythontexlistingenv nil))
 
 (defun LaTeX-pythontex-auto-cleanup ()
   "Process the parsing results for \\setpythontexlistingenv macro."
@@ -175,36 +175,36 @@ TYPE is one of the symbols `brace' or `delim' indicating 
how
 verbatim text is enclosed after the macro.  MACRO is a string or
 a list of strings."
   (let ((syntax (if (eq type 'brace)
-                   '((1 "|") (2 "|"))
-                 '((1 "\"") (2 ".") (3 "\""))))
-       regexp)
+                    '((1 "|") (2 "|"))
+                  '((1 "\"") (2 ".") (3 "\""))))
+        regexp)
     (when (listp macro)
       (setq macro (regexp-opt macro "\\(?:")))
     (setq regexp `(,(concat
-                    ;; The backslash
-                    (regexp-quote TeX-esc)
-                    ;; Name of the macro(s)
-                    macro
-                    ;; The first mandatory argument is the lexer
-                    "\\(?:{[^}]+}\\)"
-                    ;; With 'brace, allow braced sub-groups otherwise
-                    ;; we stop matching too early.  With 'delim, copy
-                    ;; font-latex.el:
-                    (if (eq type 'brace)
-                        (concat "\\({\\)"
-                                "\\(?:[^}{]*"
-                                "\\(?:{[^}{]*"
-                                "\\(?:{[^}{]*"
-                                "\\(?:{[^}{]*}[^}{]*\\)*"
-                                "}[^}{]*\\)*"
-                                "}[^}{]*\\)*"
-                                "\\)"
-                                "\\(}\\)")
-                      (concat
-                       ;; Opening delimiter
-                       "\\([^a-z@*\n\f{]\\).*?"
-                       ;; Closing delimiter
-                       "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)")))))
+                     ;; The backslash
+                     (regexp-quote TeX-esc)
+                     ;; Name of the macro(s)
+                     macro
+                     ;; The first mandatory argument is the lexer
+                     "\\(?:{[^}]+}\\)"
+                     ;; With 'brace, allow braced sub-groups otherwise
+                     ;; we stop matching too early.  With 'delim, copy
+                     ;; font-latex.el:
+                     (if (eq type 'brace)
+                         (concat "\\({\\)"
+                                 "\\(?:[^}{]*"
+                                 "\\(?:{[^}{]*"
+                                 "\\(?:{[^}{]*"
+                                 "\\(?:{[^}{]*}[^}{]*\\)*"
+                                 "}[^}{]*\\)*"
+                                 "}[^}{]*\\)*"
+                                 "\\)"
+                                 "\\(}\\)")
+                       (concat
+                        ;; Opening delimiter
+                        "\\([^a-z@*\n\f{]\\).*?"
+                        ;; Closing delimiter
+                        "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)")))))
     (add-to-list 'font-latex-syntactic-keywords-extra (append regexp syntax))))
 
 (TeX-add-style-hook
@@ -223,48 +223,48 @@ a list of strings."
 
    ;; 4.2.4 Default families
    (let* ((verb-macs '(;; python
-                      "py" "pyc" "pys" "pyv" "pyb"
-                      "pycon" "pyconc" "pyconv"
-                      ;; Python + pylab (matplotlib module)
-                      "pylab" "pylabc" "pylabs" "pylabv" "pylabb"
-                      "pylabcon" "pylabconc" "pylabconv"
-                      ;; Python + SymPy
-                      "sympy" "sympyc" "sympys" "sympyv" "sympyb"
-                      "sympycon" "sympyconc" "sympyconv"))
-         (verb-envs '(;;python
-                      "pycode" "pysub" "pyverbatim" "pyblock"
-                      "pyconsole" "pyconcode" "pyconverbatim"
-                      ;; Python + pylab (matplotlib module)
-                      "pylabcode" "pylabsub" "pylabverbatim" "pylabblock"
-                      "pylabconsole" "pylabconcode" "pylabconverbatim"
-                      ;; Python + SymPy
-                      "sympycode" "sympysub" "sympyverbatim" "sympyblock"
-                      "sympyconsole" "sympyconcode" "sympyconverbatim"))
-         (verb-envs-regexp (regexp-opt verb-envs "\\(?:")))
+                       "py" "pyc" "pys" "pyv" "pyb"
+                       "pycon" "pyconc" "pyconv"
+                       ;; Python + pylab (matplotlib module)
+                       "pylab" "pylabc" "pylabs" "pylabv" "pylabb"
+                       "pylabcon" "pylabconc" "pylabconv"
+                       ;; Python + SymPy
+                       "sympy" "sympyc" "sympys" "sympyv" "sympyb"
+                       "sympycon" "sympyconc" "sympyconv"))
+          (verb-envs '(;;python
+                       "pycode" "pysub" "pyverbatim" "pyblock"
+                       "pyconsole" "pyconcode" "pyconverbatim"
+                       ;; Python + pylab (matplotlib module)
+                       "pylabcode" "pylabsub" "pylabverbatim" "pylabblock"
+                       "pylabconsole" "pylabconcode" "pylabconverbatim"
+                       ;; Python + SymPy
+                       "sympycode" "sympysub" "sympyverbatim" "sympyblock"
+                       "sympyconsole" "sympyconcode" "sympyconverbatim"))
+          (verb-envs-regexp (regexp-opt verb-envs "\\(?:")))
      (apply #'TeX-add-symbols
-           (mapcar (lambda (mac)
-                     (list mac [ "Session" ] 'TeX-arg-verb-delim-or-brace))
-                   verb-macs))
+            (mapcar (lambda (mac)
+                      (list mac [ "Session" ] 'TeX-arg-verb-delim-or-brace))
+                    verb-macs))
      (apply #'LaTeX-add-environments
-           (mapcar (lambda (env)
-                     (list env 'LaTeX-env-pythontex))
-                   verb-envs))
+            (mapcar (lambda (env)
+                      (list env 'LaTeX-env-pythontex))
+                    verb-envs))
      ;; Filling:
      (dolist (mac verb-macs)
        (add-to-list 'LaTeX-verbatim-macros-with-delims-local mac)
        (add-to-list 'LaTeX-verbatim-macros-with-braces-local mac))
      (dolist (env verb-envs)
        (add-to-list 'LaTeX-indent-environment-list
-                   `(,env current-indentation) t))
+                    `(,env current-indentation) t))
      ;; Fontification
      (when (and (fboundp 'font-latex-add-keywords)
-               (fboundp 'font-latex-set-syntactic-keywords)
-               (boundp 'font-latex-syntactic-keywords-extra)
-               (eq TeX-install-font-lock 'font-latex-setup))
+                (fboundp 'font-latex-set-syntactic-keywords)
+                (boundp 'font-latex-syntactic-keywords-extra)
+                (eq TeX-install-font-lock 'font-latex-setup))
        (font-latex-add-keywords (mapcar (lambda (mac)
-                                         (list mac "["))
-                                       verb-macs)
-                               'textual)
+                                          (list mac "["))
+                                        verb-macs)
+                                'textual)
        ;; We can't use the fontification provided when verbatim
        ;; environments are added to
        ;; `LaTeX-verbatim-environments-local' -- pythontex
@@ -273,19 +273,19 @@ a list of strings."
        ;; We add the envs to `font-latex-syntactic-keywords-extra' and
        ;; define a customized regexp to match 2 optional arguments.
        (add-to-list 'font-latex-syntactic-keywords-extra
-                   `(,(concat
-                       "^[ \t]*\\\\begin *{\\(?:"
-                       verb-envs-regexp
-                       "\\)}"
-                       "[ \t]*\\(?:%.*\n[ \t]*\\)?"
-                       
"\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)\\{0,2\\}"
-                       "\\(\n\\|.\\)")
-                     (1 "|" t)))
+                    `(,(concat
+                        "^[ \t]*\\\\begin *{\\(?:"
+                        verb-envs-regexp
+                        "\\)}"
+                        "[ \t]*\\(?:%.*\n[ \t]*\\)?"
+                        
"\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)\\{0,2\\}"
+                        "\\(\n\\|.\\)")
+                      (1 "|" t)))
        (add-to-list 'font-latex-syntactic-keywords-extra
-                   `(,(concat "\\(\\\\\\)end *{\\(?:"
-                              verb-envs-regexp
-                              "\\)}")
-                     (1 "|" t))))
+                    `(,(concat "\\(\\\\\\)end *{\\(?:"
+                               verb-envs-regexp
+                               "\\)}")
+                      (1 "|" t))))
      ;; Tell font-lock about the update.
      (font-latex-set-syntactic-keywords))
 
@@ -294,44 +294,44 @@ a list of strings."
     ;; pythontexcustomc[<position>]{<family>}{<code>}
     '("pythontexcustomc"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Position")
-                    '("begin" "end") ]
+        (TeX-argument-prompt t nil "Position")
+        '("begin" "end") ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Family")
-                   LaTeX-pythontex-family-list)
+                    (TeX-argument-prompt nil nil "Family")
+                    LaTeX-pythontex-family-list)
       t)
 
     ;; 4.2.7 Formatting of typeset code
     ;; \setpythontexfv[<family>]{<fancyvrb settings>}
     '("setpythontexfv"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Family")
-                    LaTeX-pythontex-family-list ]
+        (TeX-argument-prompt t nil "Family")
+        LaTeX-pythontex-family-list ]
       (TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local))
 
     ;; \setpythontexprettyprinter[<family>]{<printer>}
     '("setpythontexprettyprinter"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Family")
-                    (cons "auto" LaTeX-pythontex-family-list) ]
+        (TeX-argument-prompt t nil "Family")
+        (cons "auto" LaTeX-pythontex-family-list) ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Printer")
-                   '("text" "bw" "fancyvrb" "pygments")))
+                    (TeX-argument-prompt nil nil "Printer")
+                    '("text" "bw" "fancyvrb" "pygments")))
 
     ;; \setpythontexpyglexer[<family>]{<pygments lexer>}
     '("setpythontexpyglexer"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Family")
-                    LaTeX-pythontex-family-list ]
+        (TeX-argument-prompt t nil "Family")
+        LaTeX-pythontex-family-list ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Pygments lexer")
-                   (LaTeX-pythontex-language-list)))
+                    (TeX-argument-prompt nil nil "Pygments lexer")
+                    (LaTeX-pythontex-language-list)))
 
     ;; \setpythontexpygopt[<family>]{<pygments options>}
     '("setpythontexpygopt"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Family")
-                    LaTeX-pythontex-family-list ]
+        (TeX-argument-prompt t nil "Family")
+        LaTeX-pythontex-family-list ]
       (TeX-arg-key-val
        (("style") ("texcomments") ("mathescape"))))
 
@@ -339,129 +339,129 @@ a list of strings."
     ;; \printpythontex[<mode>][<options>]
     '("printpythontex"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Mode")
-                    '("raw" "verb" "verbatim") ]
+        (TeX-argument-prompt t nil "Mode")
+        '("raw" "verb" "verbatim") ]
       [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] )
 
     ;; \stdoutpythontex[<mode>][<options>]
     '("stdoutpythontex"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Mode")
-                    '("raw" "verb" "verbatim") ]
+        (TeX-argument-prompt t nil "Mode")
+        '("raw" "verb" "verbatim") ]
       [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] )
 
     ;;\saveprintpythontex{<name>}
     '("saveprintpythontex"
       (TeX-arg-eval (lambda ()
-                     (let ((name (TeX-read-string
-                                  (TeX-argument-prompt nil nil "Name"))))
-                       (LaTeX-add-pythontex-savecontents name)
-                       (format "%s" name)))))
+                      (let ((name (TeX-read-string
+                                   (TeX-argument-prompt nil nil "Name"))))
+                        (LaTeX-add-pythontex-savecontents name)
+                        (format "%s" name)))))
 
     ;;\savestdoutpythontex{<name>}
     '("savestdoutpythontex"
       (TeX-arg-eval (lambda ()
-                     (let ((name (TeX-read-string
-                                  (TeX-argument-prompt nil nil "Name"))))
-                       (LaTeX-add-pythontex-savecontents name)
-                       (format "%s" name)))))
+                      (let ((name (TeX-read-string
+                                   (TeX-argument-prompt nil nil "Name"))))
+                        (LaTeX-add-pythontex-savecontents name)
+                        (format "%s" name)))))
 
     ;; \useprintpythontex[<verbatim options>][<fancyvrb options>]{<name>}
     ;; I assume <verbatim options> is meant to be <mode>
     '("useprintpythontex"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Mode")
-                    '("raw" "verb" "verbatim") ]
+        (TeX-argument-prompt t nil "Mode")
+        '("raw" "verb" "verbatim") ]
       [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-pythontex-savecontent-list)))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-pythontex-savecontent-list)))
 
     ;; \usestdoutpythontex[<verbatim options>][<fancyvrb options>]{<name>}
     ;; I assume <verbatim options> is meant to be <mode>
     '("usestdoutpythontex"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Mode")
-                    '("raw" "verb" "verbatim") ]
+        (TeX-argument-prompt t nil "Mode")
+        '("raw" "verb" "verbatim") ]
       [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-pythontex-savecontent-list)))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-pythontex-savecontent-list)))
 
     ;; \stderrpythontex[<mode>][<fancyvrb options>]
     '("stderrpythontex"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Mode")
-                    '("raw" "verb" "verbatim") ]
+        (TeX-argument-prompt t nil "Mode")
+        '("raw" "verb" "verbatim") ]
       [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] )
 
 
     ;;\savestderrpythontex{<name>}
     '("savestderrpythontex"
       (TeX-arg-eval (lambda ()
-                     (let ((name (TeX-read-string
-                                  (TeX-argument-prompt nil nil "Name"))))
-                       (LaTeX-add-pythontex-savecontents name)
-                       (format "%s" name)))))
+                      (let ((name (TeX-read-string
+                                   (TeX-argument-prompt nil nil "Name"))))
+                        (LaTeX-add-pythontex-savecontents name)
+                        (format "%s" name)))))
 
     ;; \usestderrpythontex[<mode>][<fancyvrb options>]{<name>}
     '("usestderrpythontex"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Mode")
-                    '("raw" "verb" "verbatim") ]
+        (TeX-argument-prompt t nil "Mode")
+        '("raw" "verb" "verbatim") ]
       [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Name")
-                   (LaTeX-pythontex-savecontent-list)))
+                    (TeX-argument-prompt nil nil "Name")
+                    (LaTeX-pythontex-savecontent-list)))
 
     ;;\setpythontexautoprint{<boolean>}
     '("setpythontexautoprint"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Boolean value")
-                   '("true" "false")))
+                    (TeX-argument-prompt nil nil "Boolean value")
+                    '("true" "false")))
 
     ;; \setpythontexautostdout{<boolean>}
     '("setpythontexautostdout"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Boolean value")
-                   '("true" "false")))
+                    (TeX-argument-prompt nil nil "Boolean value")
+                    '("true" "false")))
 
     ;; 4.3 Pygments commands and environments
     ;; \pygment{<lexer>}<opening delim><code><closing delim>
     '("pygment"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Lexer")
-                   (LaTeX-pythontex-language-list))
+                    (TeX-argument-prompt nil nil "Lexer")
+                    (LaTeX-pythontex-language-list))
       TeX-arg-verb-delim-or-brace)
 
     ;; \inputpygments[<fancyvrb settings>]{<lexer>}{<external file>}
     '("inputpygments"
       [ TeX-arg-eval LaTeX-fancyvrb-key-val-options-local ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Lexer")
-                   (LaTeX-pythontex-language-list))
+                    (TeX-argument-prompt nil nil "Lexer")
+                    (LaTeX-pythontex-language-list))
       TeX-arg-file-name)
 
     ;; \setpygmentsfv[<lexer>]{<fancyvrb settings>}
     '("setpygmentsfv"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Lexer")
-                    (LaTeX-pythontex-language-list) ]
+        (TeX-argument-prompt t nil "Lexer")
+        (LaTeX-pythontex-language-list) ]
       (TeX-arg-eval LaTeX-fancyvrb-key-val-options-local))
 
     ;; \setpygmentspygopt[<lexer>]{<pygments options>}
     '("setpygmentspygopt"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Lexer")
-                    (LaTeX-pythontex-language-list) ]
+        (TeX-argument-prompt t nil "Lexer")
+        (LaTeX-pythontex-language-list) ]
       (TeX-arg-key-val
        (("style") ("texcomments") ("mathescape"))))
 
     ;; \setpygmentsprettyprinter{<printer>}
     '("setpygmentsprettyprinter"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Printer")
-                   '("text" "bw" "fancyvrb" "pygments")))
+                    (TeX-argument-prompt nil nil "Printer")
+                    '("text" "bw" "fancyvrb" "pygments")))
 
     ;; 4.5  Advanced PythonTeX usage
     ;; \setpythontexcontext{<key-value pairs>}
@@ -493,72 +493,72 @@ a list of strings."
     '("setpythontexlistingenv"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (TeX-read-string
-                     (TeX-argument-prompt nil nil "Listing environment 
name"))))
-          (LaTeX-add-newfloat-DeclareFloatingEnvironments `(,name "verbatim"))
-          (LaTeX-newfloat-auto-cleanup)
-          (format "%s" name))))))
+         (let ((name (TeX-read-string
+                      (TeX-argument-prompt nil nil "Listing environment 
name"))))
+           (LaTeX-add-newfloat-DeclareFloatingEnvironments `(,name "verbatim"))
+           (LaTeX-newfloat-auto-cleanup)
+           (format "%s" name))))))
 
    (LaTeX-add-environments
     ;; 4.2.5 Custom code
     '("pythontexcustomcode" LaTeX-env-args
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Position")
-                    '("begin" "end") ]
+        (TeX-argument-prompt t nil "Position")
+        '("begin" "end") ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Family")
-                   LaTeX-pythontex-family-list))
+                    (TeX-argument-prompt nil nil "Family")
+                    LaTeX-pythontex-family-list))
 
     ;; \begin{pygments}[<fancyvrb settings>]{<lexer>}
     '("pygments" LaTeX-env-args
       [ TeX-arg-eval LaTeX-fancyvrb-key-val-options-local ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Lexer")
-                   (LaTeX-pythontex-language-list))) )
+                    (TeX-argument-prompt nil nil "Lexer")
+                    (LaTeX-pythontex-language-list))) )
 
    ;; Filling
    (add-to-list 'LaTeX-indent-environment-list
-               '("pythontexcustomcode" current-indentation) t)
+                '("pythontexcustomcode" current-indentation) t)
    (add-to-list 'LaTeX-indent-environment-list
-               '("pygments" current-indentation) t)
+                '("pygments" current-indentation) t)
    (add-to-list 'LaTeX-verbatim-environments-local "pythontexcustomcode")
    (add-to-list 'LaTeX-verbatim-environments-local "pygments")
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("pythontexcustomc"         "[{{")
-                               ("setpythontexfv"           "[{")
-                               ("setpythontexprettyprinter" "[{")
-                               ("setpythontexpyglexer"     "[{")
-                               ("setpythontexpygopt"       "[{")
-                               ("printpythontex"           "[[")
-                               ("stdoutpythontex"          "[[")
-                               ("saveprintpythontex"       "{")
-                               ("savestdoutpythontex"      "{")
-                               ("useprintpythontex"        "[[{")
-                               ("usestdoutpythontex"       "[[{")
-                               ("stderrpythontex"          "[[")
-                               ("savestderrpythontex"      "{")
-                               ("usestderrpythontex"       "[[{")
-                               ("setpythontexautoprint"    "{")
-                               ("setpythontexautostdout"   "{")
-                               ("inputpygments"            "[{{")
-                               ("setpygmentsfv"            "[{")
-                               ("setpygmentspygopt"        "[{")
-                               ("setpygmentsprettyprinter" "{")
-                               ("setpythontexcontext"      "{")
-                               ("restartpythontexsession"  "{")
-                               ("setpythontexoutputdir"    "{")
-                               ("setpythontexworkingdir"   "{")
-                               ("setpythontexlistingenv"   "{")
-                               ("setpythontexcontext"      "{")
-                               ("restartpythontexsession"  "{")
-                               ("setpythontexoutputdir"    "{")
-                               ("setpythontexworkingdir"   "{"))
-                             'function)
+                                ("setpythontexfv"           "[{")
+                                ("setpythontexprettyprinter" "[{")
+                                ("setpythontexpyglexer"     "[{")
+                                ("setpythontexpygopt"       "[{")
+                                ("printpythontex"           "[[")
+                                ("stdoutpythontex"          "[[")
+                                ("saveprintpythontex"       "{")
+                                ("savestdoutpythontex"      "{")
+                                ("useprintpythontex"        "[[{")
+                                ("usestdoutpythontex"       "[[{")
+                                ("stderrpythontex"          "[[")
+                                ("savestderrpythontex"      "{")
+                                ("usestderrpythontex"       "[[{")
+                                ("setpythontexautoprint"    "{")
+                                ("setpythontexautostdout"   "{")
+                                ("inputpygments"            "[{{")
+                                ("setpygmentsfv"            "[{")
+                                ("setpygmentspygopt"        "[{")
+                                ("setpygmentsprettyprinter" "{")
+                                ("setpythontexcontext"      "{")
+                                ("restartpythontexsession"  "{")
+                                ("setpythontexoutputdir"    "{")
+                                ("setpythontexworkingdir"   "{")
+                                ("setpythontexlistingenv"   "{")
+                                ("setpythontexcontext"      "{")
+                                ("restartpythontexsession"  "{")
+                                ("setpythontexoutputdir"    "{")
+                                ("setpythontexworkingdir"   "{"))
+                              'function)
      (font-latex-add-keywords '(("pygment" "{"))
-                             'textual)
+                              'textual)
      (LaTeX-pythontex-add-syntactic-keywords-extra 'brace "pygment")
      (LaTeX-pythontex-add-syntactic-keywords-extra 'delim "pygment")
      ;; Tell font-lock about the update.
diff --git a/style/ragged2e.el b/style/ragged2e.el
index 56750fb..f5cf7eb 100644
--- a/style/ragged2e.el
+++ b/style/ragged2e.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "ragged2e"
@@ -66,12 +66,12 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("Centering"    "")
-                               ("justifying"   "")
-                               ("RaggedRight"  "")
-                               ("RaggedLeft"   ""))
-                             'function)))
+                                ("justifying"   "")
+                                ("RaggedRight"  "")
+                                ("RaggedLeft"   ""))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-ragged2e-package-options
diff --git a/style/relsize.el b/style/relsize.el
index d9724ac..985c514 100644
--- a/style/relsize.el
+++ b/style/relsize.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "relsize"
@@ -55,19 +55,19 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      ;; This is not easy, are the first 2 'variable oder rather
      ;; 'type-declaration?  I start with 'type-declaration, let the
      ;; users decide
      (font-latex-add-keywords '(("relsize"            "")
-                               ("relscale"           "")
-                               ("larger"             "")
-                               ("smaller"            ""))
-                             'type-declaration)
+                                ("relscale"           "")
+                                ("larger"             "")
+                                ("smaller"            ""))
+                              'type-declaration)
      (font-latex-add-keywords '(("textlarger"         "[{")
-                               ("textsmaller"        "[{")
-                               ("textscale"          "{{"))
-                             'type-command)))
+                                ("textsmaller"        "[{")
+                                ("textscale"          "{{"))
+                              'type-command)))
  TeX-dialect)
 
 (defvar LaTeX-relsize-package-options nil
diff --git a/style/report.el b/style/report.el
index 125f199..0248374 100644
--- a/style/report.el
+++ b/style/report.el
@@ -17,7 +17,7 @@
  (lambda ()
    (LaTeX-largest-level-set "chapter")
    (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection"
-                      "paragraph" "subparagraph" "figure" "table")
+                       "paragraph" "subparagraph" "figure" "table")
    (LaTeX-add-pagestyles "headings" "myheadings")
    (LaTeX-add-environments "abstract"))
  TeX-dialect)
diff --git a/style/revtex4-2.el b/style/revtex4-2.el
index 63daeb0..26a5eff 100644
--- a/style/revtex4-2.el
+++ b/style/revtex4-2.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 (defvar LaTeX-natbib-package-options)
 (defvar LaTeX-url-package-options)
 
@@ -46,18 +46,18 @@
 This function is meant to be used for \"video\" environment
 provided by REVTeX class."
   (let* ((float (and LaTeX-float ; LaTeX-float can be nil, i.e. do not prompt
-                    (TeX-read-string
-                     (TeX-argument-prompt t nil "Float position")
-                     LaTeX-float)))
-        (caption (TeX-read-string
-                  (TeX-argument-prompt nil nil "Caption")))
-        (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
-                         (TeX-read-string
-                          (TeX-argument-prompt t nil "Short caption")))))
+                     (TeX-read-string
+                      (TeX-argument-prompt t nil "Float position")
+                      LaTeX-float)))
+         (caption (TeX-read-string
+                   (TeX-argument-prompt nil nil "Caption")))
+         (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
+                          (TeX-read-string
+                           (TeX-argument-prompt t nil "Short caption")))))
     (setq LaTeX-float float)
     (LaTeX-insert-environment environment
-                             (unless (zerop (length float))
-                               (concat LaTeX-optop float LaTeX-optcl)))
+                              (unless (zerop (length float))
+                                (concat LaTeX-optop float LaTeX-optcl)))
     ;; Save the place where we've started:
     (save-excursion
       ;; Add a new line and add the \setfloatlink macro:
@@ -67,16 +67,16 @@ provided by REVTeX class."
       ;; Insert caption and ask for a label, do nothing if user skips
       ;; caption:
       (when (and caption (not (string= caption "")))
-       (LaTeX-newline)
-       (indent-according-to-mode)
-       (insert (LaTeX-compose-caption-macro caption short-caption))
-       ;; If `auto-fill-mode' is active, fill the caption.
-       (when auto-fill-function (LaTeX-fill-paragraph))
-       (LaTeX-newline)
-       (indent-according-to-mode)
-       ;; Ask for a label and indent only if it is inserted:
-       (when (LaTeX-label environment 'environment)
-         (indent-according-to-mode))))))
+        (LaTeX-newline)
+        (indent-according-to-mode)
+        (insert (LaTeX-compose-caption-macro caption short-caption))
+        ;; If `auto-fill-mode' is active, fill the caption.
+        (when auto-fill-function (LaTeX-fill-paragraph))
+        (LaTeX-newline)
+        (indent-according-to-mode)
+        ;; Ask for a label and indent only if it is inserted:
+        (when (LaTeX-label environment 'environment)
+          (indent-according-to-mode))))))
 
 (TeX-add-style-hook
  "revtex4-2"
@@ -85,7 +85,7 @@ provided by REVTeX class."
    ;; Add standard stuff taken from `article.el':
    (LaTeX-largest-level-set "section")
    (LaTeX-add-counters "part" "section" "subsection" "subsubsection"
-                      "paragraph" "subparagraph" "figure" "table")
+                       "paragraph" "subparagraph" "figure" "table")
    (LaTeX-add-environments "abstract")
 
    ;; Run style hooks for packages loaded by default:
@@ -95,12 +95,12 @@ provided by REVTeX class."
    ;; respectively.  car of the cons is the REVTeX class option, cdr
    ;; the name of AUCTeX style:
    (let ((opt-style '(("amsfonts" . "amsfonts")
-                     ("amsmath" . "amsmath")
-                     ("linenumbers" . "lineno")))
-        (opt-cls (cdar LaTeX-provided-class-options)))
+                      ("amsmath" . "amsmath")
+                      ("linenumbers" . "lineno")))
+         (opt-cls (cdar LaTeX-provided-class-options)))
      (dolist (opt opt-style)
        (when (member (car opt) opt-cls)
-        (TeX-run-style-hooks (cdr opt)))))
+         (TeX-run-style-hooks (cdr opt)))))
 
    (TeX-add-symbols
     ;; IV.3. Specifying authors and affiliations
@@ -166,16 +166,16 @@ provided by REVTeX class."
 
    ;; Append entry for `video' to `LaTeX-label-alist':
    (add-to-list 'LaTeX-label-alist
-               (cons "video" 'LaTeX-revtex4-2-video-label)
-               t)
+                (cons "video" 'LaTeX-revtex4-2-video-label)
+                t)
 
    ;; Tell RefTeX about `video' environment:
    (when (fboundp 'reftex-add-label-environments)
      (reftex-add-label-environments
       `(("video"
-        ,LaTeX-revtex4-2-video-reftex-quick-id-key
-        ,LaTeX-revtex4-2-video-label
-        "~\\ref{%s}" caption))))
+         ,LaTeX-revtex4-2-video-reftex-quick-id-key
+         ,LaTeX-revtex4-2-video-label
+         "~\\ref{%s}" caption))))
 
    ;; X.3. Dealing with Long Tables
    (when (member "longtable" (TeX-style-list))
@@ -189,29 +189,29 @@ provided by REVTeX class."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("fbox"          "*[{")
-                               ("keywords"      "{")
-                               ("preprint"      "")
-                               ("onecolumngrid" "")
-                               ("twocolumngrid" "")
-                               ("squeezetable"  "")
-                               ("printtables"   "*")
-                               ("printfigures"  "*"))
-                             'function)
+                                ("keywords"      "{")
+                                ("preprint"      "")
+                                ("onecolumngrid" "")
+                                ("twocolumngrid" "")
+                                ("squeezetable"  "")
+                                ("printtables"   "*")
+                                ("printfigures"  "*"))
+                              'function)
      (font-latex-add-keywords '(("affiliation"    "{")
-                               ("noaffiliation"  "")
-                               ("collaboration"  "{")
-                               ("altaffiliation" "[{"))
-                             'textual)
+                                ("noaffiliation"  "")
+                                ("collaboration"  "{")
+                                ("altaffiliation" "[{"))
+                              'textual)
      (font-latex-add-keywords '(("email"        "[")
-                               ("homepage"     "[")
-                               ("onlinecite"   "[[{")
-                               ("textcite"     "[[{")
-                               ("setfloatlink" ""))
-                             'reference)
+                                ("homepage"     "[")
+                                ("onlinecite"   "[[{")
+                                ("textcite"     "[[{")
+                                ("setfloatlink" ""))
+                              'reference)
      (font-latex-add-keywords '(("appendix*" ""))
-                             'warning)))
+                              'warning)))
  TeX-dialect)
 
 (defvar LaTeX-revtex4-2-class-options
diff --git a/style/scholax.el b/style/scholax.el
index 46fb4a6..4a6e22a 100644
--- a/style/scholax.el
+++ b/style/scholax.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "scholax"
@@ -75,22 +75,22 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("textsu"    "{")
-                               ("textin"    "{")
-                               ("textlf"    "{")
-                               ("texttlf"   "{")
-                               ("textosf"   "{")
-                               ("texttosf"  "{")
-                               ("textfrac"  "{{"))
-                             'type-command)
+                                ("textin"    "{")
+                                ("textlf"    "{")
+                                ("texttlf"   "{")
+                                ("textosf"   "{")
+                                ("texttosf"  "{")
+                                ("textfrac"  "{{"))
+                              'type-command)
      (font-latex-add-keywords '(("sustyle"   "")
-                               ("instyle"   "")
-                               ("lfstyle"   "")
-                               ("tlfstyle"  "")
-                               ("osfstyle"  "")
-                               ("tosfstyle" ""))
-                             'type-declaration)))
+                                ("instyle"   "")
+                                ("lfstyle"   "")
+                                ("tlfstyle"  "")
+                                ("osfstyle"  "")
+                                ("tosfstyle" ""))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-scholax-package-options
diff --git a/style/scrbase.el b/style/scrbase.el
index e288e34..ef13aff 100644
--- a/style/scrbase.el
+++ b/style/scrbase.el
@@ -37,162 +37,162 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook "scrbase"
-  (lambda ()
-    (TeX-add-symbols
-     "appendixmore"
-     "autodot"
-     '("addtokomafont" TeX-arg-KOMA-fontelements t)
-     '("areaset" [ "BCOR" ] "Width" "Height")
-     '("captionabove" [ "Lof entry" ] "Caption")
-     '("captionbelow" [ "Lof entry" ] "Caption")
-     '("cleardoubleemptypage")
-     '("cleardoubleplainpage")
-     '("cleardoublestandardpage")
-     '("dedication" t)
-     '("deffootnote" [ "Mark width" ] "Indent" "Parindent" "Definition")
-     '("deffootnotemark" "Definition")
-     '("extratitle" t)
-     '("ifpdfoutput" t nil)
-     '("ifthispageodd" t nil)
-     '("lowertitleback" t)
-     '("maketitle" [ "Pagenumber" ])
-     '("marginline" t)
-     '("publishers" "Publishers")
-     '("sectionmark" "Running head")
-     '("setbibpreamble" "Preamble")
-     '("setcaphanging")
-     '("setcapindent" "Indent")
-     '("setcapindent*" "X-Indent")
-     '("setcapmargin" [ "Margin left" ] "Margin")
-     '("setcapmargin*" [ "Margin inside" ] "Margin")
-     '("setcapwidth" [ TeX-arg-KOMA-capjust ] "Width")
-     '("setindexpreamble" "Preamble")
-     '("setkomafont" TeX-arg-KOMA-fontelements t)
-     '("subject" "Subject")
-     '("subsectionmark" "Running head")
-     '("textsubscript" "Text")
-     '("thanks" "Footnote")
-     '("thefootnotemark")
-     '("titlehead" t)
-     '("uppertitleback" t)
-     '("usekomafont" TeX-arg-KOMA-fontelements))
-    (LaTeX-add-environments
-     '("labeling" (lambda (env &rest ignore)
-                   (LaTeX-insert-environment
-                    env
-                    (let ((delim (TeX-read-string "(Optional) Delimiter: "))
-                          (width (TeX-read-string "Longest item: ")))
-                      (concat
-                       (if (not (zerop (length delim)))
-                           (format "[%s]" delim))
-                       (format "{%s}" width))))
-                   (LaTeX-find-matching-begin)
-                   (end-of-line 1)
-                   (LaTeX-insert-item)))
-     '("addmargin" (lambda (env &rest ignore)
-                    (LaTeX-insert-environment
-                     env
-                     (let ((leftin (TeX-read-string "(Optional) Left 
Indentation: "))
-                           (indent (TeX-read-string "Indentation: ")))
-                       (concat
-                        (if (not (zerop (length leftin)))
-                            (format "[%s]" leftin))
-                        (format "{%s}" indent))))))
-     '("addmargin*" (lambda (env &rest ignore)
-                     (LaTeX-insert-environment
-                      env
-                      (let ((innin (TeX-read-string "(Optional) Inner 
Indentation: "))
-                            (indent (TeX-read-string "Indentation: ")))
-                        (concat
-                         (if (not (zerop (length innin)))
-                             (format "[%s]" innin))
-                         (format "{%s}" indent))))))
-     '("captionbeside" (lambda (env &rest ignore)
-                        (LaTeX-insert-environment
-                         env
-                         (let ((lofent (TeX-read-string "(Optional) Lof Entry: 
"))
-                               (title (TeX-read-string "Caption: "))
-                               (place (TeX-read-string "(Optional) Placement 
(l,r,o,i): "))
-                               (width (TeX-read-string "(Optional) Width: "))
-                               (offset (TeX-read-string "(Optional) Offset: 
")))
-                           (concat
-                            (if (not (zerop (length lofent)))
-                                (format "[%s]" lofent))
-                            (format "{%s}" title)
-                            (if (not (zerop (length place)))
-                                (format "[%s]" place))
-                            (if (not (zerop (length width)))
-                                (format "[%s]" width))
-                            (and
-                             (not (zerop (length place)))
-                             (not (zerop (length offset)))
-                             (format "[%s]%s" offset
-                                     (if (y-or-n-p "Starred? ")
-                                         "*" "")))))))))
-    (LaTeX-section-list-add-locally '(("addpart" 0)
-                                     ("addsec" 2)
-                                     ("minisec" 7)))
-    ;; This doesn't work. Maybe it's RefTeX's label insertion?
-    (make-local-variable 'LaTeX-section-label)
-    (setq LaTeX-section-label (append
-                              LaTeX-section-label
-                              '(("addpart" . nil)
-                                ("addsec" . nil)
-                                ("minisec" . nil))))
-    ;; Fill \minisec{...} like normal sectioning commands
-    (LaTeX-paragraph-commands-add-locally "minisec")
-    ;; Fontification
-    (when (and (featurep 'font-latex)
-              (eq TeX-install-font-lock 'font-latex-setup))
-      ;; Textual keywords
-      (font-latex-add-keywords '(("captionabove" "[{")
-                                ("captionbelow" "[{")
-                                ("dedication" "{")
-                                ("extratitle" "{")
-                                ("lowertitleback" "{")
-                                ("maketitle" "[")
-                                ("marginline" "{")
-                                ("publishers" "{")
-                                ("subject" "{")
-                                ("sectionmark" "{")
-                                ("setbibpreamble" "{")
-                                ("setindexpreamble" "{")
-                                ("subsectionmark" "{")
-                                ("textsubscript" "{")
-                                ("titlehead" "{")
-                                ("uppertitleback" "{"))
-                              'textual)
-      ;; Function keywords
-      (font-latex-add-keywords '(("deffootnote" "[{{{")
-                                ("deffootnotemark" "{")
-                                ("ifpdfoutput" "{{")
-                                ("ifthispageodd" "{{"))
-                              'function)
-      ;; Variable keywords
-      (font-latex-add-keywords '(("addtokomafont" "{{")
-                                ("areaset" "[{{")
-                                ("setcaphanging" "")
-                                ("setcapindent" "{")
-                                ("setcapmargin" "*[{")
-                                ("setcapwidth" "[{")
-                                ("setkomafont" "{{")
-                                ("typearea" "[{")
-                                ("usekomafont" "{"))
-                              'variable)
-      ;; Warning keywords
-      (font-latex-add-keywords '("cleardoublestandardpage"
-                                "cleardoubleplainpage"
-                                "cleardoubleemptypage")
-                              'warning)
-      ;; Sectioning keywords
-      (font-latex-add-keywords '(("addpart" "[{")) 'sectioning-1)
-      (font-latex-add-keywords '(("addsec" "[{")) 'sectioning-2)
-      (font-latex-add-keywords '(("minisec" "[{")) 'sectioning-4)))
-  TeX-dialect)
+                    (lambda ()
+                      (TeX-add-symbols
+                       "appendixmore"
+                       "autodot"
+                       '("addtokomafont" TeX-arg-KOMA-fontelements t)
+                       '("areaset" [ "BCOR" ] "Width" "Height")
+                       '("captionabove" [ "Lof entry" ] "Caption")
+                       '("captionbelow" [ "Lof entry" ] "Caption")
+                       '("cleardoubleemptypage")
+                       '("cleardoubleplainpage")
+                       '("cleardoublestandardpage")
+                       '("dedication" t)
+                       '("deffootnote" [ "Mark width" ] "Indent" "Parindent" 
"Definition")
+                       '("deffootnotemark" "Definition")
+                       '("extratitle" t)
+                       '("ifpdfoutput" t nil)
+                       '("ifthispageodd" t nil)
+                       '("lowertitleback" t)
+                       '("maketitle" [ "Pagenumber" ])
+                       '("marginline" t)
+                       '("publishers" "Publishers")
+                       '("sectionmark" "Running head")
+                       '("setbibpreamble" "Preamble")
+                       '("setcaphanging")
+                       '("setcapindent" "Indent")
+                       '("setcapindent*" "X-Indent")
+                       '("setcapmargin" [ "Margin left" ] "Margin")
+                       '("setcapmargin*" [ "Margin inside" ] "Margin")
+                       '("setcapwidth" [ TeX-arg-KOMA-capjust ] "Width")
+                       '("setindexpreamble" "Preamble")
+                       '("setkomafont" TeX-arg-KOMA-fontelements t)
+                       '("subject" "Subject")
+                       '("subsectionmark" "Running head")
+                       '("textsubscript" "Text")
+                       '("thanks" "Footnote")
+                       '("thefootnotemark")
+                       '("titlehead" t)
+                       '("uppertitleback" t)
+                       '("usekomafont" TeX-arg-KOMA-fontelements))
+                      (LaTeX-add-environments
+                       '("labeling" (lambda (env &rest ignore)
+                                      (LaTeX-insert-environment
+                                       env
+                                       (let ((delim (TeX-read-string 
"(Optional) Delimiter: "))
+                                             (width (TeX-read-string "Longest 
item: ")))
+                                         (concat
+                                          (if (not (zerop (length delim)))
+                                              (format "[%s]" delim))
+                                          (format "{%s}" width))))
+                                      (LaTeX-find-matching-begin)
+                                      (end-of-line 1)
+                                      (LaTeX-insert-item)))
+                       '("addmargin" (lambda (env &rest ignore)
+                                       (LaTeX-insert-environment
+                                        env
+                                        (let ((leftin (TeX-read-string 
"(Optional) Left Indentation: "))
+                                              (indent (TeX-read-string 
"Indentation: ")))
+                                          (concat
+                                           (if (not (zerop (length leftin)))
+                                               (format "[%s]" leftin))
+                                           (format "{%s}" indent))))))
+                       '("addmargin*" (lambda (env &rest ignore)
+                                        (LaTeX-insert-environment
+                                         env
+                                         (let ((innin (TeX-read-string 
"(Optional) Inner Indentation: "))
+                                               (indent (TeX-read-string 
"Indentation: ")))
+                                           (concat
+                                            (if (not (zerop (length innin)))
+                                                (format "[%s]" innin))
+                                            (format "{%s}" indent))))))
+                       '("captionbeside" (lambda (env &rest ignore)
+                                           (LaTeX-insert-environment
+                                            env
+                                            (let ((lofent (TeX-read-string 
"(Optional) Lof Entry: "))
+                                                  (title (TeX-read-string 
"Caption: "))
+                                                  (place (TeX-read-string 
"(Optional) Placement (l,r,o,i): "))
+                                                  (width (TeX-read-string 
"(Optional) Width: "))
+                                                  (offset (TeX-read-string 
"(Optional) Offset: ")))
+                                              (concat
+                                               (if (not (zerop (length 
lofent)))
+                                                   (format "[%s]" lofent))
+                                               (format "{%s}" title)
+                                               (if (not (zerop (length place)))
+                                                   (format "[%s]" place))
+                                               (if (not (zerop (length width)))
+                                                   (format "[%s]" width))
+                                               (and
+                                                (not (zerop (length place)))
+                                                (not (zerop (length offset)))
+                                                (format "[%s]%s" offset
+                                                        (if (y-or-n-p 
"Starred? ")
+                                                            "*" "")))))))))
+                      (LaTeX-section-list-add-locally '(("addpart" 0)
+                                                        ("addsec" 2)
+                                                        ("minisec" 7)))
+                      ;; This doesn't work. Maybe it's RefTeX's label 
insertion?
+                      (make-local-variable 'LaTeX-section-label)
+                      (setq LaTeX-section-label (append
+                                                 LaTeX-section-label
+                                                 '(("addpart" . nil)
+                                                   ("addsec" . nil)
+                                                   ("minisec" . nil))))
+                      ;; Fill \minisec{...} like normal sectioning commands
+                      (LaTeX-paragraph-commands-add-locally "minisec")
+                      ;; Fontification
+                      (when (and (featurep 'font-latex)
+                                 (eq TeX-install-font-lock 'font-latex-setup))
+                        ;; Textual keywords
+                        (font-latex-add-keywords '(("captionabove" "[{")
+                                                   ("captionbelow" "[{")
+                                                   ("dedication" "{")
+                                                   ("extratitle" "{")
+                                                   ("lowertitleback" "{")
+                                                   ("maketitle" "[")
+                                                   ("marginline" "{")
+                                                   ("publishers" "{")
+                                                   ("subject" "{")
+                                                   ("sectionmark" "{")
+                                                   ("setbibpreamble" "{")
+                                                   ("setindexpreamble" "{")
+                                                   ("subsectionmark" "{")
+                                                   ("textsubscript" "{")
+                                                   ("titlehead" "{")
+                                                   ("uppertitleback" "{"))
+                                                 'textual)
+                        ;; Function keywords
+                        (font-latex-add-keywords '(("deffootnote" "[{{{")
+                                                   ("deffootnotemark" "{")
+                                                   ("ifpdfoutput" "{{")
+                                                   ("ifthispageodd" "{{"))
+                                                 'function)
+                        ;; Variable keywords
+                        (font-latex-add-keywords '(("addtokomafont" "{{")
+                                                   ("areaset" "[{{")
+                                                   ("setcaphanging" "")
+                                                   ("setcapindent" "{")
+                                                   ("setcapmargin" "*[{")
+                                                   ("setcapwidth" "[{")
+                                                   ("setkomafont" "{{")
+                                                   ("typearea" "[{")
+                                                   ("usekomafont" "{"))
+                                                 'variable)
+                        ;; Warning keywords
+                        (font-latex-add-keywords '("cleardoublestandardpage"
+                                                   "cleardoubleplainpage"
+                                                   "cleardoubleemptypage")
+                                                 'warning)
+                        ;; Sectioning keywords
+                        (font-latex-add-keywords '(("addpart" "[{")) 
'sectioning-1)
+                        (font-latex-add-keywords '(("addsec" "[{")) 
'sectioning-2)
+                        (font-latex-add-keywords '(("minisec" "[{")) 
'sectioning-4)))
+                    TeX-dialect)
 
 (defun TeX-arg-KOMA-setpreamble (optional &optional prompt)
   "Prompt for KOMA-Script's \\set*preamble position with completion."
diff --git a/style/scrbook.el b/style/scrbook.el
index 3b4586f..c3a7be5 100644
--- a/style/scrbook.el
+++ b/style/scrbook.el
@@ -35,37 +35,37 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook "scrbook"
-  (lambda ()
-    (LaTeX-largest-level-set "chapter")
-    ;; load basic definitons
-    (TeX-run-style-hooks "scrbase")
-    (TeX-add-symbols
-     "chapapp"
-     "raggeddictum"
-     '("chapappifchapterprefix" "Additional text")
-     '("setpartpreamble" [ TeX-arg-KOMA-setpreamble ] [ "Width" ] t)
-     '("setchapterpreamble" [ TeX-arg-KOMA-setpreamble ] [ "Width" ] t)
-     '("dictum" [ "Author" ] t))
-    (LaTeX-section-list-add-locally '("addchap" 1))
-    (make-local-variable 'LaTeX-section-label)
-    (setq LaTeX-section-label (append
-                              LaTeX-section-label
-                              '(("addchap" . nil))))
-    ;; Definitions for font-latex
-    (when (and (featurep 'font-latex)
-              (eq TeX-install-font-lock 'font-latex-setup))
-      ;; Textual keywords
-      (font-latex-add-keywords '(("addchap" "[{")
-                                ("setpartpreamble" "[[{")
-                                ("setchapterpreamble" "[[{")
-                                ("dictum" "[{"))
-                              'textual)
-      ;; Sectioning keywords
-      (font-latex-add-keywords '(("addchap" "[{")) 'sectioning-1)))
-  TeX-dialect)
+                    (lambda ()
+                      (LaTeX-largest-level-set "chapter")
+                      ;; load basic definitons
+                      (TeX-run-style-hooks "scrbase")
+                      (TeX-add-symbols
+                       "chapapp"
+                       "raggeddictum"
+                       '("chapappifchapterprefix" "Additional text")
+                       '("setpartpreamble" [ TeX-arg-KOMA-setpreamble ] [ 
"Width" ] t)
+                       '("setchapterpreamble" [ TeX-arg-KOMA-setpreamble ] [ 
"Width" ] t)
+                       '("dictum" [ "Author" ] t))
+                      (LaTeX-section-list-add-locally '("addchap" 1))
+                      (make-local-variable 'LaTeX-section-label)
+                      (setq LaTeX-section-label (append
+                                                 LaTeX-section-label
+                                                 '(("addchap" . nil))))
+                      ;; Definitions for font-latex
+                      (when (and (featurep 'font-latex)
+                                 (eq TeX-install-font-lock 'font-latex-setup))
+                        ;; Textual keywords
+                        (font-latex-add-keywords '(("addchap" "[{")
+                                                   ("setpartpreamble" "[[{")
+                                                   ("setchapterpreamble" "[[{")
+                                                   ("dictum" "[{"))
+                                                 'textual)
+                        ;; Sectioning keywords
+                        (font-latex-add-keywords '(("addchap" "[{")) 
'sectioning-1)))
+                    TeX-dialect)
 
 ;;; scrbook.el ends here
diff --git a/style/scrlttr2.el b/style/scrlttr2.el
index 4e168c9..5a0f667 100644
--- a/style/scrlttr2.el
+++ b/style/scrlttr2.el
@@ -42,8 +42,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "scrlttr2"
@@ -137,76 +137,76 @@
     '("yourrefname" t))
    (LaTeX-add-environments
     '("letter" (lambda (env &rest ignore)
-                (LaTeX-insert-environment
-                 env
-                 (let ((options (TeX-read-string "Optional options: "))
-                       (recip (TeX-read-string "Recipient: ")))
-                   (concat
-                    (if (not (zerop (length options)))
-                        (format "[%s]" options))
-                    (format "{%s}" recip)))))))
+                 (LaTeX-insert-environment
+                  env
+                  (let ((options (TeX-read-string "Optional options: "))
+                        (recip (TeX-read-string "Recipient: ")))
+                    (concat
+                     (if (not (zerop (length options)))
+                         (format "[%s]" options))
+                     (format "{%s}" recip)))))))
    ;; Definitions for font-latex
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      ;; Textual keywords
      (font-latex-add-keywords '(("addrentry" "{{{{{{{{{")
-                               ("adrentry" "{{{{{{{{")
-                               ("bankname" "{")
-                               ("cc" "{")
-                               ("ccname" "{")
-                               ("closing" "{")
-                               ("customername" "{")
-                               ("datename" "{")
-                               ("emailname" "{")
-                               ("encl" "{")
-                               ("enclname" "{")
-                               ("faxname" "{")
-                               ("firstfoot" "{")
-                               ("firsthead" "{")
-                               ("headfromname" "{")
-                               ("headtoname" "{")
-                               ("invoicename" "{")
-                               ("myrefname" "{")
-                               ("nextfoot" "{")
-                               ("nexthead" "{")
-                               ("opening" "{")
-                               ("pagename" "{")
-                               ("phonename" "{")
-                               ("ps" "")
-                               ("subjectname" "{")
-                               ("wwwname" "{")
-                               ("yourmailname" "{")
-                               ("yourrefname" "{"))
-                             'textual)
+                                ("adrentry" "{{{{{{{{")
+                                ("bankname" "{")
+                                ("cc" "{")
+                                ("ccname" "{")
+                                ("closing" "{")
+                                ("customername" "{")
+                                ("datename" "{")
+                                ("emailname" "{")
+                                ("encl" "{")
+                                ("enclname" "{")
+                                ("faxname" "{")
+                                ("firstfoot" "{")
+                                ("firsthead" "{")
+                                ("headfromname" "{")
+                                ("headtoname" "{")
+                                ("invoicename" "{")
+                                ("myrefname" "{")
+                                ("nextfoot" "{")
+                                ("nexthead" "{")
+                                ("opening" "{")
+                                ("pagename" "{")
+                                ("phonename" "{")
+                                ("ps" "")
+                                ("subjectname" "{")
+                                ("wwwname" "{")
+                                ("yourmailname" "{")
+                                ("yourrefname" "{"))
+                              'textual)
      ;; Function keywords
      (font-latex-add-keywords '(("AtBeginLetter" "{")
-                               ("LetterOptionNeedsPapersize" "{{")
-                               ("LoadLetterOption" "{")
-                               ("addrchar" "{")
-                               ("adrchar" "{")
-                               ("ifkomavarempty" "*{{{"))
-                             'function)
+                                ("LetterOptionNeedsPapersize" "{{")
+                                ("LoadLetterOption" "{")
+                                ("addrchar" "{")
+                                ("adrchar" "{")
+                                ("ifkomavarempty" "*{{{"))
+                              'function)
      ;; Variable keywords
      (font-latex-add-keywords '(("KOMAoptions" "{")
-                               ("addtokomafont" "{{")
-                               ("addtolengthplength" "[{{")
-                               ("addtoreffields" "{")
-                               ("newcaptionname" "{{{")
-                               ("newkomavar" "*[{")
-                               ("providecaptionname" "{{{")
-                               ("renewcaptionname" "{{{")
-                               ("setkomafont" "{{")
-                               ("setkomavar" "*{[{")
-                               ("setlengthtoplength" "[{{")
-                               ("usekomafont" "{")
-                               ("usekomavar" "*[{")
-                               ("useplength" "{"))
-                             'variable)
+                                ("addtokomafont" "{{")
+                                ("addtolengthplength" "[{{")
+                                ("addtoreffields" "{")
+                                ("newcaptionname" "{{{")
+                                ("newkomavar" "*[{")
+                                ("providecaptionname" "{{{")
+                                ("renewcaptionname" "{{{")
+                                ("setkomafont" "{{")
+                                ("setkomavar" "*{[{")
+                                ("setlengthtoplength" "[{{")
+                                ("usekomafont" "{")
+                                ("usekomavar" "*[{")
+                                ("useplength" "{"))
+                              'variable)
      ;; Warning keywords
      (font-latex-add-keywords '("cleardoublestandardpage"
-                               "cleardoubleplainpage"
-                               "cleardoubleemptypage")
-                             'warning)))
+                                "cleardoubleplainpage"
+                                "cleardoubleemptypage")
+                              'warning)))
  TeX-dialect)
 
 (defun TeX-arg-KOMA-scrlttr-vars (optional &optional prompt)
diff --git a/style/scrpage2.el b/style/scrpage2.el
index 8ad4249..2ee9b2c 100644
--- a/style/scrpage2.el
+++ b/style/scrpage2.el
@@ -31,8 +31,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "scrpage2"
@@ -85,53 +85,53 @@
 
     ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("lehead" "[{")
-                               ("cehead" "[{")
-                               ("rehead" "[{")
-                               ("lefoot" "[{")
-                               ("cefoot" "[{")
-                               ("refoot" "[{")
-                               ("lohead" "[{")
-                               ("cohead" "[{")
-                               ("rohead" "[{")
-                               ("lofoot" "[{")
-                               ("cofoot" "[{")
-                               ("rofoot" "[{")
-                               ("ihead" "[{")
-                               ("chead" "[{")
-                               ("ohead" "[{")
-                               ("ifoot" "[{")
-                               ("cfoot" "[{")
-                               ("ofoot" "[{")
-                               ("automark" "[{")
-                               ("setfootwidth" "[{")
-                               ("setheadwidth" "[{")
-                               ("setfootbotline" "[{")
-                               ("setfootsepline" "[{")
-                               ("setheadtopline" "[{")
-                               ("setheadsepline" "[{"))
-                             'variable)
+                                ("cehead" "[{")
+                                ("rehead" "[{")
+                                ("lefoot" "[{")
+                                ("cefoot" "[{")
+                                ("refoot" "[{")
+                                ("lohead" "[{")
+                                ("cohead" "[{")
+                                ("rohead" "[{")
+                                ("lofoot" "[{")
+                                ("cofoot" "[{")
+                                ("rofoot" "[{")
+                                ("ihead" "[{")
+                                ("chead" "[{")
+                                ("ohead" "[{")
+                                ("ifoot" "[{")
+                                ("cfoot" "[{")
+                                ("ofoot" "[{")
+                                ("automark" "[{")
+                                ("setfootwidth" "[{")
+                                ("setheadwidth" "[{")
+                                ("setfootbotline" "[{")
+                                ("setfootsepline" "[{")
+                                ("setheadtopline" "[{")
+                                ("setheadsepline" "[{"))
+                              'variable)
      (font-latex-add-keywords '(("deftripstyle" "{[[{{{{{{")
-                               ("defpagestyle" "{{{")
-                               ("newpagestyle" "{{{")
-                               ("renewpagestyle" "{{{")
-                               ("providepagestyle" "{{{"))
-                             'function)))
+                                ("defpagestyle" "{{{")
+                                ("newpagestyle" "{{{")
+                                ("renewpagestyle" "{{{")
+                                ("providepagestyle" "{{{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-scrpage2-package-options '("headinclude" "headexclude"
-                                        "footinclude" "footexclude"
-                                        "mpinclude" "mpexclude"
-                                        "headtopline" "headsepline"
-                                        "footsepline" "footbotline"
-                                        "plainheadtopline" "plainheadsepline"
-                                        "plainfootsepline" "plainfootbotline"
-                                        "ilines" "clines" "olines"
-                                        "automark" "manualmark"
-                                        "autooneside" "markuppercase"
-                                        "markusedcase" "nouppercase"
-                                        "komastyle" "standardstyle")
+                                         "footinclude" "footexclude"
+                                         "mpinclude" "mpexclude"
+                                         "headtopline" "headsepline"
+                                         "footsepline" "footbotline"
+                                         "plainheadtopline" "plainheadsepline"
+                                         "plainfootsepline" "plainfootbotline"
+                                         "ilines" "clines" "olines"
+                                         "automark" "manualmark"
+                                         "autooneside" "markuppercase"
+                                         "markusedcase" "nouppercase"
+                                         "komastyle" "standardstyle")
   "Package options for the scrpage2 package.")
 
 ;;; scrpage2.el ends here
diff --git a/style/scrreprt.el b/style/scrreprt.el
index 3b7120f..a2f5273 100644
--- a/style/scrreprt.el
+++ b/style/scrreprt.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "scrreprt"
@@ -55,17 +55,17 @@
    (LaTeX-section-list-add-locally '("addchap" 1))
    (make-local-variable 'LaTeX-section-label)
    (setq LaTeX-section-label (append
-                             LaTeX-section-label
-                             '(("addchap" . nil))))
+                              LaTeX-section-label
+                              '(("addchap" . nil))))
    ;; Definitions for font-latex
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      ;; Textual keywords
      (font-latex-add-keywords '(("addchap" "[{")
-                               ("setpartpreamble" "[[{")
-                               ("setchapterpreamble" "[[{")
-                               ("dictum" "[{"))
-                             'textual)
+                                ("setpartpreamble" "[[{")
+                                ("setchapterpreamble" "[[{")
+                                ("dictum" "[{"))
+                              'textual)
      ;; Sectioning keywords
      (font-latex-add-keywords '(("addchap" "[{")) 'sectioning-1)))
  TeX-dialect)
diff --git a/style/setspace.el b/style/setspace.el
index 39cf153..be0867d 100644
--- a/style/setspace.el
+++ b/style/setspace.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "setspace"
@@ -58,8 +58,8 @@
    (when (and (featurep 'font-latex)
               (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("singlespacing" "")
-                               ("doublespacing" "")
-                               ("onehalfspacing" ""))
+                                ("doublespacing" "")
+                                ("onehalfspacing" ""))
                               'function)))
  TeX-dialect)
 
diff --git a/style/shortvrb.el b/style/shortvrb.el
index 822c84b..5f8df92 100644
--- a/style/shortvrb.el
+++ b/style/shortvrb.el
@@ -46,8 +46,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-to-syntax-alist
-                 "font-latex"
-                 (list))
+                  "font-latex"
+                  (list))
 
 (TeX-add-style-hook
  "shortvrb"
@@ -57,17 +57,17 @@
    (when LaTeX-shortvrb-chars
      (TeX-ispell-skip-setcar
       (mapcar (lambda (char)
-               (let ((str (char-to-string char)))
-                 (cons str str)))
-             LaTeX-shortvrb-chars)))
+                (let ((str (char-to-string char)))
+                  (cons str str)))
+              LaTeX-shortvrb-chars)))
 
    ;; Fontification
    (when (and LaTeX-shortvrb-chars
-             (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-to-syntax-alist
       (mapcar (lambda (char) (cons char "|"))
-             LaTeX-shortvrb-chars))))
+              LaTeX-shortvrb-chars))))
  TeX-dialect)
 
 ;;; shortvrb.el ends here
diff --git a/style/siunitx.el b/style/siunitx.el
index bcda14a..b7a2acd 100644
--- a/style/siunitx.el
+++ b/style/siunitx.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-auto-add-type "siunitx-unit" "LaTeX")
 
@@ -44,9 +44,9 @@
 ;; wrapped in `[...]'.
 (defvar LaTeX-siunitx-regexp
   (concat "\\\\Declare"
-         "\\(?:SIUnit\\|SIPrefix\\|BinaryPrefix\\|SIPostPower\\|SIPrepower\\|"
-         "SIQualifier\\)"
-         "[ \t\n\r]*\\(?:\\[.*\\]\\)?[ \t\n\r]*{?\\\\\\([A-Za-z]+\\)}?")
+          "\\(?:SIUnit\\|SIPrefix\\|BinaryPrefix\\|SIPostPower\\|SIPrepower\\|"
+          "SIQualifier\\)"
+          "[ \t\n\r]*\\(?:\\[.*\\]\\)?[ \t\n\r]*{?\\\\\\([A-Za-z]+\\)}?")
   "Matches new siunitx unit, prefix, power, and qualifier definitions.")
 
 (defvar LaTeX-auto-siunitx-unit nil
@@ -59,8 +59,8 @@
 (defun LaTeX-siunitx-cleanup ()
   "Move symbols from `LaTeX-auto-siunitx-unit' to `LaTeX-siunitx-unit-list'."
   (mapcar (lambda (symbol)
-           (add-to-list 'LaTeX-siunitx-unit-list (list symbol)))
-         LaTeX-auto-siunitx-unit))
+            (add-to-list 'LaTeX-siunitx-unit-list (list symbol)))
+          LaTeX-auto-siunitx-unit))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-siunitx-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-siunitx-cleanup t)
@@ -70,7 +70,7 @@
   "History of units in siunitx.")
 
 (defun LaTeX-arg-siunitx-unit (optional &optional prompt initial-input
-                                       definition prefix)
+                                        definition prefix)
   "Prompt for siunitx units, prefixes, powers, and qualifiers.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
@@ -83,19 +83,19 @@ PREFIX is non-nil, insert it before the given input."
   ;; `completing-read-multiple' is bound, `minibuffer-local-completion-map'
   ;; otherwise) and set completion separator to the TeX escape character.
   (let* ((crm-local-completion-map
-         (remove (assoc 32 crm-local-completion-map) crm-local-completion-map))
-        (minibuffer-local-completion-map
-         (remove (assoc 32 minibuffer-local-completion-map)
-                 minibuffer-local-completion-map))
-        (crm-separator (regexp-quote TeX-esc))
-        (unit (mapconcat 'identity
-                         (TeX-completing-read-multiple
-                          (TeX-argument-prompt optional prompt "Unit: " t)
-                          (LaTeX-siunitx-unit-list) nil nil initial-input
-                          'LaTeX-siunitx-unit-history)
-                         TeX-esc)))
+          (remove (assoc 32 crm-local-completion-map) 
crm-local-completion-map))
+         (minibuffer-local-completion-map
+          (remove (assoc 32 minibuffer-local-completion-map)
+                  minibuffer-local-completion-map))
+         (crm-separator (regexp-quote TeX-esc))
+         (unit (mapconcat 'identity
+                          (TeX-completing-read-multiple
+                           (TeX-argument-prompt optional prompt "Unit: " t)
+                           (LaTeX-siunitx-unit-list) nil nil initial-input
+                           'LaTeX-siunitx-unit-history)
+                          TeX-esc)))
     (if (and definition (not (string-equal "" unit)))
-       (LaTeX-add-siunitx-units unit))
+        (LaTeX-add-siunitx-units unit))
     (TeX-argument-insert unit optional prefix)))
 
 (defun LaTeX-arg-define-siunitx-unit (optional &optional prompt)
@@ -104,8 +104,8 @@ If OPTIONAL is non-nil, insert the resulting value as an 
optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
 string."
   (LaTeX-arg-siunitx-unit optional
-                         (unless prompt (concat "Unit: " TeX-esc))
-                         nil t TeX-esc))
+                          (unless prompt (concat "Unit: " TeX-esc))
+                          nil t TeX-esc))
 
 (defvar LaTeX-siunitx-package-options
   '(;; Detecting fonts
@@ -218,7 +218,7 @@ string."
     ("inter-unit-product")
     ("parse-units" ("true" "false"))
     ("per-mode" ("reciprocal" "fraction" "reciprocal-positive-first" "symbol"
-                "repeated-symbol" "symbol-or-fraction"))
+                 "repeated-symbol" "symbol-or-fraction"))
     ("per-symbol")
     ("power-font" ("number" "unit"))
     ("prefixes-as-symbols" ("true" "false"))
@@ -232,7 +232,7 @@ string."
     ("multi-part-units" ("brackets" "repeat" "single"))
     ("number-unit-product")
     ("product-units" ("repeat" "brackets" "brackets-power" "power" "repeat"
-                     "single"))
+                      "single"))
     ("range-units" ("brackets" "repeat" "single"))
     ;; Tabular material
     ("table-align-comparator" ("true" "false"))
@@ -506,7 +506,7 @@ string."
       "dB"))
    ;; Binary prefixes and units available when `binary-units' option is used
    (when (or (LaTeX-provided-package-options-member "siunitx" "binary-units")
-            (LaTeX-provided-package-options-member "siunitx" 
"binary-units=true"))
+             (LaTeX-provided-package-options-member "siunitx" 
"binary-units=true"))
      (LaTeX-add-siunitx-units
       "kibi"
       "mebi"
@@ -529,9 +529,9 @@ string."
     "SIUnitSymbolOhm")
    ;; Macros available when `version-1-compatibility' option is used
    (when (or (LaTeX-provided-package-options-member
-             "siunitx" "version-1-compatibility")
-            (LaTeX-provided-package-options-member
-             "siunitx" "version-1-compatibility=true"))
+              "siunitx" "version-1-compatibility")
+             (LaTeX-provided-package-options-member
+              "siunitx" "version-1-compatibility=true"))
      (LaTeX-add-siunitx-units
       "Square"
       "ssquare"
@@ -599,35 +599,35 @@ string."
 
    ;; `siunitx.sty' adds new column specification letters
    (set (make-local-variable 'LaTeX-array-column-letters)
-       (concat LaTeX-array-column-letters "s" "S"))
+        (concat LaTeX-array-column-letters "s" "S"))
 
    (TeX-run-style-hooks "l3keys2e"
-                       "array"
-                       "amstext"
-                       "xparse"
-                       "expl3")
+                        "array"
+                        "amstext"
+                        "xparse"
+                        "expl3")
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("ang" "[{")
-                               ("num" "[{")
-                               ("si" "[{")
-                               ("SI" "[{[{")
-                               ("numlist" "[{")
-                               ("numrange" "[{{")
-                               ("SIlist" "[{{")
-                               ("SIrange" "[{{{")
-                               ("sisetup" "{")
-                               ("tablenum" "[{")
-                               ("DeclareSIUnit" "[|{\\{")
-                               ("DeclareSIPrefix" "|{\\{{")
-                               ("DeclareBinaryPrefix" "|{\\{{")
-                               ("DeclareSIPostPower" "|{\\{")
-                               ("DeclareSIPrePower" "|{\\{")
-                               ("DeclareSIQualifier" "|{\\{")
-                               ("highlight" "{"))
-                             'function)))
+                                ("num" "[{")
+                                ("si" "[{")
+                                ("SI" "[{[{")
+                                ("numlist" "[{")
+                                ("numrange" "[{{")
+                                ("SIlist" "[{{")
+                                ("SIrange" "[{{{")
+                                ("sisetup" "{")
+                                ("tablenum" "[{")
+                                ("DeclareSIUnit" "[|{\\{")
+                                ("DeclareSIPrefix" "|{\\{{")
+                                ("DeclareBinaryPrefix" "|{\\{{")
+                                ("DeclareSIPostPower" "|{\\{")
+                                ("DeclareSIPrePower" "|{\\{")
+                                ("DeclareSIQualifier" "|{\\{")
+                                ("highlight" "{"))
+                              'function)))
  TeX-dialect)
 
 (defun LaTeX-siunitx-package-options nil
diff --git a/style/slides.el b/style/slides.el
index fabdb23..4abd53f 100644
--- a/style/slides.el
+++ b/style/slides.el
@@ -44,8 +44,8 @@
  "slides"
  (lambda ()
    (LaTeX-add-environments "slide"
-                          "overlay"
-                          "note")
+                           "overlay"
+                           "note")
    (LaTeX-add-counters "minutes" "seconds")
    (LaTeX-add-pagestyles "headings" "slide" "overlay" "note")
    (setq LaTeX-default-document-environment "slide"))
diff --git a/style/slovak.el b/style/slovak.el
index 705ef5d..4909613 100644
--- a/style/slovak.el
+++ b/style/slovak.el
@@ -4,8 +4,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-quotes
-                 "font-latex"
-                 (quotes))
+                  "font-latex"
+                  (quotes))
 
 (TeX-add-style-hook
  "slovak"
diff --git a/style/sourcecodepro.el b/style/sourcecodepro.el
index ff308e8..ab1dcbb 100644
--- a/style/sourcecodepro.el
+++ b/style/sourcecodepro.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "sourcecodepro"
@@ -45,9 +45,9 @@
 
    ;; Load "fontspec" with package options "opentype" or "otf":
    (when (or (LaTeX-provided-package-options-member "sourcecodepro" "opentype")
-            (LaTeX-provided-package-options-member "sourcecodepro" 
"opentype=true")
-            (LaTeX-provided-package-options-member "sourcecodepro" "otf")
-            (LaTeX-provided-package-options-member "sourcecodepro" "otf=true"))
+             (LaTeX-provided-package-options-member "sourcecodepro" 
"opentype=true")
+             (LaTeX-provided-package-options-member "sourcecodepro" "otf")
+             (LaTeX-provided-package-options-member "sourcecodepro" 
"otf=true"))
      (TeX-run-style-hooks "fontspec"))
 
    ;; The next set of macros is only available when package "fontspec"
@@ -63,14 +63,14 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup)
-             (member "fontspec" (TeX-style-list)))
+              (eq TeX-install-font-lock 'font-latex-setup)
+              (member "fontspec" (TeX-style-list)))
      (font-latex-add-keywords '(("sourcecodepro"        "")
-                               ("sourcecodepromedium"  "")
-                               ("sourcecodeprolight"   "")
-                               ("sourcecodeproextreme" "")
-                               ("sourcecodeprolf"      ""))
-                             'type-declaration)))
+                                ("sourcecodepromedium"  "")
+                                ("sourcecodeprolight"   "")
+                                ("sourcecodeproextreme" "")
+                                ("sourcecodeprolf"      ""))
+                              'type-declaration)))
  TeX-dialect)
 
 (defvar LaTeX-sourcecodepro-package-options
diff --git a/style/splitidx.el b/style/splitidx.el
index ccd9863..edf52c2 100644
--- a/style/splitidx.el
+++ b/style/splitidx.el
@@ -94,16 +94,16 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 ;; Setup parsing for \newindex:
 (TeX-auto-add-type "splitidx-newindex" "LaTeX" "splitidx-newindices")
 
 (defvar LaTeX-splitidx-newindex-regex
   `(,(concat "\\\\new\\(?:protected\\)?index"
-            "\\(?:\\[[^]]*\\]\\)?"
-            "{\\([^}]+\\)}")
+             "\\(?:\\[[^]]*\\]\\)?"
+             "{\\([^}]+\\)}")
     1 LaTeX-auto-splitidx-newindex)
   "Matches the argument of `\\newindex' from `splitidx.sty'.")
 
@@ -121,21 +121,21 @@
       (TeX-ispell-skip-setcar `((,elt ispell-tex-arg-end)))
       ;; font-locking
       (when (and (featurep 'font-latex)
-                (eq TeX-install-font-lock 'font-latex-setup))
-       (font-latex-add-keywords `((,elt  "{"))
-                                'reference))
+                 (eq TeX-install-font-lock 'font-latex-setup))
+        (font-latex-add-keywords `((,elt  "{"))
+                                 'reference))
       ;; Prepare for parsing
       (add-to-list 'LaTeX-auto-regexp-list
-                  `(,(concat
-                      "\\\\"
-                      elt
-                      "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*"
-                      "}[^}{]*\\)*}[^}{]*\\)*\\)}")
-                    1 LaTeX-auto-index-entry))
+                   `(,(concat
+                       "\\\\"
+                       elt
+                       "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*"
+                       "}[^}{]*\\)*}[^}{]*\\)*\\)}")
+                     1 LaTeX-auto-index-entry))
       ;; Cater for completion
       (add-to-list 'TeX-complete-list
-                  `(,(concat "\\\\" elt "{\\([^{}\n\r]*\\)")
-                    1 LaTeX-index-entry-list "}")) )))
+                   `(,(concat "\\\\" elt "{\\([^{}\n\r]*\\)")
+                     1 LaTeX-index-entry-list "}")) )))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-splitidx-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-splitidx-auto-cleanup t)
@@ -152,30 +152,30 @@
       [ "Index name" ]
       (TeX-arg-eval
        (lambda ()
-        (let ((shortcut (TeX-read-string
-                         (TeX-argument-prompt nil nil "Short cut"))))
-          (LaTeX-add-splitidx-newindices shortcut)
-          (format "%s" shortcut)))))
+         (let ((shortcut (TeX-read-string
+                          (TeX-argument-prompt nil nil "Short cut"))))
+           (LaTeX-add-splitidx-newindices shortcut)
+           (format "%s" shortcut)))))
 
     ;; 3.2 Marking up index entries
     '("sindex"
       ;; I don't use `[ TeX-arg-index-tag ]' here
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Short cut")
-                    (LaTeX-splitidx-newindex-list) ]
+        (TeX-argument-prompt t nil "Short cut")
+        (LaTeX-splitidx-newindex-list) ]
       TeX-arg-index)
 
     ;; 3.4 Customizing index entries
     '("AtWriteToIndex"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Short cut")
-                   (LaTeX-splitidx-newindex-list))
+                    (TeX-argument-prompt nil nil "Short cut")
+                    (LaTeX-splitidx-newindex-list))
       t)
 
     '("AtNextWriteToIndex"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Short cut")
-                   (LaTeX-splitidx-newindex-list))
+                    (TeX-argument-prompt nil nil "Short cut")
+                    (LaTeX-splitidx-newindex-list))
       t)
 
     ;; 3.6 Preventing premature expansion of index entries
@@ -183,32 +183,32 @@
       [ "Index name" ]
       (TeX-arg-eval
        (lambda ()
-        (let ((shortcut (TeX-read-string
-                         (TeX-argument-prompt nil nil "Short cut"))))
-          (LaTeX-add-splitidx-newindices shortcut)
-          (format "%s" shortcut)))))
+         (let ((shortcut (TeX-read-string
+                          (TeX-argument-prompt nil nil "Short cut"))))
+           (LaTeX-add-splitidx-newindices shortcut)
+           (format "%s" shortcut)))))
 
     ;; 3.7 Including the generated indices in your document
     '("printindex"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Short cut")
-                    (LaTeX-splitidx-newindex-list) ]
+        (TeX-argument-prompt t nil "Short cut")
+        (LaTeX-splitidx-newindex-list) ]
       [ "Index name" ])
 
     '("printindex*" 0)
 
     '("printsubindex"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Short cut")
-                    (LaTeX-splitidx-newindex-list) ]
+        (TeX-argument-prompt t nil "Short cut")
+        (LaTeX-splitidx-newindex-list) ]
       [ "Index name" ])
 
     '("printsubindex*" 0)
 
     '("setindexpreamble"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Short cut")
-                    (LaTeX-splitidx-newindex-list) ]
+        (TeX-argument-prompt t nil "Short cut")
+        (LaTeX-splitidx-newindex-list) ]
       t)
 
     '("useindexpreamble" [ TeX-arg-macro ])
@@ -222,19 +222,19 @@
 
    ;; Borrowed from index.el
    (add-to-list 'LaTeX-auto-regexp-list
-               `(,(concat "\\\\sindex\\(?:\\[[^{}]*\\]\\)?"
-                          "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*"
-                          "}[^}{]*\\)*}[^}{]*\\)*\\)}")
-                 1 LaTeX-auto-index-entry))
+                `(,(concat "\\\\sindex\\(?:\\[[^{}]*\\]\\)?"
+                           
"{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*"
+                           "}[^}{]*\\)*}[^}{]*\\)*\\)}")
+                  1 LaTeX-auto-index-entry))
 
    ;; Completion for \sindex entries
    (add-to-list 'TeX-complete-list
-               '("\\\\sindex\\(\\[[^][{}]*\\]\\)?{\\([^{}\n\r]*\\)"
-                 2 LaTeX-index-entry-list "}"))
+                '("\\\\sindex\\(\\[[^][{}]*\\]\\)?{\\([^{}\n\r]*\\)"
+                  2 LaTeX-index-entry-list "}"))
 
    ;; Completion for the |see macro
    (add-to-list 'TeX-complete-list
-               '("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list))
+                '("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list))
 
    ;; Tell RefTeX with `reftex-add-index-macros'
    (when (fboundp 'reftex-add-index-macros)
@@ -244,31 +244,31 @@
    ;; 3.2 Marking up index entries
    ;; \index should be an alias for \sindex
    (when (LaTeX-provided-package-options-member "splitidx" "useindex")
-       (TeX-add-symbols
-       '("index"
-         [TeX-arg-eval completing-read
-                       (TeX-argument-prompt t nil "Short cut")
-                       (LaTeX-splitidx-newindex-list) ]
-         (TeX-arg-index)))
-       ;; Tell RefTeX to look in the optional arg. for the index short cut
-       (when (fboundp 'reftex-add-index-macros)
-        (reftex-add-index-macros '(("\\index[]{*}" 1 ?i "" nil t))))
-       (add-to-list 'LaTeX-auto-regexp-list
-                   `(,(concat
-                       "\\\\index\\(?:\\[[^{}]*\\]\\)?"
-                       "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*"
-                       "}[^}{]*\\)*}[^}{]*\\)*\\)}")
-                     1 LaTeX-auto-index-entry))
-       (when (and (featurep 'font-latex)
-                 (eq TeX-install-font-lock 'font-latex-setup))
-        (font-latex-add-keywords '(("index" "[{"))
-                                 'reference)))
+     (TeX-add-symbols
+      '("index"
+        [TeX-arg-eval completing-read
+                      (TeX-argument-prompt t nil "Short cut")
+                      (LaTeX-splitidx-newindex-list) ]
+        (TeX-arg-index)))
+     ;; Tell RefTeX to look in the optional arg. for the index short cut
+     (when (fboundp 'reftex-add-index-macros)
+       (reftex-add-index-macros '(("\\index[]{*}" 1 ?i "" nil t))))
+     (add-to-list 'LaTeX-auto-regexp-list
+                  `(,(concat
+                      "\\\\index\\(?:\\[[^{}]*\\]\\)?"
+                      "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*"
+                      "}[^}{]*\\)*}[^}{]*\\)*\\)}")
+                    1 LaTeX-auto-index-entry))
+     (when (and (featurep 'font-latex)
+                (eq TeX-install-font-lock 'font-latex-setup))
+       (font-latex-add-keywords '(("index" "[{"))
+                                'reference)))
 
    ;; 3.5 Automatic custom index commands
    ;; With package option `idxcommands', one can write \foo{<entry>}
    ;; instead of \sindex[foo]{<entry>}
    (when (and (LaTeX-provided-package-options-member "splitidx" "idxcommands")
-             (LaTeX-splitidx-newindex-list))
+              (LaTeX-splitidx-newindex-list))
      (dolist (elt (mapcar #'car (LaTeX-splitidx-newindex-list)))
        ;; Make every `foo' available as a command
        (TeX-add-symbols `(,elt TeX-arg-index))
@@ -276,31 +276,31 @@
        (TeX-ispell-skip-setcar `((,elt ispell-tex-arg-end)))
        ;; Cater for font-locking
        (when (and (featurep 'font-latex)
-                 (eq TeX-install-font-lock 'font-latex-setup))
-        (font-latex-add-keywords `((,elt  "{"))
-                                 'reference))
+                  (eq TeX-install-font-lock 'font-latex-setup))
+         (font-latex-add-keywords `((,elt  "{"))
+                                  'reference))
        ;; Add defined <entry> to `LaTeX-index-entry-list'
        (add-to-list 'LaTeX-auto-regexp-list
-                   `(,(concat
-                       "\\\\"
-                       elt
-                       "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*"
-                       "}[^}{]*\\)*}[^}{]*\\)*\\)}")
-                     1 LaTeX-auto-index-entry)) ))
+                    `(,(concat
+                        "\\\\"
+                        elt
+                        "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*"
+                        "}[^}{]*\\)*}[^}{]*\\)*\\)}")
+                      1 LaTeX-auto-index-entry)) ))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("newindex"           "[{")
-                               ("AtWriteToIndex"     "{{")
-                               ("AtNextWriteToIndex" "{{")
-                               ("newprotectedindex"  "[{")
-                               ("setindexpreamble"   "[{")
-                               ("useindexpreamble"   "[")
-                               ("extendtheindex"     "{{{{"))
-                             'function)
+                                ("AtWriteToIndex"     "{{")
+                                ("AtNextWriteToIndex" "{{")
+                                ("newprotectedindex"  "[{")
+                                ("setindexpreamble"   "[{")
+                                ("useindexpreamble"   "[")
+                                ("extendtheindex"     "{{{{"))
+                              'function)
      (font-latex-add-keywords '(("sindex"             "[{"))
-                             'reference)))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-splitidx-package-options
diff --git a/style/subcaption.el b/style/subcaption.el
index 0780523..370a5dc 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-caption-key-val-options-local)
 (defvar LaTeX-caption-key-val-options)
@@ -52,18 +52,18 @@ same values as \"labelformat\" from caption package.")
 If STAR is non-nil, then do not query for a \\label and a short
 caption, insert only a caption."
   (let* (;; \subcaption needs an environment, "minipage" will be
-        ;; popular.  If so, check next higher environment to find out
-        ;; where we are
-        (currenv (if (string= (LaTeX-current-environment) "minipage")
-                     (LaTeX-current-environment 2)
-                   (LaTeX-current-environment)))
-        (caption (TeX-read-string
-                  (TeX-argument-prompt optional nil "Sub-caption")))
-        (short-caption
-         (when (and (not star)
-                    (>= (length caption) LaTeX-short-caption-prompt-length))
-           (TeX-read-string
-            (TeX-argument-prompt t nil "Short caption")))))
+         ;; popular.  If so, check next higher environment to find out
+         ;; where we are
+         (currenv (if (string= (LaTeX-current-environment) "minipage")
+                      (LaTeX-current-environment 2)
+                    (LaTeX-current-environment)))
+         (caption (TeX-read-string
+                   (TeX-argument-prompt optional nil "Sub-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)
     (when (and short-caption (not (string= short-caption "")))
       (insert LaTeX-optop short-caption LaTeX-optcl))
@@ -71,7 +71,7 @@ caption, insert only a caption."
     ;; Fill the \subcaption paragraph before inserting the \label:
     (LaTeX-fill-paragraph)
     (when (and (not star)
-              (save-excursion (LaTeX-label currenv 'environment)))
+               (save-excursion (LaTeX-label currenv 'environment)))
       ;; Move \label into next line if we have one:
       (LaTeX-newline)
       (indent-according-to-mode)
@@ -82,13 +82,13 @@ caption, insert only a caption."
 If STAR is non-nil, then do not query for a \\label and a short
 caption, insert only a caption."
   (let* ((currenv (LaTeX-current-environment))
-        (caption (TeX-read-string
-                  (TeX-argument-prompt optional nil "Sub-caption")))
-        (short-caption
-         (when (and (not star)
-                    (>= (length caption) LaTeX-short-caption-prompt-length))
-           (TeX-read-string
-            (TeX-argument-prompt t nil "Short Sub-caption")))))
+         (caption (TeX-read-string
+                   (TeX-argument-prompt optional nil "Sub-caption")))
+         (short-caption
+          (when (and (not star)
+                     (>= (length caption) LaTeX-short-caption-prompt-length))
+            (TeX-read-string
+             (TeX-argument-prompt t nil "Short Sub-caption")))))
     (indent-according-to-mode)
     (when (and short-caption (not (string= short-caption "")))
       (insert LaTeX-optop short-caption LaTeX-optcl))
@@ -96,14 +96,14 @@ caption, insert only a caption."
     (unless star (LaTeX-label currenv 'environment))
     (insert TeX-grcl))
   (let* ((TeX-arg-opening-brace "[")
-        (TeX-arg-closing-brace "]")
-        (width (completing-read (TeX-argument-prompt t nil "Width")
-                                (mapcar (lambda (elt) (concat TeX-esc (car 
elt)))
-                                        (LaTeX-length-list))))
-        (inpos (if (and width (not (string-equal width "")))
-                   (completing-read (TeX-argument-prompt t nil "Inner 
position")
-                                    '("c" "l" "r" "s"))
-                 "")))
+         (TeX-arg-closing-brace "]")
+         (width (completing-read (TeX-argument-prompt t nil "Width")
+                                 (mapcar (lambda (elt) (concat TeX-esc (car 
elt)))
+                                         (LaTeX-length-list))))
+         (inpos (if (and width (not (string-equal width "")))
+                    (completing-read (TeX-argument-prompt t nil "Inner 
position")
+                                     '("c" "l" "r" "s"))
+                  "")))
     (TeX-argument-insert width t)
     (TeX-argument-insert inpos t))
   ;; Fill the paragraph before inserting {}.  We use this function
@@ -119,8 +119,8 @@ caption, insert only a caption."
 
    ;; Make "subrefformat" available in key-vals of caption.el:
    (setq LaTeX-caption-key-val-options-local
-        (append LaTeX-subcaption-key-val-options
-                LaTeX-caption-key-val-options-local))
+         (append LaTeX-subcaption-key-val-options
+                 LaTeX-caption-key-val-options-local))
 
    (TeX-add-symbols
     ;; Basic commands
@@ -149,11 +149,11 @@ caption, insert only a caption."
 
     '("DeclareCaptionSubType*"
       [TeX-arg-eval completing-read
-                   (TeX-argument-prompt t nil "Numbering scheme")
-                   '("arabic" "roman" "Roman" "alph" "Alph" "fnsymbol")]
+                    (TeX-argument-prompt t nil "Numbering scheme")
+                    '("arabic" "roman" "Roman" "alph" "Alph" "fnsymbol")]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Type")
-                   '("figure" "table"))))
+                    (TeX-argument-prompt nil nil "Type")
+                    '("figure" "table"))))
 
    ;; \subcaption(box)? and \subfloat macros should get their own lines
    (LaTeX-paragraph-commands-add-locally
@@ -172,27 +172,27 @@ caption, insert only a caption."
    (when (fboundp 'reftex-add-label-environments)
      (reftex-add-label-environments
       `(("subfigure" ?f ,LaTeX-figure-label "~\\ref{%s}" caption)
-       ("subtable"  ?t ,LaTeX-table-label  "~\\ref{%s}" caption))))
+        ("subtable"  ?t ,LaTeX-table-label  "~\\ref{%s}" caption))))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("subcaption"            "*[{")
-                               ("subcaptionbox"         "*[{[[")
-                               ("phantomcaption"        "")
-                               ("phantomsubcaption"     "")
-                               ("subfloat"              "[["))
-                             'textual)
+                                ("subcaptionbox"         "*[{[[")
+                                ("phantomcaption"        "")
+                                ("phantomsubcaption"     "")
+                                ("subfloat"              "[["))
+                              'textual)
      (font-latex-add-keywords '(("subref"                "*{"))
-                             'reference)
+                              'reference)
      (font-latex-add-keywords '(("DeclareCaptionSubType" "*[{"))
-                             'function)) )
+                              'function)) )
  TeX-dialect)
 
 (defun LaTeX-subcaption-package-options ()
   "Prompt for package options for the subcaption package."
   (TeX-load-style "caption")
   (TeX-read-key-val t (append LaTeX-subcaption-key-val-options
-                             LaTeX-caption-key-val-options)))
+                              LaTeX-caption-key-val-options)))
 
 ;;; subcaption.el ends here
diff --git a/style/subfigure.el b/style/subfigure.el
index d967ed1..181b17c 100644
--- a/style/subfigure.el
+++ b/style/subfigure.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "subfigure"
@@ -54,34 +54,34 @@
 
    ;; Install completion for labels:
    (setq TeX-complete-list
-        (append
-         '(("\\\\[Ss]ubref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
-         TeX-complete-list))
+         (append
+          '(("\\\\[Ss]ubref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
+          TeX-complete-list))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("subfigure" "[[{")
-                               ("subtable" "[[{"))
-                             'textual)
+                                ("subtable" "[[{"))
+                              'textual)
      (font-latex-add-keywords '(("Subref" "{")
-                               ("subref" "{"))
-                             'reference)))
+                                ("subref" "{"))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-subfigure-package-options '("normal" "hang" "center"
-                                         "centerlast" "nooneline"
-                                         "raggedright" "isu" "anne"
-                                         "scriptsize" "footnotesize"
-                                         "small" "normalsize" "large"
-                                         "Large" "rm" "sf" "tt" "md"
-                                         "bf" "up" "it" "sl" "sc" "RM"
-                                         "SF" "TT" "MD" "BF" "IT" "SL"
-                                         "SC" "UP" "figbotcap"
-                                         "figtopcap" "tabbotcap"
-                                         "tabtopcap" "FIGBOTCAP"
-                                         "FIGTOPCAP" "TABBOTCAP"
-                                         "TABTOPCAP" "loose" "tight")
+                                          "centerlast" "nooneline"
+                                          "raggedright" "isu" "anne"
+                                          "scriptsize" "footnotesize"
+                                          "small" "normalsize" "large"
+                                          "Large" "rm" "sf" "tt" "md"
+                                          "bf" "up" "it" "sl" "sc" "RM"
+                                          "SF" "TT" "MD" "BF" "IT" "SL"
+                                          "SC" "UP" "figbotcap"
+                                          "figtopcap" "tabbotcap"
+                                          "tabtopcap" "FIGBOTCAP"
+                                          "FIGTOPCAP" "TABBOTCAP"
+                                          "TABTOPCAP" "loose" "tight")
   "Package options for the subfigure package.")
 
 ;;; subfigure.el ends here
diff --git a/style/subfiles.el b/style/subfiles.el
index 5434f99..49df08c 100644
--- a/style/subfiles.el
+++ b/style/subfiles.el
@@ -38,12 +38,12 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function reftex-compile-variables
-                 "reftex"
-                 ())
+                  "reftex"
+                  ())
 
 (defvar LaTeX-subfiles-package-options nil
   "Package options for the subfiles package.")
@@ -67,7 +67,7 @@
    (let ((master-file (cadr (assoc "subfiles" LaTeX-provided-class-options))))
      (when (stringp master-file)
        (TeX-run-style-hooks
-       (file-name-sans-extension master-file))))
+        (file-name-sans-extension master-file))))
 
    (TeX-add-symbols
     '("subfile" TeX-arg-file)
@@ -81,16 +81,16 @@
    ;; subfile(s) when master file is loaded.
    (TeX-auto-add-regexp
     `(,(concat
-       "\\\\subfile\\(?:include\\)?"
-       "{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}")
+        "\\\\subfile\\(?:include\\)?"
+        "{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}")
       1 TeX-auto-file))
 
    ;; Tell RefTeX the same thing.
    (when (and (boundp 'reftex-include-file-commands)
-             (not (string-match "subfile"
-                                (mapconcat #'identity
-                                           reftex-include-file-commands
-                                           "|"))))
+              (not (string-match "subfile"
+                                 (mapconcat #'identity
+                                            reftex-include-file-commands
+                                            "|"))))
      (make-local-variable 'reftex-include-file-commands)
      (add-to-list 'reftex-include-file-commands "subfile\\(?:include\\)?" t)
      (reftex-compile-variables))
@@ -98,10 +98,10 @@
    ;; The following code will fontify \subfile{} and
    ;; \subfileinclude{} like \input.
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("subfile"        "{")
-                               ("subfileinclude" "{"))
-                             'reference)))
+                                ("subfileinclude" "{"))
+                              'reference)))
  TeX-dialect)
 
 ;;; subfiles.el ends here
diff --git a/style/swedish.el b/style/swedish.el
index 0cef29e..120e67a 100644
--- a/style/swedish.el
+++ b/style/swedish.el
@@ -12,7 +12,7 @@
  (lambda ()
    (unless (eq (car TeX-quote-language) 'override)
      (setq TeX-quote-language
-          `("swedish" "''" ,TeX-close-quote ,TeX-quote-after-quote)))
+           `("swedish" "''" ,TeX-close-quote ,TeX-quote-after-quote)))
    (setq LaTeX-babel-hyphen-language "swedish")
    (run-hooks 'TeX-language-sv-hook))
  TeX-dialect)
diff --git a/style/tabularx.el b/style/tabularx.el
index 274ad4f..970f698 100644
--- a/style/tabularx.el
+++ b/style/tabularx.el
@@ -45,7 +45,7 @@
    ;; Use the enhanced tabular indentation.  Append to
    ;; `LaTeX-indent-environment-list' in order not to override custom settings.
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("tabularx" LaTeX-indent-tabular) t)
+                '("tabularx" LaTeX-indent-tabular) t)
 
    ;; Append tabularx to `LaTeX-item-list' with `LaTeX-item-tabular*'
    (add-to-list 'LaTeX-item-list '("tabularx" . LaTeX-item-tabular*) t)
@@ -67,7 +67,7 @@
 
    ;; `tabularx.sty' adds one new column specification letter.
    (set (make-local-variable 'LaTeX-array-column-letters)
-       (concat LaTeX-array-column-letters "X")))
+        (concat LaTeX-array-column-letters "X")))
  TeX-dialect)
 
 ;;; tabularx.el ends here
diff --git a/style/tabulary.el b/style/tabulary.el
index 18c1f41..be4b114 100644
--- a/style/tabulary.el
+++ b/style/tabulary.el
@@ -45,7 +45,7 @@
    ;; Use the enhanced tabular indentation.  Append to
    ;; `LaTeX-indent-environment-list' in order not to override custom settings.
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("tabulary" LaTeX-indent-tabular))
+                '("tabulary" LaTeX-indent-tabular))
 
    ;; Append tabulary to `LaTeX-item-list' with `LaTeX-item-tabular*'
    (add-to-list 'LaTeX-item-list '("tabulary" . LaTeX-item-tabular*) t)
@@ -64,7 +64,7 @@
 
    ;; `tabulary.sty' adds some new column specification letters.
    (set (make-local-variable 'LaTeX-array-column-letters)
-       (concat LaTeX-array-column-letters "L" "C" "R" "J")))
+        (concat LaTeX-array-column-letters "L" "C" "R" "J")))
  TeX-dialect)
 
 ;;; tabulary.el ends here
diff --git a/style/tcolorbox.el b/style/tcolorbox.el
index d2aa27a..68cd0aa 100644
--- a/style/tcolorbox.el
+++ b/style/tcolorbox.el
@@ -50,8 +50,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
 
@@ -89,27 +89,27 @@
     ("coltext")
     ("coltitle")
     ("fontupper" ("\\rmfamily" "\\sffamily" "\\ttfamily" "\\mdseries" 
"\\bfseries"
-                 "\\upshape" "\\itshape" "\\slshape" "\\scshape"
-                 "\\tiny"  "\\scriptsize" "\\footnotesize"
-                 "\\small" "\\normalsize" "\\large"
-                 "\\Large" "\\LARGE" "\\huge" "\\Huge" "\\normalfont"))
+                  "\\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"))
+                  "\\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"))
+                  "\\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"))
+               "flush right" "center" "flush center"))
     ("halign lower" ("justify" "left" "flush left" "right"
-                    "flush right" "center" "flush center"))
+                     "flush right" "center" "flush center"))
     ("halign title" ("justify" "left" "flush left" "right"
-                    "flush right" "center" "flush center"))
+                     "flush right" "center" "flush center"))
     ("flushleft upper")
     ("center upper")
     ("flushright upper")
@@ -167,9 +167,9 @@
     ("toggle left and right" ("none" "forced" "evenpage"))
     ;; 4.8 Corners
     ("sharp corners" ("northwest" "northeast" "southwest" "southeast"
-                     "north" "south" "east" "west" "downhill" "uphill" "all"))
+                      "north" "south" "east" "west" "downhill" "uphill" "all"))
     ("rounded corners" ("northwest" "northeast" "southwest" "southeast"
-                       "north" "south" "east" "west" "downhill" "uphill" 
"all"))
+                        "north" "south" "east" "west" "downhill" "uphill" 
"all"))
     ("sharpish corners")
     ;; 4.9 Transparency
     ("opacityframe")
@@ -332,7 +332,7 @@
     ;; 6 Side by Side
     ("sidebyside" ("true" "false"))
     ("sidebyside align" ("center" "top" "bottom" "center seam"
-                        "top seam" "bottom seam"))
+                         "top seam" "bottom seam"))
     ("sidebyside gap")
     ("lefthand width")
     ("righthand width")
@@ -357,8 +357,8 @@
     ("tcbox raise base")
     ("on line")
     ("tcbox width" ("auto" "auto limited" "forced center"
-                   "forced left" "forced right" "minimum center"
-                   "minimum left" "minimum right")))
+                    "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
@@ -405,16 +405,16 @@
 
 (defvar LaTeX-tcolorbox-newtcolorbox-regexp
   `(,(concat "\\\\\\(re\\)?newtcolorbox"
-            "[ \t\n\r%]*"
-            "\\(?:"
-            (LaTeX-extract-key-value-label 'none)
-            "\\)?"
-            "[ \t\n\r%]*"
-            "{\\([a-zA-Z0-9]+\\)}"
-            "[ \t\n\r%]*"
-            "\\(?:\\[\\([0-9]*\\)\\]\\)?"
-            "[ \t\n\r%]*"
-            "\\(\\[\\)?")
+             "[ \t\n\r%]*"
+             "\\(?:"
+             (LaTeX-extract-key-value-label 'none)
+             "\\)?"
+             "[ \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.")
 
@@ -423,16 +423,16 @@
 
 (defvar LaTeX-tcolorbox-newtcbox-regexp
   `(,(concat "\\\\\\(re\\)?newtcbox"
-            "[ \t\n\r%]*"
-            "\\(?:"
-            (LaTeX-extract-key-value-label 'none)
-            "\\)?"
-            "[ \t\n\r%]*"
-            "{\\\\\\([a-zA-Z]+\\)}"
-            "[ \t\n\r%]*"
-            "\\(?:\\[\\([0-9]*\\)\\]\\)?"
-            "[ \t\n\r%]*"
-            "\\(\\[\\)?")
+             "[ \t\n\r%]*"
+             "\\(?:"
+             (LaTeX-extract-key-value-label 'none)
+             "\\)?"
+             "[ \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.")
 
@@ -454,99 +454,99 @@ 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))
+        (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)))))
+        (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)))))))
+        (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)))
+                 "colback"
+                 "colbacktitle"
+                 "colupper"
+                 "collower"
+                 "coltext"
+                 "coltitle"))
+         (tmp (copy-alist LaTeX-tcolorbox-keyval-options-local)))
     (dolist (key keys)
       (setq tmp (assq-delete-all (car (assoc key tmp)) tmp))
       (cl-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)))
+        (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))
+        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))))
+          (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)))
+        (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))))))
+             (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))))
+          (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)))
+        (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))))))
+             (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)
@@ -564,12 +564,12 @@ e.g. \"tcolorboxlib-raster.el\"."
 
    ;; Activate the buffer-local version of key-vals.
    (setq LaTeX-tcolorbox-keyval-options-local
-        (copy-alist LaTeX-tcolorbox-keyval-options))
+         (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))
+         (copy-alist LaTeX-tcolorbox-keyval-options-local))
 
    ;; Add tcolorbox to the parser.
    (TeX-auto-add-regexp LaTeX-tcolorbox-newtcolorbox-regexp)
@@ -585,9 +585,9 @@ e.g. \"tcolorboxlib-raster.el\"."
     ;; 1.3 Libraries
     '("tcbuselibrary"
       (TeX-arg-eval mapconcat #'identity
-                   (TeX-completing-read-multiple
-                    (TeX-argument-prompt nil nil "Libraries")
-                    LaTeX-tcolorbox-library-list) ","))
+                    (TeX-completing-read-multiple
+                     (TeX-argument-prompt nil nil "Libraries")
+                     LaTeX-tcolorbox-library-list) ","))
 
     ;; 3 Macros for Box Creation
     '("tcblower" 0)
@@ -600,9 +600,9 @@ e.g. \"tcolorboxlib-raster.el\"."
 
     '("tcbox"
       [ TeX-arg-eval TeX-read-key-val t
-                    (append
-                     LaTeX-tcolorbox-tcbox-options
-                     LaTeX-tcolorbox-keyval-options-local) ]
+        (append
+         LaTeX-tcolorbox-tcbox-options
+         LaTeX-tcolorbox-keyval-options-local) ]
       t)
 
     '("newtcolorbox"
@@ -614,8 +614,8 @@ e.g. \"tcolorboxlib-raster.el\"."
     '("renewtcolorbox"
       [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color box")
-                   (LaTeX-tcolorbox-newtcolorbox-list))
+                    (TeX-argument-prompt nil nil "Color box")
+                    (LaTeX-tcolorbox-newtcolorbox-list))
       [ TeX-arg-define-macro-arguments ]
       (TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local))
 
@@ -629,10 +629,10 @@ e.g. \"tcolorboxlib-raster.el\"."
       [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
       (TeX-arg-eval
        (lambda ()
-        (let ((macro (completing-read
-                      (TeX-argument-prompt nil nil "Macro: \\" t)
-                      (LaTeX-tcolorbox-newtcbox-list))))
-          (concat TeX-esc macro))))
+         (let ((macro (completing-read
+                       (TeX-argument-prompt nil 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))
 
@@ -652,10 +652,10 @@ e.g. \"tcolorboxlib-raster.el\"."
     ;; 5.2 Lists of tcolorboxes
     '("tcblistof"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Macro")
-                    (if (< (LaTeX-largest-level) 2)
-                        '("\\chapter" "\\section" "\\subsection" 
"\\subsubsection")
-                      '("\\section" "\\subsection" "\\subsubsection")) ]
+        (TeX-argument-prompt t nil "Macro")
+        (if (< (LaTeX-largest-level) 2)
+            '("\\chapter" "\\section" "\\subsection" "\\subsubsection")
+          '("\\section" "\\subsection" "\\subsubsection")) ]
       2)
 
     ;; 7 Saving and Loading of Verbatim Texts
@@ -679,24 +679,24 @@ e.g. \"tcolorboxlib-raster.el\"."
    ;; 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)
+                '("tcbverbatimwrite" current-indentation) t)
    (add-to-list 'LaTeX-indent-environment-list
-               '("tcbwritetemp" current-indentation) t)
+                '("tcbwritetemp" current-indentation) t)
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("tcbuselibrary"        "{")
-                               ("tcbset"               "{")
-                               ("tcbsetforeverylayer"  "{")
-                               ("tcbox"                "[{")
-                               ("newtcolorbox"         "[{[[{")
-                               ("renewtcolorbox"       "[{[[{")
-                               ("newtcbox"             "[{[[{")
-                               ("renewtcbox"           "[{[[{")
-                               ("tcolorboxenvironment" "{{")
-                               ("tcbsetmanagedlayer"   "{"))
-                             'function)))
+                                ("tcbset"               "{")
+                                ("tcbsetforeverylayer"  "{")
+                                ("tcbox"                "[{")
+                                ("newtcolorbox"         "[{[[{")
+                                ("renewtcolorbox"       "[{[[{")
+                                ("newtcbox"             "[{[[{")
+                                ("renewtcbox"           "[{[[{")
+                                ("tcolorboxenvironment" "{{")
+                                ("tcbsetmanagedlayer"   "{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-tcolorbox-package-options LaTeX-tcolorbox-library-list
diff --git a/style/tcolorboxlib-raster.el b/style/tcolorboxlib-raster.el
index 91d4918..bcb93d0 100644
--- a/style/tcolorboxlib-raster.el
+++ b/style/tcolorboxlib-raster.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-tcolorbox-keyval-options-local)
 (defvar LaTeX-tcolorbox-keyval-options-full)
@@ -90,26 +90,26 @@
   (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)"))))
+                                    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))
+        (format "[%s]" opts))
       (when (string= environment "tcboxeditemize")
-       (format "{%s}" box-opts)))))
+        (format "{%s}" box-opts)))))
   (if (TeX-active-mark)
       (progn
-       (LaTeX-find-matching-begin)
-       (end-of-line 1))
+        (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]*$"))
+                            "^[ \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'
@@ -120,9 +120,9 @@
   ;; 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)))
+             (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 ()
@@ -135,8 +135,8 @@
 
    ;; 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))
+         (append LaTeX-tcolorbox-lib-raster-keyval-options
+                 LaTeX-tcolorbox-keyval-options-full))
 
    (TeX-add-symbols
     ;; 14.2 Macros of the Library
@@ -148,56 +148,56 @@
     ;; 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))))))
+        (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)))))
+        (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)
+                '("tcbitemize" . LaTeX-tcolorbox-lib-raster-insert-item) t)
    (add-to-list 'LaTeX-item-list
-               '("tcboxeditemize" . LaTeX-tcolorbox-lib-raster-insert-item) t)
+                '("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"))
+          (concat
+           LaTeX-item-regexp
+           "\\|"
+           "tcbitem\\b"))
      (LaTeX-set-paragraph-start))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("tcbitem" "["))
-                             'textual)))
+                              'textual)))
  TeX-dialect)
 
 ;;; tcolorboxlib-raster.el ends here
diff --git a/style/tex-live.el b/style/tex-live.el
index 45ae12b..abddbe8 100644
--- a/style/tex-live.el
+++ b/style/tex-live.el
@@ -40,12 +40,12 @@
 
 ;; Silence the compiler:
 (declare-function LaTeX-add-fancyvrb-environments
-                 "fancyvrb"
-                 (&rest fancyvrb-environments))
+                  "fancyvrb"
+                  (&rest fancyvrb-environments))
 
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "tex-live"
@@ -53,18 +53,18 @@
 
    ;; Run hooks for required packages:
    (TeX-run-style-hooks "geometry"
-                       "alltt"
-                       "array"
-                       "colortbl"
-                       "comment"
-                       "float"
-                       "graphicx"
-                       "longtable"
-                       "ulem"
-                       "url"
-                       "xspace"
-                       "relsize"
-                       "fancyvrb")
+                        "alltt"
+                        "array"
+                        "colortbl"
+                        "comment"
+                        "float"
+                        "graphicx"
+                        "longtable"
+                        "ulem"
+                        "url"
+                        "xspace"
+                        "relsize"
+                        "fancyvrb")
 
    ;; Add | to a local version of `LaTeX-shortvrb-chars' before
    ;; running the style hook `shortvrb.el':
@@ -83,8 +83,8 @@
     '("boxedverbatiminput" LaTeX-fancyvrb-arg-file-relative)
     '("listinginput"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Value of firstnumber key")
-                   (cadr (assoc "firstnumber" 
LaTeX-fancyvrb-key-val-options-local)))
+                    (TeX-argument-prompt nil nil "Value of firstnumber key")
+                    (cadr (assoc "firstnumber" 
LaTeX-fancyvrb-key-val-options-local)))
       LaTeX-fancyvrb-arg-file-relative)
 
     ;; Various sorts of names:
@@ -96,22 +96,22 @@
     '("filename" "Directory")
     '("envname"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Environment")
-                   '("TEXMFCACHE"
-                     "TEXMFCNF"
-                     "TEXMFCONFIG"
-                     "TEXMFDIST"
-                     "TEXMFHOME"
-                     "TEXMFLOCAL"
-                     "TEXMFMAIN"
-                     "TEXMFOUTPUT"
-                     "TEXMFSYSCONFIG"
-                     "TEXMFSYSVAR"
-                     "TEXMFVAR"
-                     "TEXINPUTS"
-                     "TEXFONTMAPS"
-                     "ENCFONTS"
-                     "PATH" "MANPATH" "INFOPATH" "DISPLAY")))
+                    (TeX-argument-prompt nil nil "Environment")
+                    '("TEXMFCACHE"
+                      "TEXMFCNF"
+                      "TEXMFCONFIG"
+                      "TEXMFDIST"
+                      "TEXMFHOME"
+                      "TEXMFLOCAL"
+                      "TEXMFMAIN"
+                      "TEXMFOUTPUT"
+                      "TEXMFSYSCONFIG"
+                      "TEXMFSYSVAR"
+                      "TEXMFVAR"
+                      "TEXINPUTS"
+                      "TEXFONTMAPS"
+                      "ENCFONTS"
+                      "PATH" "MANPATH" "INFOPATH" "DISPLAY")))
     '("code" "Code")
     '("file" "File")
     '("prog" "Program")
@@ -139,7 +139,7 @@
 
    ;; `tex-live.sty' adds one new column specification letter P:
    (set (make-local-variable 'LaTeX-array-column-letters)
-       (concat LaTeX-array-column-letters "P"))
+        (concat LaTeX-array-column-letters "P"))
 
    ;; Custom env's where \item takes an opt. argument:
    (let ((envs '("ttdescription" "cmddescription")))
@@ -148,29 +148,29 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("verbatiminput"      "{")
-                               ("boxedverbatiminput" "{")
-                               ("listinginput"       "{{")
-                               ("pkgname"       "{")
-                               ("optname"       "{")
-                               ("cmdname"       "{")
-                               ("colname"       "{")
-                               ("dirname"       "")
-                               ("filename"      "")
-                               ("envname"       "{")
-                               ("cs"            "{"))
-                             'reference)
+                                ("boxedverbatiminput" "{")
+                                ("listinginput"       "{{")
+                                ("pkgname"       "{")
+                                ("optname"       "{")
+                                ("cmdname"       "{")
+                                ("colname"       "{")
+                                ("dirname"       "")
+                                ("filename"      "")
+                                ("envname"       "{")
+                                ("cs"            "{"))
+                              'reference)
      (font-latex-add-keywords '(("code" "{")
-                               ("file" "{")
-                               ("prog" "{")
-                               ("samp" "{")
-                               ("ttvar" "{"))
-                             'type-command)
+                                ("file" "{")
+                                ("prog" "{")
+                                ("samp" "{")
+                                ("ttvar" "{"))
+                              'type-command)
      (font-latex-add-keywords '(("var" "{") )
-                             'italic-command)
+                              'italic-command)
      (font-latex-add-keywords '(("Ucom" "{"))
-                             'bold-command)))
+                              'bold-command)))
  TeX-dialect)
 
 ;;; tex-live.el ends here
diff --git a/style/textpos.el b/style/textpos.el
index 4a143bb..0f02efb 100644
--- a/style/textpos.el
+++ b/style/textpos.el
@@ -42,30 +42,30 @@
   "Query for the arguments of `textblock' environment and insert
 them."
   (let* ((hsize (TeX-read-string "Width: "))
-        (ho    (TeX-read-string "(Optional) X reference point: "))
-        (vo    (when (not (string-equal ho ""))
-                 (TeX-read-string "Y reference point: ")))
-        (hpos  (TeX-read-string "X placement point: "))
-        (vpos  (TeX-read-string "Y placement point: ")))
+         (ho    (TeX-read-string "(Optional) X reference point: "))
+         (vo    (when (not (string-equal ho ""))
+                  (TeX-read-string "Y reference point: ")))
+         (hpos  (TeX-read-string "X placement point: "))
+         (vpos  (TeX-read-string "Y placement point: ")))
     (LaTeX-insert-environment
      env
      (concat
       (when (and hsize (not (string-equal hsize "")))
-       (format "{%s}" hsize))
+        (format "{%s}" hsize))
       (when (and ho (not (string-equal ho ""))
-                vo (not (string-equal vo "")))
-       (format "[%s,%s]" ho vo))
+                 vo (not (string-equal vo "")))
+        (format "[%s,%s]" ho vo))
       (when (and hpos (not (string-equal hpos ""))
-                vpos (not (string-equal vpos "")))
-       (format "(%s,%s)" hpos vpos))))))
+                 vpos (not (string-equal vpos "")))
+        (format "(%s,%s)" hpos vpos))))))
 
 (defun LaTeX-arg-textpos-tpgrid (optional)
   "Query and insert the optional argument of `\\TPGrid'."
   (let* ((x (TeX-read-string "(Optional) X start coordinate: "))
-        (y (when (not (string-equal x ""))
-             (TeX-read-string "Y start coordinate: "))))
+         (y (when (not (string-equal x ""))
+              (TeX-read-string "Y start coordinate: "))))
     (when (and (not (string-equal x ""))
-              (not (string-equal y "")))
+               (not (string-equal y "")))
       (TeX-argument-insert (format "%s,%s" x y) optional))))
 
 (TeX-add-style-hook
@@ -81,7 +81,7 @@ them."
 
    (TeX-add-symbols
     '("TPGrid" [ LaTeX-arg-textpos-tpgrid ]
-              "Horizontal fraction" "Vertical fraction")
+      "Horizontal fraction" "Vertical fraction")
 
     '("TPMargin"  (TeX-arg-length "Margin around textblock"))
     '("TPMargin*" (TeX-arg-length "Margin around textblock"))
@@ -90,30 +90,30 @@ them."
     '("textblockcolour"
       (TeX-arg-eval
        (lambda ()
-        (let ((color (cond ((member "xcolor" (TeX-style-list))
-                            (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
-                           ((member "color" (TeX-style-list))
-                            (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
-                           (t
-                            (TeX-read-string "Color name: ")))))
-          (format "%s" color)))))
+         (let ((color (cond ((member "xcolor" (TeX-style-list))
+                             (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
+                            ((member "color" (TeX-style-list))
+                             (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
+                            (t
+                             (TeX-read-string "Color name: ")))))
+           (format "%s" color)))))
 
     '("textblockrulecolour"
       (TeX-arg-eval
        (lambda ()
-        (let ((color (cond ((member "xcolor" (TeX-style-list))
-                            (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
-                           ((member "color" (TeX-style-list))
-                            (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
-                           (t
-                            (TeX-read-string "Color name: ")))))
-          (format "%s" color)))))
-
-   '("TPshowboxestrue")
-   '("TPshowboxesfalse")
-
-   '("textblocklabel" t)
-   '("textblockorigin" "Horizontal position" "Vertical position"))
+         (let ((color (cond ((member "xcolor" (TeX-style-list))
+                             (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
+                            ((member "color" (TeX-style-list))
+                             (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
+                            (t
+                             (TeX-read-string "Color name: ")))))
+           (format "%s" color)))))
+
+    '("TPshowboxestrue")
+    '("TPshowboxesfalse")
+
+    '("textblocklabel" t)
+    '("textblockorigin" "Horizontal position" "Vertical position"))
 
    ;; Add the lengths defined by textpos.sty
    (LaTeX-add-lengths "TPHorizModule" "TPVertModule" "TPboxrulesize"))
diff --git a/style/theorem.el b/style/theorem.el
index 204f909..65712b8 100644
--- a/style/theorem.el
+++ b/style/theorem.el
@@ -42,8 +42,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-theorem-theoremstyle-list
   '(("plain") ("break") ("margin") ("change")
@@ -72,11 +72,11 @@ argument.  Use PROMPT as the prompt string."
   ;; `INITIAL-INPUT' (5th argument to `TeX-completing-read-multiple')
   ;; is hard-coded to `TeX-esc'.
   (let* ((crm-separator (regexp-quote TeX-esc))
-        (fontdecl (mapconcat 'identity
-                             (TeX-completing-read-multiple
-                              (TeX-argument-prompt optional prompt "Font")
-                              LaTeX-theorem-fontdecl nil nil TeX-esc)
-                             TeX-esc)))
+         (fontdecl (mapconcat 'identity
+                              (TeX-completing-read-multiple
+                               (TeX-argument-prompt optional prompt "Font")
+                               LaTeX-theorem-fontdecl nil nil TeX-esc)
+                              TeX-esc)))
     (TeX-argument-insert fontdecl optional)))
 
 (defun LaTeX-theorem-env-label (environment)
@@ -91,14 +91,14 @@ RefTeX users should customize or add ENVIRONMENT to
 
   (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
   (add-to-list \\='reftex-label-alist
-              \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
-                nil (\"Lemma\" \"lemma\") nil))"
+               \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
+                 nil (\"Lemma\" \"lemma\") nil))"
   (let ((opthead (TeX-read-string
-                 (TeX-argument-prompt t nil "Heading"))))
+                  (TeX-argument-prompt t nil "Heading"))))
     (LaTeX-insert-environment environment
-                             (when (and opthead
-                                        (not (string= opthead "")))
-                               (format "[%s]" opthead))))
+                              (when (and opthead
+                                         (not (string= opthead "")))
+                                (format "[%s]" opthead))))
   (when (LaTeX-label environment 'environment)
     (LaTeX-newline)
     (indent-according-to-mode)))
@@ -133,23 +133,23 @@ make them available as new environments."
     '("newtheorem"
       (TeX-arg-eval
        (lambda ()
-        (let ((nthm (TeX-read-string
-                     (TeX-argument-prompt nil nil "Environment"))))
-          (LaTeX-add-theorem-newtheorems nthm)
-          (LaTeX-add-environments (list nthm 'LaTeX-theorem-env-label))
-          (format "%s" nthm))))
+         (let ((nthm (TeX-read-string
+                      (TeX-argument-prompt nil nil "Environment"))))
+           (LaTeX-add-theorem-newtheorems nthm)
+           (LaTeX-add-environments (list nthm 'LaTeX-theorem-env-label))
+           (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"))
-                       "") ])
+                                        (backward-char 2)
+                                        (preceding-char)) ?\])
+                                  ()
+                                (TeX-arg-counter t "Within counter"))
+                        "") ])
 
     '("theoremstyle"
       (TeX-arg-eval completing-read
-                   "Style: "
-                   LaTeX-theorem-theoremstyle-list))
+                    "Style: "
+                    LaTeX-theorem-theoremstyle-list))
 
     '("theorembodyfont"
       (LaTeX-arg-theorem-fontdecl "Body font"))
@@ -165,13 +165,13 @@ make them available as new environments."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("theoremstyle"          "{")
-                               ("theorembodyfont"       "{")
-                               ("theoremheaderfont"     "{")
-                               ("theorempreskipamount"  "{")
-                               ("theorempostskipamount" "{"))
-                             'function)))
+                                ("theorembodyfont"       "{")
+                                ("theoremheaderfont"     "{")
+                                ("theorempreskipamount"  "{")
+                                ("theorempostskipamount" "{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-theorem-package-options nil
diff --git a/style/thm-restate.el b/style/thm-restate.el
index 8592556..15d33a9 100644
--- a/style/thm-restate.el
+++ b/style/thm-restate.el
@@ -38,7 +38,7 @@
 
 ;; Silence the parser:
 (declare-function LaTeX-thmtools-declaretheorem-list
-                 "thmtools" ())
+                  "thmtools" ())
 
 ;; Setup for macro names defined with
 ;; \begin{restatable}[<Heading>]{<env-name>}{<macro name>}:
@@ -47,12 +47,12 @@
 
 (defvar LaTeX-thmrestate-restatable-marco-regexp
   `(,(concat "\\\\begin{restatable}"
-            "[ \t\n\r%]*"
-            "\\(?:\\[[^]]*\\]\\)?"
-            "[ \t\n\r%]*"
-            "\\(?:{[^}]+}\\)"
-            "[ \t\n\r%]*"
-            "{\\([^}]+\\)}")
+             "[ \t\n\r%]*"
+             "\\(?:\\[[^]]*\\]\\)?"
+             "[ \t\n\r%]*"
+             "\\(?:{[^}]+}\\)"
+             "[ \t\n\r%]*"
+             "{\\([^}]+\\)}")
     1 LaTeX-auto-thmrestate-restatable-macro))
 
 (defun LaTeX-thmrestate-auto-prepare ()
@@ -63,7 +63,7 @@
   "Process parsed elements from thm-restate package."
   (dolist (newmac (mapcar #'car (LaTeX-thmrestate-restatable-macro-list)))
     (TeX-add-symbols `(,newmac 0)
-                    `(,(concat newmac "*") 0))))
+                     `(,(concat newmac "*") 0))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-thmrestate-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-thmrestate-auto-cleanup t)
@@ -73,7 +73,7 @@
   "Insert arguments for restatable environment from thm-restate package."
   ;; The optional heading argument:
   (let ((TeX-arg-opening-brace LaTeX-optop)
-       (TeX-arg-closing-brace LaTeX-optcl))
+        (TeX-arg-closing-brace LaTeX-optcl))
     (TeX-argument-insert
      (TeX-read-string
       (TeX-argument-prompt t nil "Heading"))
@@ -86,19 +86,19 @@
     (append
      ;; Cater for environments defined with amsthm's \newtheorem
      (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
-               (LaTeX-amsthm-newtheorem-list))
+                (LaTeX-amsthm-newtheorem-list))
        (LaTeX-amsthm-newtheorem-list))
      ;; Cater for environments defined with ntheorem's \newtheorem
      (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
-               (LaTeX-ntheorem-newtheorem-list))
+                (LaTeX-ntheorem-newtheorem-list))
        (LaTeX-ntheorem-newtheorem-list))
      ;; Environments defined with \declaretheorem
      (LaTeX-thmtools-declaretheorem-list)))
    optional)
   (let ((mac (TeX-read-string
-             (TeX-argument-prompt optional nil "Macro"))))
+              (TeX-argument-prompt optional nil "Macro"))))
     (TeX-add-symbols `(,mac 0)
-                    `(,(concat mac "*") 0))
+                     `(,(concat mac "*") 0))
     (TeX-argument-insert mac optional)))
 
 (TeX-add-style-hook
diff --git a/style/thmtools.el b/style/thmtools.el
index 9e155d2..a4a33b4 100644
--- a/style/thmtools.el
+++ b/style/thmtools.el
@@ -33,8 +33,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 ;; Needed for auto-parsing:
 (require 'tex)
@@ -45,12 +45,12 @@
 
 (defvar LaTeX-thmtools-declaretheoremstyle-regexp
   `(,(concat "\\\\declaretheoremstyle"
-            "[ \t\n\r%]*"
-            "\\(?:"
-            (LaTeX-extract-key-value-label 'none)
-            "\\)?"
-            "[ \t\n\r%]*"
-            "{\\([^}]+\\)}")
+             "[ \t\n\r%]*"
+             "\\(?:"
+             (LaTeX-extract-key-value-label 'none)
+             "\\)?"
+             "[ \t\n\r%]*"
+             "{\\([^}]+\\)}")
     1 LaTeX-auto-thmtools-declaretheoremstyle)
   "Matches the argument of \\declaretheoremstyle from thmtools package.")
 
@@ -59,19 +59,19 @@
 
 (defvar LaTeX-thmtools-declaretheorem-regexp
   `(,(concat "\\\\declaretheorem"
-            "[ \t\n\r%]*"
-            "\\(?:"
-            (LaTeX-extract-key-value-label 'none)
-            "\\)?"
-            "[ \t\n\r%]*"
-            "{\\([^}]+\\)}")
+             "[ \t\n\r%]*"
+             "\\(?:"
+             (LaTeX-extract-key-value-label 'none)
+             "\\)?"
+             "[ \t\n\r%]*"
+             "{\\([^}]+\\)}")
     1 LaTeX-auto-thmtools-declaretheorem)
   "Matches the argument of \\declaretheorem from thmtools package.")
 
 (defun LaTeX-thmtools-auto-prepare ()
   "Clear `LaTeX-auto-thmtools-*' before parsing."
   (setq LaTeX-auto-thmtools-declaretheoremstyle nil
-       LaTeX-auto-thmtools-declaretheorem      nil))
+        LaTeX-auto-thmtools-declaretheorem      nil))
 
 (defun LaTeX-thmtools-auto-cleanup ()
   "Process parsed elements from thmtools package."
@@ -87,15 +87,15 @@
 If OPTIONAL is non-nil, indicate an optional argument in
 minibuffer.  PROMPT replaces the standard one."
   (let ((lengths (mapcar (lambda (x)
-                          (concat TeX-esc x))
-                        (mapcar #'car (LaTeX-length-list))))
-       (fonts (mapcar (lambda (x)
-                        (concat TeX-esc x))
-                      '("rmfamily" "sffamily" "ttfamily" "mdseries" "bfseries"
-                        "upshape" "itshape" "slshape" "scshape"
-                        "tiny"  "scriptsize" "footnotesize"
-                        "small" "normalsize" "large"
-                        "Large" "LARGE" "huge" "Huge" "normalfont"))))
+                           (concat TeX-esc x))
+                         (mapcar #'car (LaTeX-length-list))))
+        (fonts (mapcar (lambda (x)
+                         (concat TeX-esc x))
+                       '("rmfamily" "sffamily" "ttfamily" "mdseries" "bfseries"
+                         "upshape" "itshape" "slshape" "scshape"
+                         "tiny"  "scriptsize" "footnotesize"
+                         "small" "normalsize" "large"
+                         "Large" "LARGE" "huge" "Huge" "normalfont"))))
     (TeX-read-key-val
      optional
      `(("spaceabove" ,lengths)
@@ -116,12 +116,12 @@ If OPTIONAL is non-nil, also insert the second argument 
in square
 brackets.  PROMPT replaces the standard one for the second
 argument."
   (let ((TeX-arg-opening-brace "[")
-       (TeX-arg-closing-brace "]"))
+        (TeX-arg-closing-brace "]"))
     (TeX-argument-insert
      (LaTeX-thmtools-declaretheoremstyle-key-val t)
      t))
   (let ((style (TeX-read-string
-               (TeX-argument-prompt optional prompt "Style"))))
+                (TeX-argument-prompt optional prompt "Style"))))
     (LaTeX-add-thmtools-declaretheoremstyles style)
     (TeX-argument-insert style optional)))
 
@@ -143,17 +143,17 @@ minibuffer.  PROMPT replaces the standard one."
        ("heading")
        ("numbered" ("yes" "no" "unless unique"))
        ("style"
-       ,(append
-         ;; check for \newtheoremstyle from amsthm.sty:
-         (when (and (fboundp 'LaTeX-amsthm-newtheoremstyle-list)
-                    (LaTeX-amsthm-newtheoremstyle-list))
-           (mapcar #'car (LaTeX-amsthm-newtheoremstyle-list)))
-         ;; check for \newtheoremstyle from ntheorem.sty:
-         (when (and (fboundp 'LaTeX-ntheorem-newtheoremstyle-list)
-                    (LaTeX-ntheorem-newtheoremstyle-list))
-           (mapcar #'car (LaTeX-ntheorem-newtheoremstyle-list)))
-         ;; thmtools version is called \declaretheoremstyle:
-         (mapcar #'car (LaTeX-thmtools-declaretheoremstyle-list))))
+        ,(append
+          ;; check for \newtheoremstyle from amsthm.sty:
+          (when (and (fboundp 'LaTeX-amsthm-newtheoremstyle-list)
+                     (LaTeX-amsthm-newtheoremstyle-list))
+            (mapcar #'car (LaTeX-amsthm-newtheoremstyle-list)))
+          ;; check for \newtheoremstyle from ntheorem.sty:
+          (when (and (fboundp 'LaTeX-ntheorem-newtheoremstyle-list)
+                     (LaTeX-ntheorem-newtheoremstyle-list))
+            (mapcar #'car (LaTeX-ntheorem-newtheoremstyle-list)))
+          ;; thmtools version is called \declaretheoremstyle:
+          (mapcar #'car (LaTeX-thmtools-declaretheoremstyle-list))))
        ("preheadhook")
        ("postheadhook")
        ("prefoothook")
@@ -170,12 +170,12 @@ If OPTIONAL is non-nil, also insert the second argument 
in square
 brackets.  PROMPT replaces the standard one for the second
 argument."
   (let ((TeX-arg-opening-brace "[")
-       (TeX-arg-closing-brace "]"))
+        (TeX-arg-closing-brace "]"))
     (TeX-argument-insert
      (LaTeX-thmtools-declaretheorem-key-val t)
      t))
   (let ((env (TeX-read-string
-             (TeX-argument-prompt optional prompt "Environment"))))
+              (TeX-argument-prompt optional prompt "Environment"))))
     (LaTeX-add-environments `(,env LaTeX-thmtools-env-label))
     (TeX-argument-insert env optional)))
 
@@ -184,19 +184,19 @@ argument."
 If OPTIONAL is non-nil, indicate an optional argument in
 minibuffer.  PROMPT replaces the standard one."
   (let ((lengths (mapcar (lambda (x)
-                          (concat TeX-esc x))
-                        (mapcar #'car (LaTeX-length-list))))
-       (thms (append
-              ;; check for \newtheorem from amsthm.sty:
-              (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
-                         (LaTeX-amsthm-newtheorem-list))
-                (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
-              ;; check for \newtheorem from ntheorem.sty:
-              (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
-                         (LaTeX-ntheorem-newtheorem-list))
-                (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
-              ;; thmtools version is called \declaretheorem:
-              (mapcar #'car (LaTeX-thmtools-declaretheorem-list)))))
+                           (concat TeX-esc x))
+                         (mapcar #'car (LaTeX-length-list))))
+        (thms (append
+               ;; check for \newtheorem from amsthm.sty:
+               (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
+                          (LaTeX-amsthm-newtheorem-list))
+                 (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
+               ;; check for \newtheorem from ntheorem.sty:
+               (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
+                          (LaTeX-ntheorem-newtheorem-list))
+                 (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
+               ;; thmtools version is called \declaretheorem:
+               (mapcar #'car (LaTeX-thmtools-declaretheorem-list)))))
     (TeX-read-key-val
      optional
      `(("numwidth" ,lengths)
@@ -228,30 +228,30 @@ RefTeX users should customize or add ENVIRONMENT to
 
   (add-to-list \\='LaTeX-label-alist \\='(\"theorem\" . \"thm:\"))
   (add-to-list \\='reftex-label-alist
-              \\='(\"theorem\" ?m \"thm:\" \"~\\ref{%s}\"
-                nil (\"Theorem\" \"theorem\") nil))"
+               \\='(\"theorem\" ?m \"thm:\" \"~\\ref{%s}\"
+                 nil (\"Theorem\" \"theorem\") nil))"
   (let* ((choice (read-char
-                 (TeX-argument-prompt nil nil "Heading (h), Key=val (k), Empty 
(RET)")))
-        (opthead (cond ((= choice ?h)
-                        (TeX-read-string
-                         (TeX-argument-prompt t nil "Heading")))
-                       ((= choice ?k)
-                        (TeX-read-key-val
-                         t
-                         `(("name")
-                           ("continues" ,(mapcar #'car (LaTeX-label-list)))
-                           ("restate" ,(mapcar #'car (LaTeX-label-list)))
-                           ;; We don't offer a label key here: It is
-                           ;; marked "experimental" in the manual and
-                           ;; inserting and parsing \label{foo} is
-                           ;; much easier for AUCTeX and RefTeX
-                           ;; ("label")
-                           ("listhack" ("true" "false")))))
-                       (t ""))))
+                  (TeX-argument-prompt nil nil "Heading (h), Key=val (k), 
Empty (RET)")))
+         (opthead (cond ((= choice ?h)
+                         (TeX-read-string
+                          (TeX-argument-prompt t nil "Heading")))
+                        ((= choice ?k)
+                         (TeX-read-key-val
+                          t
+                          `(("name")
+                            ("continues" ,(mapcar #'car (LaTeX-label-list)))
+                            ("restate" ,(mapcar #'car (LaTeX-label-list)))
+                            ;; We don't offer a label key here: It is
+                            ;; marked "experimental" in the manual and
+                            ;; inserting and parsing \label{foo} is
+                            ;; much easier for AUCTeX and RefTeX
+                            ;; ("label")
+                            ("listhack" ("true" "false")))))
+                        (t ""))))
     (LaTeX-insert-environment environment
-                             (when (and opthead
-                                        (not (string= opthead "")))
-                               (format "[%s]" opthead))))
+                              (when (and opthead
+                                         (not (string= opthead "")))
+                                (format "[%s]" opthead))))
   (when (LaTeX-label environment 'environment)
     (LaTeX-newline)
     (indent-according-to-mode)))
@@ -271,30 +271,30 @@ RefTeX users should customize or add ENVIRONMENT to
     '("listoftheorems"  [ LaTeX-arg-thmtools-listoftheorems ])
     '("ignoretheorems"
       (TeX-arg-eval mapconcat #'identity
-                   (TeX-completing-read-multiple
-                    (TeX-argument-prompt nil nil "Environment(s)")
-                    (append
-                     ;; check for \newtheorem from amsthm.sty:
-                     (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
-                                (LaTeX-amsthm-newtheorem-list))
-                       (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
-                     ;; check for \newtheorem from ntheorem.sty:
-                     (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
-                                (LaTeX-ntheorem-newtheorem-list))
-                       (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
-                     ;; thmtools version is called \declaretheorem:
-                     (mapcar #'car (LaTeX-thmtools-declaretheorem-list))))
-                   ","))
+                    (TeX-completing-read-multiple
+                     (TeX-argument-prompt nil nil "Environment(s)")
+                     (append
+                      ;; check for \newtheorem from amsthm.sty:
+                      (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
+                                 (LaTeX-amsthm-newtheorem-list))
+                        (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
+                      ;; check for \newtheorem from ntheorem.sty:
+                      (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
+                                 (LaTeX-ntheorem-newtheorem-list))
+                        (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
+                      ;; thmtools version is called \declaretheorem:
+                      (mapcar #'car (LaTeX-thmtools-declaretheorem-list))))
+                    ","))
     '("listtheoremname" 0))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("declaretheoremstyle"  "[{")
-                               ("declaretheorem"       "[{")
-                               ("listoftheorems"       "[")
-                               ("ignoretheorems"       "{"))
-                             'function)))
+                                ("declaretheorem"       "[{")
+                                ("listoftheorems"       "[")
+                                ("ignoretheorems"       "{"))
+                              'function)))
  TeX-dialect)
 
 ;; The package has only one option `debug'.  We ignore that in order
diff --git a/style/tikz.el b/style/tikz.el
index 25a67b4..a9c7314 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -47,12 +47,12 @@
 
 (defconst TeX-TikZ-relative-point-function-map
   (apply #'append (mapcar
-                  (lambda (point-map)
-                    (let ((key (car point-map))
-                          (value (cadr point-map)))
-                      `((,(concat "+" key) ,value "+")
-                        (,(concat "++" key) ,value "++"))))
-                  TeX-TikZ-point-function-map))
+                   (lambda (point-map)
+                     (let ((key (car point-map))
+                           (value (cadr point-map)))
+                       `((,(concat "+" key) ,value "+")
+                         (,(concat "++" key) ,value "++"))))
+                   TeX-TikZ-point-function-map))
   "`TeX-TikZ-point-function-map' with \"+\" and \"++\" as a
 prefix.")
 
diff --git a/style/titleps.el b/style/titleps.el
index eda601c..33801b4 100644
--- a/style/titleps.el
+++ b/style/titleps.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-titleps-section-command-list
   '("part"
@@ -76,49 +76,49 @@ Removal is based on the return value of function
      (TeX-add-symbols `(,(concat sec "title") 0)))
 
    (TeX-add-symbols
-   ;; 2. Defining Page Styles
+    ;; 2. Defining Page Styles
     '("newpagestyle"
       (TeX-arg-eval
        (lambda ()
-        (let ((ps (TeX-read-string
-                   (TeX-argument-prompt nil nil "Page style"))))
-          (LaTeX-add-pagestyles ps)
-          (format "%s" ps))))
+         (let ((ps (TeX-read-string
+                    (TeX-argument-prompt nil nil "Page style"))))
+           (LaTeX-add-pagestyles ps)
+           (format "%s" ps))))
       (TeX-arg-conditional (y-or-n-p "With optional global style? ")
-                          ( [ t ] nil)
-                        ( t )))
+                           ( [ t ] nil)
+                           ( t )))
 
     '("renewpagestyle" TeX-arg-pagestyle
       (TeX-arg-conditional (y-or-n-p "With optional global style? ")
-                          ( [ t ] nil)
-                        ( t )))
+                           ( [ t ] nil)
+                           ( t )))
 
     '("sethead"
       (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
-                          ( [ 3 ] nil nil nil)
-                        ( 3 )))
+                           ( [ 3 ] nil nil nil)
+                           ( 3 )))
 
     '("setfoot"
       (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
-                          ( [ 3 ] nil nil nil)
-                        ( 3 )))
+                           ( [ 3 ] nil nil nil)
+                           ( 3 )))
 
     '("sethead*" 3)
     '("setfoot*" 3)
 
     '("settitlemarks"
       (TeX-arg-eval mapconcat #'identity
-                   (TeX-completing-read-multiple
-                    (TeX-argument-prompt nil nil "Level names")
-                    (LaTeX-titleps-section-command-list))
-                   ","))
+                    (TeX-completing-read-multiple
+                     (TeX-argument-prompt nil nil "Level names")
+                     (LaTeX-titleps-section-command-list))
+                    ","))
 
     '("settitlemarks"
       (TeX-arg-eval mapconcat #'identity
-                   (TeX-completing-read-multiple
-                    (TeX-argument-prompt nil nil "Level names")
-                    (LaTeX-titleps-section-command-list))
-                   ","))
+                    (TeX-completing-read-multiple
+                     (TeX-argument-prompt nil nil "Level names")
+                     (LaTeX-titleps-section-command-list))
+                    ","))
 
     '("headrule" 0)
     '("setheadrule" "Thickness")
@@ -136,25 +136,25 @@ Removal is based on the return value of function
     ;; 4. Headline/footline width
     '("widenhead"
       (TeX-arg-conditional (y-or-n-p "With optional even pages? ")
-                          ( [ 2 ] nil nil)
-                        ( 2 )))
+                           ( [ 2 ] nil nil)
+                           ( 2 )))
 
     '("widenhead*" 2)
 
     '("TitlepsPatchSection"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Sectioning command")
-                   (LaTeX-titleps-section-command-list)))
+                    (TeX-argument-prompt nil nil "Sectioning command")
+                    (LaTeX-titleps-section-command-list)))
 
     '("TitlepsPatchSection*"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Sectioning command")
-                   (LaTeX-titleps-section-command-list)))
+                    (TeX-argument-prompt nil nil "Sectioning command")
+                    (LaTeX-titleps-section-command-list)))
 
     ;; 5. Marks
     '("bottitlemarks"     0)
     '("toptitlemarks"     0)
-    '("firsttitlemarks"          0)
+    '("firsttitlemarks"   0)
     '("nexttoptitlemarks" 0)
     '("outertitlemarks"   0)
     '("innertitlemarks"   0)
@@ -164,14 +164,14 @@ Removal is based on the return value of function
 
     '("pretitlemark"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Sectioning command")
-                   (LaTeX-titleps-section-command-list))
+                    (TeX-argument-prompt nil nil "Sectioning command")
+                    (LaTeX-titleps-section-command-list))
       "Text")
 
     '("pretitlemark*"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Sectioning command")
-                   (LaTeX-titleps-section-command-list))
+                    (TeX-argument-prompt nil nil "Sectioning command")
+                    (LaTeX-titleps-section-command-list))
       "Text")
 
     '("ifsamemark"
@@ -182,26 +182,26 @@ Removal is based on the return value of function
     ;; 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 ] )))
+                           ( [ 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 ] )))
+                           ( [ 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 ] )))
+                           ( [ 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 ] )))
+                           ( [ 3 ] nil nil nil nil [ nil ] )
+                           ( 4 [ nil ] )))
 
     '("nextfloathead*" 4 [ nil ] )
     '("nextfloatfoot*" 4 [ nil ] )
@@ -211,17 +211,17 @@ Removal is based on the return value of function
     )
 
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("newpagestyle"         "{[{")
-                               ("renewpagestyle"       "{[{")
-                               ("settitlemarks"        "*{")
-                               ("widenhead"            "*[[{{")
-                               ("TitlepsPatchSection"  "*{")
-                               ("newtitlemark"         "*{")
-                               ("pretitlemark"         "*{{")
-                               ("nextfloathead"        "*[[[{{{{[")
-                               ("nextfloatfoot"        "*[[[{{{{["))
-                             'function)))
+                                ("renewpagestyle"       "{[{")
+                                ("settitlemarks"        "*{")
+                                ("widenhead"            "*[[{{")
+                                ("TitlepsPatchSection"  "*{")
+                                ("newtitlemark"         "*{")
+                                ("pretitlemark"         "*{{")
+                                ("nextfloathead"        "*[[[{{{{[")
+                                ("nextfloatfoot"        "*[[[{{{{["))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-titleps-package-options
diff --git a/style/titlesec.el b/style/titlesec.el
index bdec21c..1262186 100644
--- a/style/titlesec.el
+++ b/style/titlesec.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-titlesec-key-val-options
   '(("page" ("even" "odd"))
@@ -74,9 +74,9 @@ 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))))
+          (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\".
@@ -87,21 +87,21 @@ append a \"name\" key with corresponding values to
 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-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
@@ -124,11 +124,11 @@ insert the argument in brackets."
     '("titleformat"
       (LaTeX-arg-titlesec-titlespec)
       [TeX-arg-eval completing-read
-                   (TeX-argument-prompt t nil "Shape")
-                   LaTeX-titlesec-section-shape-list]
+                    (TeX-argument-prompt t nil "Shape")
+                    LaTeX-titlesec-section-shape-list]
       (TeX-arg-conditional (y-or-n-p "With optional after-code? ")
-                          (4 [nil])
-                          (4)))
+                           (4 [nil])
+                           (4)))
 
     '("chaptertitlename" 0)
 
@@ -151,7 +151,7 @@ insert the argument in brackets."
     ;; 3.3. Spacing related tools
     '("filright"  0)
     '("filcenter" 0)
-    '("filleft"          0)
+    '("filleft"   0)
     '("fillast"   0)
     '("filinner"  0)
     '("filouter"  0)
@@ -161,8 +161,8 @@ insert the argument in brackets."
     ;; 3.4. Rules
     '("titleline"
       [TeX-arg-eval completing-read
-                   (TeX-argument-prompt t nil "Alignment")
-                   '("l" "r" "c")]
+                    (TeX-argument-prompt t nil "Alignment")
+                    '("l" "r" "c")]
       t)
 
     '("titlerule" [TeX-arg-length "Rule height"])
@@ -174,57 +174,57 @@ insert the argument in brackets."
     ;; 3.5. Page styles
     '("assignpagestyle"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Sectioning command")
-                   (LaTeX-titlesec-section-command-list))
+                    (TeX-argument-prompt nil 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 nil nil "Sectioning command")
-                   (LaTeX-titlesec-section-command-list))
+                    (TeX-argument-prompt nil nil "Sectioning command")
+                    (LaTeX-titlesec-section-command-list))
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Class")
-                   '("page" "top" "straight"))
+                    (TeX-argument-prompt nil nil "Class")
+                    '("page" "top" "straight"))
       [TeX-arg-eval completing-read
-                   (TeX-argument-prompt t nil "Super level command")
-                   (LaTeX-titlesec-section-command-list)]) )
+                    (TeX-argument-prompt t 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 nil nil "Alignment")
-                     '("l" "r" "c"))
-       t)))
+        (TeX-arg-eval completing-read
+                      (TeX-argument-prompt nil nil "Alignment")
+                      '("l" "r" "c"))
+        t)))
 
    ;; The length of the longest line is returned in \titlewidth
    (LaTeX-add-lengths "titlewidth"
-                     "titlewidthlast"
-                     "titlewidthfirst")
+                      "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))
+              (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)))
+                                ;;
+                                ;; \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)))
  TeX-dialect)
 
 (defvar LaTeX-titlesec-package-options
diff --git a/style/titletoc.el b/style/titletoc.el
index 005875c..c0ac512 100644
--- a/style/titletoc.el
+++ b/style/titletoc.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-titletoc-section-command-list
   '("part"
@@ -99,8 +99,8 @@ Removal is based on the return value of function
     ;;                {<label width>}{<leader width>}
     '("dottedcontents"
       (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titletoc-section-command-list))
+                    (TeX-argument-prompt nil nil "Sectioning command")
+                    (LaTeX-titletoc-section-command-list))
       [ TeX-arg-length "Left margin" ] 3)
 
     ;; \titlecontents{<section>}[<left>]{<above-code>}
@@ -108,24 +108,24 @@ Removal is based on the return value of function
     ;;               {<filler-page-format>}[<below-code>]
     '("titlecontents"
       (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titletoc-section-command-list))
+                    (TeX-argument-prompt nil 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)))
+                           (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 nil nil "Sectioning command")
-                    (LaTeX-titletoc-section-command-list))
+                    (TeX-argument-prompt nil 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)))
+                           (4 [nil])
+                           (4)))
 
     ;; \contentsmargin[<correction>]{<right>}
     '("contentsmargin" [ "Correction" ] "Right margin")
@@ -148,17 +148,17 @@ Removal is based on the return value of function
     '("contentsuse"
       (TeX-arg-eval
        (lambda ()
-        (let ((name (if (and (member "newfloat" (TeX-active-styles))
-                             (LaTeX-newfloat-DeclareFloatingEnvironment-list))
-                        (completing-read
-                         (TeX-argument-prompt nil nil "Name of contents")
-                         (mapcar #'car
-                                 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
-                      (TeX-read-string
-                       (TeX-argument-prompt nil nil "Name of contents")))))
-          (make-local-variable 'LaTeX-titletoc-section-command-list)
-          (add-to-list 'LaTeX-titletoc-section-command-list name)
-          (format "%s" name))))
+         (let ((name (if (and (member "newfloat" (TeX-active-styles))
+                              (LaTeX-newfloat-DeclareFloatingEnvironment-list))
+                         (completing-read
+                          (TeX-argument-prompt nil nil "Name of contents")
+                          (mapcar #'car
+                                  
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+                       (TeX-read-string
+                        (TeX-argument-prompt nil 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
@@ -183,12 +183,12 @@ Removal is based on the return value of function
    ;; 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))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("dottedcontents"  "{[{{{")
-                               ("titlecontents"   "*{[{{{[[[")
-                               ("contentsmargin"  "[{")
-                               ("contentsuse"     "{{"))
-                             'function)) )
+                                ("titlecontents"   "*{[{{{[[[")
+                                ("contentsmargin"  "[{")
+                                ("contentsuse"     "{{"))
+                              'function)) )
  TeX-dialect)
 
 (defvar LaTeX-titletoc-package-options
diff --git a/style/transparent.el b/style/transparent.el
index c25b0b2..4cdd5ca 100644
--- a/style/transparent.el
+++ b/style/transparent.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "transparent"
@@ -47,11 +47,11 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("transparent"     "{"))
-                             'type-declaration)
+                              'type-declaration)
      (font-latex-add-keywords '(("texttransparent" "{{"))
-                             'type-command)))
+                              'type-command)))
  TeX-dialect)
 
 (defvar LaTeX-transparent-package-options nil
diff --git a/style/ulem.el b/style/ulem.el
index d9e5e41..e9a7d3e 100644
--- a/style/ulem.el
+++ b/style/ulem.el
@@ -32,8 +32,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "ulem"
@@ -59,53 +59,53 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      ;; Tell font-lock about the update.
      (font-latex-add-keywords '(("useunder" "{{{")) 'function)
      (font-latex-add-keywords '(("uline" "{")
-                               ("uwave" "{")
-                               ("sout" "{")
-                               ("xout" "{")) 'textual)))
+                                ("uwave" "{")
+                                ("sout" "{")
+                                ("xout" "{")) 'textual)))
  TeX-dialect)
 
 (defvar LaTeX-arg-fontdecl
   (mapcar (lambda (str) (concat "\\" str))
-         '("itshape" "bfseries" "scshape"
-           "ttfamily" "upshape" "mdseries"
-           "rmfamily" "sffamily" "slshape"))
+          '("itshape" "bfseries" "scshape"
+            "ttfamily" "upshape" "mdseries"
+            "rmfamily" "sffamily" "slshape"))
   "List of font declaration commands in LaTeX")
 
 (defvar LaTeX-arg-fontcmd
   (mapcar (lambda (str) (concat "\\" str))
-         '("textit" "textbf" "textsc"
-           "texttt" "textup" "textmd"
-           "textrm" "textsf" "textsl"))
+          '("textit" "textbf" "textsc"
+            "texttt" "textup" "textmd"
+            "textrm" "textsf" "textsl"))
   "List of font commands in LaTeX")
 
 (defun TeX-arg-ulem-fontdecl (optional &optional prompt)
   "Prompt for the font-declaration un \\useunder"
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt
-                    optional prompt "Font declaration")
-                   LaTeX-arg-fontdecl nil t) optional))
+                     optional prompt "Font declaration")
+                    LaTeX-arg-fontdecl nil t) optional))
 
 (defun TeX-arg-ulem-fontcmd (optional &optional prompt)
   "Prompt for the font-declaration un \\useunder"
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt
-                    optional prompt "Font command")
-                   LaTeX-arg-fontcmd nil t) optional))
+                     optional prompt "Font command")
+                    LaTeX-arg-fontcmd nil t) optional))
 
 ;; adapted from url.el:TeX-arg-urlstyle
 (defun TeX-arg-ulem-useunder (optional &optional prompt)
   "Prompt for underline command used in \\useunder"
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "Underline command")
-                   (mapcar 'list
-                           (mapcar (lambda (str) (concat "\\" str))
-                                   '("uline" "uuline"
-                                     "uwave" "sout" "xout")))
-                   nil t) optional))
+                    (mapcar 'list
+                            (mapcar (lambda (str) (concat "\\" str))
+                                    '("uline" "uuline"
+                                      "uwave" "sout" "xout")))
+                    nil t) optional))
 
 (defvar LaTeX-ulem-package-options
   '("UWforbf" "ULforem" "normalbf" "normalem")
diff --git a/style/unicode-math.el b/style/unicode-math.el
index b87363d..11217a3 100644
--- a/style/unicode-math.el
+++ b/style/unicode-math.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-unicode-math-package-options-list
   '(("math-style" ("ISO" "TeX" "french" "upright" "literal"))
@@ -50,18 +50,18 @@
 
 (defvar LaTeX-unicode-math-setmathfont-options
   (append LaTeX-unicode-math-package-options-list
-         '(("range")
-           ("script-font")
-           ("script-features")
-           ("sscript-font")
-           ("sscript-features")))
+          '(("range")
+            ("script-font")
+            ("script-features")
+            ("sscript-font")
+            ("sscript-features")))
   "Options for the setmathfont macro of the unicode-math package.")
 
 (TeX-add-style-hook
  "unicode-math"
  (lambda ()
    (TeX-run-style-hooks "ifxetex" "ifluatex" "expl3" "xparse" "l3keys2e"
-                       "fontspec" "catchfile" "fix-cm" "filehook")
+                        "fontspec" "catchfile" "fix-cm" "filehook")
    (TeX-add-symbols
     '("setmathfont" [TeX-arg-key-val LaTeX-unicode-math-setmathfont-options]
       "Math font name")
@@ -69,10 +69,10 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("setmathfont" "[{")
-                               ("unimathsetup" "{"))
-                             'function)))
+                                ("unimathsetup" "{"))
+                              'function)))
  TeX-dialect)
 
 (defun LaTeX-unicode-math-package-options ()
diff --git a/style/units.el b/style/units.el
index b20132a..c7b4a7d 100644
--- a/style/units.el
+++ b/style/units.el
@@ -33,8 +33,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "units"
@@ -47,7 +47,7 @@
    (TeX-run-style-hooks "nicefrac")
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("unit" "[{") ("unitfrac" "[{{")) 'textual)))
  TeX-dialect)
 
diff --git a/style/url.el b/style/url.el
index 418b772..98f691b 100644
--- a/style/url.el
+++ b/style/url.el
@@ -35,11 +35,11 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 (TeX-add-style-hook
  "url"
@@ -61,8 +61,8 @@
     ;; "hyperref" redefines \url so that the argument is only in
     ;; braces.  We check here if hyperref is loaded:
     '("url" (TeX-arg-conditional (member "hyperref" (TeX-style-list))
-                                ("Url")
-                                ((TeX-arg-verb-delim-or-brace "Url"))))
+                                 ("Url")
+                                 ((TeX-arg-verb-delim-or-brace "Url"))))
     "urldef"
     '("urlstyle" TeX-arg-urlstyle))
 
@@ -77,22 +77,22 @@
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("path" "") ("url" "")) 'reference)
      (font-latex-add-keywords '(("Url" "")
-                               ("UrlBigBreakPenalty" "")
-                               ("UrlBigBreaks" "")
-                               ("UrlBreakPenalty" "")
-                               ("UrlBreaks" "")
-                               ("UrlFont" "")
-                               ("UrlLeft" "")
-                               ("UrlNoBreaks" "")
-                               ("UrlOrds" "")
-                               ("UrlRight" "")
-                               ("UrlSpecials" "")
-                               ("urldef" "")
-                               ("urlstyle" "{"))
-                             'variable)
+                                ("UrlBigBreakPenalty" "")
+                                ("UrlBigBreaks" "")
+                                ("UrlBreakPenalty" "")
+                                ("UrlBreaks" "")
+                                ("UrlFont" "")
+                                ("UrlLeft" "")
+                                ("UrlNoBreaks" "")
+                                ("UrlOrds" "")
+                                ("UrlRight" "")
+                                ("UrlSpecials" "")
+                                ("urldef" "")
+                                ("urlstyle" "{"))
+                              'variable)
      ;; Tell font-lock about the update.
      (font-latex-set-syntactic-keywords)))
  TeX-dialect)
@@ -101,12 +101,12 @@
   "Prompt for style used in \\urlstyle with completion."
   (TeX-argument-insert
    (completing-read (TeX-argument-prompt optional prompt "Style")
-                   (mapcar 'list '("rm" "same" "sf" "tt"))
-                   nil t)
+                    (mapcar 'list '("rm" "same" "sf" "tt"))
+                    nil t)
    optional))
 
 (defvar LaTeX-url-package-options '("hyphens" "obeyspaces" "spaces" "LY1"
-                                   "T1" "allowmove")
+                                    "T1" "allowmove")
   "Package options for the url package.")
 
 ;;; url.el ends here
diff --git a/style/varioref.el b/style/varioref.el
index 5ab7adb..32134c1 100644
--- a/style/varioref.el
+++ b/style/varioref.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "varioref"
@@ -72,31 +72,31 @@
    ;; FIXME: The first 3 entries can be reduced to
    ;; ("\\\\[Vv]ref\\*?{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")  ???
    (setq TeX-complete-list
-        (append
-         '(("\\\\[Vv]ref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
-           ("\\\\vref\\*?{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
-           ("\\\\vref\\*{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
-           ("\\\\fullref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
-           ("\\\\vpageref\\*?\\(\\[[^]]*\\]\\)*{\\([^{}\n\r\\%,]*\\)"
-            2 LaTeX-label-list "}"))
-         TeX-complete-list))
+         (append
+          '(("\\\\[Vv]ref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
+            ("\\\\vref\\*?{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
+            ("\\\\vref\\*{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
+            ("\\\\fullref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
+            ("\\\\vpageref\\*?\\(\\[[^]]*\\]\\)*{\\([^{}\n\r\\%,]*\\)"
+             2 LaTeX-label-list "}"))
+          TeX-complete-list))
 
    ;; Fontification
    (when (and (fboundp 'font-latex-add-keywords)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (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
-                               ("vpageref"      "*[[{")
-                               ("vrefrange"     "*[{{")
-                               ("vpagerefrange" "*[{{")
-                               ("Vref"          "*{")
-                               ("fullref"       "{"))
-                             'reference))
+                                ;; so don't add it here again
+                                ("vpageref"      "*[[{")
+                                ("vrefrange"     "*[{{")
+                                ("vpagerefrange" "*[{{")
+                                ("Vref"          "*{")
+                                ("fullref"       "{"))
+                              'reference))
 
    ;; Activate RefTeX reference style.
    (and LaTeX-reftex-ref-style-auto-activate
-       (fboundp 'reftex-ref-style-activate)
-       (reftex-ref-style-activate "Varioref")))
+        (fboundp 'reftex-ref-style-activate)
+        (reftex-ref-style-activate "Varioref")))
  TeX-dialect)
 
 (defvar LaTeX-varioref-package-options
diff --git a/style/verbatim.el b/style/verbatim.el
index cd6a0b8..9062254 100644
--- a/style/verbatim.el
+++ b/style/verbatim.el
@@ -34,7 +34,7 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-set-syntactic-keywords
-                 "font-latex")
+                  "font-latex")
 
 (TeX-add-style-hook
  "verbatim"
@@ -47,14 +47,14 @@
    ;; Fontification:
    ;; Code taken from `comment.el'
    (when (and (boundp 'font-latex-syntactic-keywords-extra)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      ;; For syntactic fontification.
      (add-to-list 'font-latex-syntactic-keywords-extra
-                 '("^[ \t]*\\\\begin *{comment}.*\\(\n\\)"
-                   (1 "!" t)))
+                  '("^[ \t]*\\\\begin *{comment}.*\\(\n\\)"
+                    (1 "!" t)))
      (add-to-list 'font-latex-syntactic-keywords-extra
-                 '("^[ \t]*\\(\\\\\\)end *{comment}"
-                   (1 "!" t)))
+                  '("^[ \t]*\\(\\\\\\)end *{comment}"
+                    (1 "!" t)))
      ;; Tell font-lock about the update.
      (font-latex-set-syntactic-keywords)))
  TeX-dialect)
diff --git a/style/virtex.el b/style/virtex.el
index c4571ad..725cafe 100644
--- a/style/virtex.el
+++ b/style/virtex.el
@@ -10,77 +10,77 @@
  "virtex"
  (lambda ()
    (TeX-add-symbols "/" "above" "abovedisplayshortskip"
-                   "abovedisplayskip" "abovewithdelims" "accent"
-                   "adjdemerits" "advance" "afterassignment"
-                   "aftergroup" "atop" "atopwithdelims" "badness"
-                   "baselineskip" "batchmode" "begingroup"
-                   "belowdisplayshortskip" "belowdisplayskip"
-                   "binoppenalty" "botmark" "box" "boxmaxdepth"
-                   "brokenpenalty" "catcode" "char" "chardef"
-                   "cleaders" "closein" "closeout" "clubpenalty"
-                   "copy" "count" "countdef" "cr" "crcr" "csname"
-                   "day" "deadcycles" "def" "defaulthyphenchar"
-                   "defaultskewchar" "delcode" "delimiter"
-                   "delimiterfactor" "delimitershortfall" "dimen"
-                   "dimendef" "discretionary" "displayindent"
-                   "displaylimits" "displaystyle"
-                   "displaywidowpenalty" "displaywidth" "divide"
-                   "doublehyphendemerits" "dp" "dump" "edef" "else"
-                   "emergencystretch" "end" "endcsname" "endgroup"
-                   "endinput" "endlinechar" "eqno" "errhelp"
-                   "errmessage" "errorcontextlines" "errorstopmode"
-                   "escapechar" "everycr" "everydisplay"
-                   "everyhbox" "everyjob" "everymath" "everypar"
-                   "everyvbox" "exhyphenpenalty" "expandafter"
-                   "fam" "fi" "finalhyphendemerits" "firstmark"
-                   "floatingpenalty" "font" "fontdimen" "fontname"
-                   "futurelet" "gdef" "global" "globaldefs"
-                   "halign" "hangafter" "hangindent" "hbadness"
-                   "hbox" "hfil" "hfill" "hfilneg" "hfuzz"
-                   "hoffset" "holdinginserts" "hrule" "hsize"
-                   "hskip" "hss" "ht" "hyphenpenation" "hyphenchar"
-                   "hyphenpenalty" "if" "ifcase" "ifcat" "ifdim"
-                   "ifeof" "iffalse" "ifhbox" "ifinner" "ifhmode"
-                   "ifmmode" "ifnum" "ifodd" "iftrue" "ifvbox"
-                   "ifvoid" "ifx" "ignorespaces" "immediate"
-                   "indent" "input" "inputlineno" "insert"
-                   "insertpenalties" "interlinepenalty" "jobname"
-                   "kern" "language" "lastbox" "lastkern"
-                   "lastpenalty" "lastskip" "lccode" "leaders"
-                   "left" "lefthyphenmin" "leftskip" "leqno" "let"
-                   "limits" "linepenalty" "lineskip"
-                   "lineskiplimit" "long" "looseness" "lower"
-                   "lowercase" "mag" "markaccent" "mathbin"
-                   "mathchar" "mathchardef" "mathchoise"
-                   "mathclose" "mathcode" "mathinner" "mathhop"
-                   "mathopen" "mathord" "mathpunct" "mathrel"
-                   "mathsurround" "maxdeadcycles" "maxdepth"
-                   "meaning" "medmuskip" "message" "mkern" "month"
-                   "moveleft" "moveright" "mskip" "multiply"
-                   "muskip" "muskipdef" "newlinechar" "noalign"
-                   "noboundary" "noexpand" "noindent" "nolimits"
-                   "nonscript" "nonstopmode" "nulldelimiterspace"
-                   "nullfont" "number" "omit" "openin" "openout"
-                   "or" "outer" "output" "outputpenalty"
-                   "overfullrule" "parfillskip" "parindent"
-                   "parskip" "pausing" "postdisplaypenalty"
-                   "predisplaypenalty" "predisplaysize"
-                   "pretolerance" "relpenalty" "rightskip"
-                   "scriptspace" "showboxbreadth" "showboxdepth"
-                   "smallskipamount" "spaceskip" "splitmaxdepth"
-                   "splittopskip" "tabskip" "thickmuskip"
-                   "thinmuskip" "time" "tolerance" "topskip"
-                   "tracingcommands" "tracinglostchars"
-                   "tracingmacros" "tracingonline" "tracingoutput"
-                   "tracingpages" "tracingparagraphs"
-                   "tracingrestores" "tracingstats" "uccode"
-                   "uchyph" "underline" "unhbox" "unhcopy" "unkern"
-                   "unpenalty" "unskip" "unvbox" "unvcopy"
-                   "uppercase" "vadjust" "valign" "vbadness" "vbox"
-                   "vcenter" "vfil" "vfill" "vfilneg" "vfuzz"
-                   "voffset" "vrule" "vsize" "vskip" "vss" "vtop"
-                   "wd" "widowpenalty" "write" "xdef" "xleaders"
-                   "xspaceskip" "year"))
+                    "abovedisplayskip" "abovewithdelims" "accent"
+                    "adjdemerits" "advance" "afterassignment"
+                    "aftergroup" "atop" "atopwithdelims" "badness"
+                    "baselineskip" "batchmode" "begingroup"
+                    "belowdisplayshortskip" "belowdisplayskip"
+                    "binoppenalty" "botmark" "box" "boxmaxdepth"
+                    "brokenpenalty" "catcode" "char" "chardef"
+                    "cleaders" "closein" "closeout" "clubpenalty"
+                    "copy" "count" "countdef" "cr" "crcr" "csname"
+                    "day" "deadcycles" "def" "defaulthyphenchar"
+                    "defaultskewchar" "delcode" "delimiter"
+                    "delimiterfactor" "delimitershortfall" "dimen"
+                    "dimendef" "discretionary" "displayindent"
+                    "displaylimits" "displaystyle"
+                    "displaywidowpenalty" "displaywidth" "divide"
+                    "doublehyphendemerits" "dp" "dump" "edef" "else"
+                    "emergencystretch" "end" "endcsname" "endgroup"
+                    "endinput" "endlinechar" "eqno" "errhelp"
+                    "errmessage" "errorcontextlines" "errorstopmode"
+                    "escapechar" "everycr" "everydisplay"
+                    "everyhbox" "everyjob" "everymath" "everypar"
+                    "everyvbox" "exhyphenpenalty" "expandafter"
+                    "fam" "fi" "finalhyphendemerits" "firstmark"
+                    "floatingpenalty" "font" "fontdimen" "fontname"
+                    "futurelet" "gdef" "global" "globaldefs"
+                    "halign" "hangafter" "hangindent" "hbadness"
+                    "hbox" "hfil" "hfill" "hfilneg" "hfuzz"
+                    "hoffset" "holdinginserts" "hrule" "hsize"
+                    "hskip" "hss" "ht" "hyphenpenation" "hyphenchar"
+                    "hyphenpenalty" "if" "ifcase" "ifcat" "ifdim"
+                    "ifeof" "iffalse" "ifhbox" "ifinner" "ifhmode"
+                    "ifmmode" "ifnum" "ifodd" "iftrue" "ifvbox"
+                    "ifvoid" "ifx" "ignorespaces" "immediate"
+                    "indent" "input" "inputlineno" "insert"
+                    "insertpenalties" "interlinepenalty" "jobname"
+                    "kern" "language" "lastbox" "lastkern"
+                    "lastpenalty" "lastskip" "lccode" "leaders"
+                    "left" "lefthyphenmin" "leftskip" "leqno" "let"
+                    "limits" "linepenalty" "lineskip"
+                    "lineskiplimit" "long" "looseness" "lower"
+                    "lowercase" "mag" "markaccent" "mathbin"
+                    "mathchar" "mathchardef" "mathchoise"
+                    "mathclose" "mathcode" "mathinner" "mathhop"
+                    "mathopen" "mathord" "mathpunct" "mathrel"
+                    "mathsurround" "maxdeadcycles" "maxdepth"
+                    "meaning" "medmuskip" "message" "mkern" "month"
+                    "moveleft" "moveright" "mskip" "multiply"
+                    "muskip" "muskipdef" "newlinechar" "noalign"
+                    "noboundary" "noexpand" "noindent" "nolimits"
+                    "nonscript" "nonstopmode" "nulldelimiterspace"
+                    "nullfont" "number" "omit" "openin" "openout"
+                    "or" "outer" "output" "outputpenalty"
+                    "overfullrule" "parfillskip" "parindent"
+                    "parskip" "pausing" "postdisplaypenalty"
+                    "predisplaypenalty" "predisplaysize"
+                    "pretolerance" "relpenalty" "rightskip"
+                    "scriptspace" "showboxbreadth" "showboxdepth"
+                    "smallskipamount" "spaceskip" "splitmaxdepth"
+                    "splittopskip" "tabskip" "thickmuskip"
+                    "thinmuskip" "time" "tolerance" "topskip"
+                    "tracingcommands" "tracinglostchars"
+                    "tracingmacros" "tracingonline" "tracingoutput"
+                    "tracingpages" "tracingparagraphs"
+                    "tracingrestores" "tracingstats" "uccode"
+                    "uchyph" "underline" "unhbox" "unhcopy" "unkern"
+                    "unpenalty" "unskip" "unvbox" "unvcopy"
+                    "uppercase" "vadjust" "valign" "vbadness" "vbox"
+                    "vcenter" "vfil" "vfill" "vfilneg" "vfuzz"
+                    "voffset" "vrule" "vsize" "vskip" "vss" "vtop"
+                    "wd" "widowpenalty" "write" "xdef" "xleaders"
+                    "xspaceskip" "year"))
  TeX-dialect)
 
 ;;; virtex.el ends here
diff --git a/style/vwcol.el b/style/vwcol.el
index 0adb34e..03e813f 100644
--- a/style/vwcol.el
+++ b/style/vwcol.el
@@ -36,8 +36,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-vwcol-key-val-options
   '(("widths")
@@ -68,9 +68,9 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("vwcolsetup" "{"))
-                             'function)))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-vwcol-package-options '("quiet")
diff --git a/style/wrapfig.el b/style/wrapfig.el
index 414ebf6..2de699b 100644
--- a/style/wrapfig.el
+++ b/style/wrapfig.el
@@ -41,44 +41,44 @@
     ;; \begin{wrapfigure}[No.lines]{Placement}[Overhang]{Width} ... 
\end{wrapfigure}
     '("wrapfigure"
       (lambda (env &rest ignore)
-       (LaTeX-insert-environment
-        env
-        (let ((narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
-              (placement (completing-read
-                          "Placement: " '(("r") ("R")
-                                          ("l") ("L")
-                                          ("i") ("I")
-                                          ("o") ("O"))))
-              (overhang  (TeX-read-string "(Optional) Overhang: "))
-              (width     (TeX-read-string "Width: ")))
-          (concat
-           (unless (string= narrow "")
-             (format "[%s]" narrow))
-           (format "{%s}" placement)
-           (unless (string= overhang "")
-             (format "[%s]" overhang))
-           (format "{%s}" width))))))
+        (LaTeX-insert-environment
+         env
+         (let ((narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
+               (placement (completing-read
+                           "Placement: " '(("r") ("R")
+                                           ("l") ("L")
+                                           ("i") ("I")
+                                           ("o") ("O"))))
+               (overhang  (TeX-read-string "(Optional) Overhang: "))
+               (width     (TeX-read-string "Width: ")))
+           (concat
+            (unless (string= narrow "")
+              (format "[%s]" narrow))
+            (format "{%s}" placement)
+            (unless (string= overhang "")
+              (format "[%s]" overhang))
+            (format "{%s}" width))))))
     ;;
     ;; \begin{wraptable}[No.lines]{Placement}[Overhang]{Width} ... 
\end{wraptable}
     '("wraptable"
       (lambda (env &rest ignore)
-       (LaTeX-insert-environment
-        env
-        (let ((narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
-              (placement (completing-read
-                          "Placement: " '(("r") ("R")
-                                          ("l") ("L")
-                                          ("i") ("I")
-                                          ("o") ("O"))))
-              (overhang  (TeX-read-string "(Optional) Overhang: "))
-              (width     (TeX-read-string "Width: ")))
-          (concat
-           (unless (string= narrow "")
-             (format "[%s]" narrow))
-           (format "{%s}" placement)
-           (unless (string= overhang "")
-             (format "[%s]" overhang))
-           (format "{%s}" width))))))
+        (LaTeX-insert-environment
+         env
+         (let ((narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
+               (placement (completing-read
+                           "Placement: " '(("r") ("R")
+                                           ("l") ("L")
+                                           ("i") ("I")
+                                           ("o") ("O"))))
+               (overhang  (TeX-read-string "(Optional) Overhang: "))
+               (width     (TeX-read-string "Width: ")))
+           (concat
+            (unless (string= narrow "")
+              (format "[%s]" narrow))
+            (format "{%s}" placement)
+            (unless (string= overhang "")
+              (format "[%s]" overhang))
+            (format "{%s}" width))))))
     ;;
     ;; \begin{wrapfloat}{<Type>}[No.lines]{Placement}[Overhang]{Width} ... 
\end{wrapfloat}
     ;;
@@ -89,30 +89,30 @@
     ;; completion.  Otherwise, just ask user without completion.
     '("wrapfloat"
       (lambda (env &rest ignore)
-       (LaTeX-insert-environment
-        env
-        (let ((floattype (if (and (fboundp 
'LaTeX-newfloat-DeclareFloatingEnvironment-list)
-                                  
(LaTeX-newfloat-DeclareFloatingEnvironment-list))
-                             (completing-read
-                              "Float type: "
-                              (mapcar 'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
-                           (TeX-read-string "Float type: ")))
-              (narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
-              (placement (completing-read
-                          "Placement: " '(("r") ("R")
-                                          ("l") ("L")
-                                          ("i") ("I")
-                                          ("o") ("O"))))
-              (overhang  (TeX-read-string "(Optional) Overhang: "))
-              (width     (TeX-read-string "Width: ")))
-          (concat
-           (format "{%s}" floattype)
-           (unless (string= narrow "")
-             (format "[%s]" narrow))
-           (format "{%s}" placement)
-           (unless (string= overhang "")
-             (format "[%s]" overhang))
-           (format "{%s}" width))))))))
+        (LaTeX-insert-environment
+         env
+         (let ((floattype (if (and (fboundp 
'LaTeX-newfloat-DeclareFloatingEnvironment-list)
+                                   
(LaTeX-newfloat-DeclareFloatingEnvironment-list))
+                              (completing-read
+                               "Float type: "
+                               (mapcar 'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+                            (TeX-read-string "Float type: ")))
+               (narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
+               (placement (completing-read
+                           "Placement: " '(("r") ("R")
+                                           ("l") ("L")
+                                           ("i") ("I")
+                                           ("o") ("O"))))
+               (overhang  (TeX-read-string "(Optional) Overhang: "))
+               (width     (TeX-read-string "Width: ")))
+           (concat
+            (format "{%s}" floattype)
+            (unless (string= narrow "")
+              (format "[%s]" narrow))
+            (format "{%s}" placement)
+            (unless (string= overhang "")
+              (format "[%s]" overhang))
+            (format "{%s}" width))))))))
  TeX-dialect)
 
 (defvar LaTeX-wrapfig-package-options '("verbose")
diff --git a/style/xcolor.el b/style/xcolor.el
index d8eb9ce..6399516 100644
--- a/style/xcolor.el
+++ b/style/xcolor.el
@@ -49,8 +49,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (defvar LaTeX-xcolor-core-color-models
   '("rgb" "cmy" "cmyk" "hsb" "gray")
@@ -220,8 +220,8 @@
 
 (defvar LaTeX-xcolor-color-models
   (append LaTeX-xcolor-core-color-models
-         LaTeX-xcolor-num-color-models
-         LaTeX-xcolor-pseudo-color-models)
+          LaTeX-xcolor-num-color-models
+          LaTeX-xcolor-pseudo-color-models)
   "Combine three variables `LaTeX-xcolor-core-color-models',
 `LaTeX-xcolor-num-color-models' and `LaTeX-xcolor-pseudo-color-models'.")
 
@@ -243,20 +243,20 @@ remainder."
 (defvar LaTeX-xcolor-definecolor-regexp
   (eval-when-compile
     `(,(concat "\\\\"
-              (regexp-opt '("definecolor"  "providecolor"
-                            "preparecolor" "colorlet"))
-              "\\(?:\\[\\(?:[^]]*\\)\\]\\)?{\\([^}]+\\)}")
+               (regexp-opt '("definecolor"  "providecolor"
+                             "preparecolor" "colorlet"))
+               "\\(?:\\[\\(?:[^]]*\\)\\]\\)?{\\([^}]+\\)}")
       1 LaTeX-auto-xcolor-definecolor))
   "Match the argument of various color defining macros from xcolor package.")
 
 (defvar LaTeX-xcolor-definecolorset-regexp
   `(,(concat "\\\\\\(?:define\\|provide\\|prepare\\)"
-            "colorset"
-            "\\(?:\\[\\(?:[^]]*\\)\\]\\)?"
-            "{\\(?:[^}]+\\)}"
-            "{\\([^}]+\\)}"
-            "{\\([^}]+\\)}"
-            "{\\([^}]+\\)}")
+             "colorset"
+             "\\(?:\\[\\(?:[^]]*\\)\\]\\)?"
+             "{\\(?:[^}]+\\)}"
+             "{\\([^}]+\\)}"
+             "{\\([^}]+\\)}"
+             "{\\([^}]+\\)}")
     (1 2 3) LaTeX-auto-xcolor-definecolorset)
   "Match the argument of various color-set defining macros from
 xcolor package.")
@@ -264,18 +264,18 @@ xcolor package.")
 (defun LaTeX-xcolor-auto-prepare ()
   "Clear `LaTeX-auto-xcolor-definecolor' before parsing."
   (setq LaTeX-auto-xcolor-definecolor nil
-       LaTeX-auto-xcolor-definecolorset nil))
+        LaTeX-auto-xcolor-definecolorset nil))
 
 (defun LaTeX-xcolor-auto-cleanup ()
   "Process the parsed elements from `LaTeX-auto-xcolor-definecolorset'."
   (dolist (colset (LaTeX-xcolor-definecolorset-list))
     (let ((head (car colset))
-         (tail (cadr colset))
-         (cols (split-string
-                (replace-regexp-in-string "[ %\n\r\t]" "" (nth 2 colset))
-                "\\(,[^;]+;\\|,[^;]+$\\)" t)))
+          (tail (cadr colset))
+          (cols (split-string
+                 (replace-regexp-in-string "[ %\n\r\t]" "" (nth 2 colset))
+                 "\\(,[^;]+;\\|,[^;]+$\\)" t)))
       (dolist (color cols)
-       (LaTeX-add-xcolor-definecolors (concat head color tail))))))
+        (LaTeX-add-xcolor-definecolors (concat head color tail))))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-xcolor-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-xcolor-auto-cleanup t)
@@ -285,23 +285,23 @@ xcolor package.")
   "Insert arguments of \\definecolor and similar macros from xcolor.sty."
   ;; \definecolor[<type>]{<name>}{<model-list>}{<spec-list>}
   (let* ((TeX-last-optional-rejected nil)
-        (xcoltype  (LaTeX-check-insert-macro-default-style
-                    (completing-read
-                     (TeX-argument-prompt t nil "Type")
-                     LaTeX-xcolor-type-color-models)))
-        (xcolname  (TeX-read-string
-                    (TeX-argument-prompt optional nil "Color name")))
-        (xcolmodel (completing-read
-                    (TeX-argument-prompt optional nil "Model (list)")
-                    (if (string= xcoltype "named")
-                        (LaTeX-xcolor-color-models t)
-                      LaTeX-xcolor-color-models)))
-        (xcolspec  (if (string= xcolmodel "named")
-                       (completing-read
-                        (TeX-argument-prompt optional nil "Color")
-                        (LaTeX-xcolor-definecolor-list))
-                     (TeX-read-string
-                      (TeX-argument-prompt optional nil (concat xcolmodel " 
spec (list)"))))))
+         (xcoltype  (LaTeX-check-insert-macro-default-style
+                     (completing-read
+                      (TeX-argument-prompt t nil "Type")
+                      LaTeX-xcolor-type-color-models)))
+         (xcolname  (TeX-read-string
+                     (TeX-argument-prompt optional nil "Color name")))
+         (xcolmodel (completing-read
+                     (TeX-argument-prompt optional nil "Model (list)")
+                     (if (string= xcoltype "named")
+                         (LaTeX-xcolor-color-models t)
+                       LaTeX-xcolor-color-models)))
+         (xcolspec  (if (string= xcolmodel "named")
+                        (completing-read
+                         (TeX-argument-prompt optional nil "Color")
+                         (LaTeX-xcolor-definecolor-list))
+                      (TeX-read-string
+                       (TeX-argument-prompt optional nil (concat xcolmodel " 
spec (list)"))))))
     (when (and xcoltype (not (string= xcoltype "")))
       (insert (format "[%s]" xcoltype)))
     (TeX-argument-insert xcolname optional)
@@ -312,13 +312,13 @@ xcolor package.")
 (defun TeX-arg-xcolor-definecolorset (optional)
   "Insert arguments of \\definecolorset and similar macros from xcolor.sty."
   (let* ((TeX-last-optional-rejected nil)
-        (xcoltype (LaTeX-check-insert-macro-default-style
-                   (completing-read
-                    (TeX-argument-prompt t nil "Type")
-                    LaTeX-xcolor-type-color-models)))
-        (xcolmodel (completing-read
-                    (TeX-argument-prompt optional nil "Model")
-                    (LaTeX-xcolor-color-models t))))
+         (xcoltype (LaTeX-check-insert-macro-default-style
+                    (completing-read
+                     (TeX-argument-prompt t nil "Type")
+                     LaTeX-xcolor-type-color-models)))
+         (xcolmodel (completing-read
+                     (TeX-argument-prompt optional nil "Model")
+                     (LaTeX-xcolor-color-models t))))
     (when (and xcoltype (not (string= xcoltype "")))
       (insert (format "[%s]" xcoltype)))
     (TeX-argument-insert xcolmodel optional)))
@@ -327,16 +327,16 @@ xcolor package.")
   "Insert arguments of various color commands from xcolor.sty."
   ;; \color{<name>} or \color[<model-list>]{<spec-list>}
   (let* ((TeX-last-optional-rejected nil)
-        (xcolmodel (LaTeX-check-insert-macro-default-style
-                    (completing-read
-                     (TeX-argument-prompt t nil "Model (list)")
-                     (LaTeX-xcolor-color-models t))))
-        (xcolor (if (and xcolmodel (not (string= xcolmodel "")))
-                    (TeX-read-string
-                     (TeX-argument-prompt optional nil (concat xcolmodel " 
spec (list)")))
-                  (completing-read
-                   (TeX-argument-prompt optional nil "Color")
-                   (LaTeX-xcolor-definecolor-list)))))
+         (xcolmodel (LaTeX-check-insert-macro-default-style
+                     (completing-read
+                      (TeX-argument-prompt t nil "Model (list)")
+                      (LaTeX-xcolor-color-models t))))
+         (xcolor (if (and xcolmodel (not (string= xcolmodel "")))
+                     (TeX-read-string
+                      (TeX-argument-prompt optional nil (concat xcolmodel " 
spec (list)")))
+                   (completing-read
+                    (TeX-argument-prompt optional nil "Color")
+                    (LaTeX-xcolor-definecolor-list)))))
     (when (and xcolmodel (not (string= xcolmodel "")))
       (insert (format "[%s]" xcolmodel)))
     (TeX-argument-insert xcolor optional)))
@@ -345,36 +345,36 @@ xcolor package.")
   "Insert arguments of \\fcolorbox from xcolor.sty."
   ;;\fcolorbox[<frame model>]{<frame spec>}[<background model>]{<background 
spec>}{<text>}
   (let* ((TeX-last-optional-rejected nil)
-        (xfrmodel (LaTeX-check-insert-macro-default-style
-                   (completing-read
-                    (TeX-argument-prompt t nil "(Frame) Color model")
-                    LaTeX-xcolor-color-models)))
-        ;; Set `TeX-last-optional-rejected' acc. to `xfrmodel'
-        (TeX-last-optional-rejected (or (not xfrmodel)
-                                        (and xfrmodel (string= xfrmodel ""))))
-        (xfrspec  (if (or (null xfrmodel)
-                          (string= xfrmodel "")
-                          (string= xfrmodel "named"))
-                      (completing-read
-                       (TeX-argument-prompt optional nil "Frame color spec")
-                       (LaTeX-xcolor-definecolor-list))
-                    (TeX-read-string
-                     (TeX-argument-prompt optional nil "Frame color spec"))))
-        (xbgmodel (LaTeX-check-insert-macro-default-style
-                   (completing-read
-                    (TeX-argument-prompt t nil "Background Color model")
-                    LaTeX-xcolor-color-models)))
-        (xbgspec  (if (or (null xfrmodel)
-                          (string= xfrmodel "")
-                          (string= xfrmodel "named")
-                          (null xbgmodel)
-                          (string= xbgmodel "")
-                          (string= xbgmodel "named"))
-                      (completing-read
-                       (TeX-argument-prompt optional nil "Background color 
spec")
-                       (LaTeX-xcolor-definecolor-list))
-                    (TeX-read-string
-                     (TeX-argument-prompt optional nil "Background color 
spec")))))
+         (xfrmodel (LaTeX-check-insert-macro-default-style
+                    (completing-read
+                     (TeX-argument-prompt t nil "(Frame) Color model")
+                     LaTeX-xcolor-color-models)))
+         ;; Set `TeX-last-optional-rejected' acc. to `xfrmodel'
+         (TeX-last-optional-rejected (or (not xfrmodel)
+                                         (and xfrmodel (string= xfrmodel ""))))
+         (xfrspec  (if (or (null xfrmodel)
+                           (string= xfrmodel "")
+                           (string= xfrmodel "named"))
+                       (completing-read
+                        (TeX-argument-prompt optional nil "Frame color spec")
+                        (LaTeX-xcolor-definecolor-list))
+                     (TeX-read-string
+                      (TeX-argument-prompt optional nil "Frame color spec"))))
+         (xbgmodel (LaTeX-check-insert-macro-default-style
+                    (completing-read
+                     (TeX-argument-prompt t nil "Background Color model")
+                     LaTeX-xcolor-color-models)))
+         (xbgspec  (if (or (null xfrmodel)
+                           (string= xfrmodel "")
+                           (string= xfrmodel "named")
+                           (null xbgmodel)
+                           (string= xbgmodel "")
+                           (string= xbgmodel "named"))
+                       (completing-read
+                        (TeX-argument-prompt optional nil "Background color 
spec")
+                        (LaTeX-xcolor-definecolor-list))
+                     (TeX-read-string
+                      (TeX-argument-prompt optional nil "Background color 
spec")))))
     (when (and xfrmodel (not (string= xfrmodel "")))
       (insert (format "[%s]" xfrmodel)))
     (TeX-argument-insert xfrspec optional)
@@ -394,17 +394,17 @@ xcolor package.")
 
    ;; Add dvips colors in conjunction with `dvipsnames*?'.
    (when (or (LaTeX-provided-package-options-member "xcolor" "dvipsnames")
-            (LaTeX-provided-package-options-member "xcolor" "dvipsnames*"))
+             (LaTeX-provided-package-options-member "xcolor" "dvipsnames*"))
      (apply #'LaTeX-add-xcolor-definecolors LaTeX-xcolor-dvipsnames-colors))
 
    ;; For `svgnames*?'
    (when (or (LaTeX-provided-package-options-member "xcolor" "svgnames")
-            (LaTeX-provided-package-options-member "xcolor" "svgnames*"))
+             (LaTeX-provided-package-options-member "xcolor" "svgnames*"))
      (apply #'LaTeX-add-xcolor-definecolors LaTeX-xcolor-svgnames-colors))
 
    ;; For `x11ames*?'
    (when (or (LaTeX-provided-package-options-member "xcolor" "x11names")
-            (LaTeX-provided-package-options-member "xcolor" "x11names*"))
+             (LaTeX-provided-package-options-member "xcolor" "x11names*"))
      (apply #'LaTeX-add-xcolor-definecolors LaTeX-xcolor-x11names-colors))
 
    (TeX-add-symbols
@@ -418,20 +418,20 @@ xcolor package.")
     ;; \colorlet[<type>]{<name>}[<num model>]{<color>}
     '("colorlet"
       [ TeX-arg-eval completing-read
-       (TeX-argument-prompt t nil "Type")
-       LaTeX-xcolor-type-color-models ]
+        (TeX-argument-prompt t nil "Type")
+        LaTeX-xcolor-type-color-models ]
       (TeX-arg-eval
        (lambda ()
-        (let ((xcolor (TeX-read-string
-                       (TeX-argument-prompt nil nil "Color"))))
-          (LaTeX-add-xcolor-definecolors xcolor)
-          (format "%s" xcolor))))
+         (let ((xcolor (TeX-read-string
+                        (TeX-argument-prompt nil nil "Color"))))
+           (LaTeX-add-xcolor-definecolors xcolor)
+           (format "%s" xcolor))))
       [ TeX-arg-eval completing-read
-       (TeX-argument-prompt t nil "Model")
-       (LaTeX-xcolor-color-models t) ]
+        (TeX-argument-prompt t nil "Model")
+        (LaTeX-xcolor-color-models t) ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color")
-                   (LaTeX-xcolor-definecolor-list)))
+                    (TeX-argument-prompt nil nil "Color")
+                    (LaTeX-xcolor-definecolor-list)))
 
     ;; 2.5.3 Defining sets of colors
     ;; \definecolorset[<type>]{<model-list>}{<head>}{<tail>}{<set spec>}
@@ -488,31 +488,31 @@ xcolor package.")
     ;; 2.7 Color blending
     '("blendcolors"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Mix expr")
-                   (LaTeX-xcolor-definecolor-list)))
+                    (TeX-argument-prompt nil nil "Mix expr")
+                    (LaTeX-xcolor-definecolor-list)))
     '("blendcolors*"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Mix expr")
-                   (LaTeX-xcolor-definecolor-list)))
+                    (TeX-argument-prompt nil nil "Mix expr")
+                    (LaTeX-xcolor-definecolor-list)))
 
     ;; 2.8 Color masks and separation
     '("maskcolors"
       [ TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Model")
-                    (LaTeX-xcolor-color-models t) ]
+        (TeX-argument-prompt t nil "Model")
+        (LaTeX-xcolor-color-models t) ]
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color")
-                   (LaTeX-xcolor-definecolor-list)))
+                    (TeX-argument-prompt nil nil "Color")
+                    (LaTeX-xcolor-definecolor-list)))
 
     ;; 2.9 Color series
     '("definecolorseries"
       "Name"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Core model")
-                   LaTeX-xcolor-core-color-models)
+                    (TeX-argument-prompt nil nil "Core model")
+                    LaTeX-xcolor-core-color-models)
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Method")
-                   '("step" "grad" "last"))
+                    (TeX-argument-prompt nil nil "Method")
+                    '("step" "grad" "last"))
       [ t ] nil [ nil ] nil)
 
     '("resetcolorseries" [ "Div." ] "Name")
@@ -521,15 +521,15 @@ xcolor package.")
     ;; \extractcolorspec{<color>}{<cmd>}
     '("extractcolorspec"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color")
-                   (LaTeX-xcolor-definecolor-list))
+                    (TeX-argument-prompt nil nil "Color")
+                    (LaTeX-xcolor-definecolor-list))
       (TeX-arg-define-macro "Command: \\"))
 
     ;; \extractcolorspecs{<color>}{<model-cmd>}{<color-cmd>}
     '("extractcolorspecs"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Color")
-                   (LaTeX-xcolor-definecolor-list))
+                    (TeX-argument-prompt nil nil "Color")
+                    (LaTeX-xcolor-definecolor-list))
       (TeX-arg-define-macro "Model command: \\")
       (TeX-arg-define-macro "Color command: \\"))
 
@@ -541,13 +541,13 @@ xcolor package.")
     ;; \convertcolorspec{<model>}{<spec>}{<target model>}{cmd>}
     '("convertcolorspec"
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Model")
-                   (LaTeX-xcolor-color-models))
+                    (TeX-argument-prompt nil nil "Model")
+                    (LaTeX-xcolor-color-models))
       (TeX-arg-eval TeX-read-string
-                   (TeX-argument-prompt nil nil "Spec"))
+                    (TeX-argument-prompt nil nil "Spec"))
       (TeX-arg-eval completing-read
-                   (TeX-argument-prompt nil nil "Model")
-                   (LaTeX-xcolor-color-models t))
+                    (TeX-argument-prompt nil nil "Model")
+                    (LaTeX-xcolor-color-models t))
       (TeX-arg-define-macro "Macro: \\")) ) ; close TeX-add-symbols
 
    ;; 2.12 Color in tables
@@ -560,27 +560,27 @@ xcolor package.")
      (TeX-add-symbols
       ;; \rowcolors[<commands>]{<row>}{<odd-row color>}{<even-row color>}
       '("rowcolors"
-       (TeX-arg-conditional (y-or-n-p "With optional commands? ")
-                            ( [ t ] )
-                            (ignore))
-       "Row"
-       (TeX-arg-eval completing-read
-                     (TeX-argument-prompt nil nil "Odd-row color")
-                     (LaTeX-xcolor-definecolor-list))
-       (TeX-arg-eval completing-read
-                     (TeX-argument-prompt nil nil "Even-row color")
-                     (LaTeX-xcolor-definecolor-list)))
+        (TeX-arg-conditional (y-or-n-p "With optional commands? ")
+                             ( [ t ] )
+                             (ignore))
+        "Row"
+        (TeX-arg-eval completing-read
+                      (TeX-argument-prompt nil nil "Odd-row color")
+                      (LaTeX-xcolor-definecolor-list))
+        (TeX-arg-eval completing-read
+                      (TeX-argument-prompt nil nil "Even-row color")
+                      (LaTeX-xcolor-definecolor-list)))
       '("rowcolors*"
-       (TeX-arg-conditional (y-or-n-p "With optional commands? ")
-                            ( [ t ] )
-                            (ignore))
-       "Row"
-       (TeX-arg-eval completing-read
-                     (TeX-argument-prompt nil nil "Odd-row color")
-                     (LaTeX-xcolor-definecolor-list))
-       (TeX-arg-eval completing-read
-                     (TeX-argument-prompt nil nil "Even-row color")
-                     (LaTeX-xcolor-definecolor-list)))
+        (TeX-arg-conditional (y-or-n-p "With optional commands? ")
+                             ( [ t ] )
+                             (ignore))
+        "Row"
+        (TeX-arg-eval completing-read
+                      (TeX-argument-prompt nil nil "Odd-row color")
+                      (LaTeX-xcolor-definecolor-list))
+        (TeX-arg-eval completing-read
+                      (TeX-argument-prompt nil nil "Even-row color")
+                      (LaTeX-xcolor-definecolor-list)))
       '("showrowcolors" 0)
       '("hiderowcolors" 0))
      (LaTeX-add-counters "rownum"))
@@ -589,40 +589,40 @@ xcolor package.")
    (LaTeX-add-environments
     '("testcolors" LaTeX-env-args
       [ TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt t nil "Color models")
-                     (LaTeX-xcolor-color-models t))
-                    "," ] ))
+        (TeX-completing-read-multiple
+         (TeX-argument-prompt t nil "Color models")
+         (LaTeX-xcolor-color-models t))
+        "," ] ))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("color"             "[{")
-                               ("pagecolor"         "[{"))
-                             'type-declaration)
+                                ("pagecolor"         "[{"))
+                              'type-declaration)
      (font-latex-add-keywords '(("textcolor"         "[{{")
-                               ("colorbox"          "[{{" )
-                               ("fcolorbox"         "[{[{{"))
-                             'type-command)
+                                ("colorbox"          "[{{" )
+                                ("fcolorbox"         "[{[{{"))
+                              'type-command)
      (font-latex-add-keywords '(("definecolor"       "[{{{")
-                               ("providecolor"      "[{{{")
-                               ("colorlet"          "[{[{")
-                               ("definecolorset"    "[{{{{")
-                               ("providecolorset"   "[{{{{")
-                               ("preparecolor"      "[{{{")
-                               ("preparecolorset"   "[{{{{")
-                               ("definecolors"      "{")
-                               ("providecolors"     "{")
-                               ("testcolor"         "[{")
-                               ("blendcolors"       "*{")
-                               ("maskcolors"        "[{")
-                               ("definecolorseries" "{{{[{[{")
-                               ("resetcolorseries"  "[{")
-                               ("extractcolorspec"  "{{")
-                               ("extractcolorspecs" "{{{")
-                               ("convertcolorspec"  "{{{{")
-                               ("rowcolors"         "*[{{{"))
-                             'function)))
+                                ("providecolor"      "[{{{")
+                                ("colorlet"          "[{[{")
+                                ("definecolorset"    "[{{{{")
+                                ("providecolorset"   "[{{{{")
+                                ("preparecolor"      "[{{{")
+                                ("preparecolorset"   "[{{{{")
+                                ("definecolors"      "{")
+                                ("providecolors"     "{")
+                                ("testcolor"         "[{")
+                                ("blendcolors"       "*{")
+                                ("maskcolors"        "[{")
+                                ("definecolorseries" "{{{[{[{")
+                                ("resetcolorseries"  "[{")
+                                ("extractcolorspec"  "{{")
+                                ("extractcolorspecs" "{{{")
+                                ("convertcolorspec"  "{{{{")
+                                ("rowcolors"         "*[{{{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-xcolor-package-options
diff --git a/style/xkcdcolors.el b/style/xkcdcolors.el
index f5f2444..d00ad30 100644
--- a/style/xkcdcolors.el
+++ b/style/xkcdcolors.el
@@ -35,961 +35,961 @@
 
 ;; Silence the compiler:
 (declare-function LaTeX-add-xcolor-definecolors
-                 "xcolor"
-                 (&rest xcolor-definecolors))
+                  "xcolor"
+                  (&rest xcolor-definecolors))
 
 (defvar LaTeX-xkcdcolors-colornames
   (eval-when-compile
     (mapcar (lambda (x) (concat "xkcd" x))
-           '("CloudyBlue"
-             "DarkPastelGreen"
-             "Dust"
-             "ElectricLime"
-             "FreshGreen"
-             "LightEggplant"
-             "NastyGreen"
-             "ReallyLightBlue"
-             "Tea"
-             "WarmPurple"
-             "YellowishTan"
-             "Cement"
-             "DarkGrassGreen"
-             "DustyTeal"
-             "GreyTeal"
-             "MacaroniAndCheese"
-             "PinkishTan"
-             "Spruce"
-             "StrongBlue"
-             "ToxicGreen"
-             "WindowsBlue"
-             "BlueBlue"
-             "BlueWithAHintOfPurple"
-             "Booger"
-             "BrightSeaGreen"
-             "DarkGreenBlue"
-             "DeepTurquoise"
-             "GreenTeal"
-             "StrongPink"
-             "Bland"
-             "DeepAqua"
-             "LavenderPink"
-             "LightMossGreen"
-             "LightSeafoamGreen"
-             "OliveYellow"
-             "PigPink"
-             "DeepLilac"
-             "Desert"
-             "DustyLavender"
-             "PurpleyGrey"
-             "Purply"
-             "CandyPink"
-             "LightPastelGreen"
-             "BoringGreen"
-             "KiwiGreen"
-             "LightGreyGreen"
-             "OrangePink"
-             "TeaGreen"
-             "VeryLightBrown"
-             "EggShell"
-             "EggplantPurple"
-             "PowderPink"
-             "ReddishGrey"
-             "BabyShitBrown"
-             "Liliac"
-             "StormyBlue"
-             "UglyBrown"
-             "Custard"
-             "DarkishPink"
-             "DeepBrown"
-             "GreenishBeige"
-             "Manilla"
-             "OffBlue"
-             "BattleshipGrey"
-             "BrownyGreen"
-             "Bruise"
-             "KelleyGreen"
-             "SicklyYellow"
-             "SunnyYellow"
-             "Azul"
-             "Darkgreen"
-             "GreenYellow"
-             "Lichen"
-             "LightLightGreen"
-             "PaleGold"
-             "SunYellow"
-             "TanGreen"
-             "Burple"
-             "Butterscotch"
-             "Toupe"
-             "DarkCream"
-             "IndianRed"
-             "LightLavendar"
-             "PoisonGreen"
-             "BabyPukeGreen"
-             "BrightYellowGreen"
-             "CharcoalGrey"
-             "Squash"
-             "Cinnamon"
-             "LightPeaGreen"
-             "RadioactiveGreen"
-             "RawSienna"
-             "BabyPurple"
-             "Cocoa"
-             "LightRoyalBlue"
-             "Orangeish"
-             "RustBrown"
-             "SandBrown"
-             "Swamp"
-             "TealishGreen"
-             "BurntSiena"
-             "Camo"
-             "DuskBlue"
-             "Fern"
-             "OldRose"
-             "PaleLightGreen"
-             "PeachyPink"
-             "RosyPink"
-             "LightBluishGreen"
-             "LightBrightGreen"
-             "LightNeonGreen"
-             "LightSeafoam"
-             "TiffanyBlue"
-             "WashedOutGreen"
-             "BrownyOrange"
-             "NiceBlue"
-             "Sapphire"
-             "GreyishTeal"
-             "OrangeyYellow"
-             "Parchment"
-             "Straw"
-             "VeryDarkBrown"
-             "Terracota"
-             "UglyBlue"
-             "ClearBlue"
-             "Creme"
-             "FoamGreen"
-             "GreyGreen"
-             "LightGold"
-             "SeafoamBlue"
-             "Topaz"
-             "VioletPink"
-             "Wintergreen"
-             "YellowTan"
-             "DarkFuchsia"
-             "IndigoBlue"
-             "LightYellowishGreen"
-             "PaleMagenta"
-             "RichPurple"
-             "SunflowerYellow"
-             "GreenBlue"
-             "Leather"
-             "RacingGreen"
-             "VividPurple"
-             "DarkRoyalBlue"
-             "Hazel"
-             "MutedPink"
-             "BoogerGreen"
-             "Canary"
-             "CoolGrey"
-             "DarkTaupe"
-             "DarkishPurple"
-             "TrueGreen"
-             "CoralPink"
-             "DarkSage"
-             "DarkSlateBlue"
-             "FlatBlue"
-             "Mushroom"
-             "RichBlue"
-             "DirtyPurple"
-             "Greenblue"
-             "IckyGreen"
-             "LightKhaki"
-             "WarmBlue"
-             "DarkHotPink"
-             "DeepSeaBlue"
-             "Carmine"
-             "DarkYellowGreen"
-             "PalePeach"
-             "PlumPurple"
-             "GoldenRod"
-             "NeonRed"
-             "OldPink"
-             "VeryPaleBlue"
-             "BloodOrange"
-             "Grapefruit"
-             "SandYellow"
-             "ClayBrown"
-             "DarkBlueGrey"
-             "FlatGreen"
-             "LightGreenBlue"
-             "WarmPink"
-             "DodgerBlue"
-             "GrossGreen"
-             "Ice"
-             "MetallicBlue"
-             "PaleSalmon"
-             "SapGreen"
-             "Algae"
-             "BlueyGrey"
-             "GreenyGrey"
-             "HighlighterGreen"
-             "LightLightBlue"
-             "LightMint"
-             "RawUmber"
-             "VividBlue"
-             "DeepLavender"
-             "DullTeal"
-             "LightGreenishBlue"
-             "MudGreen"
-             "Pinky"
-             "RedWine"
-             "ShitGreen"
-             "TanBrown"
-             "Darkblue"
-             "Rosa"
-             "Lipstick"
-             "PaleMauve"
-             "Claret"
-             "Dandelion"
-             "Orangered"
-             "PoopGreen"
-             "Ruby"
-             "Dark"
-             "GreenishTurquoise"
-             "PastelRed"
-             "PissYellow"
-             "BrightCyan"
-             "DarkCoral"
-             "AlgaeGreen"
-             "DarkishRed"
-             "ReddyBrown"
-             "BlushPink"
-             "CamouflageGreen"
-             "LawnGreen"
-             "Putty"
-             "VibrantBlue"
-             "DarkSand"
-             "PurpleBlue"
-             "Saffron"
-             "Twilight"
-             "WarmBrown"
-             "Bluegrey"
-             "BubbleGumPink"
-             "DuckEggBlue"
-             "GreenishCyan"
-             "Petrol"
-             "Royal"
-             "Butter"
-             "DustyOrange"
-             "OffYellow"
-             "PaleOliveGreen"
-             "Orangish"
-             "Leaf"
-             "LightBlueGrey"
-             "DriedBlood"
-             "LightishPurple"
-             "RustyRed"
-             "LavenderBlue"
-             "LightGrassGreen"
-             "LightMintGreen"
-             "Sunflower"
-             "Velvet"
-             "BrickOrange"
-             "LightishRed"
-             "PureBlue"
-             "TwilightBlue"
-             "VioletRed"
-             "YellowyBrown"
-             "Carnation"
-             "MuddyYellow"
-             "DarkSeafoamGreen"
-             "DeepRose"
-             "DustyRed"
-             "GreyBlue"
-             "LemonLime"
-             "PurplePink"
-             "BrownYellow"
-             "PurpleBrown"
-             "Wisteria"
-             "BananaYellow"
-             "LipstickRed"
-             "WaterBlue"
-             "BrownGrey"
-             "VibrantPurple"
-             "BabyGreen"
-             "BarfGreen"
-             "EggshellBlue"
-             "SandyYellow"
-             "CoolGreen"
-             "Pale"
-             "BlueGrey"
-             "HotMagenta"
-             "Greyblue"
-             "Purpley"
-             "BabyShitGreen"
-             "BrownishPink"
-             "DarkAquamarine"
-             "Diarrhea"
-             "LightMustard"
-             "PaleSkyBlue"
-             "TurtleGreen"
-             "BrightOlive"
-             "DarkGreyBlue"
-             "GreenyBrown"
-             "LemonGreen"
-             "LightPeriwinkle"
-             "SeaweedGreen"
-             "SunshineYellow"
-             "UglyPurple"
-             "MediumPink"
-             "PukeBrown"
-             "VeryLightPink"
-             "Viridian"
-             "Bile"
-             "FadedYellow"
-             "VeryPaleGreen"
-             "VibrantGreen"
-             "BrightLime"
-             "Spearmint"
-             "LightAquamarine"
-             "LightSage"
-             "Yellowgreen"
-             "BabyPoo"
-             "DarkSeafoam"
-             "DeepTeal"
-             "Heather"
-             "RustOrange"
-             "DirtyBlue"
-             "FernGreen"
-             "BrightLilac"
-             "WeirdGreen"
-             "PeacockBlue"
-             "AvocadoGreen"
-             "FadedOrange"
-             "GrapePurple"
-             "HotGreen"
-             "LimeYellow"
-             "Mango"
-             "Shamrock"
-             "Bubblegum"
-             "PurplishBrown"
-             "VomitYellow"
-             "PaleCyan"
-             "KeyLime"
-             "TomatoRed"
-             "Lightgreen"
-             "Merlot"
-             "NightBlue"
-             "PurpleishPink"
-             "Apple"
-             "BabyPoopGreen"
-             "GreenApple"
-             "Heliotrope"
-             "YellowGreen"
-             "AlmostBlack"
-             "CoolBlue"
-             "LeafyGreen"
-             "MustardBrown"
-             "Dusk"
-             "DullBrown"
-             "FrogGreen"
-             "VividGreen"
-             "BrightLightGreen"
-             "FluroGreen"
-             "Kiwi"
-             "Seaweed"
-             "NavyGreen"
-             "UltramarineBlue"
-             "Iris"
-             "PastelOrange"
-             "YellowishOrange"
-             "Perrywinkle"
-             "Tealish"
-             "DarkPlum"
-             "Pear"
-             "PinkishOrange"
-             "MidnightPurple"
-             "LightPurple"
-             "DarkMint"
-             "GreenishTan"
-             "LightBurgundy"
-             "TurquoiseBlue"
-             "UglyPink"
-             "Sandy"
-             "ElectricPink"
-             "MutedPurple"
-             "MidGreen"
-             "Greyish"
-             "NeonYellow"
-             "Banana"
-             "CarnationPink"
-             "Tomato"
-             "Sea"
-             "MuddyBrown"
-             "TurquoiseGreen"
-             "Buff"
-             "Fawn"
-             "MutedBlue"
-             "PaleRose"
-             "DarkMintGreen"
-             "Amethyst"
-             "BlueGreen"
-             "Chestnut"
-             "SickGreen"
-             "Pea"
-             "RustyOrange"
-             "Stone"
-             "RoseRed"
-             "PaleAqua"
-             "DeepOrange"
-             "Earth"
-             "MossyGreen"
-             "GrassyGreen"
-             "PaleLimeGreen"
-             "LightGreyBlue"
-             "PaleGrey"
-             "Asparagus"
-             "Blueberry"
-             "PurpleRed"
-             "PaleLime"
-             "GreenishTeal"
-             "Caramel"
-             "DeepMagenta"
-             "LightPeach"
-             "MilkChocolate"
-             "Ocher"
-             "OffGreen"
-             "PurplyPink"
-             "Lightblue"
-             "DuskyBlue"
-             "Golden"
-             "LightBeige"
-             "ButterYellow"
-             "DuskyPurple"
-             "FrenchBlue"
-             "UglyYellow"
-             "GreenyYellow"
-             "OrangishRed"
-             "ShamrockGreen"
-             "OrangishBrown"
-             "TreeGreen"
-             "DeepViolet"
-             "Gunmetal"
-             "BluePurple"
-             "Cherry"
-             "SandyBrown"
-             "WarmGrey"
-             "DarkIndigo"
-             "Midnight"
-             "BlueyGreen"
-             "GreyPink"
-             "SoftPurple"
-             "Blood"
-             "BrownRed"
-             "MediumGrey"
-             "Berry"
-             "Poo"
-             "PurpleyPink"
-             "LightSalmon"
-             "Snot"
-             "EasterPurple"
-             "LightYellowGreen"
-             "DarkNavyBlue"
-             "Drab"
-             "LightRose"
-             "Rouge"
-             "PurplishRed"
-             "SlimeGreen"
-             "BabyPoop"
-             "IrishGreen"
-             "PinkPurple"
-             "DarkNavy"
-             "GreenyBlue"
-             "LightPlum"
-             "PinkishGrey"
-             "DirtyOrange"
-             "RustRed"
-             "PaleLilac"
-             "OrangeyRed"
-             "PrimaryBlue"
-             "KermitGreen"
-             "BrownishPurple"
-             "MurkyGreen"
-             "Wheat"
-             "VeryDarkPurple"
-             "BottleGreen"
-             "Watermelon"
-             "DeepSkyBlue"
-             "FireEngineRed"
-             "YellowOchre"
-             "PumpkinOrange"
-             "PaleOlive"
-             "LightLilac"
-             "LightishGreen"
-             "CarolinaBlue"
-             "Mulberry"
-             "ShockingPink"
-             "Auburn"
-             "BrightLimeGreen"
-             "Celadon"
-             "PinkishBrown"
-             "PooBrown"
-             "BrightSkyBlue"
-             "Celery"
-             "DirtBrown"
-             "Strawberry"
-             "DarkLime"
-             "Copper"
-             "MediumBrown"
-             "MutedGreen"
-             "Robin'sEgg"
-             "BrightAqua"
-             "BrightLavender"
-             "Ivory"
-             "VeryLightPurple"
-             "LightNavy"
-             "PinkRed"
-             "OliveBrown"
-             "PoopBrown"
-             "MustardGreen"
-             "OceanGreen"
-             "VeryDarkBlue"
-             "DustyGreen"
-             "LightNavyBlue"
-             "MintyGreen"
-             "Adobe"
-             "Barney"
-             "JadeGreen"
-             "BrightLightBlue"
-             "LightLime"
-             "DarkKhaki"
-             "OrangeYellow"
-             "Ocre"
-             "Maize"
-             "FadedPink"
-             "BritishRacingGreen"
-             "Sandstone"
-             "MudBrown"
-             "LightSeaGreen"
-             "RobinEggBlue"
-             "AquaMarine"
-             "DarkSeaGreen"
-             "SoftPink"
-             "OrangeyBrown"
-             "CherryRed"
-             "BurntYellow"
-             "BrownishGrey"
-             "Camel"
-             "PurplishGrey"
-             "Marine"
-             "GreyishPink"
-             "PaleTurquoise"
-             "PastelYellow"
-             "BlueyPurple"
-             "CanaryYellow"
-             "FadedRed"
-             "Sepia"
-             "Coffee"
-             "BrightMagenta"
-             "Mocha"
-             "Ecru"
-             "Purpleish"
-             "Cranberry"
-             "DarkishGreen"
-             "BrownOrange"
-             "DuskyRose"
-             "Melon"
-             "SicklyGreen"
-             "Silver"
-             "PurplyBlue"
-             "PurpleishBlue"
-             "HospitalGreen"
-             "ShitBrown"
-             "MidBlue"
-             "Amber"
-             "EasterGreen"
-             "SoftBlue"
-             "CeruleanBlue"
-             "GoldenBrown"
-             "BrightTurquoise"
-             "RedPink"
-             "RedPurple"
-             "GreyishBrown"
-             "Vermillion"
-             "Russet"
-             "SteelGrey"
-             "LighterPurple"
-             "BrightViolet"
-             "PrussianBlue"
-             "SlateGreen"
-             "DirtyPink"
-             "DarkBlueGreen"
-             "Pine"
-             "YellowyGreen"
-             "DarkGold"
-             "Bluish"
-             "DarkishBlue"
-             "DullRed"
-             "PinkyRed"
-             "Bronze"
-             "PaleTeal"
-             "MilitaryGreen"
-             "BarbiePink"
-             "BubblegumPink"
-             "PeaSoupGreen"
-             "DarkMustard"
-             "Shit"
-             "MediumPurple"
-             "VeryDarkGreen"
-             "Dirt"
-             "DuskyPink"
-             "RedViolet"
-             "LemonYellow"
-             "Pistachio"
-             "DullYellow"
-             "DarkLimeGreen"
-             "DenimBlue"
-             "TealBlue"
-             "LightishBlue"
-             "PurpleyBlue"
-             "LightIndigo"
-             "SwampGreen"
-             "BrownGreen"
-             "DarkMaroon"
-             "HotPurple"
-             "DarkForestGreen"
-             "FadedBlue"
-             "DrabGreen"
-             "LightLimeGreen"
-             "SnotGreen"
-             "Yellowish"
-             "LightBlueGreen"
-             "Bordeaux"
-             "LightMauve"
-             "Ocean"
-             "Marigold"
-             "MuddyGreen"
-             "DullOrange"
-             "Steel"
-             "ElectricPurple"
-             "FluorescentGreen"
-             "YellowishBrown"
-             "Blush"
-             "SoftGreen"
-             "BrightOrange"
-             "Lemon"
-             "PurpleGrey"
-             "AcidGreen"
-             "PaleLavender"
-             "VioletBlue"
-             "LightForestGreen"
-             "BurntRed"
-             "KhakiGreen"
-             "Cerise"
-             "FadedPurple"
-             "Apricot"
-             "DarkOliveGreen"
-             "GreyBrown"
-             "GreenGrey"
-             "TrueBlue"
-             "PaleViolet"
-             "PeriwinkleBlue"
-             "LightSkyBlue"
-             "Blurple"
-             "GreenBrown"
-             "Bluegreen"
-             "BrightTeal"
-             "BrownishYellow"
-             "PeaSoup"
-             "Forest"
-             "BarneyPurple"
-             "Ultramarine"
-             "Purplish"
-             "PukeYellow"
-             "BluishGrey"
-             "DarkPeriwinkle"
-             "DarkLilac"
-             "Reddish"
-             "LightMaroon"
-             "DustyPurple"
-             "TerraCotta"
-             "Avocado"
-             "MarineBlue"
-             "TealGreen"
-             "SlateGrey"
-             "LighterGreen"
-             "ElectricGreen"
-             "DustyBlue"
-             "GoldenYellow"
-             "BrightYellow"
-             "LightLavender"
-             "Umber"
-             "Poop"
-             "DarkPeach"
-             "JungleGreen"
-             "Eggshell"
-             "Denim"
-             "YellowBrown"
-             "DullPurple"
-             "ChocolateBrown"
-             "WineRed"
-             "NeonBlue"
-             "DirtyGreen"
-             "LightTan"
-             "IceBlue"
-             "CadetBlue"
-             "DarkMauve"
-             "VeryLightBlue"
-             "GreyPurple"
-             "PastelPink"
-             "VeryLightGreen"
-             "DarkSkyBlue"
-             "Evergreen"
-             "DullPink"
-             "Aubergine"
-             "Mahogany"
-             "ReddishOrange"
-             "DeepGreen"
-             "VomitGreen"
-             "PurplePink"
-             "DustyPink"
-             "FadedGreen"
-             "CamoGreen"
-             "PinkyPurple"
-             "PinkPurple"
-             "BrownishRed"
-             "DarkRose"
-             "Mud"
-             "Brownish"
-             "EmeraldGreen"
-             "PaleBrown"
-             "DullBlue"
-             "BurntUmber"
-             "MediumGreen"
-             "Clay"
-             "LightAqua"
-             "LightOliveGreen"
-             "BrownishOrange"
-             "DarkAqua"
-             "PurplishPink"
-             "DarkSalmon"
-             "GreenishGrey"
-             "Jade"
-             "UglyGreen"
-             "DarkBeige"
-             "Emerald"
-             "PaleRed"
-             "LightMagenta"
-             "Sky"
-             "LightCyan"
-             "YellowOrange"
-             "ReddishPurple"
-             "ReddishPink"
-             "Orchid"
-             "DirtyYellow"
-             "OrangeRed"
-             "DeepRed"
-             "OrangeBrown"
-             "CobaltBlue"
-             "NeonPink"
-             "RosePink"
-             "GreyishPurple"
-             "Raspberry"
-             "AquaGreen"
-             "SalmonPink"
-             "Tangerine"
-             "BrownishGreen"
-             "RedBrown"
-             "GreenishBrown"
-             "Pumpkin"
-             "PineGreen"
-             "Charcoal"
-             "BabyPink"
-             "Cornflower"
-             "BlueViolet"
-             "Chocolate"
-             "GreyishGreen"
-             "Scarlet"
-             "GreenYellow"
-             "DarkOlive"
-             "Sienna"
-             "PastelPurple"
-             "Terracotta"
-             "AquaBlue"
-             "SageGreen"
-             "BloodRed"
-             "DeepPink"
-             "Grass"
-             "Moss"
-             "PastelBlue"
-             "BluishGreen"
-             "GreenBlue"
-             "DarkTan"
-             "GreenishBlue"
-             "PaleOrange"
-             "Vomit"
-             "ForrestGreen"
-             "DarkLavender"
-             "DarkViolet"
-             "PurpleBlue"
-             "DarkCyan"
-             "OliveDrab"
-             "Pinkish"
-             "Cobalt"
-             "NeonPurple"
-             "LightTurquoise"
-             "AppleGreen"
-             "DullGreen"
-             "Wine"
-             "PowderBlue"
-             "OffWhite"
-             "ElectricBlue"
-             "DarkTurquoise"
-             "BluePurple"
-             "Azure"
-             "BrightRed"
-             "PinkishRed"
-             "CornflowerBlue"
-             "LightOlive"
-             "Grape"
-             "GreyishBlue"
-             "PurplishBlue"
-             "YellowishGreen"
-             "GreenishYellow"
-             "MediumBlue"
-             "DustyRose"
-             "LightViolet"
-             "MidnightBlue"
-             "BluishPurple"
-             "RedOrange"
-             "DarkMagenta"
-             "Greenish"
-             "OceanBlue"
-             "Coral"
-             "Cream"
-             "ReddishBrown"
-             "BurntSienna"
-             "Brick"
-             "Sage"
-             "GreyGreen"
-             "White"
-             "Robin'sEggBlue"
-             "MossGreen"
-             "SteelBlue"
-             "Eggplant"
-             "LightYellow"
-             "LeafGreen"
-             "LightGrey"
-             "Puke"
-             "PinkishPurple"
-             "SeaBlue"
-             "PalePurple"
-             "SlateBlue"
-             "BlueGrey"
-             "HunterGreen"
-             "Fuchsia"
-             "Crimson"
-             "PaleYellow"
-             "Ochre"
-             "MustardYellow"
-             "LightRed"
-             "Cerulean"
-             "PalePink"
-             "DeepBlue"
-             "Rust"
-             "LightTeal"
-             "Slate"
-             "Goldenrod"
-             "DarkYellow"
-             "DarkGrey"
-             "ArmyGreen"
-             "GreyBlue"
-             "Seafoam"
-             "Puce"
-             "SpringGreen"
-             "DarkOrange"
-             "Sand"
-             "PastelGreen"
-             "Mint"
-             "LightOrange"
-             "BrightPink"
-             "Chartreuse"
-             "DeepPurple"
-             "DarkBrown"
-             "Taupe"
-             "PeaGreen"
-             "PukeGreen"
-             "KellyGreen"
-             "SeafoamGreen"
-             "BlueGreen"
-             "Khaki"
-             "Burgundy"
-             "DarkTeal"
-             "BrickRed"
-             "RoyalPurple"
-             "Plum"
-             "MintGreen"
-             "Gold"
-             "BabyBlue"
-             "YellowGreen"
-             "BrightPurple"
-             "DarkRed"
-             "PaleBlue"
-             "GrassGreen"
-             "Navy"
-             "Aquamarine"
-             "BurntOrange"
-             "NeonGreen"
-             "BrightBlue"
-             "Rose"
-             "LightPink"
-             "Mustard"
-             "Indigo"
-             "Lime"
-             "SeaGreen"
-             "Periwinkle"
-             "DarkPink"
-             "OliveGreen"
-             "Peach"
-             "PaleGreen"
-             "LightBrown"
-             "HotPink"
-             "Black"
-             "Lilac"
-             "NavyBlue"
-             "RoyalBlue"
-             "Beige"
-             "Salmon"
-             "Olive"
-             "Maroon"
-             "BrightGreen"
-             "DarkPurple"
-             "Mauve"
-             "ForestGreen"
-             "Aqua"
-             "Cyan"
-             "Tan"
-             "DarkBlue"
-             "Lavender"
-             "Turquoise"
-             "DarkGreen"
-             "Violet"
-             "LightPurple"
-             "LimeGreen"
-             "Grey"
-             "SkyBlue"
-             "Yellow"
-             "Magenta"
-             "LightGreen"
-             "Orange"
-             "Teal"
-             "LightBlue"
-             "Red"
-             "Brown"
-             "Pink"
-             "Blue"
-             "Green"
-             "Purple")))
+            '("CloudyBlue"
+              "DarkPastelGreen"
+              "Dust"
+              "ElectricLime"
+              "FreshGreen"
+              "LightEggplant"
+              "NastyGreen"
+              "ReallyLightBlue"
+              "Tea"
+              "WarmPurple"
+              "YellowishTan"
+              "Cement"
+              "DarkGrassGreen"
+              "DustyTeal"
+              "GreyTeal"
+              "MacaroniAndCheese"
+              "PinkishTan"
+              "Spruce"
+              "StrongBlue"
+              "ToxicGreen"
+              "WindowsBlue"
+              "BlueBlue"
+              "BlueWithAHintOfPurple"
+              "Booger"
+              "BrightSeaGreen"
+              "DarkGreenBlue"
+              "DeepTurquoise"
+              "GreenTeal"
+              "StrongPink"
+              "Bland"
+              "DeepAqua"
+              "LavenderPink"
+              "LightMossGreen"
+              "LightSeafoamGreen"
+              "OliveYellow"
+              "PigPink"
+              "DeepLilac"
+              "Desert"
+              "DustyLavender"
+              "PurpleyGrey"
+              "Purply"
+              "CandyPink"
+              "LightPastelGreen"
+              "BoringGreen"
+              "KiwiGreen"
+              "LightGreyGreen"
+              "OrangePink"
+              "TeaGreen"
+              "VeryLightBrown"
+              "EggShell"
+              "EggplantPurple"
+              "PowderPink"
+              "ReddishGrey"
+              "BabyShitBrown"
+              "Liliac"
+              "StormyBlue"
+              "UglyBrown"
+              "Custard"
+              "DarkishPink"
+              "DeepBrown"
+              "GreenishBeige"
+              "Manilla"
+              "OffBlue"
+              "BattleshipGrey"
+              "BrownyGreen"
+              "Bruise"
+              "KelleyGreen"
+              "SicklyYellow"
+              "SunnyYellow"
+              "Azul"
+              "Darkgreen"
+              "GreenYellow"
+              "Lichen"
+              "LightLightGreen"
+              "PaleGold"
+              "SunYellow"
+              "TanGreen"
+              "Burple"
+              "Butterscotch"
+              "Toupe"
+              "DarkCream"
+              "IndianRed"
+              "LightLavendar"
+              "PoisonGreen"
+              "BabyPukeGreen"
+              "BrightYellowGreen"
+              "CharcoalGrey"
+              "Squash"
+              "Cinnamon"
+              "LightPeaGreen"
+              "RadioactiveGreen"
+              "RawSienna"
+              "BabyPurple"
+              "Cocoa"
+              "LightRoyalBlue"
+              "Orangeish"
+              "RustBrown"
+              "SandBrown"
+              "Swamp"
+              "TealishGreen"
+              "BurntSiena"
+              "Camo"
+              "DuskBlue"
+              "Fern"
+              "OldRose"
+              "PaleLightGreen"
+              "PeachyPink"
+              "RosyPink"
+              "LightBluishGreen"
+              "LightBrightGreen"
+              "LightNeonGreen"
+              "LightSeafoam"
+              "TiffanyBlue"
+              "WashedOutGreen"
+              "BrownyOrange"
+              "NiceBlue"
+              "Sapphire"
+              "GreyishTeal"
+              "OrangeyYellow"
+              "Parchment"
+              "Straw"
+              "VeryDarkBrown"
+              "Terracota"
+              "UglyBlue"
+              "ClearBlue"
+              "Creme"
+              "FoamGreen"
+              "GreyGreen"
+              "LightGold"
+              "SeafoamBlue"
+              "Topaz"
+              "VioletPink"
+              "Wintergreen"
+              "YellowTan"
+              "DarkFuchsia"
+              "IndigoBlue"
+              "LightYellowishGreen"
+              "PaleMagenta"
+              "RichPurple"
+              "SunflowerYellow"
+              "GreenBlue"
+              "Leather"
+              "RacingGreen"
+              "VividPurple"
+              "DarkRoyalBlue"
+              "Hazel"
+              "MutedPink"
+              "BoogerGreen"
+              "Canary"
+              "CoolGrey"
+              "DarkTaupe"
+              "DarkishPurple"
+              "TrueGreen"
+              "CoralPink"
+              "DarkSage"
+              "DarkSlateBlue"
+              "FlatBlue"
+              "Mushroom"
+              "RichBlue"
+              "DirtyPurple"
+              "Greenblue"
+              "IckyGreen"
+              "LightKhaki"
+              "WarmBlue"
+              "DarkHotPink"
+              "DeepSeaBlue"
+              "Carmine"
+              "DarkYellowGreen"
+              "PalePeach"
+              "PlumPurple"
+              "GoldenRod"
+              "NeonRed"
+              "OldPink"
+              "VeryPaleBlue"
+              "BloodOrange"
+              "Grapefruit"
+              "SandYellow"
+              "ClayBrown"
+              "DarkBlueGrey"
+              "FlatGreen"
+              "LightGreenBlue"
+              "WarmPink"
+              "DodgerBlue"
+              "GrossGreen"
+              "Ice"
+              "MetallicBlue"
+              "PaleSalmon"
+              "SapGreen"
+              "Algae"
+              "BlueyGrey"
+              "GreenyGrey"
+              "HighlighterGreen"
+              "LightLightBlue"
+              "LightMint"
+              "RawUmber"
+              "VividBlue"
+              "DeepLavender"
+              "DullTeal"
+              "LightGreenishBlue"
+              "MudGreen"
+              "Pinky"
+              "RedWine"
+              "ShitGreen"
+              "TanBrown"
+              "Darkblue"
+              "Rosa"
+              "Lipstick"
+              "PaleMauve"
+              "Claret"
+              "Dandelion"
+              "Orangered"
+              "PoopGreen"
+              "Ruby"
+              "Dark"
+              "GreenishTurquoise"
+              "PastelRed"
+              "PissYellow"
+              "BrightCyan"
+              "DarkCoral"
+              "AlgaeGreen"
+              "DarkishRed"
+              "ReddyBrown"
+              "BlushPink"
+              "CamouflageGreen"
+              "LawnGreen"
+              "Putty"
+              "VibrantBlue"
+              "DarkSand"
+              "PurpleBlue"
+              "Saffron"
+              "Twilight"
+              "WarmBrown"
+              "Bluegrey"
+              "BubbleGumPink"
+              "DuckEggBlue"
+              "GreenishCyan"
+              "Petrol"
+              "Royal"
+              "Butter"
+              "DustyOrange"
+              "OffYellow"
+              "PaleOliveGreen"
+              "Orangish"
+              "Leaf"
+              "LightBlueGrey"
+              "DriedBlood"
+              "LightishPurple"
+              "RustyRed"
+              "LavenderBlue"
+              "LightGrassGreen"
+              "LightMintGreen"
+              "Sunflower"
+              "Velvet"
+              "BrickOrange"
+              "LightishRed"
+              "PureBlue"
+              "TwilightBlue"
+              "VioletRed"
+              "YellowyBrown"
+              "Carnation"
+              "MuddyYellow"
+              "DarkSeafoamGreen"
+              "DeepRose"
+              "DustyRed"
+              "GreyBlue"
+              "LemonLime"
+              "PurplePink"
+              "BrownYellow"
+              "PurpleBrown"
+              "Wisteria"
+              "BananaYellow"
+              "LipstickRed"
+              "WaterBlue"
+              "BrownGrey"
+              "VibrantPurple"
+              "BabyGreen"
+              "BarfGreen"
+              "EggshellBlue"
+              "SandyYellow"
+              "CoolGreen"
+              "Pale"
+              "BlueGrey"
+              "HotMagenta"
+              "Greyblue"
+              "Purpley"
+              "BabyShitGreen"
+              "BrownishPink"
+              "DarkAquamarine"
+              "Diarrhea"
+              "LightMustard"
+              "PaleSkyBlue"
+              "TurtleGreen"
+              "BrightOlive"
+              "DarkGreyBlue"
+              "GreenyBrown"
+              "LemonGreen"
+              "LightPeriwinkle"
+              "SeaweedGreen"
+              "SunshineYellow"
+              "UglyPurple"
+              "MediumPink"
+              "PukeBrown"
+              "VeryLightPink"
+              "Viridian"
+              "Bile"
+              "FadedYellow"
+              "VeryPaleGreen"
+              "VibrantGreen"
+              "BrightLime"
+              "Spearmint"
+              "LightAquamarine"
+              "LightSage"
+              "Yellowgreen"
+              "BabyPoo"
+              "DarkSeafoam"
+              "DeepTeal"
+              "Heather"
+              "RustOrange"
+              "DirtyBlue"
+              "FernGreen"
+              "BrightLilac"
+              "WeirdGreen"
+              "PeacockBlue"
+              "AvocadoGreen"
+              "FadedOrange"
+              "GrapePurple"
+              "HotGreen"
+              "LimeYellow"
+              "Mango"
+              "Shamrock"
+              "Bubblegum"
+              "PurplishBrown"
+              "VomitYellow"
+              "PaleCyan"
+              "KeyLime"
+              "TomatoRed"
+              "Lightgreen"
+              "Merlot"
+              "NightBlue"
+              "PurpleishPink"
+              "Apple"
+              "BabyPoopGreen"
+              "GreenApple"
+              "Heliotrope"
+              "YellowGreen"
+              "AlmostBlack"
+              "CoolBlue"
+              "LeafyGreen"
+              "MustardBrown"
+              "Dusk"
+              "DullBrown"
+              "FrogGreen"
+              "VividGreen"
+              "BrightLightGreen"
+              "FluroGreen"
+              "Kiwi"
+              "Seaweed"
+              "NavyGreen"
+              "UltramarineBlue"
+              "Iris"
+              "PastelOrange"
+              "YellowishOrange"
+              "Perrywinkle"
+              "Tealish"
+              "DarkPlum"
+              "Pear"
+              "PinkishOrange"
+              "MidnightPurple"
+              "LightPurple"
+              "DarkMint"
+              "GreenishTan"
+              "LightBurgundy"
+              "TurquoiseBlue"
+              "UglyPink"
+              "Sandy"
+              "ElectricPink"
+              "MutedPurple"
+              "MidGreen"
+              "Greyish"
+              "NeonYellow"
+              "Banana"
+              "CarnationPink"
+              "Tomato"
+              "Sea"
+              "MuddyBrown"
+              "TurquoiseGreen"
+              "Buff"
+              "Fawn"
+              "MutedBlue"
+              "PaleRose"
+              "DarkMintGreen"
+              "Amethyst"
+              "BlueGreen"
+              "Chestnut"
+              "SickGreen"
+              "Pea"
+              "RustyOrange"
+              "Stone"
+              "RoseRed"
+              "PaleAqua"
+              "DeepOrange"
+              "Earth"
+              "MossyGreen"
+              "GrassyGreen"
+              "PaleLimeGreen"
+              "LightGreyBlue"
+              "PaleGrey"
+              "Asparagus"
+              "Blueberry"
+              "PurpleRed"
+              "PaleLime"
+              "GreenishTeal"
+              "Caramel"
+              "DeepMagenta"
+              "LightPeach"
+              "MilkChocolate"
+              "Ocher"
+              "OffGreen"
+              "PurplyPink"
+              "Lightblue"
+              "DuskyBlue"
+              "Golden"
+              "LightBeige"
+              "ButterYellow"
+              "DuskyPurple"
+              "FrenchBlue"
+              "UglyYellow"
+              "GreenyYellow"
+              "OrangishRed"
+              "ShamrockGreen"
+              "OrangishBrown"
+              "TreeGreen"
+              "DeepViolet"
+              "Gunmetal"
+              "BluePurple"
+              "Cherry"
+              "SandyBrown"
+              "WarmGrey"
+              "DarkIndigo"
+              "Midnight"
+              "BlueyGreen"
+              "GreyPink"
+              "SoftPurple"
+              "Blood"
+              "BrownRed"
+              "MediumGrey"
+              "Berry"
+              "Poo"
+              "PurpleyPink"
+              "LightSalmon"
+              "Snot"
+              "EasterPurple"
+              "LightYellowGreen"
+              "DarkNavyBlue"
+              "Drab"
+              "LightRose"
+              "Rouge"
+              "PurplishRed"
+              "SlimeGreen"
+              "BabyPoop"
+              "IrishGreen"
+              "PinkPurple"
+              "DarkNavy"
+              "GreenyBlue"
+              "LightPlum"
+              "PinkishGrey"
+              "DirtyOrange"
+              "RustRed"
+              "PaleLilac"
+              "OrangeyRed"
+              "PrimaryBlue"
+              "KermitGreen"
+              "BrownishPurple"
+              "MurkyGreen"
+              "Wheat"
+              "VeryDarkPurple"
+              "BottleGreen"
+              "Watermelon"
+              "DeepSkyBlue"
+              "FireEngineRed"
+              "YellowOchre"
+              "PumpkinOrange"
+              "PaleOlive"
+              "LightLilac"
+              "LightishGreen"
+              "CarolinaBlue"
+              "Mulberry"
+              "ShockingPink"
+              "Auburn"
+              "BrightLimeGreen"
+              "Celadon"
+              "PinkishBrown"
+              "PooBrown"
+              "BrightSkyBlue"
+              "Celery"
+              "DirtBrown"
+              "Strawberry"
+              "DarkLime"
+              "Copper"
+              "MediumBrown"
+              "MutedGreen"
+              "Robin'sEgg"
+              "BrightAqua"
+              "BrightLavender"
+              "Ivory"
+              "VeryLightPurple"
+              "LightNavy"
+              "PinkRed"
+              "OliveBrown"
+              "PoopBrown"
+              "MustardGreen"
+              "OceanGreen"
+              "VeryDarkBlue"
+              "DustyGreen"
+              "LightNavyBlue"
+              "MintyGreen"
+              "Adobe"
+              "Barney"
+              "JadeGreen"
+              "BrightLightBlue"
+              "LightLime"
+              "DarkKhaki"
+              "OrangeYellow"
+              "Ocre"
+              "Maize"
+              "FadedPink"
+              "BritishRacingGreen"
+              "Sandstone"
+              "MudBrown"
+              "LightSeaGreen"
+              "RobinEggBlue"
+              "AquaMarine"
+              "DarkSeaGreen"
+              "SoftPink"
+              "OrangeyBrown"
+              "CherryRed"
+              "BurntYellow"
+              "BrownishGrey"
+              "Camel"
+              "PurplishGrey"
+              "Marine"
+              "GreyishPink"
+              "PaleTurquoise"
+              "PastelYellow"
+              "BlueyPurple"
+              "CanaryYellow"
+              "FadedRed"
+              "Sepia"
+              "Coffee"
+              "BrightMagenta"
+              "Mocha"
+              "Ecru"
+              "Purpleish"
+              "Cranberry"
+              "DarkishGreen"
+              "BrownOrange"
+              "DuskyRose"
+              "Melon"
+              "SicklyGreen"
+              "Silver"
+              "PurplyBlue"
+              "PurpleishBlue"
+              "HospitalGreen"
+              "ShitBrown"
+              "MidBlue"
+              "Amber"
+              "EasterGreen"
+              "SoftBlue"
+              "CeruleanBlue"
+              "GoldenBrown"
+              "BrightTurquoise"
+              "RedPink"
+              "RedPurple"
+              "GreyishBrown"
+              "Vermillion"
+              "Russet"
+              "SteelGrey"
+              "LighterPurple"
+              "BrightViolet"
+              "PrussianBlue"
+              "SlateGreen"
+              "DirtyPink"
+              "DarkBlueGreen"
+              "Pine"
+              "YellowyGreen"
+              "DarkGold"
+              "Bluish"
+              "DarkishBlue"
+              "DullRed"
+              "PinkyRed"
+              "Bronze"
+              "PaleTeal"
+              "MilitaryGreen"
+              "BarbiePink"
+              "BubblegumPink"
+              "PeaSoupGreen"
+              "DarkMustard"
+              "Shit"
+              "MediumPurple"
+              "VeryDarkGreen"
+              "Dirt"
+              "DuskyPink"
+              "RedViolet"
+              "LemonYellow"
+              "Pistachio"
+              "DullYellow"
+              "DarkLimeGreen"
+              "DenimBlue"
+              "TealBlue"
+              "LightishBlue"
+              "PurpleyBlue"
+              "LightIndigo"
+              "SwampGreen"
+              "BrownGreen"
+              "DarkMaroon"
+              "HotPurple"
+              "DarkForestGreen"
+              "FadedBlue"
+              "DrabGreen"
+              "LightLimeGreen"
+              "SnotGreen"
+              "Yellowish"
+              "LightBlueGreen"
+              "Bordeaux"
+              "LightMauve"
+              "Ocean"
+              "Marigold"
+              "MuddyGreen"
+              "DullOrange"
+              "Steel"
+              "ElectricPurple"
+              "FluorescentGreen"
+              "YellowishBrown"
+              "Blush"
+              "SoftGreen"
+              "BrightOrange"
+              "Lemon"
+              "PurpleGrey"
+              "AcidGreen"
+              "PaleLavender"
+              "VioletBlue"
+              "LightForestGreen"
+              "BurntRed"
+              "KhakiGreen"
+              "Cerise"
+              "FadedPurple"
+              "Apricot"
+              "DarkOliveGreen"
+              "GreyBrown"
+              "GreenGrey"
+              "TrueBlue"
+              "PaleViolet"
+              "PeriwinkleBlue"
+              "LightSkyBlue"
+              "Blurple"
+              "GreenBrown"
+              "Bluegreen"
+              "BrightTeal"
+              "BrownishYellow"
+              "PeaSoup"
+              "Forest"
+              "BarneyPurple"
+              "Ultramarine"
+              "Purplish"
+              "PukeYellow"
+              "BluishGrey"
+              "DarkPeriwinkle"
+              "DarkLilac"
+              "Reddish"
+              "LightMaroon"
+              "DustyPurple"
+              "TerraCotta"
+              "Avocado"
+              "MarineBlue"
+              "TealGreen"
+              "SlateGrey"
+              "LighterGreen"
+              "ElectricGreen"
+              "DustyBlue"
+              "GoldenYellow"
+              "BrightYellow"
+              "LightLavender"
+              "Umber"
+              "Poop"
+              "DarkPeach"
+              "JungleGreen"
+              "Eggshell"
+              "Denim"
+              "YellowBrown"
+              "DullPurple"
+              "ChocolateBrown"
+              "WineRed"
+              "NeonBlue"
+              "DirtyGreen"
+              "LightTan"
+              "IceBlue"
+              "CadetBlue"
+              "DarkMauve"
+              "VeryLightBlue"
+              "GreyPurple"
+              "PastelPink"
+              "VeryLightGreen"
+              "DarkSkyBlue"
+              "Evergreen"
+              "DullPink"
+              "Aubergine"
+              "Mahogany"
+              "ReddishOrange"
+              "DeepGreen"
+              "VomitGreen"
+              "PurplePink"
+              "DustyPink"
+              "FadedGreen"
+              "CamoGreen"
+              "PinkyPurple"
+              "PinkPurple"
+              "BrownishRed"
+              "DarkRose"
+              "Mud"
+              "Brownish"
+              "EmeraldGreen"
+              "PaleBrown"
+              "DullBlue"
+              "BurntUmber"
+              "MediumGreen"
+              "Clay"
+              "LightAqua"
+              "LightOliveGreen"
+              "BrownishOrange"
+              "DarkAqua"
+              "PurplishPink"
+              "DarkSalmon"
+              "GreenishGrey"
+              "Jade"
+              "UglyGreen"
+              "DarkBeige"
+              "Emerald"
+              "PaleRed"
+              "LightMagenta"
+              "Sky"
+              "LightCyan"
+              "YellowOrange"
+              "ReddishPurple"
+              "ReddishPink"
+              "Orchid"
+              "DirtyYellow"
+              "OrangeRed"
+              "DeepRed"
+              "OrangeBrown"
+              "CobaltBlue"
+              "NeonPink"
+              "RosePink"
+              "GreyishPurple"
+              "Raspberry"
+              "AquaGreen"
+              "SalmonPink"
+              "Tangerine"
+              "BrownishGreen"
+              "RedBrown"
+              "GreenishBrown"
+              "Pumpkin"
+              "PineGreen"
+              "Charcoal"
+              "BabyPink"
+              "Cornflower"
+              "BlueViolet"
+              "Chocolate"
+              "GreyishGreen"
+              "Scarlet"
+              "GreenYellow"
+              "DarkOlive"
+              "Sienna"
+              "PastelPurple"
+              "Terracotta"
+              "AquaBlue"
+              "SageGreen"
+              "BloodRed"
+              "DeepPink"
+              "Grass"
+              "Moss"
+              "PastelBlue"
+              "BluishGreen"
+              "GreenBlue"
+              "DarkTan"
+              "GreenishBlue"
+              "PaleOrange"
+              "Vomit"
+              "ForrestGreen"
+              "DarkLavender"
+              "DarkViolet"
+              "PurpleBlue"
+              "DarkCyan"
+              "OliveDrab"
+              "Pinkish"
+              "Cobalt"
+              "NeonPurple"
+              "LightTurquoise"
+              "AppleGreen"
+              "DullGreen"
+              "Wine"
+              "PowderBlue"
+              "OffWhite"
+              "ElectricBlue"
+              "DarkTurquoise"
+              "BluePurple"
+              "Azure"
+              "BrightRed"
+              "PinkishRed"
+              "CornflowerBlue"
+              "LightOlive"
+              "Grape"
+              "GreyishBlue"
+              "PurplishBlue"
+              "YellowishGreen"
+              "GreenishYellow"
+              "MediumBlue"
+              "DustyRose"
+              "LightViolet"
+              "MidnightBlue"
+              "BluishPurple"
+              "RedOrange"
+              "DarkMagenta"
+              "Greenish"
+              "OceanBlue"
+              "Coral"
+              "Cream"
+              "ReddishBrown"
+              "BurntSienna"
+              "Brick"
+              "Sage"
+              "GreyGreen"
+              "White"
+              "Robin'sEggBlue"
+              "MossGreen"
+              "SteelBlue"
+              "Eggplant"
+              "LightYellow"
+              "LeafGreen"
+              "LightGrey"
+              "Puke"
+              "PinkishPurple"
+              "SeaBlue"
+              "PalePurple"
+              "SlateBlue"
+              "BlueGrey"
+              "HunterGreen"
+              "Fuchsia"
+              "Crimson"
+              "PaleYellow"
+              "Ochre"
+              "MustardYellow"
+              "LightRed"
+              "Cerulean"
+              "PalePink"
+              "DeepBlue"
+              "Rust"
+              "LightTeal"
+              "Slate"
+              "Goldenrod"
+              "DarkYellow"
+              "DarkGrey"
+              "ArmyGreen"
+              "GreyBlue"
+              "Seafoam"
+              "Puce"
+              "SpringGreen"
+              "DarkOrange"
+              "Sand"
+              "PastelGreen"
+              "Mint"
+              "LightOrange"
+              "BrightPink"
+              "Chartreuse"
+              "DeepPurple"
+              "DarkBrown"
+              "Taupe"
+              "PeaGreen"
+              "PukeGreen"
+              "KellyGreen"
+              "SeafoamGreen"
+              "BlueGreen"
+              "Khaki"
+              "Burgundy"
+              "DarkTeal"
+              "BrickRed"
+              "RoyalPurple"
+              "Plum"
+              "MintGreen"
+              "Gold"
+              "BabyBlue"
+              "YellowGreen"
+              "BrightPurple"
+              "DarkRed"
+              "PaleBlue"
+              "GrassGreen"
+              "Navy"
+              "Aquamarine"
+              "BurntOrange"
+              "NeonGreen"
+              "BrightBlue"
+              "Rose"
+              "LightPink"
+              "Mustard"
+              "Indigo"
+              "Lime"
+              "SeaGreen"
+              "Periwinkle"
+              "DarkPink"
+              "OliveGreen"
+              "Peach"
+              "PaleGreen"
+              "LightBrown"
+              "HotPink"
+              "Black"
+              "Lilac"
+              "NavyBlue"
+              "RoyalBlue"
+              "Beige"
+              "Salmon"
+              "Olive"
+              "Maroon"
+              "BrightGreen"
+              "DarkPurple"
+              "Mauve"
+              "ForestGreen"
+              "Aqua"
+              "Cyan"
+              "Tan"
+              "DarkBlue"
+              "Lavender"
+              "Turquoise"
+              "DarkGreen"
+              "Violet"
+              "LightPurple"
+              "LimeGreen"
+              "Grey"
+              "SkyBlue"
+              "Yellow"
+              "Magenta"
+              "LightGreen"
+              "Orange"
+              "Teal"
+              "LightBlue"
+              "Red"
+              "Brown"
+              "Pink"
+              "Blue"
+              "Green"
+              "Purple")))
   "List of colors provided by xkcdcolors package.")
 
 (TeX-add-style-hook
diff --git a/style/xltabular.el b/style/xltabular.el
index 04ce22c..72c46df 100644
--- a/style/xltabular.el
+++ b/style/xltabular.el
@@ -51,25 +51,25 @@ nested curly brace pair nor escaped \"}\".")
   ;; is a combination of `LaTeX-env-tabular*' and
   ;; `LaTeX-env-longtable':
   (let* ((pos (completing-read (TeX-argument-prompt t nil "Position")
-                              '("l" "r" "c")))
-        (width (TeX-read-string "Width: " LaTeX-default-width))
-        (fmt (TeX-read-string "Format: " LaTeX-default-format))
-        (caption (TeX-read-string "Caption: "))
-        (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
-                         (TeX-read-string "(Optional) Short caption: "))))
+                               '("l" "r" "c")))
+         (width (TeX-read-string "Width: " LaTeX-default-width))
+         (fmt (TeX-read-string "Format: " LaTeX-default-format))
+         (caption (TeX-read-string "Caption: "))
+         (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
+                          (TeX-read-string "(Optional) Short caption: "))))
     (setq LaTeX-default-format fmt)
     (LaTeX-insert-environment environment
-                             (concat
-                              (unless (zerop (length pos))
-                                (concat LaTeX-optop pos LaTeX-optcl))
-                              (concat TeX-grop width TeX-grcl)
-                              (concat TeX-grop fmt TeX-grcl)))
+                              (concat
+                               (unless (zerop (length pos))
+                                 (concat LaTeX-optop pos LaTeX-optcl))
+                               (concat TeX-grop width TeX-grcl)
+                               (concat TeX-grop fmt TeX-grcl)))
     ;; top caption -- do nothing if user skips caption
     (unless (zerop (length caption))
       ;; insert `\caption[short-caption]{caption':
       (insert TeX-esc "caption")
       (when (and short-caption (not (string= short-caption "")))
-       (insert LaTeX-optop short-caption LaTeX-optcl))
+        (insert LaTeX-optop short-caption LaTeX-optcl))
       (insert TeX-grop caption)
       ;; ask for a label and insert it
       (LaTeX-label environment 'environment)
@@ -111,7 +111,7 @@ If SUPPRESS is non-nil, do not insert line break macro."
    ;; Use the enhanced table formatting.  Append to
    ;; `LaTeX-indent-environment-list' in order not to override custom settings.
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
-               '("xltabular" LaTeX-indent-tabular) t)
+                '("xltabular" LaTeX-indent-tabular) t)
 
    ;; Append xltabular to `LaTeX-label-alist', in order not to
    ;; override possible custome values.
diff --git a/style/xparse.el b/style/xparse.el
index 1e54c6c..5dd4f84 100644
--- a/style/xparse.el
+++ b/style/xparse.el
@@ -40,8 +40,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-auto-add-type "xparse-macro" "LaTeX")
 
@@ -87,7 +87,7 @@ If OPTIONAL is non-nil, indicate it in minibuffer.  OP-BRACE 
sets
 the opening brace, CL-BRACE sets the closing one.  PROMPT
 replaces the standard one."
   (let ((TeX-arg-opening-brace op-brace)
-       (TeX-arg-closing-brace cl-brace))
+        (TeX-arg-closing-brace cl-brace))
     (TeX-argument-insert
      (TeX-read-string (TeX-argument-prompt optional prompt "Text"))
      optional)))
@@ -96,121 +96,121 @@ replaces the standard one."
   "Process parsed macro and environment definitions.
 TYPE is one of the symobols mac or env."
   (dolist (xcmd (if (eq type 'mac)
-                   (LaTeX-xparse-macro-list)
-                 (LaTeX-xparse-environment-list)))
+                    (LaTeX-xparse-macro-list)
+                  (LaTeX-xparse-environment-list)))
     (let ((name (car xcmd))
-         (spec (cadr xcmd))
-         args opt-star opt-token)
+          (spec (cadr xcmd))
+          args opt-star opt-token)
       (with-temp-buffer
-       (set-syntax-table LaTeX-mode-syntax-table)
-       ;; This one is probably not really needed?
-       (goto-char (point-min))
-       (insert (replace-regexp-in-string "[ \t\r\n%]" "" spec))
-       (goto-char (point-min))
-       (while (looking-at-p "[+!>bmrRvodODsteE]")
-         (cond (;; + or !: Long argument or space aware: Move over
-                ;; them.  b is special; only available for
-                ;; enviroments
-                (looking-at-p "[+!b]")
-                (forward-char 1))
-               ((looking-at-p ">")
-                ;; Argument processors: Move over > and a balanced
-                ;; {}
-                (forward-char 1)
-                (forward-sexp))
-               ;; Mandatory arguments:
-               ;; m: Ask for input with "Text" as prompt
-               ((looking-at-p "m")
-                (forward-char 1)
-                (push "Text" args))
-               ;; r<token1><token2>
-               ((looking-at-p "r")
-                (re-search-forward "r\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
-                (push `(LaTeX-arg-xparse-query
-                        ,(match-string-no-properties 1)
-                        ,(match-string-no-properties 2))
-                      args))
-               ;; R<token1><token2>{default}
-               ((looking-at-p "R")
-                (re-search-forward "R\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
-                (forward-sexp)
-                (push `(LaTeX-arg-xparse-query
-                        ,(match-string-no-properties 1)
-                        ,(match-string-no-properties 2))
-                      args))
-               ;; v: Use `TeX-arg-verb-delim-or-brace'
-               ((looking-at-p "v")
-                (forward-char 1)
-                (push 'TeX-arg-verb-delim-or-brace args))
-               ;; Optional arguments:
-               ;; o standard LaTeX optional in square brackets
-               ((looking-at-p "o")
-                (forward-char 1)
-                (push (vector "Text") args))
-               ;; d<token1><token2>
-               ((looking-at-p "d")
-                (re-search-forward "d\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
-                (push (vector 'LaTeX-arg-xparse-query
-                              (match-string-no-properties 1)
-                              (match-string-no-properties 2))
-                      args))
-               ;; O{default}
-               ((looking-at-p "O")
-                (forward-char 1)
-                (forward-sexp)
-                (push (vector "Text") args))
-               ;; D<token1><token2>{default}
-               ((looking-at-p "D")
-                (re-search-forward "D\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
-                (forward-sexp)
-                (push (vector 'LaTeX-arg-xparse-query
-                              (match-string-no-properties 1)
-                              (match-string-no-properties 2))
-                      args))
-               ;; s: optional star
-               ((looking-at-p "s")
-                (forward-char 1)
-                (setq opt-star t))
-               ;; t: optional <token>
-               ((looking-at-p "t")
-                (re-search-forward "t\\(.\\)" (+ (point) 2) t)
-                (setq opt-token (match-string-no-properties 1)))
-               ;; e & E are currently ignored.  e: If looking at a
-               ;; {, move one balanced expression, otherwise only
-               ;; one character.
-               ((looking-at-p "e")
-                (forward-char)
-                (if (looking-at-p TeX-grop)
-                    (forward-sexp)
-                  (forward-char)))
-               ;; E
-               ((looking-at-p "E")
-                (forward-char)
-                (if (looking-at-p TeX-grop)
-                    (forward-sexp)
-                  (forward-char))
-                (if (looking-at-p TeX-grop)
-                    (forward-sexp)
-                  (forward-char)))
-               ;; Finished:
-               (t nil))))
+        (set-syntax-table LaTeX-mode-syntax-table)
+        ;; This one is probably not really needed?
+        (goto-char (point-min))
+        (insert (replace-regexp-in-string "[ \t\r\n%]" "" spec))
+        (goto-char (point-min))
+        (while (looking-at-p "[+!>bmrRvodODsteE]")
+          (cond (;; + or !: Long argument or space aware: Move over
+                 ;; them.  b is special; only available for
+                 ;; enviroments
+                 (looking-at-p "[+!b]")
+                 (forward-char 1))
+                ((looking-at-p ">")
+                 ;; Argument processors: Move over > and a balanced
+                 ;; {}
+                 (forward-char 1)
+                 (forward-sexp))
+                ;; Mandatory arguments:
+                ;; m: Ask for input with "Text" as prompt
+                ((looking-at-p "m")
+                 (forward-char 1)
+                 (push "Text" args))
+                ;; r<token1><token2>
+                ((looking-at-p "r")
+                 (re-search-forward "r\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
+                 (push `(LaTeX-arg-xparse-query
+                         ,(match-string-no-properties 1)
+                         ,(match-string-no-properties 2))
+                       args))
+                ;; R<token1><token2>{default}
+                ((looking-at-p "R")
+                 (re-search-forward "R\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
+                 (forward-sexp)
+                 (push `(LaTeX-arg-xparse-query
+                         ,(match-string-no-properties 1)
+                         ,(match-string-no-properties 2))
+                       args))
+                ;; v: Use `TeX-arg-verb-delim-or-brace'
+                ((looking-at-p "v")
+                 (forward-char 1)
+                 (push 'TeX-arg-verb-delim-or-brace args))
+                ;; Optional arguments:
+                ;; o standard LaTeX optional in square brackets
+                ((looking-at-p "o")
+                 (forward-char 1)
+                 (push (vector "Text") args))
+                ;; d<token1><token2>
+                ((looking-at-p "d")
+                 (re-search-forward "d\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
+                 (push (vector 'LaTeX-arg-xparse-query
+                               (match-string-no-properties 1)
+                               (match-string-no-properties 2))
+                       args))
+                ;; O{default}
+                ((looking-at-p "O")
+                 (forward-char 1)
+                 (forward-sexp)
+                 (push (vector "Text") args))
+                ;; D<token1><token2>{default}
+                ((looking-at-p "D")
+                 (re-search-forward "D\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
+                 (forward-sexp)
+                 (push (vector 'LaTeX-arg-xparse-query
+                               (match-string-no-properties 1)
+                               (match-string-no-properties 2))
+                       args))
+                ;; s: optional star
+                ((looking-at-p "s")
+                 (forward-char 1)
+                 (setq opt-star t))
+                ;; t: optional <token>
+                ((looking-at-p "t")
+                 (re-search-forward "t\\(.\\)" (+ (point) 2) t)
+                 (setq opt-token (match-string-no-properties 1)))
+                ;; e & E are currently ignored.  e: If looking at a
+                ;; {, move one balanced expression, otherwise only
+                ;; one character.
+                ((looking-at-p "e")
+                 (forward-char)
+                 (if (looking-at-p TeX-grop)
+                     (forward-sexp)
+                   (forward-char)))
+                ;; E
+                ((looking-at-p "E")
+                 (forward-char)
+                 (if (looking-at-p TeX-grop)
+                     (forward-sexp)
+                   (forward-char))
+                 (if (looking-at-p TeX-grop)
+                     (forward-sexp)
+                   (forward-char)))
+                ;; Finished:
+                (t nil))))
       (if (eq type 'env)
-         (LaTeX-add-environments `(,name
-                                   LaTeX-env-args
-                                   ,@(reverse (copy-sequence args))))
-       (TeX-add-symbols (cons name
-                              (reverse (copy-sequence args))))
-       (when opt-star
-         (TeX-add-symbols (cons (concat name "*")
-                                (reverse (copy-sequence args)))))
-       (when opt-token
-         (TeX-add-symbols (cons (concat name opt-token)
-                                (reverse (copy-sequence args)))))))))
+          (LaTeX-add-environments `(,name
+                                    LaTeX-env-args
+                                    ,@(reverse (copy-sequence args))))
+        (TeX-add-symbols (cons name
+                               (reverse (copy-sequence args))))
+        (when opt-star
+          (TeX-add-symbols (cons (concat name "*")
+                                 (reverse (copy-sequence args)))))
+        (when opt-token
+          (TeX-add-symbols (cons (concat name opt-token)
+                                 (reverse (copy-sequence args)))))))))
 
 (defun LaTeX-xparse-auto-prepare ()
   "Clear various `LaTeX-auto-xparse-*' variables before parsing."
   (setq LaTeX-auto-xparse-macro nil
-       LaTeX-auto-xparse-environment nil))
+        LaTeX-auto-xparse-environment nil))
 
 (defun LaTeX-xparse-auto-cleanup ()
   "Process parsed elements for xparse package."
@@ -286,22 +286,22 @@ TYPE is one of the symobols mac or env."
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("DeclareDocumentCommand" "|{\\{{")
-                               ("NewDocumentCommand"     "|{\\{{")
-                               ("ProvideDocumentCommand" "|{\\{{")
-                               ("RenewDocumentCommand"   "|{\\{{")
-                               ;;
-                               ("DeclareExpandableDocumentCommand" "|{\\{{")
-                               ("NewExpandableDocumentCommand"     "|{\\{{")
-                               ("ProvideExpandableDocumentCommand" "|{\\{{")
-                               ("RenewExpandableDocumentCommand"   "|{\\{{")
-                               ;;
-                               ("DeclareDocumentEnvironment" "{{{{")
-                               ("NewDocumentEnvironment"     "{{{{")
-                               ("ProvideDocumentEnvironment" "{{{{")
-                               ("RenewDocumentEnvironment"   "{{{{"))
-                             'function)))
+                                ("NewDocumentCommand"     "|{\\{{")
+                                ("ProvideDocumentCommand" "|{\\{{")
+                                ("RenewDocumentCommand"   "|{\\{{")
+                                ;;
+                                ("DeclareExpandableDocumentCommand" "|{\\{{")
+                                ("NewExpandableDocumentCommand"     "|{\\{{")
+                                ("ProvideExpandableDocumentCommand" "|{\\{{")
+                                ("RenewExpandableDocumentCommand"   "|{\\{{")
+                                ;;
+                                ("DeclareDocumentEnvironment" "{{{{")
+                                ("NewDocumentEnvironment"     "{{{{")
+                                ("ProvideDocumentEnvironment" "{{{{")
+                                ("RenewDocumentEnvironment"   "{{{{"))
+                              'function)))
  TeX-dialect)
 
 (defun LaTeX-xparse-package-options ()
diff --git a/style/xspace.el b/style/xspace.el
index 643060c..5f04c5b 100644
--- a/style/xspace.el
+++ b/style/xspace.el
@@ -34,8 +34,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "xspace"
@@ -47,11 +47,11 @@
 
    ;; Fontification
    (when (and (featurep 'font-latex)
-             (eq TeX-install-font-lock 'font-latex-setup))
+              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("xspace" "")
-                               ("xspaceaddexception" "{")
-                               ("xspaceremoveexception" "{"))
-                             'function)))
+                                ("xspaceaddexception" "{")
+                                ("xspaceremoveexception" "{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-xspace-package-options nil
diff --git a/style/zlmtt.el b/style/zlmtt.el
index 2ee692c..40712fc 100644
--- a/style/zlmtt.el
+++ b/style/zlmtt.el
@@ -35,8 +35,8 @@
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
-                 "font-latex"
-                 (keywords class))
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "zlmtt"
diff --git a/tests/japanese/error-parsing.el b/tests/japanese/error-parsing.el
index c2f8f90..da6a413 100644
--- a/tests/japanese/error-parsing.el
+++ b/tests/japanese/error-parsing.el
@@ -31,34 +31,34 @@
 It should pick up error messages from the log file even if
 tex-jp.el modified `TeX-error-description-list'."
   (should (let* ((dummyfile (make-temp-file "japanese-TeX-ert"))
-                (logfile (concat dummyfile ".log")))
-           (find-file logfile)
-           (insert "\
+                 (logfile (concat dummyfile ".log")))
+            (find-file logfile)
+            (insert "\
 ./errorsamp.tex:3: EROOR NEVER COVERED BY TeX-error-description-list.
 l.3 }
      
 FOO BAR
 HOGE FUGA
 ")
-           (save-buffer 0)
-           (find-file dummyfile)
-           ;; Actually, the contents of dummyfile is irrelavent to
-           ;; this test.  It is only used to make the log file name
-           ;; which is analysed in `TeX-help-error' to be
-           ;; predictable.
-           (let ((TeX-command-buffer (current-buffer)))
-             (TeX-help-error
-              "EROOR NEVER COVERED BY TeX-error-description-list."
-              "" (current-buffer) 'error))
-           (delete-other-windows)
-           (kill-buffer (get-file-buffer logfile))
-           (delete-file logfile)
-           (kill-buffer (get-file-buffer dummyfile))
-           (delete-file dummyfile)
-           (set-buffer "*TeX Help*")
-           (goto-char (point-min))
-           (prog1
-               (search-forward "From the .log file...")
-             (kill-buffer)))))
+            (save-buffer 0)
+            (find-file dummyfile)
+            ;; Actually, the contents of dummyfile is irrelavent to
+            ;; this test.  It is only used to make the log file name
+            ;; which is analysed in `TeX-help-error' to be
+            ;; predictable.
+            (let ((TeX-command-buffer (current-buffer)))
+              (TeX-help-error
+               "EROOR NEVER COVERED BY TeX-error-description-list."
+               "" (current-buffer) 'error))
+            (delete-other-windows)
+            (kill-buffer (get-file-buffer logfile))
+            (delete-file logfile)
+            (kill-buffer (get-file-buffer dummyfile))
+            (delete-file dummyfile)
+            (set-buffer "*TeX Help*")
+            (goto-char (point-min))
+            (prog1
+                (search-forward "From the .log file...")
+              (kill-buffer)))))
 
 ;;; error-parsing.el ends here
diff --git a/tests/japanese/parse-timing.el b/tests/japanese/parse-timing.el
index 1c49eb7..a05b06f 100644
--- a/tests/japanese/parse-timing.el
+++ b/tests/japanese/parse-timing.el
@@ -40,13 +40,13 @@
 (ert-deftest japanese-TeX-style-hook-timing ()
   "Test style hooks are not called too early."
   (let ((TeX-parse-self t)
-       (TeX-master t)
-       (LaTeX-mode-hook '(japanese-latex-mode-initialization
-                          turn-on-reftex)))
+        (TeX-master t)
+        (LaTeX-mode-hook '(japanese-latex-mode-initialization
+                           turn-on-reftex)))
     (find-file parse-timing)
     (should (memq 'AMSTeX
-                 (get reftex-docstruct-symbol
-                      'reftex-label-alist-style)))
+                  (get reftex-docstruct-symbol
+                       'reftex-label-alist-style)))
     (kill-buffer)))
 
 ;;; parse-timing.el ends here
diff --git a/tests/japanese/preview-latex.el b/tests/japanese/preview-latex.el
index 5ca3d96..ec54f11 100644
--- a/tests/japanese/preview-latex.el
+++ b/tests/japanese/preview-latex.el
@@ -50,11 +50,11 @@ character used to cause trouble.  Such patterns are tested."
   ;; batch mode.
   (skip-unless (not noninteractive))
   (let ((TeX-clean-confirm nil)
-       (preview-auto-cache-preamble nil)
-       (process-environment (copy-sequence process-environment))
-       (locale-coding-system 'shift_jis)
-       (TeX-japanese-process-output-coding-system nil)
-       (TeX-japanese-process-input-coding-system nil))
+        (preview-auto-cache-preamble nil)
+        (process-environment (copy-sequence process-environment))
+        (locale-coding-system 'shift_jis)
+        (TeX-japanese-process-output-coding-system nil)
+        (TeX-japanese-process-input-coding-system nil))
     ;; Make platex binary to output in `shift_jis' encoding.
     (setenv "LC_ALL" "ja_JP.SJIS")
     ;; If your startup script for `TeX-shell' (normally "/bin/sh")
@@ -62,33 +62,33 @@ character used to cause trouble.  Such patterns are tested."
     ;; I.e., the positive result can be reported as negative, and the
     ;; negative can be as positive.
     (unwind-protect
-       (save-window-excursion
-         (find-file platex-shift-jis)
-         (delete-other-windows)
-         (preview-document)
-         (message "Please wait for asynchronous process to finish...")
-         (sleep-for 5)
-         ;; Actually, this type of trouble seems to be captured early by
-         ;; ert mechanism as error and not to reach here.
-         (should-not (string-match "error in process sentinel:"
-                                   (current-message)))
-         (message "Please wait for asynchronous process to finish...done")
-         (message "Type %s when checking is done."
-                  (substitute-command-keys "\\[exit-recursive-edit]"))
-         (recursive-edit)
-         (should (yes-or-no-p "\
+        (save-window-excursion
+          (find-file platex-shift-jis)
+          (delete-other-windows)
+          (preview-document)
+          (message "Please wait for asynchronous process to finish...")
+          (sleep-for 5)
+          ;; Actually, this type of trouble seems to be captured early by
+          ;; ert mechanism as error and not to reach here.
+          (should-not (string-match "error in process sentinel:"
+                                    (current-message)))
+          (message "Please wait for asynchronous process to finish...done")
+          (message "Type %s when checking is done."
+                   (substitute-command-keys "\\[exit-recursive-edit]"))
+          (recursive-edit)
+          (should (yes-or-no-p "\
 Did all images come out at the correct position? ")))
       ;; Cleanup.
       (set-buffer (get-file-buffer platex-shift-jis))
       (let* ((buffer (TeX-process-buffer-name (TeX-master-file nil t)))
-            (process (get-buffer-process buffer)))
-       (if process (delete-process process))
-       (kill-buffer buffer))
+             (process (get-buffer-process buffer)))
+        (if process (delete-process process))
+        (kill-buffer buffer))
       (preview-clearout-document)
       (TeX-clean t)
       (dolist (dir preview-temp-dirs)
-       (if (file-exists-p (directory-file-name dir))
-           (delete-directory dir t)))
+        (if (file-exists-p (directory-file-name dir))
+            (delete-directory dir t)))
       (kill-buffer))))
 
 (ert-deftest japanese-preview-different-coding-system ()
@@ -100,11 +100,11 @@ the process differ."
   ;; batch mode.
   (skip-unless (not noninteractive))
   (let ((TeX-clean-confirm nil)
-       (preview-auto-cache-preamble nil)
-       (process-environment (copy-sequence process-environment))
-       (locale-coding-system 'shift_jis)
-       (TeX-japanese-process-output-coding-system nil)
-       (TeX-japanese-process-input-coding-system nil))
+        (preview-auto-cache-preamble nil)
+        (process-environment (copy-sequence process-environment))
+        (locale-coding-system 'shift_jis)
+        (TeX-japanese-process-output-coding-system nil)
+        (TeX-japanese-process-input-coding-system nil))
     ;; Make platex binary to output in `shift_jis' encoding.
     (setenv "LC_ALL" "ja_JP.SJIS")
     ;; If your startup script for `TeX-shell' (normally "/bin/sh")
@@ -112,33 +112,33 @@ the process differ."
     ;; I.e., the positive result can be reported as negative, and the
     ;; negative can be as positive.
     (unwind-protect
-       (save-window-excursion
-         (find-file different-coding-system)
-         (delete-other-windows)
-         (preview-document)
-         (message "Please wait for asynchronous process to finish...")
-         (sleep-for 5)
-         ;; Actually, this type of trouble seems to be captured early by
-         ;; ert mechanism as error and not to reach here.
-         (should-not (string-match "error in process sentinel:"
-                                   (current-message)))
-         (message "Please wait for asynchronous process to finish...done")
-         (message "Type %s when checking is done."
-                  (substitute-command-keys "\\[exit-recursive-edit]"))
-         (recursive-edit)
-         (should (yes-or-no-p "\
+        (save-window-excursion
+          (find-file different-coding-system)
+          (delete-other-windows)
+          (preview-document)
+          (message "Please wait for asynchronous process to finish...")
+          (sleep-for 5)
+          ;; Actually, this type of trouble seems to be captured early by
+          ;; ert mechanism as error and not to reach here.
+          (should-not (string-match "error in process sentinel:"
+                                    (current-message)))
+          (message "Please wait for asynchronous process to finish...done")
+          (message "Type %s when checking is done."
+                   (substitute-command-keys "\\[exit-recursive-edit]"))
+          (recursive-edit)
+          (should (yes-or-no-p "\
 Did all images come out at the correct position? ")))
       ;; Cleanup.
       (set-buffer (get-file-buffer different-coding-system))
       (let* ((buffer (TeX-process-buffer-name (TeX-master-file nil t)))
-            (process (get-buffer-process buffer)))
-       (if process (delete-process process))
-       (kill-buffer buffer))
+             (process (get-buffer-process buffer)))
+        (if process (delete-process process))
+        (kill-buffer buffer))
       (preview-clearout-document)
       (TeX-clean t)
       (dolist (dir preview-temp-dirs)
-       (if (file-exists-p (directory-file-name dir))
-           (delete-directory dir t)))
+        (if (file-exists-p (directory-file-name dir))
+            (delete-directory dir t)))
       (kill-buffer))))
 
 (ert-deftest japanese-preview-preserve-kanji-option ()
@@ -152,33 +152,33 @@ is enabled."
   ;; batch mode.
   (skip-unless (not noninteractive))
   (let ((TeX-clean-confirm nil)
-       (preview-auto-cache-preamble t)
-       (TeX-japanese-process-output-coding-system nil)
-       (TeX-japanese-process-input-coding-system nil))
+        (preview-auto-cache-preamble t)
+        (TeX-japanese-process-output-coding-system nil)
+        (TeX-japanese-process-input-coding-system nil))
     (unwind-protect
-       (save-window-excursion
-         (find-file preserve-kanji-option)
-         (delete-other-windows)
-         (preview-document)
-         (message "Please wait for asynchronous process to finish...")
-         (sleep-for 3)
-         (message "Please wait for asynchronous process to finish...done")
-         (message "Type %s when checking is done."
-                  (substitute-command-keys "\\[exit-recursive-edit]"))
-         (recursive-edit)
-         (should (yes-or-no-p "\
+        (save-window-excursion
+          (find-file preserve-kanji-option)
+          (delete-other-windows)
+          (preview-document)
+          (message "Please wait for asynchronous process to finish...")
+          (sleep-for 3)
+          (message "Please wait for asynchronous process to finish...done")
+          (message "Type %s when checking is done."
+                   (substitute-command-keys "\\[exit-recursive-edit]"))
+          (recursive-edit)
+          (should (yes-or-no-p "\
 Did the image come out at the correct position? ")))
       ;; Cleanup.
       (set-buffer (get-file-buffer preserve-kanji-option))
       (let* ((buffer (TeX-process-buffer-name (TeX-master-file nil t)))
-            (process (get-buffer-process buffer)))
-       (if process (delete-process process))
-       (kill-buffer buffer))
+             (process (get-buffer-process buffer)))
+        (if process (delete-process process))
+        (kill-buffer buffer))
       (preview-clearout-document)
       (TeX-clean t)
       (dolist (dir preview-temp-dirs)
-       (if (file-exists-p (directory-file-name dir))
-           (delete-directory dir t)))
+        (if (file-exists-p (directory-file-name dir))
+            (delete-directory dir t)))
       (kill-buffer))))
 
 ;; The following tests the individual parts fixed in May 2017 and can be
@@ -190,7 +190,7 @@ Did the image come out at the correct position? ")))
   "`preview-error-quote' is robust against `shift_jis' or not.
 String encoded in `shift_jis' can have regexp meta characters in it."
   (let (case-fold-search
-       (buffer-file-coding-system 'shift_jis))
+        (buffer-file-coding-system 'shift_jis))
     (dolist (str '("$BI=(B(1)" "$BM=(B{a}" "$BG=(B|" "{$B$"(B} 
%$BG=(B" "$B%"!<%9(B" "$B7?(B"))
       (should (string-match (preview-error-quote str) str)))))
 
@@ -217,68 +217,68 @@ String encoded in `shift_jis' can have regexp meta 
characters in it."
 (ert-deftest japanese-preview-preserve-kanji-option2 ()
   "Test command to use dumped format preserves kanji option or not."
   (let ((TeX-clean-confirm nil)
-       ;; Make `preview-call-hook' inactive.
-       (preview-image-creators nil)
-       dummyfile process)
+        ;; Make `preview-call-hook' inactive.
+        (preview-image-creators nil)
+        dummyfile process)
     (unwind-protect
-       (save-window-excursion
-         (find-file preserve-kanji-option)
-         (setq dummyfile (TeX-master-file))
-         (delete-other-windows)
-         (setq process (TeX-inline-preview-internal
-                        (preview-do-replacements
-                         (TeX-command-expand
-                          (preview-string-expand preview-LaTeX-command))
-                         preview-LaTeX-command-replacements)
-                        dummyfile '(nil . nil) (current-buffer)
-                        '(nil . (t . t)) dummyfile '(nil nil nil)))
-         (let ((cmd (process-command process)))
-           (should (string-match "-kanji" (nth (1- (length cmd)) cmd)))))
+        (save-window-excursion
+          (find-file preserve-kanji-option)
+          (setq dummyfile (TeX-master-file))
+          (delete-other-windows)
+          (setq process (TeX-inline-preview-internal
+                         (preview-do-replacements
+                          (TeX-command-expand
+                           (preview-string-expand preview-LaTeX-command))
+                          preview-LaTeX-command-replacements)
+                         dummyfile '(nil . nil) (current-buffer)
+                         '(nil . (t . t)) dummyfile '(nil nil nil)))
+          (let ((cmd (process-command process)))
+            (should (string-match "-kanji" (nth (1- (length cmd)) cmd)))))
       ;; Cleanup.
       (accept-process-output process)
       (set-buffer (get-file-buffer preserve-kanji-option))
       (let* ((buffer (TeX-process-buffer-name (TeX-master-file nil t)))
-            (process (get-buffer-process buffer)))
-       (if process (delete-process process))
-       (kill-buffer buffer))
+             (process (get-buffer-process buffer)))
+        (if process (delete-process process))
+        (kill-buffer buffer))
       (TeX-clean t)
       (dolist (dir preview-temp-dirs)
-       (if (file-exists-p (directory-file-name dir))
-           (delete-directory dir t)))
+        (if (file-exists-p (directory-file-name dir))
+            (delete-directory dir t)))
       (kill-buffer))))
 
 (ert-deftest japanese-preview-preserve-kanji-option3 ()
   "Test command to dump format file preserves kanji option or not."
   (let ((TeX-clean-confirm nil)
-       ;; Make `preview-call-hook' inactive.
-       (preview-image-creators nil)
-       (preview-format-name "dummy")
-       dummyfile process)
+        ;; Make `preview-call-hook' inactive.
+        (preview-image-creators nil)
+        (preview-format-name "dummy")
+        dummyfile process)
     (unwind-protect
-       (save-window-excursion
-         (find-file preserve-kanji-option)
-         (setq dummyfile (TeX-master-file))
-         (delete-other-windows)
-         (setq process (TeX-inline-preview-internal
-                        (preview-do-replacements
-                         (TeX-command-expand
-                          (preview-string-expand preview-LaTeX-command))
-                         preview-dump-replacements)
-                        dummyfile '(nil . nil) (current-buffer)
-                        nil dummyfile '(nil nil nil)))
-         (let ((cmd (process-command process)))
-           (should (string-match "-kanji" (nth (1- (length cmd)) cmd)))))
+        (save-window-excursion
+          (find-file preserve-kanji-option)
+          (setq dummyfile (TeX-master-file))
+          (delete-other-windows)
+          (setq process (TeX-inline-preview-internal
+                         (preview-do-replacements
+                          (TeX-command-expand
+                           (preview-string-expand preview-LaTeX-command))
+                          preview-dump-replacements)
+                         dummyfile '(nil . nil) (current-buffer)
+                         nil dummyfile '(nil nil nil)))
+          (let ((cmd (process-command process)))
+            (should (string-match "-kanji" (nth (1- (length cmd)) cmd)))))
       ;; Cleanup.
       (accept-process-output process)
       (set-buffer (get-file-buffer preserve-kanji-option))
       (let* ((buffer (TeX-process-buffer-name (TeX-master-file nil t)))
-            (process (get-buffer-process buffer)))
-       (if process (delete-process process))
-       (kill-buffer buffer))
+             (process (get-buffer-process buffer)))
+        (if process (delete-process process))
+        (kill-buffer buffer))
       (TeX-clean t)
       (dolist (dir preview-temp-dirs)
-       (if (file-exists-p (directory-file-name dir))
-           (delete-directory dir t)))
+        (if (file-exists-p (directory-file-name dir))
+            (delete-directory dir t)))
       (kill-buffer))))
 
 ;;; preview-latex.el ends here
diff --git a/tests/latex/font-latex-test.el b/tests/latex/font-latex-test.el
index a869fe4..82579a3 100644
--- a/tests/latex/font-latex-test.el
+++ b/tests/latex/font-latex-test.el
@@ -33,20 +33,20 @@
   ;; ignore them and search another occurence of $. That is the
   ;; behavior expected for MATCHER function of `font-lock-keywords'.
   (should (let ((TeX-install-font-lock 'font-latex-setup))
-           (with-temp-buffer
-             (insert "% $$$ $$$
+            (with-temp-buffer
+              (insert "% $$$ $$$
 $a$")
-             (LaTeX-mode)
-             (goto-char (point-min))
-             (setq font-latex--updated-region-end (point-max))
-             (font-latex-match-dollar-math (point-max))))))
+              (LaTeX-mode)
+              (goto-char (point-min))
+              (setq font-latex--updated-region-end (point-max))
+              (font-latex-match-dollar-math (point-max))))))
 
 (ert-deftest font-latex-extend-region-backwards-quotation ()
   "Test f-l-e-r-b-q doesn't extend region too eagerly."
   (with-temp-buffer
     (let ((TeX-install-font-lock 'font-latex-setup)
-         (font-latex-quotes 'french)
-         font-lock-beg font-lock-end)
+          (font-latex-quotes 'french)
+          font-lock-beg font-lock-end)
       (LaTeX-mode)
 
       ;; Test 1: Double prime in math expression doesn't cause region
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index c8ecff7..4600ad6 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -82,16 +82,16 @@
            (with-temp-buffer
              (insert-file-contents LaTeX-filling/in)
              (LaTeX-mode)
-            (let ((fill-column 70))
-              (fill-paragraph)
-              (let ((cmds '("captionsetup" "caption"
-                            "parencite"    "par")))
-                (dolist (cmd cmds)
-                  (search-forward (concat "\\" cmd))
-                  (save-excursion
-                    (end-of-line 0)
-                    (fill-paragraph)))))
-            (buffer-string))
+             (let ((fill-column 70))
+               (fill-paragraph)
+               (let ((cmds '("captionsetup" "caption"
+                             "parencite"    "par")))
+                 (dolist (cmd cmds)
+                   (search-forward (concat "\\" cmd))
+                   (save-excursion
+                     (end-of-line 0)
+                     (fill-paragraph)))))
+             (buffer-string))
            (with-temp-buffer
              (insert-file-contents LaTeX-filling/out)
              (buffer-string)))))
@@ -103,12 +103,12 @@
   (should (string=
            (with-temp-buffer
              (LaTeX-mode)
-            (LaTeX-insert-environment (concat TeX-esc "foo{bar}"))
-            (LaTeX-modify-environment "foobar")
+             (LaTeX-insert-environment (concat TeX-esc "foo{bar}"))
+             (LaTeX-modify-environment "foobar")
              (buffer-string))
            (with-temp-buffer
              (LaTeX-mode)
-            (LaTeX-insert-environment "foobar")
+             (LaTeX-insert-environment "foobar")
              (buffer-string)))))
 
 ;; Test for inserting &'s with `M-RET' in various tabular environment.
@@ -116,20 +116,20 @@
 ;; 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 "\\"):
-            (let ((TeX-insert-macro-default-style 'mandatory-args-only))
-              (while (search-forward "LaTeX-insert-item" nil t)
-                (LaTeX-insert-item)))
-            (buffer-string))
-          (with-temp-buffer
-            (insert-file-contents tabular-count-ampersands/out)
-            (LaTeX-mode)
-            (buffer-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 "\\"):
+             (let ((TeX-insert-macro-default-style 'mandatory-args-only))
+               (while (search-forward "LaTeX-insert-item" nil t)
+                 (LaTeX-insert-item)))
+             (buffer-string))
+           (with-temp-buffer
+             (insert-file-contents tabular-count-ampersands/out)
+             (LaTeX-mode)
+             (buffer-string)))))
 
 (ert-deftest LaTeX-addbibresource ()
   "Check parsing of bibliography files added with addbibresource.
@@ -142,7 +142,7 @@ last extension is stripped."
       (insert "\\addbibresource{../foo-1.bar_2.qux3.ext}")
       (LaTeX-mode)
       (let ((TeX-parse-self t))
-       (TeX-update-style t))
+        (TeX-update-style t))
       (LaTeX-bibliography-list))
     '(("../foo-1.bar_2.qux3")))))
 
@@ -160,7 +160,7 @@ backend=biber % here is a comment
       (TeX-update-style t))
     (should (member "biblatex" (TeX-style-list)))
     (should (LaTeX-provided-package-options-member
-            "biblatex" "backend=biber"))))
+             "biblatex" "backend=biber"))))
 
 (ert-deftest LaTeX-includegraphics-extensions ()
   "Check correct extensions are generated accoding to `TeX-engine'."
@@ -170,53 +170,53 @@ backend=biber % here is a comment
   ;; `luatex'.
   ;; c.f. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31718
   :expected-result (if (and (= emacs-major-version 26)
-                           (= emacs-minor-version 1))
-                      :failed
-                    :passed)
+                            (= emacs-minor-version 1))
+                       :failed
+                     :passed)
   (with-temp-buffer
     (LaTeX-mode)
     (TeX-load-style "graphicx")
     (let (TeX-engine TeX-PDF-mode TeX-PDF-from-DVI
-                    TeX-PDF-via-dvips-ps2pdf TeX-DVI-via-PDFTeX)
+                     TeX-PDF-via-dvips-ps2pdf TeX-DVI-via-PDFTeX)
       ;; tests for default engine
       (setq TeX-engine 'default)
       ;; default 1
       (setq TeX-PDF-mode t
-           TeX-PDF-from-DVI nil
-           TeX-DVI-via-PDFTeX nil)
+            TeX-PDF-from-DVI nil
+            TeX-DVI-via-PDFTeX nil)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("png" "pdf" "jpe?g" "jbig2" "jb2" "mps"
-                     "PNG" "PDF" "JPE?G" "JBIG2" "JB2" "eps") #'string<)))
+              (sort '("png" "pdf" "jpe?g" "jbig2" "jb2" "mps"
+                      "PNG" "PDF" "JPE?G" "JBIG2" "JB2" "eps") #'string<)))
       ;; default 2
       (setq TeX-PDF-mode t
-           TeX-PDF-from-DVI "Dvips"
-           TeX-DVI-via-PDFTeX nil)
+            TeX-PDF-from-DVI "Dvips"
+            TeX-DVI-via-PDFTeX nil)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("eps" "mps" "EPS") #'string<)))
+              (sort '("eps" "mps" "EPS") #'string<)))
       ;; default 3
       (setq TeX-PDF-mode nil
-           TeX-PDF-from-DVI nil
-           TeX-DVI-via-PDFTeX nil)
+            TeX-PDF-from-DVI nil
+            TeX-DVI-via-PDFTeX nil)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("eps" "mps" "EPS") #'string<)))
+              (sort '("eps" "mps" "EPS") #'string<)))
       ;; default 4
       (setq TeX-PDF-mode nil
-           TeX-PDF-from-DVI nil
-           TeX-DVI-via-PDFTeX t)
+            TeX-PDF-from-DVI nil
+            TeX-DVI-via-PDFTeX t)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("png" "pdf" "jpe?g" "jbig2" "jb2" "mps"
-                     "PNG" "PDF" "JPE?G" "JBIG2" "JB2" "eps") #'string<)))
+              (sort '("png" "pdf" "jpe?g" "jbig2" "jb2" "mps"
+                      "PNG" "PDF" "JPE?G" "JBIG2" "JB2" "eps") #'string<)))
       ;; default 5
       (setq TeX-PDF-mode t
-           TeX-PDF-from-DVI "Dvipdfmx"
-           TeX-DVI-via-PDFTeX nil)
+            TeX-PDF-from-DVI "Dvipdfmx"
+            TeX-DVI-via-PDFTeX nil)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("eps" "mps" "EPS" "jpe?g" "pdf" "png") #'string<)))
+              (sort '("eps" "mps" "EPS" "jpe?g" "pdf" "png") #'string<)))
 
       ;; tests for luatex engine
       (setq TeX-engine 'luatex)
@@ -224,38 +224,38 @@ backend=biber % here is a comment
       (setq TeX-PDF-mode t)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("png" "pdf" "jpe?g" "jbig2" "jb2" "mps"
-                     "PNG" "PDF" "JPE?G" "JBIG2" "JB2" "eps") #'string<)))
+              (sort '("png" "pdf" "jpe?g" "jbig2" "jb2" "mps"
+                      "PNG" "PDF" "JPE?G" "JBIG2" "JB2" "eps") #'string<)))
       ;; luatex 2
       (setq TeX-PDF-mode nil)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("eps" "mps" "EPS") #'string<)))
+              (sort '("eps" "mps" "EPS") #'string<)))
 
       ;; test for xetex engine
       (setq TeX-engine 'xetex)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("pdf" "eps" "mps" "ps" "png" "jpe?g" "jp2" "jpf"
-                     "PDF" "EPS" "MPS" "PS" "PNG" "JPE?G" "JP2" "JPF"
-                     "bmp" "pict" "psd" "mac" "tga" "gif" "tif" "tiff"
-                     "BMP" "PICT" "PSD" "MAC" "TGA" "GIF" "TIF" "TIFF")
-                   #'string<)))
+              (sort '("pdf" "eps" "mps" "ps" "png" "jpe?g" "jp2" "jpf"
+                      "PDF" "EPS" "MPS" "PS" "PNG" "JPE?G" "JP2" "JPF"
+                      "bmp" "pict" "psd" "mac" "tga" "gif" "tif" "tiff"
+                      "BMP" "PICT" "PSD" "MAC" "TGA" "GIF" "TIF" "TIFF")
+                    #'string<)))
 
       ;; test for other engine
       (setq TeX-engine 'omega)
       ;; other 1
       (setq TeX-PDF-mode t
-           TeX-PDF-from-DVI "Dvipdfmx")
+            TeX-PDF-from-DVI "Dvipdfmx")
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("eps" "mps" "EPS" "jpe?g" "pdf" "png") #'string<)))
+              (sort '("eps" "mps" "EPS" "jpe?g" "pdf" "png") #'string<)))
       ;; other 2
       (setq TeX-PDF-mode nil
-           TeX-PDF-from-DVI nil)
+            TeX-PDF-from-DVI nil)
       (should
        (equal (sort (LaTeX-includegraphics-extensions-list) #'string<)
-             (sort '("eps" "jpe?g" "pdf" "png") #'string<))))))
+              (sort '("eps" "jpe?g" "pdf" "png") #'string<))))))
 
 (ert-deftest LaTeX-style-hook-with-class-option ()
   "Check style hooks associated with class option are processed."
@@ -264,9 +264,9 @@ backend=biber % here is a comment
       ;; test for dvips option
       ;; This depends on the following code in latex.el:
       ;; (TeX-add-style-hook "dvips"
-      ;;                     (lambda ()
-      ;;                       (setq TeX-PDF-from-DVI "Dvips"))
-      ;;                     :classopt)
+      ;;                      (lambda ()
+      ;;                        (setq TeX-PDF-from-DVI "Dvips"))
+      ;;                      :classopt)
       (insert "\\documentclass[dvips]{article}\n")
       (latex-mode)
       (TeX-update-style)
@@ -277,13 +277,13 @@ backend=biber % here is a comment
       (erase-buffer)
       ;; This depends on the following code in latex.el:
       ;; (TeX-add-style-hook "dvipdfmx"
-      ;;                     (lambda ()
-      ;;                       (TeX-PDF-mode-on)
-      ;;                       ;; XeLaTeX normally don't use dvipdfmx
-      ;;                       ;; explicitly.
-      ;;                       (unless (eq TeX-engine 'xetex)
-      ;;                         (setq TeX-PDF-from-DVI "Dvipdfmx")))
-      ;;                     :classopt)
+      ;;                      (lambda ()
+      ;;                        (TeX-PDF-mode-on)
+      ;;                        ;; XeLaTeX normally don't use dvipdfmx
+      ;;                        ;; explicitly.
+      ;;                        (unless (eq TeX-engine 'xetex)
+      ;;                          (setq TeX-PDF-from-DVI "Dvipdfmx")))
+      ;;                      :classopt)
       (insert "\\documentclass[dvipdfmx]{article}\n")
       (latex-mode)
       (TeX-update-style)
@@ -295,7 +295,7 @@ backend=biber % here is a comment
       ;; XeLaTeX document
       (latex-mode)
       (let ((TeX-engine 'xetex))
-       (TeX-update-style))
+        (TeX-update-style))
       (should TeX-PDF-mode)
       (should (not (TeX-PDF-from-DVI)))
       (should (not (member "dvipdfmx" TeX-active-styles)))
@@ -328,7 +328,7 @@ backend=biber % here is a comment
   ;; prefix, or both.
   (with-temp-buffer
     (let ((transient-mark-mode t)
-         (LaTeX-insert-into-comments t))
+          (LaTeX-insert-into-comments t))
       (latex-mode)
       (auto-fill-mode 1)
 
@@ -345,8 +345,8 @@ backend=biber % here is a comment
       (beginning-of-line 2) ; just before the first "%".
       (LaTeX-insert-environment "verbatim")
       (should (string=
-              (buffer-string)
-              "\\begin{document}
+               (buffer-string)
+               "\\begin{document}
 % \\begin{verbatim}
 % This is a comment
 \\def\\foo#1{foo}
@@ -368,8 +368,8 @@ backend=biber % here is a comment
       (beginning-of-line 2) ; just before the first "%".
       (LaTeX-insert-environment "verbatim")
       (should (string=
-              (buffer-string)
-              "\\begin{document}
+               (buffer-string)
+               "\\begin{document}
 % \\begin{verbatim}
 % This is a comment
 \\def\\foo#1{foo}
@@ -393,8 +393,8 @@ backend=biber % here is a comment
       (beginning-of-line 2) ; just before the first "%".
       (LaTeX-insert-environment "verbatim")
       (should (string=
-              (buffer-string)
-              "\\begin{document}
+               (buffer-string)
+               "\\begin{document}
 \\begin{verbatim}
 % This is a comment
 \\def\\foo#1{foo}
@@ -414,8 +414,8 @@ backend=biber % here is a comment
       (goto-char 8) ; just after "def"
       (LaTeX-insert-environment "center")
       (should (string=
-              (buffer-string)
-              "abc
+               (buffer-string)
+               "abc
 \\begin{center}
   def
 \\end{center}
@@ -430,8 +430,8 @@ ghi")
       (set-mark (line-end-position)) ; just after "def"
       (LaTeX-insert-environment "center")
       (should (string=
-              (buffer-string)
-              "abc
+               (buffer-string)
+               "abc
 \\begin{center}
   def
 \\end{center}
@@ -450,8 +450,8 @@ ghi"))
       (beginning-of-line 2) ; just before the first "%"
       (LaTeX-insert-environment "center")
       (should (string=
-              (buffer-string)
-              "\\begin{quote}
+               (buffer-string)
+               "\\begin{quote}
   % \\begin{center}
   %   abc
   %   def
@@ -475,8 +475,8 @@ ghi"))
       (beginning-of-line 2) ; just before the first "  %"
       (LaTeX-insert-environment "center")
       (should (string=
-              (buffer-string)
-              "\\begin{quote}
+               (buffer-string)
+               "\\begin{quote}
   % \\begin{center}
   %   abc
   %   def
@@ -501,8 +501,8 @@ ghi"))
       (forward-char 2) ; just before the first "%"
       (LaTeX-insert-environment "center")
       (should (string=
-              (buffer-string)
-              "\\begin{quote}
+               (buffer-string)
+               "\\begin{quote}
   % \\begin{center}
   %   abc
   %   def
@@ -526,8 +526,8 @@ ghi"))
       (beginning-of-line 2) ; just before the first "  %"
       (LaTeX-insert-environment "center")
       (should (string=
-              (buffer-string)
-              "\\begin{quote}
+               (buffer-string)
+               "\\begin{quote}
   \\begin{center}
     % abc
     % def
diff --git a/tests/latex/preview-latex-test.el 
b/tests/latex/preview-latex-test.el
index ecc05fe..a8375cb 100644
--- a/tests/latex/preview-latex-test.el
+++ b/tests/latex/preview-latex-test.el
@@ -30,11 +30,11 @@ If a utf-8 byte sequence is partially ^^-quoted in latex 
output, we have
 to decode ^^ab as raw 8-bit character first and decode in the sense of
 emacs' coding system later."
   (let (case-fold-search
-       (buffer-file-coding-system 'utf-8))
+        (buffer-file-coding-system 'utf-8))
     (dolist (str '("primárias"
-                  ;; Unicode character á is encoded in utf-8 as
-                  ;; a byte sequence \xC3 \xA1.
-                  "prim\xC3\xA1rias" "prim^^c3\xA1rias" "prim^^c3^^a1rias"))
+                   ;; Unicode character á is encoded in utf-8 as
+                   ;; a byte sequence \xC3 \xA1.
+                   "prim\xC3\xA1rias" "prim^^c3\xA1rias" "prim^^c3^^a1rias"))
       (should (string-match (preview-error-quote str) "primárias")))))
 
 (ert-deftest preview-decode-^^ab-utf-8 ()
diff --git a/tests/latex/texmathp-test.el b/tests/latex/texmathp-test.el
index a1313b9..eeda1c9 100644
--- a/tests/latex/texmathp-test.el
+++ b/tests/latex/texmathp-test.el
@@ -29,23 +29,23 @@
 (ert-deftest texmathp-bob ()
   "Test math expressions beginning at BOB are identified correctly."
   (should (with-temp-buffer
-           (insert "\\(")
-           (LaTeX-mode)
-           (texmathp)))
+            (insert "\\(")
+            (LaTeX-mode)
+            (texmathp)))
 
   (should (with-temp-buffer
-           (insert "\\[")
-           (LaTeX-mode)
-           (texmathp)))
+            (insert "\\[")
+            (LaTeX-mode)
+            (texmathp)))
 
   (should (with-temp-buffer
-           (insert "\\ensuremath{")
-           (LaTeX-mode)
-           (texmathp)))
+            (insert "\\ensuremath{")
+            (LaTeX-mode)
+            (texmathp)))
 
   (should (with-temp-buffer
-           (insert "$")
-           (LaTeX-mode)
-           (texmathp))))
+            (insert "$")
+            (LaTeX-mode)
+            (texmathp))))
 
 ;;; texmathp-test.el ends here
diff --git a/tests/tex/command-expansion.el b/tests/tex/command-expansion.el
index 0bf661a..cc5d9d8 100644
--- a/tests/tex/command-expansion.el
+++ b/tests/tex/command-expansion.el
@@ -28,8 +28,8 @@
   "Check whether \"%%%%\" is correctly expanded when before \"%`\"."
   (should (string=
            (let ((TeX-command-list
-                 (list (cons "Test" '("%%%% %`%'" TeX-run-command t t)))))
-            (TeX-command-expand (nth 1 (assoc "Test" TeX-command-list))))
+                  (list (cons "Test" '("%%%% %`%'" TeX-run-command t t)))))
+             (TeX-command-expand (nth 1 (assoc "Test" TeX-command-list))))
            "%% ")))
 
 (ert-deftest TeX-command-expansion-errors ()
@@ -51,9 +51,9 @@
   (should-error
    (with-temp-buffer
      (let ((TeX-view-program-list '(("viewer"
-                                    (wrong-specification))))
-          (TeX-view-program-selection
-           '((output-pdf "viewer"))))
+                                     (wrong-specification))))
+           (TeX-view-program-selection
+            '((output-pdf "viewer"))))
        (TeX-mode)
        (TeX-view-command-raw)))
    :type 'error)
@@ -61,7 +61,7 @@
   (should-error
    (with-temp-buffer
      (let ((TeX-view-program-selection
-           '((output-pdf "does-not-exist"))))
+            '((output-pdf "does-not-exist"))))
        (TeX-mode)
        (TeX-view-command-raw)))
    :type 'error)
@@ -69,9 +69,9 @@
   (should-error
    (with-temp-buffer
      (let ((TeX-view-program-list
-           '(("viewer" "viewer %o" "**this-program-does-not-exist**")))
-          (TeX-view-program-selection
-           '((output-pdf "viewer"))))
+            '(("viewer" "viewer %o" "**this-program-does-not-exist**")))
+           (TeX-view-program-selection
+            '((output-pdf "viewer"))))
        (TeX-mode)
        (TeX-view-command-raw)))
    :type 'error)
@@ -89,19 +89,19 @@
   ;; is different.
   (skip-unless (not (eq system-type 'windows-nt)))
   (let ((major-mode 'latex-mode)
-       (TeX-engine 'default)
-       (TeX-command-extra-options " \"\\foo\"")
-       TeX-master)
+        (TeX-engine 'default)
+        (TeX-command-extra-options " \"\\foo\"")
+        TeX-master)
 
     (setq TeX-master "/tmp/abc")
     (should (string=
-            (TeX-command-expand "%`%(extraopts)%' %T")
-            " \"\\foo\" \"\\input\" \\\\detokenize\\{\\ abc.tex\\ \\}"))
+             (TeX-command-expand "%`%(extraopts)%' %T")
+             " \"\\foo\" \"\\input\" \\\\detokenize\\{\\ abc.tex\\ \\}"))
 
     (setq TeX-master "/tmp/abc def")
     (should (string=
-            (TeX-command-expand "%`%(extraopts)%' %T")
-            " \"\\foo\" \"\\input\" \\\\detokenize\\{\\ \\\"abc\\ 
def.tex\\\"\\ \\}"))))
+             (TeX-command-expand "%`%(extraopts)%' %T")
+             " \"\\foo\" \"\\input\" \\\\detokenize\\{\\ \\\"abc\\ 
def.tex\\\"\\ \\}"))))
 
 (ert-deftest TeX-command-expand-skip-file-name ()
   "Check whether file name is not subject to further expansion.
@@ -112,26 +112,26 @@ See 
<https://lists.gnu.org/r/bug-auctex/2014-08/msg00012.html>."
   ;; is different.
   (skip-unless (not (eq system-type 'windows-nt)))
   (let ((TeX-master "abc-def")
-       (TeX-output-extension "pdf")
-       (TeX-expand-list '(("-" (lambda () ":")))))
+        (TeX-output-extension "pdf")
+        (TeX-expand-list '(("-" (lambda () ":")))))
     (should (string=
-            (TeX-command-expand "%s")
-            TeX-master))
+             (TeX-command-expand "%s")
+             TeX-master))
     (should (string=
-            (TeX-command-expand "%t")
-            (TeX-master-file "tex" t)))
+             (TeX-command-expand "%t")
+             (TeX-master-file "tex" t)))
     (should (string=
-            (TeX-command-expand "%T")
-            (TeX-master-file "tex" t)))
+             (TeX-command-expand "%T")
+             (TeX-master-file "tex" t)))
     (should (string=
-            (TeX-command-expand "%d")
-            (TeX-master-file "dvi" t)))
+             (TeX-command-expand "%d")
+             (TeX-master-file "dvi" t)))
     (should (string=
-            (TeX-command-expand "%f")
-            (TeX-master-file "ps" t)))
+             (TeX-command-expand "%f")
+             (TeX-master-file "ps" t)))
     (should (string=
-            (TeX-command-expand "%o")
-            (TeX-master-file "pdf" t)))))
+             (TeX-command-expand "%o")
+             (TeX-master-file "pdf" t)))))
 
 (ert-deftest TeX-command-expand-active-master ()
   "Test whether `TeX-active-master' is valid argument for 
`TeX-command-expand'."
@@ -139,37 +139,37 @@ See 
<https://lists.gnu.org/r/bug-auctex/2014-08/msg00012.html>."
   ;; is different.
   (skip-unless (not (eq system-type 'windows-nt)))
   (let ((TeX-master "abc")
-       TeX-current-process-region-p)
+        TeX-current-process-region-p)
     (setq TeX-current-process-region-p nil)
     (should (string=
-            (TeX-command-expand "%s")
-            TeX-master))
+             (TeX-command-expand "%s")
+             TeX-master))
     (setq TeX-current-process-region-p t)
     (should (string=
-            (TeX-command-expand "%s")
-            TeX-region))))
+             (TeX-command-expand "%s")
+             TeX-region))))
 
 (ert-deftest TeX-command-expand-file-name-with-spaces ()
   "Test whether file name with spaces is quoted correctly."
   (let ((TeX-master "abc def")
-       (TeX-output-extension "pdf"))
+        (TeX-output-extension "pdf"))
     (should (string=
-            (TeX-command-expand "%s")
-            (shell-quote-argument TeX-master)))
+             (TeX-command-expand "%s")
+             (shell-quote-argument TeX-master)))
     (should (string=
-            (TeX-command-expand "%t")
-            (shell-quote-argument (TeX-master-file "tex" t))))
+             (TeX-command-expand "%t")
+             (shell-quote-argument (TeX-master-file "tex" t))))
     (should (string=
-            (TeX-command-expand "%T")
-            (shell-quote-argument (TeX-master-file "tex" t))))
+             (TeX-command-expand "%T")
+             (shell-quote-argument (TeX-master-file "tex" t))))
     (should (string=
-            (TeX-command-expand "%d")
-            (shell-quote-argument (TeX-master-file "dvi" t))))
+             (TeX-command-expand "%d")
+             (shell-quote-argument (TeX-master-file "dvi" t))))
     (should (string=
-            (TeX-command-expand "%f")
-            (shell-quote-argument (TeX-master-file "ps" t))))
+             (TeX-command-expand "%f")
+             (shell-quote-argument (TeX-master-file "ps" t))))
     (should (string=
-            (TeX-command-expand "%o")
-            (shell-quote-argument (TeX-master-file "pdf" t))))))
+             (TeX-command-expand "%o")
+             (shell-quote-argument (TeX-master-file "pdf" t))))))
 
 ;;; command-expansion.el ends here
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index f9df789..ca82132 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -31,22 +31,22 @@
 (ert-deftest TeX-error-parsing ()
   "Test error parsing functions."
   (should (equal
-          (with-temp-buffer
-            (setq TeX-debug-warnings t
-                  TeX-debug-bad-boxes t)
+           (with-temp-buffer
+             (setq TeX-debug-warnings t
+                   TeX-debug-bad-boxes t)
              (insert-file-contents TeX-test-compilation-log)
              (TeX-parse-all-errors)
-            TeX-error-list)
-          '((warning
-             "./nice-class.cls" 32
-             "Package nice-class Warning: 
******************************************"
-             0
-             "Package nice-class Warning: 
******************************************
+             TeX-error-list)
+           '((warning
+              "./nice-class.cls" 32
+              "Package nice-class Warning: 
******************************************"
+              0
+              "Package nice-class Warning: 
******************************************
 (nice-class)                * THIS IS JUST A WARNING WITH A PESKY
 (nice-class)                * UNMATCHED CLOSED PARENTHESIS :-)
 (nice-class)                ****************************************** on 
input line 32.\n"
-             nil 32 nil 376 nil)
-            (error
+              nil 32 nil 376 nil)
+             (error
               "./test.tex" 2
               "Class nice-class Error: ***********************************" 0
               "\n(nice-class)              * This is a very bad error!
@@ -61,15 +61,15 @@ l.2 \\begin{document}
 (/other/packages/loaded.sty)
 ABD: EveryShipout initializing macros"
               "\\begin{document}\n\n(/other/packages/loaded.sty)" nil nil 971 
nil)
-            (warning "./test.tex" 3
+             (warning "./test.tex" 3
               "Package foo Warning: This is a warning! on input line 3." 0
-             "Package foo Warning: This is a warning! on input line 3.\n"
-             nil 3 nil 1030 nil)
-            (bad-box
-             "./secondary-file.tex" 131
-             "Underfull \\hbox (badness 6608) in paragraph at lines 131--132"
-             0 "\n[]|\\T1/jkpl/m/n/10.95 (+20) Something bla" "bla"
-             132 t 1268 nil)
+              "Package foo Warning: This is a warning! on input line 3.\n"
+              nil 3 nil 1030 nil)
+             (bad-box
+              "./secondary-file.tex" 131
+              "Underfull \\hbox (badness 6608) in paragraph at lines 131--132"
+              0 "\n[]|\\T1/jkpl/m/n/10.95 (+20) Something bla" "bla"
+              132 t 1268 nil)
              (warning "./test.tex" 4
               "LaTeX Warning: Reference `wrong' on page 1 undefined on input 
line 4."
               0
@@ -99,8 +99,8 @@ ABD: EveryShipout initializing macros"
               0 "\n[]\\T1/pplj/m/n/10.95 Un qua-dri-vet-to-re co-va-rian-te 
$\\OMS/zplm/m/n/10.95 f\\OML/zplm/m/it/10.95 A[]\\OMS/zplm/m/n/10.95 g$ 
\\T1/pplj/m/n/10.95 e un in-sie-me di quat-tro quan-ti-ta $\\OT1/zplm/m/n/10.95 
(\\OML/zplm/m/it/10.95 A[]; A[]; A[]; A[]\\OT1/zplm/m/n/10.95 )$" "$"
               368 t 2600 nil)
              (error "./test.tex" 11 "Undefined control sequence." 0
-                   "\nl.11 \\doesnotexist\n\n(./foo.aux) )"
-                   "\\doesnotexist\n" nil nil 2682 nil)
+                    "\nl.11 \\doesnotexist\n\n(./foo.aux) )"
+                    "\\doesnotexist\n" nil nil 2682 nil)
              (warning "./test.tex" 48
               "LaTeX Warning: Citation 'Knuth:TeXbook-1984' undefined on input 
line 48." 0
               "LaTeX Warning: Citation 'Knuth:TeXbook-1984' undefined on input 
line 48.\n"
@@ -112,21 +112,21 @@ ABD: EveryShipout initializing macros"
 (ert-deftest TeX-error-parsing-expl3-warnings ()
   "Test parsing of expl3 warnings."
   (should (equal
-          (with-temp-buffer
-            (setq TeX-debug-warnings t
-                  TeX-debug-bad-boxes t)
+           (with-temp-buffer
+             (setq TeX-debug-warnings t
+                   TeX-debug-bad-boxes t)
              (insert
-             "*************************************************
+              "*************************************************
 * xsim warning: \"rerun\"
 * 
 * Exercise properties may have changed. Rerun to get them synchronized.
 *************************************************
 ")
              (TeX-parse-all-errors)
-            TeX-error-list)
-          '((warning nil nil "* xsim warning: \"rerun\"" 0
-                     "* xsim warning: \"rerun\"\n* \n* Exercise properties may 
have changed. Rerun to get them 
synchronized.\n*************************************************\n"
-                     nil nil nil 200 nil)))))
+             TeX-error-list)
+           '((warning nil nil "* xsim warning: \"rerun\"" 0
+                      "* xsim warning: \"rerun\"\n* \n* Exercise properties 
may have changed. Rerun to get them 
synchronized.\n*************************************************\n"
+                      nil nil nil 200 nil)))))
 
 ;; See https://lists.gnu.org/archive/html/auctex/2017-04/msg00007.html.
 (ert-deftest TeX-LaTeX2e-date ()
@@ -137,8 +137,8 @@ ABD: EveryShipout initializing macros"
       (insert "LaTeX2e <2017-04-15>")
       (goto-char (point-min))
       (let ((TeX-command-buffer (buffer-name)))
-       (TeX-LaTeX-sentinel nil "LaTeX")
-       TeX-command-next))
+        (TeX-LaTeX-sentinel nil "LaTeX")
+        TeX-command-next))
     "View"))
   (should
    (equal
@@ -146,8 +146,8 @@ ABD: EveryShipout initializing macros"
       (insert "LaTeX2e <2017/01/01> patch level 3")
       (goto-char (point-min))
       (let ((TeX-command-buffer (buffer-name)))
-       (TeX-LaTeX-sentinel nil "LaTeX")
-       TeX-command-next))
+        (TeX-LaTeX-sentinel nil "LaTeX")
+        TeX-command-next))
     "View")))
 
 ;;; error-parsing.el ends here
diff --git a/tests/tex/navigation.el b/tests/tex/navigation.el
index daf1840..d429be6 100644
--- a/tests/tex/navigation.el
+++ b/tests/tex/navigation.el
@@ -29,7 +29,7 @@
   (with-temp-buffer
     (insert string)
     (should (= (or position (point-max))
-              (TeX-find-macro-end-helper (point-min))))))
+               (TeX-find-macro-end-helper (point-min))))))
 
 (ert-deftest TeX-find-macro-end-helper-single ()
   ;; single macro ending at EOB
diff --git a/tests/tex/path-expansion.el b/tests/tex/path-expansion.el
index 42eb665..c30e64d 100644
--- a/tests/tex/path-expansion.el
+++ b/tests/tex/path-expansion.el
@@ -26,9 +26,9 @@
 (ert-deftest TeX-variable-truncation ()
   "Check whether list variable is not truncated as side effect."
   (let ((var '("str1" "str2"))
-       (TeX-kpathsea-path-delimiter nil)
-       (TeX-search-files-type-alist
-        '((abc "${dummy}" ("str2" var) TeX-file-extensions))))
+        (TeX-kpathsea-path-delimiter nil)
+        (TeX-search-files-type-alist
+         '((abc "${dummy}" ("str2" var) TeX-file-extensions))))
     (TeX-search-files-by-type 'abc 'global)
     (should (equal var '("str1" "str2")))))
 
diff --git a/tex-bar.el b/tex-bar.el
index 285828b..9866cc5 100644
--- a/tex-bar.el
+++ b/tex-bar.el
@@ -83,7 +83,7 @@ If there is no help, the empty string is returned."
 
 (defcustom TeX-bar-TeX-buttons
   '(new-file open-file dired kill-buffer save-buffer cut copy paste undo
-            [separator nil] tex next-error view bibtex spell)
+             [separator nil] tex next-error view bibtex spell)
   "List of buttons available in `tex-mode'.
 It should be a list in the same format of the BUTTONS parameter
 in function `toolbarx-install-toolbar', often a symbol that
@@ -95,29 +95,29 @@ Buttons are defined in alists (labels associated to 
properties
 that define a button).  For a list of variables that hold such
 alists, see variable `TeX-bar-TeX-all-button-alists'."
   :type '(list (set :inline t
-                   (const new-file)
-                   (const open-file)
-                   (const dired)
-                   (const kill-buffer)
-                   (const save-buffer)
-                   (const write-file)
-                   (const undo)
-                   (const cut)
-                   (const copy)
-                   (const paste)
-                   (const search-forward)
-                   (const print-buffer)
-                   (const [separator nil])
-                   (const tex)
-                   (const next-error)
-                   (const view)
-                   (const file)
-                   (const bibtex)
-                   (const clean)
-                   (const spell))
-              ;; (const latex-symbols-experimental)
-              (repeat (choice (symbol :tag "Label")
-                              (sexp :tag "General element"))))
+                    (const new-file)
+                    (const open-file)
+                    (const dired)
+                    (const kill-buffer)
+                    (const save-buffer)
+                    (const write-file)
+                    (const undo)
+                    (const cut)
+                    (const copy)
+                    (const paste)
+                    (const search-forward)
+                    (const print-buffer)
+                    (const [separator nil])
+                    (const tex)
+                    (const next-error)
+                    (const view)
+                    (const file)
+                    (const bibtex)
+                    (const clean)
+                    (const spell))
+               ;; (const latex-symbols-experimental)
+               (repeat (choice (symbol :tag "Label")
+                               (sexp :tag "General element"))))
   :group 'TeX-tool-bar)
 
 (defgroup TeX-tool-bar-button-definitions nil
@@ -135,42 +135,42 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
 
 (defcustom TeX-bar-TeX-button-alist
   '((tex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex"))
-        :command (progn
-                   (TeX-save-document (TeX-master-file))
-                   (TeX-command "TeX" 'TeX-master-file -1))
-        :help (lambda (&rest ignored)
-                (TeX-bar-help-from-command-list "TeX")))
+         :command (progn
+                    (TeX-save-document (TeX-master-file))
+                    (TeX-command "TeX" 'TeX-master-file -1))
+         :help (lambda (&rest ignored)
+                 (TeX-bar-help-from-command-list "TeX")))
     (pdftex :image "pdftex"
-           :command (progn
-                      (TeX-save-document (TeX-master-file))
-                      (TeX-command "PDFTeX" 'TeX-master-file -1))
-           :help (lambda (&rest ignored)
-                   (TeX-bar-help-from-command-list "PDFTeX")))
+            :command (progn
+                       (TeX-save-document (TeX-master-file))
+                       (TeX-command "PDFTeX" 'TeX-master-file -1))
+            :help (lambda (&rest ignored)
+                    (TeX-bar-help-from-command-list "PDFTeX")))
     (next-error :image "error"
-               :command TeX-next-error
-               :enable (TeX-error-report-has-errors-p)
-               :visible (TeX-error-report-has-errors-p))
+                :command TeX-next-error
+                :enable (TeX-error-report-has-errors-p)
+                :visible (TeX-error-report-has-errors-p))
     (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
-         :command (TeX-command "View" 'TeX-master-file -1)
-         :help (lambda (&rest ignored)
-                 (TeX-bar-help-from-command-list "View")))
+          :command (TeX-command "View" 'TeX-master-file -1)
+          :help (lambda (&rest ignored)
+                  (TeX-bar-help-from-command-list "View")))
     (file :image "dvips"
-         :command (TeX-command "File" 'TeX-master-file -1)
-         :visible (not TeX-PDF-mode)
-         :help (lambda (&rest ignored)
-                 (TeX-bar-help-from-command-list "File")))
+          :command (TeX-command "File" 'TeX-master-file -1)
+          :visible (not TeX-PDF-mode)
+          :help (lambda (&rest ignored)
+                  (TeX-bar-help-from-command-list "File")))
     (bibtex :image "bibtex"
-           :command (TeX-command "BibTeX" 'TeX-master-file -1)
-           :help (lambda (&rest ignored)
-                   (TeX-bar-help-from-command-list "BibTeX")))
+            :command (TeX-command "BibTeX" 'TeX-master-file -1)
+            :help (lambda (&rest ignored)
+                    (TeX-bar-help-from-command-list "BibTeX")))
     (clean  :image "delete"
-           :command (TeX-command "Clean" 'TeX-master-file -1)
-           :help (lambda (&rest ignored)
-                   (TeX-bar-help-from-command-list "Clean")))
+            :command (TeX-command "Clean" 'TeX-master-file -1)
+            :help (lambda (&rest ignored)
+                    (TeX-bar-help-from-command-list "Clean")))
     (spell  :image "spell"
-           :command (TeX-command "Spell" 'TeX-master-file -1)
-           :help (lambda (&rest ignored)
-                   (TeX-bar-help-from-command-list "Spell"))))
+            :command (TeX-command "Spell" 'TeX-master-file -1)
+            :help (lambda (&rest ignored)
+                    (TeX-bar-help-from-command-list "Spell"))))
   ;; latex-symbols-experimental?
   "Alist for button definitions in TeX bar.
 Value should le a list where each element is of format (KEY .
@@ -186,13 +186,13 @@ format of the argument MEANING-ALIST in the mentioned 
function."
   "Display in a buffer a list of buttons for `tex-bar.el'."
   (interactive)
   (let ((assqs-button-alists)
-       (labels))
+        (labels))
     (dolist (m-alist TeX-bar-TeX-all-button-alists)
       (setq labels nil)
       (dolist (as (eval m-alist))
-       (setq labels (cons (car as) labels)))
+        (setq labels (cons (car as) labels)))
       (setq assqs-button-alists (cons (cons m-alist (nreverse labels))
-                                     assqs-button-alists)))
+                                      assqs-button-alists)))
     (setq assqs-button-alists (nreverse assqs-button-alists))
     ;; displaying results
     (with-current-buffer (get-buffer-create "*TeX tool bar buttons*")
@@ -200,10 +200,10 @@ format of the argument MEANING-ALIST in the mentioned 
function."
       (insert "Available buttons for TeX mode
 ================================")
       (dolist (i assqs-button-alists)
-       (insert (format "\n\n`%s' provides the following buttons:\n  " (car i)))
-       (dolist (j (cdr i))
-         (insert (format " %s" j)))
-       (fill-region (point-at-bol) (point-at-eol))))
+        (insert (format "\n\n`%s' provides the following buttons:\n  " (car 
i)))
+        (dolist (j (cdr i))
+          (insert (format " %s" j)))
+        (fill-region (point-at-bol) (point-at-eol))))
     (display-buffer "*TeX tool bar buttons*" t)))
 
 ;;; Installation of the tool bar
@@ -213,18 +213,18 @@ format of the argument MEANING-ALIST in the mentioned 
function."
   (interactive)
   (require 'toolbar-x)
   (add-to-list 'toolbarx-image-path
-              (expand-file-name "images" TeX-data-directory))
+               (expand-file-name "images" TeX-data-directory))
   (add-hook 'TeX-PDF-mode-hook 'toolbarx-refresh nil t)
   (toolbarx-install-toolbar TeX-bar-TeX-buttons
-                           (let ((append-list))
-                             (dolist (elt TeX-bar-TeX-all-button-alists)
-                               (setq append-list (append append-list
-                                                         (eval elt))))
-                             append-list)))
+                            (let ((append-list))
+                              (dolist (elt TeX-bar-TeX-all-button-alists)
+                                (setq append-list (append append-list
+                                                          (eval elt))))
+                              append-list)))
 
 (defcustom TeX-bar-LaTeX-buttons
   '(new-file open-file dired kill-buffer save-buffer cut copy paste undo
-            [separator nil] latex next-error view bibtex spell)
+             [separator nil] latex next-error view bibtex spell)
   "List of buttons available in `latex-mode'.
 It should be a list in the same format of the BUTTONS parameter
 in function `toolbarx-install-toolbar', often a symbol that
@@ -236,29 +236,29 @@ Buttons are defined in alists (labels associated to 
properties
 that define a button).  For a list of variables that hold such
 alists, see variable `TeX-bar-LaTeX-all-button-alists'."
   :type '(list (set :inline t
-                   (const new-file)
-                   (const open-file)
-                   (const dired)
-                   (const kill-buffer)
-                   (const save-buffer)
-                   (const write-file)
-                   (const undo)
-                   (const cut)
-                   (const copy)
-                   (const paste)
-                   (const search-forward)
-                   (const print-buffer)
-                   (const [separator nil])
-                   (const latex)
-                   (const next-error)
-                   (const view)
-                   (const file)
-                   (const bibtex)
-                   (const clean)
-                   (const spell)
-                   (const latex-symbols-experimental))
-              (repeat (choice (symbol :tag "Label")
-                              (sexp :tag "General element"))))
+                    (const new-file)
+                    (const open-file)
+                    (const dired)
+                    (const kill-buffer)
+                    (const save-buffer)
+                    (const write-file)
+                    (const undo)
+                    (const cut)
+                    (const copy)
+                    (const paste)
+                    (const search-forward)
+                    (const print-buffer)
+                    (const [separator nil])
+                    (const latex)
+                    (const next-error)
+                    (const view)
+                    (const file)
+                    (const bibtex)
+                    (const clean)
+                    (const spell)
+                    (const latex-symbols-experimental))
+               (repeat (choice (symbol :tag "Label")
+                               (sexp :tag "General element"))))
   :group 'TeX-tool-bar)
 
 (defgroup TeX-tool-bar-button-definitions nil
@@ -276,47 +276,47 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
 
 (defcustom TeX-bar-LaTeX-button-alist
   '((latex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex"))
-          :command (progn
-                     (TeX-save-document (TeX-master-file))
-                     (TeX-command "LaTeX" 'TeX-master-file -1))
-          :help (lambda (&rest ignored)
-                  (TeX-bar-help-from-command-list "LaTeX")))
+           :command (progn
+                      (TeX-save-document (TeX-master-file))
+                      (TeX-command "LaTeX" 'TeX-master-file -1))
+           :help (lambda (&rest ignored)
+                   (TeX-bar-help-from-command-list "LaTeX")))
     (pdflatex :image "pdftex"
-             :command (progn
-                        (TeX-save-document (TeX-master-file))
-                        (TeX-command "PDFLaTeX" 'TeX-master-file -1))
-             :help (lambda (&rest ignored)
-                     (TeX-bar-help-from-command-list "PDFLaTeX")))
+              :command (progn
+                         (TeX-save-document (TeX-master-file))
+                         (TeX-command "PDFLaTeX" 'TeX-master-file -1))
+              :help (lambda (&rest ignored)
+                      (TeX-bar-help-from-command-list "PDFLaTeX")))
     (next-error :image "error"
-               :command TeX-next-error
-               :enable (TeX-error-report-has-errors-p)
-               :visible (TeX-error-report-has-errors-p))
+                :command TeX-next-error
+                :enable (TeX-error-report-has-errors-p)
+                :visible (TeX-error-report-has-errors-p))
     (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
-         :command (TeX-command "View" 'TeX-master-file -1)
-         :help (lambda (&rest ignored)
-                 (TeX-bar-help-from-command-list "View")))
+          :command (TeX-command "View" 'TeX-master-file -1)
+          :help (lambda (&rest ignored)
+                  (TeX-bar-help-from-command-list "View")))
     (file :image "dvips"
-         :command (TeX-command "File" 'TeX-master-file -1)
-         :visible (not TeX-PDF-mode)
-         :help (lambda (&rest ignored)
-                 (TeX-bar-help-from-command-list "File")))
+          :command (TeX-command "File" 'TeX-master-file -1)
+          :visible (not TeX-PDF-mode)
+          :help (lambda (&rest ignored)
+                  (TeX-bar-help-from-command-list "File")))
     (bibtex :image "bibtex"
-           :command (TeX-command (if LaTeX-using-Biber "Biber" "BibTeX")
-                                 'TeX-master-file -1)
-           :help (lambda (&rest ignored)
-                   (TeX-bar-help-from-command-list
-                    (if LaTeX-using-Biber "Biber" "BibTeX"))))
+            :command (TeX-command (if LaTeX-using-Biber "Biber" "BibTeX")
+                                  'TeX-master-file -1)
+            :help (lambda (&rest ignored)
+                    (TeX-bar-help-from-command-list
+                     (if LaTeX-using-Biber "Biber" "BibTeX"))))
     (clean  :image "delete"
-           :command (TeX-command "Clean" 'TeX-master-file -1)
-           :help (lambda (&rest ignored)
-                   (TeX-bar-help-from-command-list "Clean")))
+            :command (TeX-command "Clean" 'TeX-master-file -1)
+            :help (lambda (&rest ignored)
+                    (TeX-bar-help-from-command-list "Clean")))
     (spell  :image "spell"
-           :command (TeX-command "Spell" 'TeX-master-file -1)
-           :help (lambda (&rest ignored)
-                   (TeX-bar-help-from-command-list "Spell")))
+            :command (TeX-command "Spell" 'TeX-master-file -1)
+            :help (lambda (&rest ignored)
+                    (TeX-bar-help-from-command-list "Spell")))
     (latex-symbols-experimental . (:alias :eval-group
-                                         LaTeX-symbols-toolbar-switch-contents
-                                         LaTeX-symbols-toolbar-contents)))
+                                          LaTeX-symbols-toolbar-switch-contents
+                                          LaTeX-symbols-toolbar-contents)))
   "Alist for button definitions in TeX bar.
 Value should le a list where each element is of format (KEY .
 PROPS), where KEY is a symbol that labels the button and PROPS is
@@ -331,13 +331,13 @@ format of the argument MEANING-ALIST in the mentioned 
function."
   "Display in a buffer a list of buttons for `tex-bar.el'."
   (interactive)
   (let ((assqs-button-alists)
-       (labels))
+        (labels))
     (dolist (m-alist TeX-bar-LaTeX-all-button-alists)
       (setq labels nil)
       (dolist (as (eval m-alist))
-       (setq labels (cons (car as) labels)))
+        (setq labels (cons (car as) labels)))
       (setq assqs-button-alists (cons (cons m-alist (nreverse labels))
-                                     assqs-button-alists)))
+                                      assqs-button-alists)))
     (setq assqs-button-alists (nreverse assqs-button-alists))
     ;; displaying results
     (with-current-buffer (get-buffer-create "*TeX tool bar buttons*")
@@ -345,10 +345,10 @@ format of the argument MEANING-ALIST in the mentioned 
function."
       (insert "Available buttons for LaTeX mode
 ================================")
       (dolist (i assqs-button-alists)
-       (insert (format "\n\n`%s' provides the following buttons:\n  " (car i)))
-       (dolist (j (cdr i))
-         (insert (format " %s" j)))
-       (fill-region (point-at-bol) (point-at-eol))))
+        (insert (format "\n\n`%s' provides the following buttons:\n  " (car 
i)))
+        (dolist (j (cdr i))
+          (insert (format " %s" j)))
+        (fill-region (point-at-bol) (point-at-eol))))
     (display-buffer "*TeX tool bar buttons*" t)))
 
 ;;; Installation of the tool bar
@@ -358,18 +358,18 @@ format of the argument MEANING-ALIST in the mentioned 
function."
   (interactive)
   (require 'toolbar-x)
   (add-to-list 'toolbarx-image-path
-              (expand-file-name "images" TeX-data-directory))
+               (expand-file-name "images" TeX-data-directory))
   (add-hook 'TeX-PDF-mode-hook 'toolbarx-refresh nil t)
   ;; Refresh the toolbar after styles update because `LaTeX-using-Biber' value
   ;; could have been changed.  Append the refresh to the hook so it is run 
after
   ;; the other styles-related changes.
   (add-hook 'TeX-update-style-hook 'toolbarx-refresh t t)
   (toolbarx-install-toolbar TeX-bar-LaTeX-buttons
-                           (let ((append-list))
-                             (dolist (elt TeX-bar-LaTeX-all-button-alists)
-                               (setq append-list (append append-list
-                                                         (eval elt))))
-                             append-list)))
+                            (let ((append-list))
+                              (dolist (elt TeX-bar-LaTeX-all-button-alists)
+                                (setq append-list (append append-list
+                                                          (eval elt))))
+                              append-list)))
 
 ;;; Experimental Symbol Toolbar
 
@@ -377,94 +377,94 @@ format of the argument MEANING-ALIST in the mentioned 
function."
 (defun TeX-bar-img-filename (tex-command)
   "Return the filename (no extension) for the image button of TEX-COMMAND."
   (let ((str-list (append tex-command nil))
-       (str-result))
+        (str-result))
     (dolist (i str-list)
       (cond
        ;; capital letter -> letter + "-"
        ((and (>= i ?A) (<= i ?Z))
-       (setq str-result (cons ?- (cons i str-result))))
+        (setq str-result (cons ?- (cons i str-result))))
        ;; lowercase letter -> letter
        ((and (>= i ?a) (<= i ?z))
         (setq str-result (cons i str-result)))
        ;; open curly brackets `{' -> "ocb--"
        ((eq i ?{)
-       (setq str-result (cons ?o str-result))
-       (setq str-result (cons ?c str-result))
-       (setq str-result (cons ?b str-result))
-       (setq str-result (cons ?- str-result))
-       (setq str-result (cons ?- str-result)))
+        (setq str-result (cons ?o str-result))
+        (setq str-result (cons ?c str-result))
+        (setq str-result (cons ?b str-result))
+        (setq str-result (cons ?- str-result))
+        (setq str-result (cons ?- str-result)))
        ;; close curly brackets `}' -> "ccb--"
        ((eq i ?})
-       (setq str-result (cons ?c str-result))
-       (setq str-result (cons ?c str-result))
-       (setq str-result (cons ?b str-result))
-       (setq str-result (cons ?- str-result))
-       (setq str-result (cons ?- str-result)))
+        (setq str-result (cons ?c str-result))
+        (setq str-result (cons ?c str-result))
+        (setq str-result (cons ?b str-result))
+        (setq str-result (cons ?- str-result))
+        (setq str-result (cons ?- str-result)))
        ;; vertical bar `|' -> "v--"
        ((eq i ?|)
-       (setq str-result (cons ?v str-result))
-       (setq str-result (cons ?- str-result))
-       (setq str-result (cons ?- str-result)))
+        (setq str-result (cons ?v str-result))
+        (setq str-result (cons ?- str-result))
+        (setq str-result (cons ?- str-result)))
        ;; slash `/' -> "s--"
        ((eq i ?/)
-       (setq str-result (cons ?s str-result))
-       (setq str-result (cons ?- str-result))
-       (setq str-result (cons ?- str-result)))))
+        (setq str-result (cons ?s str-result))
+        (setq str-result (cons ?- str-result))
+        (setq str-result (cons ?- str-result)))))
     (concat (nreverse str-result))))
 
 (let* ((menu-strings-buttons-alist
-       ;; make a alist os strings with the symbol classes and store it in
-       ;; `menu-strings-alist'
-       (let* ((menu-strings-alist-temp))
-         (dolist (item-external (cdr LaTeX-math-menu)
-                                (nreverse menu-strings-alist-temp))
-           (when (listp item-external)
-             ;; if first element is vector, I am supposing that all are
-             ;; vectors as well
-             (if (vectorp (cadr item-external))
-                 (let* ((menu-str (car item-external))
-                        (menu-buttons))
-                   (dolist (button (cdr item-external))
-                     (setq menu-buttons
-                           (cons (list (intern (TeX-bar-img-filename
-                                                (aref button 0)))
-                                       :image
-                                       (concat "symb-pics/"
-                                               (TeX-bar-img-filename
-                                                (aref button 0)))
-                                       :help (aref button 0)
-                                       :command (aref button 1))
-                                 menu-buttons)))
-                   (setq menu-buttons (nreverse menu-buttons))
-                   (setq menu-strings-alist-temp
-                         (cons (cons menu-str (list menu-buttons))
-                               menu-strings-alist-temp)))
-               ;; if another list (therefore, up to second level menu)
-               (let ((parent-str (concat (car item-external) " ")))
-                 (dolist (item-internal (cdr item-external))
-                   (unless (equal (car item-internal) "Special")
-                     (let* ((menu-str (concat parent-str
-                                              (car item-internal)))
-                            (menu-buttons))
-                       (dolist (button (cdr item-internal))
-                         (setq menu-buttons
-                               (cons (list (intern (aref button 0))
-                                           :image
-                                           (concat "symb-pics/"
-                                                   (TeX-bar-img-filename
-                                                    (aref button 0)))
-                                           :help (aref button 0)
-                                           :command (aref button 1))
-                                     menu-buttons)))
-                       (setq menu-buttons (nreverse menu-buttons))
-                       (setq menu-strings-alist-temp
-                             (cons (cons menu-str (list menu-buttons))
-                                   menu-strings-alist-temp)))))))))))
+        ;; make a alist os strings with the symbol classes and store it in
+        ;; `menu-strings-alist'
+        (let* ((menu-strings-alist-temp))
+          (dolist (item-external (cdr LaTeX-math-menu)
+                                 (nreverse menu-strings-alist-temp))
+            (when (listp item-external)
+              ;; if first element is vector, I am supposing that all are
+              ;; vectors as well
+              (if (vectorp (cadr item-external))
+                  (let* ((menu-str (car item-external))
+                         (menu-buttons))
+                    (dolist (button (cdr item-external))
+                      (setq menu-buttons
+                            (cons (list (intern (TeX-bar-img-filename
+                                                 (aref button 0)))
+                                        :image
+                                        (concat "symb-pics/"
+                                                (TeX-bar-img-filename
+                                                 (aref button 0)))
+                                        :help (aref button 0)
+                                        :command (aref button 1))
+                                  menu-buttons)))
+                    (setq menu-buttons (nreverse menu-buttons))
+                    (setq menu-strings-alist-temp
+                          (cons (cons menu-str (list menu-buttons))
+                                menu-strings-alist-temp)))
+                ;; if another list (therefore, up to second level menu)
+                (let ((parent-str (concat (car item-external) " ")))
+                  (dolist (item-internal (cdr item-external))
+                    (unless (equal (car item-internal) "Special")
+                      (let* ((menu-str (concat parent-str
+                                               (car item-internal)))
+                             (menu-buttons))
+                        (dolist (button (cdr item-internal))
+                          (setq menu-buttons
+                                (cons (list (intern (aref button 0))
+                                            :image
+                                            (concat "symb-pics/"
+                                                    (TeX-bar-img-filename
+                                                     (aref button 0)))
+                                            :help (aref button 0)
+                                            :command (aref button 1))
+                                      menu-buttons)))
+                        (setq menu-buttons (nreverse menu-buttons))
+                        (setq menu-strings-alist-temp
+                              (cons (cons menu-str (list menu-buttons))
+                                    menu-strings-alist-temp)))))))))))
        (list-strings (let* ((list-str-temp))
-                      (dolist (i menu-strings-buttons-alist
-                                 (nreverse list-str-temp))
-                        (setq list-str-temp (cons (car i)
-                                                  list-str-temp))))))
+                       (dolist (i menu-strings-buttons-alist
+                                  (nreverse list-str-temp))
+                         (setq list-str-temp (cons (car i)
+                                                   list-str-temp))))))
   (defvar LaTeX-symbols-toolbar-visible-flag nil
     "Non-nil means that the LaTeX symbols on toolbar are visible.
 Internal variable.")
@@ -472,44 +472,44 @@ Internal variable.")
     `(;; the on-off switch button
       (latex-symbols-switch
        :image (lambda nil (if LaTeX-symbols-toolbar-visible-flag
-                             "ltx-symb-turn-off"
-                           "ltx-symb-turn-on"))
+                              "ltx-symb-turn-off"
+                            "ltx-symb-turn-on"))
        :command (progn
-                 (setq LaTeX-symbols-toolbar-visible-flag
-                       (not LaTeX-symbols-toolbar-visible-flag))
-                 (toolbarx-refresh))
+                  (setq LaTeX-symbols-toolbar-visible-flag
+                        (not LaTeX-symbols-toolbar-visible-flag))
+                  (toolbarx-refresh))
        ;; help message depends on if symb-toolbar is on or off, and in
        ;; the name of the current class of symbols
        :help (lambda (&rest ignore)
-              (concat "Turn "
-                      (if LaTeX-symbols-toolbar-visible-flag "off " "on ")
-                      "the toolbar of LaTeX symbols (current class: "
-                      (nth (1- LaTeX-symbols-active-menuitem)
-                           (quote ,list-strings))
-                      ")")))
+               (concat "Turn "
+                       (if LaTeX-symbols-toolbar-visible-flag "off " "on ")
+                       "the toolbar of LaTeX symbols (current class: "
+                       (nth (1- LaTeX-symbols-active-menuitem)
+                            (quote ,list-strings))
+                       ")")))
       ;; the dropdown button, that also switch on the symbols
       ,(append '(:dropdown-group)
-              list-strings
-              '(:variable
-                LaTeX-symbols-active-menuitem
-                :save offer
-                :dropdown-prepend-command
-                (setq LaTeX-symbols-toolbar-visible-flag t)
-                :dropdown-help "Select a class of symbols to be displayed"))))
+               list-strings
+               '(:variable
+                 LaTeX-symbols-active-menuitem
+                 :save offer
+                 :dropdown-prepend-command
+                 (setq LaTeX-symbols-toolbar-visible-flag t)
+                 :dropdown-help "Select a class of symbols to be displayed"))))
   (defconst LaTeX-symbols-toolbar-contents
     (let* ((ltx-symb)
-          (count 0))
+           (count 0))
       (dolist (i menu-strings-buttons-alist
-                (append (nreverse ltx-symb)
-                        '(:insert
-                          LaTeX-symbols-toolbar-visible-flag
-                          :toolbar (bottom . top))))
-       (setq count (1+ count))
-       (setq ltx-symb
-             (cons (append (cdr i)
-                           `(:insert (eq LaTeX-symbols-active-menuitem
-                                         ,count)))
-                   ltx-symb))))))
+                 (append (nreverse ltx-symb)
+                         '(:insert
+                           LaTeX-symbols-toolbar-visible-flag
+                           :toolbar (bottom . top))))
+        (setq count (1+ count))
+        (setq ltx-symb
+              (cons (append (cdr i)
+                            `(:insert (eq LaTeX-symbols-active-menuitem
+                                          ,count)))
+                    ltx-symb))))))
 
 (provide 'tex-bar)
 
diff --git a/tex-buf.el b/tex-buf.el
index c7b7c8a..94269ba 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -49,14 +49,14 @@
 
 (defcustom TeX-shell-command-option
   (cond ((memq system-type '(ms-dos emx windows-nt) )
-        (cond ((boundp 'shell-command-option)
-               shell-command-option)
-              ((boundp 'shell-command-switch)
-               shell-command-switch)
-              (t
-               "/c")))
-       (t                              ;Unix & EMX (Emacs 19 port to OS/2)
-        "-c"))
+         (cond ((boundp 'shell-command-option)
+                shell-command-option)
+               ((boundp 'shell-command-switch)
+                shell-command-switch)
+               (t
+                "/c")))
+        (t                              ;Unix & EMX (Emacs 19 port to OS/2)
+         "-c"))
   "Shell argument indicating that next argument is the command."
   :group 'TeX-command
   :type 'string)
@@ -83,8 +83,8 @@ Return non-nil if document needs to be re-TeX'ed."
       (setq name (TeX-master-file)))
 
   (TeX-check-files (concat name "." (TeX-output-extension))
-                  (cons name (TeX-style-list))
-                  TeX-file-extensions))
+                   (cons name (TeX-style-list))
+                   TeX-file-extensions))
 
 (defun TeX-command-master (&optional override-confirm)
   "Run command on the current document.
@@ -93,7 +93,7 @@ If a prefix argument OVERRIDE-CONFIRM is given, confirmation 
will
 depend on it being positive instead of the entry in `TeX-command-list'."
   (interactive "P")
   (TeX-command (TeX-command-query (TeX-master-file nil nil t))
-              'TeX-master-file override-confirm))
+               'TeX-master-file override-confirm))
 
 (defvar TeX-command-region-begin nil)
 (defvar TeX-command-region-end nil)
@@ -108,10 +108,10 @@ depend on it being positive instead of the entry in 
`TeX-command-list'."
     (widen)
     (save-excursion
       (let ((inhibit-point-motion-hooks t)
-           (inhibit-field-text-motion t))
-       (if pos (goto-char pos))
-       (+ (count-lines (point-min) (point))
-          (if (bolp) 0 -1))))))
+            (inhibit-field-text-motion t))
+        (if pos (goto-char pos))
+        (+ (count-lines (point-min) (point))
+           (if (bolp) 0 -1))))))
 
 (defun TeX-pin-region (begin end)
   "Pin the TeX region specified by BEGIN and END.
@@ -124,19 +124,19 @@ pinned region will get unpinned and vice versa."
   (interactive
    (if
        (if current-prefix-arg
-          (> (prefix-numeric-value current-prefix-arg) 0)
-        (or (TeX-active-mark)
-            (null TeX-command-region-begin)))
+           (> (prefix-numeric-value current-prefix-arg) 0)
+         (or (TeX-active-mark)
+             (null TeX-command-region-begin)))
        (list (region-beginning) (region-end))
      '(nil nil)))
   (if begin
       (progn
-       (unless (markerp TeX-command-region-begin)
-         (setq TeX-command-region-begin (make-marker))
-         (setq TeX-command-region-end (make-marker)))
-       (set-marker TeX-command-region-begin begin)
-       (set-marker TeX-command-region-end end)
-       (message "TeX region pinned."))
+        (unless (markerp TeX-command-region-begin)
+          (setq TeX-command-region-begin (make-marker))
+          (setq TeX-command-region-end (make-marker)))
+        (set-marker TeX-command-region-begin begin)
+        (set-marker TeX-command-region-end end)
+        (message "TeX region pinned."))
     (when (markerp TeX-command-region-begin)
       (set-marker TeX-command-region-begin nil)
       (set-marker TeX-command-region-end nil))
@@ -149,15 +149,15 @@ pinned region will get unpinned and vice versa."
   ;; Note that TeX-command-region-begin is not a marker when called
   ;; from TeX-command-buffer.
   (and (or (null TeX-command-region-begin)
-          (markerp TeX-command-region-begin))
+           (markerp TeX-command-region-begin))
        (TeX-active-mark)
        (TeX-pin-region (region-beginning) (region-end)))
   (let ((begin (or TeX-command-region-begin (region-beginning)))
-       (end (or TeX-command-region-end (region-end))))
+        (end (or TeX-command-region-end (region-end))))
     (TeX-region-create (TeX-region-file TeX-default-extension)
-                      (buffer-substring begin end)
-                      (file-name-nondirectory (buffer-file-name))
-                      (TeX-current-offset begin))))
+                       (buffer-substring begin end)
+                       (file-name-nondirectory (buffer-file-name))
+                       (TeX-current-offset begin))))
 
 (defun TeX-command-region (&optional override-confirm)
   "Run TeX on the current region.
@@ -186,7 +186,7 @@ all text after `TeX-trailer-start'."
   ;; within `TeX-command-query' won't work in included files not
   ;; placed in `TeX-master-directory'.
   (TeX-command (TeX-command-query (TeX-region-file)) 'TeX-region-file
-              override-confirm))
+               override-confirm))
 
 (defun TeX-command-buffer (&optional override-confirm)
   "Run TeX on the current buffer.
@@ -199,7 +199,7 @@ If a prefix argument OVERRIDE-CONFIRM is given, 
confirmation will
 depend on it being positive instead of the entry in `TeX-command-list'."
   (interactive "P")
   (let ((TeX-command-region-begin (point-min))
-       (TeX-command-region-end (point-max)))
+        (TeX-command-region-end (point-max)))
     (TeX-command-region override-confirm)))
 
 (defcustom TeX-record-buffer nil
@@ -236,14 +236,14 @@ at bottom if LINE is nil."
   (interactive "P")
   (let ((buffer (TeX-active-buffer)))
     (if buffer
-       (let ((old-buffer (current-buffer)))
-         (TeX-pop-to-buffer buffer t t)
-         (bury-buffer buffer)
-         (goto-char (point-max))
-         (recenter (if line
-                       (prefix-numeric-value line)
-                     (/ (window-height) 2)))
-         (TeX-pop-to-buffer old-buffer nil t))
+        (let ((old-buffer (current-buffer)))
+          (TeX-pop-to-buffer buffer t t)
+          (bury-buffer buffer)
+          (goto-char (point-max))
+          (recenter (if line
+                        (prefix-numeric-value line)
+                      (/ (window-height) 2)))
+          (TeX-pop-to-buffer old-buffer nil t))
       (message "No process for this document."))))
 
 (defun TeX-kill-job ()
@@ -251,7 +251,7 @@ at bottom if LINE is nil."
   (interactive)
   (let ((process (TeX-active-process)))
     (if process
-       (kill-process process)
+        (kill-process process)
       ;; Should test for TeX background process here.
       (error "No TeX process to kill"))))
 
@@ -278,8 +278,8 @@ If there is no such buffer, or you already are in that 
buffer, find
 the master file."
   (interactive)
   (if (or (null TeX-command-buffer)
-         (null (buffer-name TeX-command-buffer))
-         (eq TeX-command-buffer (current-buffer)))
+          (null (buffer-name TeX-command-buffer))
+          (eq TeX-command-buffer (current-buffer)))
       (find-file (TeX-master-file TeX-default-extension))
     (switch-to-buffer TeX-command-buffer)))
 
@@ -307,8 +307,8 @@ If REPARSE is non-nil, reparse the error message buffer.
 message buffer and start at the first error."
   (interactive "P")
   (if (or (null (TeX-active-buffer))
-         (eq 'compilation-mode (with-current-buffer TeX-command-buffer
-                                 major-mode)))
+          (eq 'compilation-mode (with-current-buffer TeX-command-buffer
+                                  major-mode)))
       (next-error arg reparse)
 
     ;; Force reparsing when the function is called with a universal-argument.
@@ -326,18 +326,18 @@ This works only with TeX commands and if the
 `TeX-parse-all-errors' variable is non-nil."
   (interactive "p")
   (if (or (null (TeX-active-buffer))
-         (eq 'compilation-mode (with-current-buffer TeX-command-buffer
-                                 major-mode)))
+          (eq 'compilation-mode (with-current-buffer TeX-command-buffer
+                                  major-mode)))
       (previous-error arg)
 
     (let ((parse-function (TeX-get-parse-function)))
       (if (and TeX-parse-all-errors (equal parse-function #'TeX-parse-TeX))
-         ;; When `TeX-parse-all-errors' is non-nil and the parsing function is
-         ;; `TeX-parse-TeX' we can move backward in the errors.
-         (TeX-parse-TeX (- arg) nil)
-       ;; XXX: moving backward in the errors hasn't yet been implemented for
-       ;; other parsing functions.
-       (error "Jumping to previous error not supported")))))
+          ;; When `TeX-parse-all-errors' is non-nil and the parsing function is
+          ;; `TeX-parse-TeX' we can move backward in the errors.
+          (TeX-parse-TeX (- arg) nil)
+        ;; XXX: moving backward in the errors hasn't yet been implemented for
+        ;; other parsing functions.
+        (error "Jumping to previous error not supported")))))
 
 ;;; Command Query
 
@@ -378,19 +378,19 @@ itself and the list of provided engines.
 
 See for example style/fontspec.el"
   (let ((list TeX-check-engine-list)
-       (res nil))
+        (res nil))
     (setq TeX-check-engine-list
-         ;; The following is based on the definition of `cl-intersection' of
-         ;; GNU Emacs.
-         (and list engines
-              (if (equal list engines) list
-                (or (>= (length list) (length engines))
-                    (setq list (prog1 engines (setq engines list))))
-                (while engines
-                  (if (memq (car engines) list)
-                      (push (car engines) res))
-                  (pop engines))
-                res)))))
+          ;; The following is based on the definition of `cl-intersection' of
+          ;; GNU Emacs.
+          (and list engines
+               (if (equal list engines) list
+                 (or (>= (length list) (length engines))
+                     (setq list (prog1 engines (setq engines list))))
+                 (while engines
+                   (if (memq (car engines) list)
+                       (push (car engines) res))
+                   (pop engines))
+                 res)))))
 
 (defun TeX-check-engine (name)
   "Check the correct engine has been set.
@@ -410,48 +410,48 @@ to be run."
    ;; builtin engines because we can't take care of custom ones.  Do nothing if
    ;; there is no allowed engine, we don't know what to do in that case.
    (let ((length (length TeX-check-engine-list))
-        (name-alist '((default . "TeX")
-                      (luatex  . "LuaTeX")
-                      (omega   . "Omega")
-                      (xetex   . "XeTeX")))
-        (completion-ignore-case t)
-        (engine nil))
+         (name-alist '((default . "TeX")
+                       (luatex  . "LuaTeX")
+                       (omega   . "Omega")
+                       (xetex   . "XeTeX")))
+         (completion-ignore-case t)
+         (engine nil))
      (when
-        (cond
-         ;; There is exactly one allowed engine.
-         ((= length 1)
-          (setq engine (car TeX-check-engine-list))
-          (y-or-n-p (format "%s is required to build this document.
+         (cond
+          ;; There is exactly one allowed engine.
+          ((= length 1)
+           (setq engine (car TeX-check-engine-list))
+           (y-or-n-p (format "%s is required to build this document.
 Do you want to use this engine? " (cdr (assoc engine name-alist)))))
-         ;; More than one engine is allowed.
-         ((> length 1)
-          (if (y-or-n-p (format "It appears %s are required to build this 
document.
+          ;; More than one engine is allowed.
+          ((> length 1)
+           (if (y-or-n-p (format "It appears %s are required to build this 
document.
 Do you want to select one of these engines? "
-                                (mapconcat
-                                 (lambda (elt) (cdr (assoc elt name-alist)))
-                                 TeX-check-engine-list ", ")))
-              (setq engine
-                    (car (rassoc
-                          (completing-read
-                           (format
-                            "Choose between %s: "
-                            (mapconcat
-                             (lambda (elt) (cdr (assoc elt name-alist)))
-                             TeX-check-engine-list ", "))
-                           (mapcar
-                            (lambda (elt) (cdr (assoc elt name-alist)))
-                            TeX-check-engine-list))
-                          name-alist)))
-            ;; Don't keep asking.  If user doesn't want to change engine,
-            ;; probably has a good reason.  In order to do so, without adding
-            ;; yet another variable we just hack `TeX-check-engine-list' and
-            ;; make it nil.
-            (setq TeX-check-engine-list nil))))
+                                 (mapconcat
+                                  (lambda (elt) (cdr (assoc elt name-alist)))
+                                  TeX-check-engine-list ", ")))
+               (setq engine
+                     (car (rassoc
+                           (completing-read
+                            (format
+                             "Choose between %s: "
+                             (mapconcat
+                              (lambda (elt) (cdr (assoc elt name-alist)))
+                              TeX-check-engine-list ", "))
+                            (mapcar
+                             (lambda (elt) (cdr (assoc elt name-alist)))
+                             TeX-check-engine-list))
+                           name-alist)))
+             ;; Don't keep asking.  If user doesn't want to change engine,
+             ;; probably has a good reason.  In order to do so, without adding
+             ;; yet another variable we just hack `TeX-check-engine-list' and
+             ;; make it nil.
+             (setq TeX-check-engine-list nil))))
        (TeX-engine-set engine)
        (when (and (fboundp 'add-file-local-variable)
-                 (y-or-n-p "Do you want to remember the choice? "))
-        (add-file-local-variable 'TeX-engine engine)
-        (save-buffer))))))
+                  (y-or-n-p "Do you want to remember the choice? "))
+         (add-file-local-variable 'TeX-engine engine)
+         (save-buffer))))))
 
 (defcustom TeX-check-TeX t
   "Whether AUCTeX should check if a working TeX distribution is present."
@@ -486,48 +486,48 @@ been set."
   (setq-default TeX-command-buffer (current-buffer))
 
   (cond ((eq file-fn #'TeX-region-file)
-        (setq TeX-current-process-region-p t))
-       ((eq file-fn #'TeX-master-file)
-        (setq TeX-current-process-region-p nil)))
+         (setq TeX-current-process-region-p t))
+        ((eq file-fn #'TeX-master-file)
+         (setq TeX-current-process-region-p nil)))
 
   ;; When we're operating on a region, we need to update the position
   ;; of point in the region file so that forward search works.
   (if (string= name "View") (TeX-region-update-point))
 
   (let ((command (TeX-command-expand (nth 1 (assoc name TeX-command-list))))
-       (hook (nth 2 (assoc name TeX-command-list)))
-       (confirm (if override-confirm
-                    (> (prefix-numeric-value override-confirm) 0)
-                  (nth 3 (assoc name TeX-command-list)))))
+        (hook (nth 2 (assoc name TeX-command-list)))
+        (confirm (if override-confirm
+                     (> (prefix-numeric-value override-confirm) 0)
+                   (nth 3 (assoc name TeX-command-list)))))
 
     ;; Verify the expanded command
     (if confirm
-       (setq command
-             (read-from-minibuffer (concat name " command: ") command
-                                   nil nil)))
+        (setq command
+              (read-from-minibuffer (concat name " command: ") command
+                                    nil nil)))
 
     ;; Kill the frame and buffer associated to the error overview before 
running
     ;; the command, but keep them if the command to be run is View.
     (unless (string= name "View")
       (if (frame-live-p TeX-error-overview-frame)
-         (delete-frame TeX-error-overview-frame))
+          (delete-frame TeX-error-overview-frame))
       (if (get-buffer TeX-error-overview-buffer-name)
-         (kill-buffer TeX-error-overview-buffer-name)))
+          (kill-buffer TeX-error-overview-buffer-name)))
 
     ;; Before running some commands, check that AUCTeX is able to find "tex"
     ;; program.
     (and TeX-check-TeX
          (member name '("TeX" "LaTeX" "AmSTeX" "ConTeXt" "ConTeXt Full"))
-        (= TeX-check-TeX-command-not-found
+         (= TeX-check-TeX-command-not-found
             (call-process TeX-shell nil nil nil
                           TeX-shell-command-option TeX-command))
-        (error (format "ERROR: AUCTeX cannot find a working TeX distribution.
+         (error (format "ERROR: AUCTeX cannot find a working TeX distribution.
 Make sure you have one and that TeX binaries are in PATH environment 
variable%s"
-                       (if (eq system-type 'darwin)
-                           ".
+                        (if (eq system-type 'darwin)
+                            ".
 If you are using OS X El Capitan or later
 remember to add /Library/TeX/texbin/ to your PATH"
-                         ""))))
+                          ""))))
 
     ;; Now start the process
     (let ((file (funcall file-fn)))
@@ -543,29 +543,29 @@ without further expansion."
         TeX-expand-pos
         TeX-command-text
         TeX-command-pos
-       pat entry case-fold-search string expansion arguments)
+        pat entry case-fold-search string expansion arguments)
     (setq list (cons
-               (list "%%" (lambda nil
-                            (setq TeX-expand-pos (1+ TeX-expand-pos))
-                            "%"))
-               (or list (TeX-expand-list)))
-         pat (regexp-opt (mapcar #'car list)))
+                (list "%%" (lambda nil
+                             (setq TeX-expand-pos (1+ TeX-expand-pos))
+                             "%"))
+                (or list (TeX-expand-list)))
+          pat (regexp-opt (mapcar #'car list)))
     (while (setq TeX-expand-pos (string-match pat TeX-expand-command 
TeX-expand-pos))
       (setq string (match-string 0 TeX-expand-command)
-           entry (assoc string list)
-           expansion (car (cdr entry)) ;Second element
-           arguments (cdr (cdr entry)) ;Remaining elements
-           string (save-match-data
-                    (cond
+            entry (assoc string list)
+            expansion (car (cdr entry)) ;Second element
+            arguments (cdr (cdr entry)) ;Remaining elements
+            string (save-match-data
+                     (cond
                       ((functionp expansion)
                        (apply expansion arguments))
-                     ((boundp expansion)
+                      ((boundp expansion)
                        (apply (symbol-value expansion) arguments))
-                     (t
-                      (error "Nonexpansion %s" expansion)))))
+                      (t
+                       (error "Nonexpansion %s" expansion)))))
       (if (stringp string)
-         (setq TeX-expand-command
-               (replace-match string t t TeX-expand-command))))
+          (setq TeX-expand-command
+                (replace-match string t t TeX-expand-command))))
     TeX-expand-command))
 
 (defun TeX-active-master-with-quotes
@@ -586,29 +586,29 @@ infinite loop in `TeX-command-expand'.
 Helper function of `TeX-command-expand'. Use only within entries in
 `TeX-expand-list-builtin' and `TeX-expand-list'."
   (let* ((raw (TeX-active-master extension nondirectory ask))
-        ;; String `TeX-command-text' means that the file name is
-        ;; given through \input command.
-        (quote-for-space (if (and (stringp TeX-command-text)
-                                  (string-match " " raw))
-                             "\"" ""))
-        (res
-         (shell-quote-argument
-          (format
-           (if (and extra
-                    (stringp TeX-command-text)
-                    (memq major-mode '(latex-mode doctex-mode))
-                    (memq TeX-engine '(default uptex)))
-               ;; Since TeXLive 2018, the default encoding for LaTeX
-               ;; files has been changed to UTF-8 if used with
-               ;; classic TeX or pdfTeX.  I.e.,
-               ;; \usepackage[utf8]{inputenc} is enabled by default
-               ;; in (pdf)latex.
-               ;; c.f. LaTeX News issue 28
-               ;; Due to this change, \detokenize is required to
-               ;; recognize non-ascii characters in the file name
-               ;; when \input precedes.
-               "\\detokenize{ %s }" "%s")
-           (concat quote-for-space raw quote-for-space)))))
+         ;; String `TeX-command-text' means that the file name is
+         ;; given through \input command.
+         (quote-for-space (if (and (stringp TeX-command-text)
+                                   (string-match " " raw))
+                              "\"" ""))
+         (res
+          (shell-quote-argument
+           (format
+            (if (and extra
+                     (stringp TeX-command-text)
+                     (memq major-mode '(latex-mode doctex-mode))
+                     (memq TeX-engine '(default uptex)))
+                ;; Since TeXLive 2018, the default encoding for LaTeX
+                ;; files has been changed to UTF-8 if used with
+                ;; classic TeX or pdfTeX.  I.e.,
+                ;; \usepackage[utf8]{inputenc} is enabled by default
+                ;; in (pdf)latex.
+                ;; c.f. LaTeX News issue 28
+                ;; Due to this change, \detokenize is required to
+                ;; recognize non-ascii characters in the file name
+                ;; when \input precedes.
+                "\\detokenize{ %s }" "%s")
+            (concat quote-for-space raw quote-for-space)))))
     ;; Advance past the file name in order to
     ;; prevent expanding any substring of it.
     (setq TeX-expand-pos
@@ -623,26 +623,26 @@ EXTENSIONS are newer than DERIVED.  Will prompt to save 
the buffer of any
 ORIGINALS which are modified but not saved yet."
   (let (existingoriginals
         found
-       (extensions (TeX-delete-duplicate-strings extensions))
+        (extensions (TeX-delete-duplicate-strings extensions))
         (buffers (buffer-list)))
     (dolist (path (TeX-delete-duplicate-strings
-                  (mapcar (lambda (dir)
-                            (expand-file-name (file-name-as-directory dir)))
-                          (append
-                           TeX-check-path
-                           ;; In `TeX-command-default', this function is used 
to
-                           ;; check whether bibliography databases are newer
-                           ;; than generated *.bbl files, but bibliography
-                           ;; database are relative to `TeX-master-directory'
-                           ;; and the test can be run also from included files
-                           ;; that are in directories different from
-                           ;; `TeX-master-directory'.
-                           (list (TeX-master-directory))))))
+                   (mapcar (lambda (dir)
+                             (expand-file-name (file-name-as-directory dir)))
+                           (append
+                            TeX-check-path
+                            ;; In `TeX-command-default', this function is used 
to
+                            ;; check whether bibliography databases are newer
+                            ;; than generated *.bbl files, but bibliography
+                            ;; database are relative to `TeX-master-directory'
+                            ;; and the test can be run also from included files
+                            ;; that are in directories different from
+                            ;; `TeX-master-directory'.
+                            (list (TeX-master-directory))))))
       (dolist (orig originals)
-       (dolist (ext extensions)
-         (let ((filepath (concat path orig "." ext)))
-           (if (or (file-exists-p filepath)
-                   (get-file-buffer filepath))
+        (dolist (ext extensions)
+          (let ((filepath (concat path orig "." ext)))
+            (if (or (file-exists-p filepath)
+                    (get-file-buffer filepath))
                 (setq existingoriginals (cons filepath existingoriginals)))))))
     (while buffers
       (let* ((buffer (car buffers))
@@ -734,56 +734,56 @@ omitted) and `TeX-region-file'."
     (let (cmd process)
       (cond
        ((stringp command)
-       (setq cmd command
-             TeX-command-sequence-command nil))
+        (setq cmd command
+              TeX-command-sequence-command nil))
        ((listp command)
-       (setq cmd (pop command)
-             TeX-command-sequence-command command))
+        (setq cmd (pop command)
+              TeX-command-sequence-command command))
        ((functionp command)
-       (setq cmd (funcall command)
-             TeX-command-sequence-command command))
+        (setq cmd (funcall command)
+              TeX-command-sequence-command command))
        (t
-       (setq cmd (TeX-command-default
-                  ;; File function should be called with nil `nondirectory'
-                  ;; argument, otherwise `TeX-command-sequence' won't work in
-                  ;; included files not placed in `TeX-master-directory'.  In
-                  ;; addition, `TeX-master-file' is called with the third
-                  ;; argument (`ask') set to t, so that the master file is
-                  ;; properly set.  This is also what `TeX-command-master'
-                  ;; does.
-                  (funcall TeX-command-sequence-file-function nil nil t))
-             TeX-command-sequence-command t)))
+        (setq cmd (TeX-command-default
+                   ;; File function should be called with nil `nondirectory'
+                   ;; argument, otherwise `TeX-command-sequence' won't work in
+                   ;; included files not placed in `TeX-master-directory'.  In
+                   ;; addition, `TeX-master-file' is called with the third
+                   ;; argument (`ask') set to t, so that the master file is
+                   ;; properly set.  This is also what `TeX-command-master'
+                   ;; does.
+                   (funcall TeX-command-sequence-file-function nil nil t))
+              TeX-command-sequence-command t)))
       (TeX-command cmd TeX-command-sequence-file-function 0)
       (when reset
-       (setq TeX-command-sequence-count-same-command 1
-             TeX-command-sequence-count 1
-             TeX-command-sequence-last-command nil))
+        (setq TeX-command-sequence-count-same-command 1
+              TeX-command-sequence-count 1
+              TeX-command-sequence-last-command nil))
       (cond
        ;; Stop when the same command has been run
        ;; `TeX-command-sequence-max-runs-same-command' times in a row.
        ((>= TeX-command-sequence-count-same-command
-           TeX-command-sequence-max-runs-same-command)
-       (message "Stopping after running %S %d times in a row."
-                TeX-command-sequence-last-command
-                TeX-command-sequence-count-same-command))
+            TeX-command-sequence-max-runs-same-command)
+        (message "Stopping after running %S %d times in a row."
+                 TeX-command-sequence-last-command
+                 TeX-command-sequence-count-same-command))
        ;; Stop when there have been `TeX-command-sequence-max-runs' total
        ;; compilations.
        ((>= TeX-command-sequence-count TeX-command-sequence-max-runs)
-       (message "Stopping after %d compilations." TeX-command-sequence-count))
+        (message "Stopping after %d compilations." TeX-command-sequence-count))
        ;; The command just run is `TeX-command-Show'.
        ((equal command TeX-command-Show))
        ;; In any other case continue: increase counters (when needed), update
        ;; `TeX-command-sequence-last-command' and run the sentinel.
        (t
-       (if (equal cmd TeX-command-sequence-last-command)
-           (setq TeX-command-sequence-count-same-command
-                 (1+ TeX-command-sequence-count-same-command))
-         (setq TeX-command-sequence-count-same-command 1))
-       (setq TeX-command-sequence-count (1+ TeX-command-sequence-count)
-             TeX-command-sequence-last-command cmd)
-       (and (setq process (get-buffer-process (current-buffer)))
-            (setq TeX-command-sequence-sentinel (process-sentinel process))
-            (set-process-sentinel process
+        (if (equal cmd TeX-command-sequence-last-command)
+            (setq TeX-command-sequence-count-same-command
+                  (1+ TeX-command-sequence-count-same-command))
+          (setq TeX-command-sequence-count-same-command 1))
+        (setq TeX-command-sequence-count (1+ TeX-command-sequence-count)
+              TeX-command-sequence-last-command cmd)
+        (and (setq process (get-buffer-process (current-buffer)))
+             (setq TeX-command-sequence-sentinel (process-sentinel process))
+             (set-process-sentinel process
                                    #'TeX-command-sequence-sentinel)))))))
 
 (defcustom TeX-save-query t
@@ -797,47 +797,47 @@ omitted) and `TeX-region-file'."
   "Guess the next command to be run on NAME."
   (let ((command-next nil))
     (cond (;; name might be absolute or relative, so expand it for
-          ;; comparison.
-          (if (string-equal (expand-file-name name)
-                            (expand-file-name (TeX-region-file)))
-              (TeX-check-files (concat name "." (TeX-output-extension))
-                               ;; Each original will be checked for all dirs
-                               ;; in `TeX-check-path' so this needs to be just
-                               ;; a filename without directory.
-                               (list (file-name-nondirectory name))
-                               TeX-file-extensions)
-            (TeX-save-document (TeX-master-file)))
-          TeX-command-default)
-         ((and (memq major-mode '(doctex-mode latex-mode))
-               ;; Want to know if bib file is newer than .bbl
-               ;; We don't care whether the bib files are open in emacs
-               (TeX-check-files (concat name ".bbl")
-                                (mapcar #'car
-                                        (LaTeX-bibliography-list))
-                                (append BibTeX-file-extensions
-                                        TeX-Biber-file-extensions)))
-          ;; We should check for bst files here as well.
-          (if LaTeX-using-Biber TeX-command-Biber TeX-command-BibTeX))
-         ((and
-           ;; Rationale: makeindex should be run when final document is almost
-           ;; complete (see
-           ;; https://tex-talk.net/2012/09/dont-forget-to-run-makeindex/),
-           ;; otherwise, after following latex runs, index pages may change due
-           ;; to changes in final document, resulting in extra makeindex and
-           ;; latex runs.
-           (member
-            (setq command-next
-                  (TeX-process-get-variable
-                   name
-                   'TeX-command-next
-                   (or (and TeX-PDF-mode (TeX-PDF-from-DVI))
-                       TeX-command-Show)))
-            (list "Dvips" "Dvipdfmx" TeX-command-Show))
-           (cdr (assoc (expand-file-name (concat name ".idx"))
-                       LaTeX-idx-changed-alist)))
-          "Index")
-         (command-next)
-         (TeX-command-Show))))
+           ;; comparison.
+           (if (string-equal (expand-file-name name)
+                             (expand-file-name (TeX-region-file)))
+               (TeX-check-files (concat name "." (TeX-output-extension))
+                                ;; Each original will be checked for all dirs
+                                ;; in `TeX-check-path' so this needs to be just
+                                ;; a filename without directory.
+                                (list (file-name-nondirectory name))
+                                TeX-file-extensions)
+             (TeX-save-document (TeX-master-file)))
+           TeX-command-default)
+          ((and (memq major-mode '(doctex-mode latex-mode))
+                ;; Want to know if bib file is newer than .bbl
+                ;; We don't care whether the bib files are open in emacs
+                (TeX-check-files (concat name ".bbl")
+                                 (mapcar #'car
+                                         (LaTeX-bibliography-list))
+                                 (append BibTeX-file-extensions
+                                         TeX-Biber-file-extensions)))
+           ;; We should check for bst files here as well.
+           (if LaTeX-using-Biber TeX-command-Biber TeX-command-BibTeX))
+          ((and
+            ;; Rationale: makeindex should be run when final document is almost
+            ;; complete (see
+            ;; https://tex-talk.net/2012/09/dont-forget-to-run-makeindex/),
+            ;; otherwise, after following latex runs, index pages may change 
due
+            ;; to changes in final document, resulting in extra makeindex and
+            ;; latex runs.
+            (member
+             (setq command-next
+                   (TeX-process-get-variable
+                    name
+                    'TeX-command-next
+                    (or (and TeX-PDF-mode (TeX-PDF-from-DVI))
+                        TeX-command-Show)))
+             (list "Dvips" "Dvipdfmx" TeX-command-Show))
+            (cdr (assoc (expand-file-name (concat name ".idx"))
+                        LaTeX-idx-changed-alist)))
+           "Index")
+          (command-next)
+          (TeX-command-Show))))
 
 (defun TeX-command-query (name)
   "Query the user for what TeX command to use."
@@ -865,39 +865,39 @@ omitted) and `TeX-region-file'."
 QUEUE is non-nil when we are checking for the printer queue."
   (let (command element printer)
     (if queue
-       (unless (setq element 2 command TeX-queue-command)
-         (error "Need to customize `TeX-queue-command'"))
+        (unless (setq element 2 command TeX-queue-command)
+          (error "Need to customize `TeX-queue-command'"))
       (unless (setq element 1 command TeX-print-command)
-         (error "Need to customize `TeX-print-command'")))
+          (error "Need to customize `TeX-print-command'")))
     (while (progn
-            (setq printer (if TeX-printer-list
-                              (let ((completion-ignore-case t))
-                                (completing-read
-                                 (format "Printer%s: "
-                                         (if TeX-printer-default
-                                             (format " (default %s)" 
TeX-printer-default) ""))
-                                 TeX-printer-list))
-                            ""))
-            (setq printer (or (car-safe (TeX-assoc printer TeX-printer-list))
-                              printer))
-            (not (if (or (null printer) (string-equal "" printer))
-                     (setq printer TeX-printer-default)
-                   (setq TeX-printer-default printer)))))
+             (setq printer (if TeX-printer-list
+                               (let ((completion-ignore-case t))
+                                 (completing-read
+                                  (format "Printer%s: "
+                                          (if TeX-printer-default
+                                              (format " (default %s)" 
TeX-printer-default) ""))
+                                  TeX-printer-list))
+                             ""))
+             (setq printer (or (car-safe (TeX-assoc printer TeX-printer-list))
+                               printer))
+             (not (if (or (null printer) (string-equal "" printer))
+                      (setq printer TeX-printer-default)
+                    (setq TeX-printer-default printer)))))
 
     (let ((expansion (let ((entry (assoc printer TeX-printer-list)))
-                      (or (nth element entry)
-                          command))))
+                       (or (nth element entry)
+                           command))))
       (if (string-match "%p" printer)
-         (error "Don't use %s in printer names" "%p"))
+          (error "Don't use %s in printer names" "%p"))
       (while (string-match "%p" expansion)
-       (setq expansion (replace-match printer t t expansion 0)))
+        (setq expansion (replace-match printer t t expansion 0)))
       expansion)))
 
 (defun TeX-style-check (styles)
   "Check STYLES compared to the current style options."
   (let ((files (TeX-style-list)))
     (while (and styles
-               (not (TeX-member (car (car styles)) files 'string-match)))
+                (not (TeX-member (car (car styles)) files 'string-match)))
       (setq styles (cdr styles))))
   (if styles
       (nth 1 (car styles))
@@ -908,9 +908,9 @@ QUEUE is non-nil when we are checking for the printer 
queue."
   (if (listp TeX-output-extension)
       (car TeX-output-extension)
     (or (TeX-process-get-variable (TeX-active-master)
-                                 'TeX-output-extension
-                                 TeX-output-extension)
-       TeX-output-extension)))
+                                  'TeX-output-extension
+                                  TeX-output-extension)
+        TeX-output-extension)))
 
 (defun TeX-view-mouse (event)
   "Start `TeX-view' at mouse position."
@@ -929,18 +929,18 @@ Do nothing in case the last command hasn't operated on 
the region
 or `TeX-source-correlate-mode' is disabled."
   (when (and TeX-current-process-region-p TeX-source-correlate-mode)
     (let ((region-buf (get-file-buffer (TeX-region-file t)))
-         (orig-line (TeX-current-offset))
-         (pos-in-line (- (point) (max (line-beginning-position)
-                                      (or TeX-command-region-begin
-                                          (region-beginning))))))
+          (orig-line (TeX-current-offset))
+          (pos-in-line (- (point) (max (line-beginning-position)
+                                       (or TeX-command-region-begin
+                                           (region-beginning))))))
       (when region-buf
-       (with-current-buffer region-buf
-         (goto-char (point-min))
-         (when (re-search-forward "!offset(\\(-?[0-9]+\\)" nil t)
-           (let ((offset (string-to-number (match-string 1))))
-             (goto-char (point-min))
-             (forward-line (- orig-line offset))
-             (forward-char pos-in-line))))))))
+        (with-current-buffer region-buf
+          (goto-char (point-min))
+          (when (re-search-forward "!offset(\\(-?[0-9]+\\)" nil t)
+            (let ((offset (string-to-number (match-string 1))))
+              (goto-char (point-min))
+              (forward-line (- orig-line offset))
+              (forward-char pos-in-line))))))))
 
 (defun TeX-view ()
   "Start a viewer without confirmation.
@@ -949,7 +949,7 @@ depending on the last command issued."
   (interactive)
   (let ((output-file (TeX-active-master (TeX-output-extension))))
     (if (file-exists-p output-file)
-       (TeX-command "View" 'TeX-active-master 0)
+        (TeX-command "View" 'TeX-active-master 0)
       (message "Output file %S does not exist." output-file))))
 
 ;;; Command Hooks
@@ -964,8 +964,8 @@ If you use an emacs-internal viewer such as `doc-view-mode' 
or
 `pdf-view-mode', add `TeX-revert-document-buffer' to this hook.")
 
 (make-obsolete-variable 'TeX-after-TeX-LaTeX-command-finished-hook
-                       'TeX-after-compilation-finished-functions
-                       "11.89")
+                        'TeX-after-compilation-finished-functions
+                        "11.89")
 
 (defun TeX-revert-document-buffer (file)
   "Revert the buffer visiting FILE.
@@ -979,7 +979,7 @@ requires that the corresponding mode defines a sensible
   (let ((buf (find-buffer-visiting file)))
     (when buf
       (with-current-buffer buf
-       (revert-buffer nil t t)))))
+        (revert-buffer nil t t)))))
 
 (defvar TeX-after-start-process-function
   #'TeX-adjust-process-coding-system
@@ -992,12 +992,12 @@ Usually coding system is the same as the TeX file with 
eol format
 adjusted to OS default value.  Take care of Japanese TeX, which
 requires special treatment."
   (if (and (boundp 'japanese-TeX-mode)
-          (fboundp 'japanese-TeX-set-process-coding-system)
-          (with-current-buffer TeX-command-buffer
-            japanese-TeX-mode))
+           (fboundp 'japanese-TeX-set-process-coding-system)
+           (with-current-buffer TeX-command-buffer
+             japanese-TeX-mode))
       (japanese-TeX-set-process-coding-system process)
     (let ((cs (coding-system-base (with-current-buffer TeX-command-buffer
-                                   buffer-file-coding-system))))
+                                    buffer-file-coding-system))))
       ;; The value of `buffer-file-coding-system' is sometimes
       ;; undecided-{unix,dos,mac}.  That happens when the file
       ;; contains no multibyte chars and only end of line format is
@@ -1025,18 +1025,18 @@ requires special treatment."
       ;; into `utf-8'.  On decoding, `utf-8' can decode UTF-8 with
       ;; BOM.  So it is safe for both decoding and encoding.
       (if (eq cs 'utf-8-with-signature)
-         (setq cs 'utf-8))
+          (setq cs 'utf-8))
 
       ;; Eol format of TeX files can differ from OS default. TeX
       ;; binaries accept all type of eol format in the given files
       ;; and output messages according to OS default.  So we set eol
       ;; format to OS default value.
       (setq cs (coding-system-change-eol-conversion
-               cs
-               ;; The eol of macosX is LF, not CR.  So we choose
-               ;; other than `unix' only for w32 system.
-               ;; FIXME: what should we do for cygwin?
-               (if (eq system-type 'windows-nt) 'dos 'unix)))
+                cs
+                ;; The eol of macosX is LF, not CR.  So we choose
+                ;; other than `unix' only for w32 system.
+                ;; FIXME: what should we do for cygwin?
+                (if (eq system-type 'windows-nt) 'dos 'unix)))
       (set-process-coding-system process cs cs))))
 
 (defcustom TeX-show-compilation nil
@@ -1048,10 +1048,10 @@ requires special treatment."
   "Create a process for NAME using COMMAND to process FILE.
 Return the new process."
   (let ((default TeX-command-default)
-       (buffer (TeX-process-buffer-name file))
-       (dir (TeX-master-directory))
-       (command-buff (current-buffer)))
-    (TeX-process-check file)           ; Check that no process is running
+        (buffer (TeX-process-buffer-name file))
+        (dir (TeX-master-directory))
+        (command-buff (current-buffer)))
+    (TeX-process-check file)            ; Check that no process is running
     (setq-default TeX-command-buffer command-buff)
     (get-buffer-create buffer)
     (set-buffer buffer)
@@ -1064,60 +1064,60 @@ Return the new process."
     (insert "Running `" name "' on `" file "' with ``" command "''\n")
     (TeX-output-mode)
     (if TeX-show-compilation
-       (display-buffer buffer)
+        (display-buffer buffer)
       (message "Type `%s' to display results of compilation."
-              (substitute-command-keys
-               "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
+               (substitute-command-keys
+                "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
     (setq TeX-parse-function #'TeX-parse-command)
     (setq TeX-command-default default)
     (setq TeX-sentinel-function
-         (lambda (_process name)
-           (message (concat name ": done."))))
+          (lambda (_process name)
+            (message (concat name ": done."))))
     (if TeX-process-asynchronous
-       (let ((process (start-process name buffer TeX-shell
-                                     TeX-shell-command-option command)))
-         (if TeX-after-start-process-function
-             (funcall TeX-after-start-process-function process))
-         (TeX-command-mode-line process)
-         (set-process-filter process #'TeX-command-filter)
-         (set-process-sentinel process #'TeX-command-sentinel)
-         (set-marker (process-mark process) (point-max))
-         (setq compilation-in-progress (cons process compilation-in-progress))
-         process)
+        (let ((process (start-process name buffer TeX-shell
+                                      TeX-shell-command-option command)))
+          (if TeX-after-start-process-function
+              (funcall TeX-after-start-process-function process))
+          (TeX-command-mode-line process)
+          (set-process-filter process #'TeX-command-filter)
+          (set-process-sentinel process #'TeX-command-sentinel)
+          (set-marker (process-mark process) (point-max))
+          (setq compilation-in-progress (cons process compilation-in-progress))
+          process)
       (setq mode-line-process ": run")
       (force-mode-line-update)
       (call-process TeX-shell nil buffer nil
-                   TeX-shell-command-option command))))
+                    TeX-shell-command-option command))))
 
 (defun TeX-run-set-command (name command)
   "Remember TeX command to use to NAME and set corresponding output extension."
   (setq TeX-command-default name
-       TeX-output-extension
-       (if (and (null (TeX-PDF-from-DVI)) TeX-PDF-mode) "pdf" "dvi"))
+        TeX-output-extension
+        (if (and (null (TeX-PDF-from-DVI)) TeX-PDF-mode) "pdf" "dvi"))
   (let ((case-fold-search t)
-       (lst TeX-command-output-list))
+        (lst TeX-command-output-list))
     (while lst
       (if (string-match (car (car lst)) command)
-         (setq TeX-output-extension (car (cdr (car lst)))
-               lst nil)
-       (setq lst (cdr lst))))))
+          (setq TeX-output-extension (car (cdr (car lst)))
+                lst nil)
+        (setq lst (cdr lst))))))
 
 (defun TeX-run-format (name command file)
   "Create a process for NAME using COMMAND to format FILE with TeX."
   (TeX-run-set-command name command)
   (let ((buffer (TeX-process-buffer-name file))
-       (process (TeX-run-command name command file)))
+        (process (TeX-run-command name command file)))
     ;; Hook to TeX debugger.
     (with-current-buffer buffer
       (TeX-parse-reset)
       (setq TeX-parse-function #'TeX-parse-TeX)
       (setq TeX-sentinel-function #'TeX-TeX-sentinel)
       (if TeX-process-asynchronous
-         (progn
-           ;; Updating the mode line.
-           (setq TeX-current-page "[0]")
-           (TeX-format-mode-line process)
-           (set-process-filter process #'TeX-format-filter)))
+          (progn
+            ;; Updating the mode line.
+            (setq TeX-current-page "[0]")
+            (TeX-format-mode-line process)
+            (set-process-filter process #'TeX-format-filter)))
       process)))
 
 (defvar TeX-error-report-switches nil
@@ -1137,31 +1137,31 @@ run of `TeX-run-TeX', use
   ;; Initialize error to nil (no error) for current master.
   ;; Presence of error is reported inside `TeX-TeX-sentinel-check'
   (let ((current-master (TeX-master-file))
-       (idx-file nil) (element nil))
+        (idx-file nil) (element nil))
     ;; the current master file is saved because error routines are
     ;; parsed in other buffers;
     (setq TeX-error-report-switches
-         (plist-put TeX-error-report-switches
-                    'TeX-current-master current-master))
+          (plist-put TeX-error-report-switches
+                     'TeX-current-master current-master))
     ;; reset error to nil (no error)
     (setq TeX-error-report-switches
-         (plist-put TeX-error-report-switches
-                    (intern current-master) nil))
+          (plist-put TeX-error-report-switches
+                     (intern current-master) nil))
 
     ;; Store md5 hash of the index file before running LaTeX.
     (and (memq major-mode '(doctex-mode latex-mode))
-        (prog1 (file-exists-p
-                (setq idx-file (expand-file-name (concat file ".idx"))))
-          ;; In order to avoid confusion and pollution of
-          ;; `LaTeX-idx-md5-alist', remove from this alist all md5 hashes of
-          ;; the current index file.  Note `assq-delete-all' doesn't work with
-          ;; string keys and has problems with non-list elements in Emacs 21
-          ;; (see file tex-site.el).
-          (while (setq element (assoc idx-file LaTeX-idx-md5-alist))
-            (setq LaTeX-idx-md5-alist (delq element LaTeX-idx-md5-alist))))
-        (with-temp-buffer
-          (insert-file-contents idx-file)
-          (push (cons idx-file (md5 (current-buffer))) LaTeX-idx-md5-alist))))
+         (prog1 (file-exists-p
+                 (setq idx-file (expand-file-name (concat file ".idx"))))
+           ;; In order to avoid confusion and pollution of
+           ;; `LaTeX-idx-md5-alist', remove from this alist all md5 hashes of
+           ;; the current index file.  Note `assq-delete-all' doesn't work with
+           ;; string keys and has problems with non-list elements in Emacs 21
+           ;; (see file tex-site.el).
+           (while (setq element (assoc idx-file LaTeX-idx-md5-alist))
+             (setq LaTeX-idx-md5-alist (delq element LaTeX-idx-md5-alist))))
+         (with-temp-buffer
+           (insert-file-contents idx-file)
+           (push (cons idx-file (md5 (current-buffer))) LaTeX-idx-md5-alist))))
 
   ;; can we assume that TeX-sentinel-function will not be changed
   ;; during (TeX-run-format ..)? --pg
@@ -1186,7 +1186,7 @@ run of `TeX-run-TeX', use
   (let ((process (TeX-run-command name command file)))
     (setq TeX-sentinel-function #'TeX-BibTeX-sentinel)
     (if TeX-process-asynchronous
-       process
+        process
       (TeX-synchronous-sentinel name file process))))
 
 (defun TeX-run-Biber (name command file)
@@ -1224,17 +1224,17 @@ run of `TeX-run-TeX', use
 (defun TeX-run-index (name command file)
   "Create a process for NAME using COMMAND to compile the index file."
   (let ((process (TeX-run-command name command file))
-       (element nil))
+        (element nil))
     (setq TeX-sentinel-function #'TeX-index-sentinel)
     ;; Same cleaning as that for `LaTeX-idx-md5-alist' in `TeX-run-TeX'.
     (while (setq element
-                ;; `file' has been determined in `TeX-command-buffer', while
-                ;; this function has `TeX-master-directory' as
-                ;; `default-directory', then we have to expand `file' file-name
-                ;; in the same directory of `TeX-command-buffer'.
-                (assoc (with-current-buffer TeX-command-buffer
-                           (expand-file-name (concat file ".idx")))
-                       LaTeX-idx-changed-alist))
+                 ;; `file' has been determined in `TeX-command-buffer', while
+                 ;; this function has `TeX-master-directory' as
+                 ;; `default-directory', then we have to expand `file' 
file-name
+                 ;; in the same directory of `TeX-command-buffer'.
+                 (assoc (with-current-buffer TeX-command-buffer
+                            (expand-file-name (concat file ".idx")))
+                        LaTeX-idx-changed-alist))
       (setq LaTeX-idx-changed-alist (delq element LaTeX-idx-changed-alist)))
     (if TeX-process-asynchronous
         process
@@ -1255,25 +1255,25 @@ run of `TeX-run-TeX', use
     ;; in `compilation-error-regexp-alist-alist' to pick up file names
     ;; with spaces.
     (add-to-list 'compilation-error-regexp-alist
-                '("^\"\\([^,\"\n\t]+\\)\", line \\([0-9]+\\)\
+                 '("^\"\\([^,\"\n\t]+\\)\", line \\([0-9]+\\)\
 \\(?:[(. pos]+\\([0-9]+\\))?\\)?[:.,; (-]\\( warning:\\|[-0-9 ]*(W)\\)?" 1 2 3 
(4))
-                t)))
+                 t)))
 
 (defun TeX-run-shell (_name command _file)
   "Ignore first and third argument, start shell-command with second argument."
   (let ((default-directory (TeX-master-directory)))
     (shell-command command)
     (if (eq system-type 'ms-dos)
-       (redraw-display))))
+        (redraw-display))))
 
 (defun TeX-run-discard (_name command _file)
   "Start COMMAND as process, discarding its output.
 NAME and FILE are ignored."
   (let ((default-directory (TeX-master-directory)))
     (call-process TeX-shell
-                 nil 0 nil
-                 TeX-shell-command-option
-                 command)))
+                  nil 0 nil
+                  TeX-shell-command-option
+                  command)))
 
 (defun TeX-run-discard-foreground (_name command _file)
   "Call process with second argument in the foreground, discarding its output.
@@ -1281,7 +1281,7 @@ With support for MS-DOS, especially when dviout is used 
with PC-9801 series."
   (if (and (boundp 'dos-machine-type) (eq dos-machine-type 'pc98)) ;if PC-9801
       (send-string-to-terminal "\e[2J")) ; clear screen
   (call-process TeX-shell (if (eq system-type 'ms-dos) "con") nil nil
-               TeX-shell-command-option command)
+                TeX-shell-command-option command)
   (if (eq system-type 'ms-dos)
       (redraw-display)))
 (defalias 'TeX-run-dviout 'TeX-run-discard-foreground)
@@ -1293,10 +1293,10 @@ With support for MS-DOS, especially when dviout is used 
with PC-9801 series."
     (if dir (cd dir))
     (erase-buffer)
     (let ((process (start-process (concat name " background")
-                                 nil TeX-shell
-                                 TeX-shell-command-option command)))
+                                  nil TeX-shell
+                                  TeX-shell-command-option command)))
       (if TeX-after-start-process-function
-         (funcall TeX-after-start-process-function process))
+          (funcall TeX-after-start-process-function process))
       (set-process-filter process #'TeX-background-filter)
       (set-process-query-on-exit-flag process nil))))
 
@@ -1307,10 +1307,10 @@ With support for MS-DOS, especially when dviout is used 
with PC-9801 series."
     (if dir (cd dir))
     (erase-buffer)
     (let ((process (start-process (concat name " silent")
-                                 (current-buffer) TeX-shell
-                                 TeX-shell-command-option command)))
+                                  (current-buffer) TeX-shell
+                                  TeX-shell-command-option command)))
       (if TeX-after-start-process-function
-         (funcall TeX-after-start-process-function process))
+          (funcall TeX-after-start-process-function process))
       (set-process-query-on-exit-flag process nil))))
 
 (defun TeX-run-interactive (name command file)
@@ -1321,12 +1321,12 @@ Error parsing on \\[next-error] should work with a bit 
of luck."
   (TeX-run-set-command name command)
   (require 'comint)
   (let ((default TeX-command-default)
-       (buffer (TeX-process-buffer-name file))
-       (process nil)
-       (dir (TeX-master-directory))
-       (command-buff (current-buffer))
-       (sentinel-function TeX-sentinel-default-function)) ; inherit from major 
mode
-    (TeX-process-check file)           ; Check that no process is running
+        (buffer (TeX-process-buffer-name file))
+        (process nil)
+        (dir (TeX-master-directory))
+        (command-buff (current-buffer))
+        (sentinel-function TeX-sentinel-default-function)) ; inherit from 
major mode
+    (TeX-process-check file)            ; Check that no process is running
     (setq-default TeX-command-buffer command-buff)
     (with-output-to-temp-buffer buffer)
     (set-buffer buffer)
@@ -1335,14 +1335,14 @@ Error parsing on \\[next-error] should work with a bit 
of luck."
     (if dir (cd dir))
     (insert "Running `" name "' on `" file "' with ``" command "''\n")
     (comint-exec buffer name TeX-shell nil
-                (list TeX-shell-command-option command))
+                 (list TeX-shell-command-option command))
     (comint-mode)
     (add-hook 'comint-output-filter-functions #'TeX-interactive-goto-prompt)
     (setq mode-name name)
     (setq TeX-command-default default)
     (setq process (get-buffer-process buffer))
     (if TeX-after-start-process-function
-       (funcall TeX-after-start-process-function process))
+        (funcall TeX-after-start-process-function process))
     (TeX-command-mode-line process)
     (set-process-sentinel process #'TeX-command-sentinel)
     (set-marker (process-mark process) (point-max))
@@ -1384,8 +1384,8 @@ reasons.  Use `TeX-run-function' instead."
       ;; Append post-mortem information to the buffer
       (goto-char (point-max))
       (insert "\n" mode-name (if (and result (zerop result))
-                                " finished" " exited") " at "
-             (substring (current-time-string) 0 -5))
+                                 " finished" " exited") " at "
+              (substring (current-time-string) 0 -5))
       (setq mode-line-process ": exit")
 
       ;; Do command specific actions.
@@ -1404,37 +1404,37 @@ reasons.  Use `TeX-run-function' instead."
   ;; `TeX-master-file' instead of `TeX-active-master' to determine the
   ;; master because the region file should never be the master.
   (let* ((TeX-transient-master (TeX-master-file))
-        (buffer (process-buffer process))
-        (name (process-name process)))
-    (cond ((null (buffer-name buffer)) ; buffer killed
-          (set-process-buffer process nil)
-          (set-process-sentinel process nil))
-         ((memq (process-status process) '(signal exit))
-          (with-current-buffer buffer
-
-            ;; Append post-mortem information to the buffer
-            (goto-char (point-max))
-            (insert-before-markers "\n" mode-name " " msg)
-            (forward-char -1)
-            (insert " at "
-                    (substring (current-time-string) 0 -5))
-            (forward-char 1)
-
-            ;; Do command specific actions.
-            (TeX-command-mode-line process)
-            (setq TeX-command-next TeX-command-Show)
-            (goto-char (point-min))
-            (apply TeX-sentinel-function process name nil)
-
-
-            ;; If buffer and mode line will show that the process
-            ;; is dead, we can delete it now.  Otherwise it
-            ;; will stay around until M-x list-processes.
-            (delete-process process))
-
-          ;; Force mode line redisplay soon
-          ;; Do this in all buffers (bug#38058 and bug#40965)
-          (force-mode-line-update t))))
+         (buffer (process-buffer process))
+         (name (process-name process)))
+    (cond ((null (buffer-name buffer))  ; buffer killed
+           (set-process-buffer process nil)
+           (set-process-sentinel process nil))
+          ((memq (process-status process) '(signal exit))
+           (with-current-buffer buffer
+
+             ;; Append post-mortem information to the buffer
+             (goto-char (point-max))
+             (insert-before-markers "\n" mode-name " " msg)
+             (forward-char -1)
+             (insert " at "
+                     (substring (current-time-string) 0 -5))
+             (forward-char 1)
+
+             ;; Do command specific actions.
+             (TeX-command-mode-line process)
+             (setq TeX-command-next TeX-command-Show)
+             (goto-char (point-min))
+             (apply TeX-sentinel-function process name nil)
+
+
+             ;; If buffer and mode line will show that the process
+             ;; is dead, we can delete it now.  Otherwise it
+             ;; will stay around until M-x list-processes.
+             (delete-process process))
+
+           ;; Force mode line redisplay soon
+           ;; Do this in all buffers (bug#38058 and bug#40965)
+           (force-mode-line-update t))))
 
   (setq compilation-in-progress (delq process compilation-in-progress)))
 
@@ -1464,27 +1464,27 @@ Open the error overview if
 errors or warnings to show."
   (if (TeX-TeX-sentinel-check process name)
       (progn
-       (if TeX-parse-all-errors
-           (TeX-parse-all-errors))
-       (if (and TeX-error-overview-open-after-TeX-run
-                (TeX-error-overview-make-entries
-                 (TeX-master-directory) (TeX-active-buffer)))
-           (TeX-error-overview)))
+        (if TeX-parse-all-errors
+            (TeX-parse-all-errors))
+        (if (and TeX-error-overview-open-after-TeX-run
+                 (TeX-error-overview-make-entries
+                  (TeX-master-directory) (TeX-active-buffer)))
+            (TeX-error-overview)))
     (message (concat name ": formatted " (TeX-current-pages)))
     (let (dvi2pdf)
-       (if (with-current-buffer TeX-command-buffer
-          (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
-        (setq TeX-command-next dvi2pdf)
+        (if (with-current-buffer TeX-command-buffer
+           (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
+         (setq TeX-command-next dvi2pdf)
        (setq TeX-command-next TeX-command-Show)))))
 
 (defun TeX-current-pages ()
   "Return string indicating the number of pages formatted."
   (cond ((null TeX-current-page)
-        "some pages")
-       ((string-match "[^0-9]1[^0-9]" TeX-current-page)
-        (concat TeX-current-page " page"))
-       (t
-        (concat TeX-current-page " pages"))))
+         "some pages")
+        ((string-match "[^0-9]1[^0-9]" TeX-current-page)
+         (concat TeX-current-page " page"))
+        (t
+         (concat TeX-current-page " pages"))))
 
 (defun TeX-TeX-sentinel-check (process name)
   "Cleanup TeX output buffer after running TeX.
@@ -1493,49 +1493,49 @@ Return nil ifs no errors were found."
     (goto-char (point-max))
     (cond
      ((and (string-match "ConTeXt" name) (boundp 'ConTeXt-Mark-version)
-          (with-current-buffer TeX-command-buffer
-            (string= ConTeXt-Mark-version "IV")))
+           (with-current-buffer TeX-command-buffer
+             (string= ConTeXt-Mark-version "IV")))
       (when (re-search-backward " > result saved in file: \\(.*?\\), " nil t)
-       (let ((output-file (TeX-match-buffer 1)))
-         ;; Shave off quotation marks if present.
-         (when (string-match "\\`\"\\(.*\\)\"\\'" output-file)
-           (setq output-file (match-string 1 output-file)))
-         (setq TeX-output-extension
-               (if (string-match "\\.\\([^.]*\\)$" output-file)
-                   (match-string 1 output-file)
-                 "dvi")))
-       (if (re-search-forward ", \\([0-9]+\\) shipped pages, " nil t)
-           (setq TeX-current-page (concat "{" (TeX-match-buffer 1) "}")))))
+        (let ((output-file (TeX-match-buffer 1)))
+          ;; Shave off quotation marks if present.
+          (when (string-match "\\`\"\\(.*\\)\"\\'" output-file)
+            (setq output-file (match-string 1 output-file)))
+          (setq TeX-output-extension
+                (if (string-match "\\.\\([^.]*\\)$" output-file)
+                    (match-string 1 output-file)
+                  "dvi")))
+        (if (re-search-forward ", \\([0-9]+\\) shipped pages, " nil t)
+            (setq TeX-current-page (concat "{" (TeX-match-buffer 1) "}")))))
      (t
       (if (re-search-backward "^Output written on \\(.*?\\) (\\([0-9]+\\) page"
-                             nil t)
-         (let ((output-file (TeX-match-buffer 1)))
-           (setq TeX-current-page (concat "{" (TeX-match-buffer 2) "}"))
-           ;; Shave off quotation marks if present.
-           (when (string-match "\\`\"\\(.*\\)\"\\'" output-file)
-             (setq output-file (match-string 1 output-file)))
-           (setq TeX-output-extension
-                 (if (string-match "\\.\\([^.]*\\)$" output-file)
-                     (match-string 1 output-file)
-                   "dvi")))))))
+                              nil t)
+          (let ((output-file (TeX-match-buffer 1)))
+            (setq TeX-current-page (concat "{" (TeX-match-buffer 2) "}"))
+            ;; Shave off quotation marks if present.
+            (when (string-match "\\`\"\\(.*\\)\"\\'" output-file)
+              (setq output-file (match-string 1 output-file)))
+            (setq TeX-output-extension
+                  (if (string-match "\\.\\([^.]*\\)$" output-file)
+                      (match-string 1 output-file)
+                    "dvi")))))))
   (if process (TeX-format-mode-line process))
   (if (re-search-forward "^\\(!\\|.*:[0-9]+:\\) " nil t)
       (progn
-       (message "%s errors in `%s'. Use %s to display." name (buffer-name)
-                (substitute-command-keys
-                 "\\<TeX-mode-map>\\[TeX-next-error]"))
-       (setq TeX-command-next TeX-command-default)
-       ;; error reported to TeX-error-report-switches
-       (setq TeX-error-report-switches
-             (plist-put TeX-error-report-switches
-                        (intern (plist-get TeX-error-report-switches
-                                           'TeX-current-master))
-                        t))
-       t)
+        (message "%s errors in `%s'. Use %s to display." name (buffer-name)
+                 (substitute-command-keys
+                  "\\<TeX-mode-map>\\[TeX-next-error]"))
+        (setq TeX-command-next TeX-command-default)
+        ;; error reported to TeX-error-report-switches
+        (setq TeX-error-report-switches
+              (plist-put TeX-error-report-switches
+                         (intern (plist-get TeX-error-report-switches
+                                            'TeX-current-master))
+                         t))
+        t)
     (let (dvi2pdf)
-       (if (with-current-buffer TeX-command-buffer
-          (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
-        (setq TeX-command-next dvi2pdf)
+        (if (with-current-buffer TeX-command-buffer
+           (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
+         (setq TeX-command-next dvi2pdf)
        (setq TeX-command-next TeX-command-Show)))
     nil))
 
@@ -1574,137 +1574,137 @@ errors or warnings to show."
   (if TeX-parse-all-errors
       (TeX-parse-all-errors))
   (if (and TeX-error-overview-open-after-TeX-run
-          (TeX-error-overview-make-entries
-           (TeX-master-directory) (TeX-active-buffer)))
+           (TeX-error-overview-make-entries
+            (TeX-master-directory) (TeX-active-buffer)))
       (TeX-error-overview))
   (cond ((TeX-TeX-sentinel-check process name))
-       ((and (save-excursion
-               (re-search-forward
-                "^Package biblatex Warning: Please (re)run Biber on the file"
-                nil t))
-             (with-current-buffer TeX-command-buffer
-               (and (LaTeX-bibliography-list)
-                    (TeX-check-files (TeX-master-file "bbl")
-                                     (TeX-style-list)
-                                     (append TeX-file-extensions
-                                             BibTeX-file-extensions
-                                             TeX-Biber-file-extensions)))))
-        (message "%s%s" "You should run Biber to get citations right, "
-                 (TeX-current-pages))
-        (setq TeX-command-next (with-current-buffer TeX-command-buffer
-                                 TeX-command-Biber)))
-       ((and (save-excursion
-               (re-search-forward
-                "^\\(?:LaTeX\\|Package natbib\\) Warning: Citation" nil t))
-             (with-current-buffer TeX-command-buffer
-               (and (LaTeX-bibliography-list)
-                    (TeX-check-files (TeX-master-file "bbl")
-                                     (TeX-style-list)
-                                     (append TeX-file-extensions
-                                             BibTeX-file-extensions
-                                             TeX-Biber-file-extensions)))))
-        (message "%s%s" "You should run BibTeX to get citations right, "
-                 (TeX-current-pages))
-        (setq TeX-command-next (with-current-buffer TeX-command-buffer
-                                 TeX-command-BibTeX)))
-       ((re-search-forward "Package biblatex Warning: Please rerun LaTeX" nil 
t)
-        (message "%s%s" "You should run LaTeX again, " (TeX-current-pages))
-        (setq TeX-command-next TeX-command-default))
-       ((re-search-forward "^(biblatex)\\W+Page breaks have changed" nil t)
-        (message "%s%s" "You should run LaTeX again - page breaks have 
changed, "
-                 (TeX-current-pages))
-        (setq TeX-command-next TeX-command-default))
-       ((re-search-forward "^\\(?:LaTeX Warning: Label(s)\\|\
+        ((and (save-excursion
+                (re-search-forward
+                 "^Package biblatex Warning: Please (re)run Biber on the file"
+                 nil t))
+              (with-current-buffer TeX-command-buffer
+                (and (LaTeX-bibliography-list)
+                     (TeX-check-files (TeX-master-file "bbl")
+                                      (TeX-style-list)
+                                      (append TeX-file-extensions
+                                              BibTeX-file-extensions
+                                              TeX-Biber-file-extensions)))))
+         (message "%s%s" "You should run Biber to get citations right, "
+                  (TeX-current-pages))
+         (setq TeX-command-next (with-current-buffer TeX-command-buffer
+                                  TeX-command-Biber)))
+        ((and (save-excursion
+                (re-search-forward
+                 "^\\(?:LaTeX\\|Package natbib\\) Warning: Citation" nil t))
+              (with-current-buffer TeX-command-buffer
+                (and (LaTeX-bibliography-list)
+                     (TeX-check-files (TeX-master-file "bbl")
+                                      (TeX-style-list)
+                                      (append TeX-file-extensions
+                                              BibTeX-file-extensions
+                                              TeX-Biber-file-extensions)))))
+         (message "%s%s" "You should run BibTeX to get citations right, "
+                  (TeX-current-pages))
+         (setq TeX-command-next (with-current-buffer TeX-command-buffer
+                                  TeX-command-BibTeX)))
+        ((re-search-forward "Package biblatex Warning: Please rerun LaTeX" nil 
t)
+         (message "%s%s" "You should run LaTeX again, " (TeX-current-pages))
+         (setq TeX-command-next TeX-command-default))
+        ((re-search-forward "^(biblatex)\\W+Page breaks have changed" nil t)
+         (message "%s%s" "You should run LaTeX again - page breaks have 
changed, "
+                  (TeX-current-pages))
+         (setq TeX-command-next TeX-command-default))
+        ((re-search-forward "^\\(?:LaTeX Warning: Label(s)\\|\
 Package natbib Warning: Citation(s)\\)" nil t)
-        (message "%s%s" "You should run LaTeX again to get references right, "
-                 (TeX-current-pages))
-        (setq TeX-command-next TeX-command-default))
-       ((re-search-forward
-         "^\\(?:(rerunfilecheck)\\|Package hyperref Warning:\\)\\W+\
+         (message "%s%s" "You should run LaTeX again to get references right, "
+                  (TeX-current-pages))
+         (setq TeX-command-next TeX-command-default))
+        ((re-search-forward
+          "^\\(?:(rerunfilecheck)\\|Package hyperref Warning:\\)\\W+\
 Rerun to get outlines right" nil t)
-        (message "%s%s" "You should run LaTeX again to get outlines right, "
-                 (TeX-current-pages))
-        (setq TeX-command-next TeX-command-default))
-       ((re-search-forward "^LaTeX Warning: Reference" nil t)
-        (message "%s%s%s" name ": there were unresolved references, "
-                 (TeX-current-pages))
-        (let (dvi2pdf)
-          (if (with-current-buffer TeX-command-buffer
-                (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
-              (setq TeX-command-next dvi2pdf)
-            (setq TeX-command-next TeX-command-Show))))
-       ((re-search-forward "^\\(?:LaTeX Warning: Citation\\|\
+         (message "%s%s" "You should run LaTeX again to get outlines right, "
+                  (TeX-current-pages))
+         (setq TeX-command-next TeX-command-default))
+        ((re-search-forward "^LaTeX Warning: Reference" nil t)
+         (message "%s%s%s" name ": there were unresolved references, "
+                  (TeX-current-pages))
+         (let (dvi2pdf)
+           (if (with-current-buffer TeX-command-buffer
+                 (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
+               (setq TeX-command-next dvi2pdf)
+             (setq TeX-command-next TeX-command-Show))))
+        ((re-search-forward "^\\(?:LaTeX Warning: Citation\\|\
 Package natbib Warning:.*undefined citations\\)" nil t)
-        (message "%s%s%s" name ": there were unresolved citations, "
-                 (TeX-current-pages))
-        (let (dvi2pdf)
-          (if (with-current-buffer TeX-command-buffer
-                (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
-              (setq TeX-command-next dvi2pdf)
-            (setq TeX-command-next TeX-command-Show))))
-       ((re-search-forward "Package longtable Warning: Table widths have \
+         (message "%s%s%s" name ": there were unresolved citations, "
+                  (TeX-current-pages))
+         (let (dvi2pdf)
+           (if (with-current-buffer TeX-command-buffer
+                 (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
+               (setq TeX-command-next dvi2pdf)
+             (setq TeX-command-next TeX-command-Show))))
+        ((re-search-forward "Package longtable Warning: Table widths have \
 changed\\. Rerun LaTeX\\." nil t)
-        (message
-         "%s" "You should run LaTeX again to get table formatting right")
-        (setq TeX-command-next TeX-command-default))
-       ((re-search-forward "^hf-TikZ Warning: Mark '.*' changed\\. \
+         (message
+          "%s" "You should run LaTeX again to get table formatting right")
+         (setq TeX-command-next TeX-command-default))
+        ((re-search-forward "^hf-TikZ Warning: Mark '.*' changed\\. \
 Rerun to get mark in right position\\." nil t)
-        (message
-         "%s" "You should run LaTeX again to get TikZ marks in right position")
-        (setq TeX-command-next TeX-command-default))
-       ((re-search-forward "^\\* xsim warning: \"rerun\"" nil t)
-        (message
-         "%s" "You should run LaTeX again to synchronize exercise properties")
-        (setq TeX-command-next TeX-command-default))
-       ((re-search-forward
-         "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
+         (message
+          "%s" "You should run LaTeX again to get TikZ marks in right 
position")
+         (setq TeX-command-next TeX-command-default))
+        ((re-search-forward "^\\* xsim warning: \"rerun\"" nil t)
+         (message
+          "%s" "You should run LaTeX again to synchronize exercise properties")
+         (setq TeX-command-next TeX-command-default))
+        ((re-search-forward
+          "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
 \\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)" nil t)
-        (let* ((warnings (and TeX-debug-warnings
-                              (TeX-LaTeX-sentinel-has-warnings)))
-               (bad-boxes (and TeX-debug-bad-boxes
-                               (TeX-LaTeX-sentinel-has-bad-boxes)))
-               (add-info (when (or warnings bad-boxes)
-                           (concat " (with "
-                                   (when warnings "warnings")
-                                   (when (and warnings bad-boxes) " and ")
-                                   (when bad-boxes "bad boxes")
-                                   ")"))))
-          (message "%s" (concat name ": successfully formatted "
-                                (TeX-current-pages) add-info)))
-        (let (dvi2pdf)
-          (if (with-current-buffer TeX-command-buffer
-                (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
-              (setq TeX-command-next dvi2pdf)
-            (setq TeX-command-next TeX-command-Show))))
-       (t
-        (message "%s%s%s" name ": problems after " (TeX-current-pages))
-        (setq TeX-command-next TeX-command-default)))
+         (let* ((warnings (and TeX-debug-warnings
+                               (TeX-LaTeX-sentinel-has-warnings)))
+                (bad-boxes (and TeX-debug-bad-boxes
+                                (TeX-LaTeX-sentinel-has-bad-boxes)))
+                (add-info (when (or warnings bad-boxes)
+                            (concat " (with "
+                                    (when warnings "warnings")
+                                    (when (and warnings bad-boxes) " and ")
+                                    (when bad-boxes "bad boxes")
+                                    ")"))))
+           (message "%s" (concat name ": successfully formatted "
+                                 (TeX-current-pages) add-info)))
+         (let (dvi2pdf)
+           (if (with-current-buffer TeX-command-buffer
+                 (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
+               (setq TeX-command-next dvi2pdf)
+             (setq TeX-command-next TeX-command-Show))))
+        (t
+         (message "%s%s%s" name ": problems after " (TeX-current-pages))
+         (setq TeX-command-next TeX-command-default)))
 
   ;; Check whether the idx file changed.
   (let ((idx-file nil) (master nil))
     (and (file-exists-p
-         (setq idx-file
-               (concat
-                (setq master
-                      (with-current-buffer TeX-command-buffer
-                        (expand-file-name (TeX-active-master)))) ".idx")))
-        ;; imakeidx package automatically runs makeindex, thus, we need to be
-        ;; sure .ind file isn't newer than .idx.
-        (TeX-check-files (concat master ".ind")
-                         (list (file-name-nondirectory master)) '("idx"))
-        (with-temp-buffer
-          (insert-file-contents idx-file)
-          (not (equal
-                ;; Compare old md5 hash of the idx file with the new one.
-                (cdr (assoc idx-file LaTeX-idx-md5-alist))
-                (md5 (current-buffer)))))
-        (push (cons idx-file t) LaTeX-idx-changed-alist)))
+          (setq idx-file
+                (concat
+                 (setq master
+                       (with-current-buffer TeX-command-buffer
+                         (expand-file-name (TeX-active-master)))) ".idx")))
+         ;; imakeidx package automatically runs makeindex, thus, we need to be
+         ;; sure .ind file isn't newer than .idx.
+         (TeX-check-files (concat master ".ind")
+                          (list (file-name-nondirectory master)) '("idx"))
+         (with-temp-buffer
+           (insert-file-contents idx-file)
+           (not (equal
+                 ;; Compare old md5 hash of the idx file with the new one.
+                 (cdr (assoc idx-file LaTeX-idx-md5-alist))
+                 (md5 (current-buffer)))))
+         (push (cons idx-file t) LaTeX-idx-changed-alist)))
 
   (unless (TeX-error-report-has-errors-p)
     (run-hook-with-args 'TeX-after-compilation-finished-functions
-                       (with-current-buffer TeX-command-buffer
-                         (expand-file-name
-                          (TeX-active-master (TeX-output-extension)))))))
+                        (with-current-buffer TeX-command-buffer
+                          (expand-file-name
+                           (TeX-active-master (TeX-output-extension)))))))
 
 ;; should go into latex.el? --pg
 (defun TeX-BibTeX-sentinel (_process _name)
@@ -1713,19 +1713,19 @@ Rerun to get mark in right position\\." nil t)
   (cond
    ;; Check whether BibTeX reports any warnings or errors.
    ((re-search-backward (concat
-                        "^(There \\(?:was\\|were\\) \\([0-9]+\\) "
-                        "\\(warnings?\\|error messages?\\))")
+                         "^(There \\(?:was\\|were\\) \\([0-9]+\\) "
+                         "\\(warnings?\\|error messages?\\))")
                         nil t)
     ;; Tell the user their number so that she sees whether the
     ;; situation is getting better or worse.
     (message (concat "BibTeX finished with %s %s. "
-                    "Type `%s' to display output.")
-            (match-string 1) (match-string 2)
-            (substitute-command-keys
-             "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
+                     "Type `%s' to display output.")
+             (match-string 1) (match-string 2)
+             (substitute-command-keys
+              "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
    (t
     (message (concat "BibTeX finished successfully. "
-                    "Run LaTeX again to get citations right."))))
+                     "Run LaTeX again to get citations right."))))
   ;; In any case, run the default next command.
   (setq TeX-command-next TeX-command-default))
 
@@ -1757,13 +1757,13 @@ Rerun to get mark in right position\\." nil t)
   (cond
    ((search-backward "TeX Output exited abnormally" nil t)
     (message "Dvips failed.  Type `%s' to display output."
-            (substitute-command-keys
+             (substitute-command-keys
               "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
    (t
     (if (with-current-buffer TeX-command-buffer
-         (and (equal (TeX-PDF-from-DVI) "Dvips") TeX-PDF-mode))
-       (setq TeX-output-extension "ps"
-             TeX-command-next "Ps2pdf"))
+          (and (equal (TeX-PDF-from-DVI) "Dvips") TeX-PDF-mode))
+        (setq TeX-output-extension "ps"
+              TeX-command-next "Ps2pdf"))
     (message "Dvips finished successfully. "))))
 
 (defun TeX-dvipdfmx-sentinel (_process _name)
@@ -1772,13 +1772,13 @@ Rerun to get mark in right position\\." nil t)
   (cond
    ((search-backward "TeX Output exited abnormally" nil t)
     (message "Dvipdfmx failed.  Type `%s' to display output."
-            (substitute-command-keys
+             (substitute-command-keys
               "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
    (t
     (if (with-current-buffer TeX-command-buffer
-         (and (equal (TeX-PDF-from-DVI) "Dvipdfmx") TeX-PDF-mode))
-       (setq TeX-output-extension "pdf"
-             TeX-command-next TeX-command-Show))
+          (and (equal (TeX-PDF-from-DVI) "Dvipdfmx") TeX-PDF-mode))
+        (setq TeX-output-extension "pdf"
+              TeX-command-next TeX-command-Show))
     (message "Dvipdfmx finished successfully. "))))
 
 (defun TeX-ps2pdf-sentinel (_process _name)
@@ -1787,13 +1787,13 @@ Rerun to get mark in right position\\." nil t)
   (cond
    ((search-backward "TeX Output exited abnormally" nil t)
     (message "ps2pdf failed.  Type `%s' to display output."
-            (substitute-command-keys
+             (substitute-command-keys
               "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
    (t
     (if (with-current-buffer TeX-command-buffer
-         (and (equal (TeX-PDF-from-DVI) "Dvips") TeX-PDF-mode))
-       (setq TeX-command-next TeX-command-Show
-             TeX-output-extension "pdf"))
+          (and (equal (TeX-PDF-from-DVI) "Dvips") TeX-PDF-mode))
+        (setq TeX-command-next TeX-command-Show
+              TeX-output-extension "pdf"))
     (message "ps2pdf finished successfully. "))))
 
 (defun TeX-index-sentinel (_process _name)
@@ -1802,12 +1802,12 @@ Rerun to get mark in right position\\." nil t)
   (cond
    ((search-backward "TeX Output exited abnormally" nil t)
     (message "Index failed.  Type `%s' to display output."
-            (substitute-command-keys
+             (substitute-command-keys
               "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")))
    (t
     (setq TeX-command-next TeX-command-default)
     (message (concat "Index finished successfully. "
-                    "Run LaTeX again to get index right.")))))
+                     "Run LaTeX again to get index right.")))))
 
 (defun TeX-command-sequence-sentinel (process string)
   "Call the appropriate sentinel for the current process.
@@ -1818,21 +1818,21 @@ variable is nil."
   (with-current-buffer (process-buffer process)
     (funcall TeX-command-sequence-sentinel process string)
     (if (string-match "\\(finished\\|exited\\)" string)
-       (with-current-buffer TeX-command-buffer
-         (unless
-             (or
-              (TeX-error-report-has-errors-p)
-              (null TeX-command-sequence-command))
-           (TeX-command-sequence TeX-command-sequence-command nil
-                                 TeX-command-sequence-file-function))))))
+        (with-current-buffer TeX-command-buffer
+          (unless
+              (or
+               (TeX-error-report-has-errors-p)
+               (null TeX-command-sequence-command))
+            (TeX-command-sequence TeX-command-sequence-command nil
+                                  TeX-command-sequence-file-function))))))
 
 ;;; Process Control
 
 ;; COMPATIBILITY for emacs < 27
 (if (< emacs-major-version 27)
     (or (assq 'compilation-in-progress minor-mode-alist)
-       (setq minor-mode-alist (cons '(compilation-in-progress " Compiling")
-                                    minor-mode-alist))))
+        (setq minor-mode-alist (cons '(compilation-in-progress " Compiling")
+                                     minor-mode-alist))))
 
 (defun TeX-process-get-variable (name symbol &optional default)
   "Return the value in the process buffer for NAME of SYMBOL.
@@ -1841,9 +1841,9 @@ Return DEFAULT if the process buffer does not exist or 
SYMBOL is not
 defined."
   (let ((buffer (TeX-process-buffer name)))
     (if (and buffer
-            (local-variable-p symbol buffer))
-       (with-current-buffer buffer
-         (symbol-value symbol))
+             (local-variable-p symbol buffer))
+        (with-current-buffer buffer
+          (symbol-value symbol))
       default)))
 
 (defun TeX-process-set-variable (name symbol value)
@@ -1851,9 +1851,9 @@ defined."
 Return nil iff no process buffer exist."
   (let ((buffer (TeX-process-buffer name)))
     (if buffer
-       (with-current-buffer buffer
-         (set symbol value)
-         t)
+        (with-current-buffer buffer
+          (set symbol value)
+          t)
       nil)))
 
 (defun TeX-process-check (name)
@@ -1862,16 +1862,16 @@ If so, give the user the choice of aborting the process 
or the current
 command."
   (let (process)
     (while (and (setq process (TeX-process name))
-               (eq (process-status process) 'run))
+                (eq (process-status process) 'run))
       (cond
        ((yes-or-no-p (concat "Process `"
-                            (process-name process)
-                            "' for document `"
-                            name
-                            "' running, kill it? "))
-       (delete-process process))
+                             (process-name process)
+                             "' for document `"
+                             name
+                             "' running, kill it? "))
+        (delete-process process))
        ((eq (process-status process) 'run)
-          (error "Cannot have two processes for the same document"))))))
+           (error "Cannot have two processes for the same document"))))))
 
 (defun TeX-process-buffer-name (name)
   "Return name of AUCTeX buffer associated with the document NAME."
@@ -1891,7 +1891,7 @@ command."
 (defun TeX-command-mode-line (process)
   "Format the mode line for a buffer containing output from PROCESS."
     (setq mode-line-process (concat ": "
-                                   (symbol-name (process-status process))))
+                                    (symbol-name (process-status process))))
     (force-mode-line-update))
 
 (defun TeX-command-filter (process string)
@@ -1910,7 +1910,7 @@ command."
 (defun TeX-format-mode-line (process)
   "Format the mode line for a buffer containing TeX output from PROCESS."
     (setq mode-line-process (concat " " TeX-current-page ": "
-                                   (symbol-name (process-status process))))
+                                    (symbol-name (process-status process))))
     (force-mode-line-update))
 
 (defun TeX-format-filter (process string)
@@ -1918,43 +1918,43 @@ command."
   (with-current-buffer (process-buffer process)
     (let (str pos end (pt (marker-position (process-mark process))))
       (save-excursion
-       (goto-char pt)
-       (insert-before-markers string)
-       (set-marker (process-mark process) (point))
-       ;; Remove line breaks at columns 79 and 80
-       (while (> (point) pt)
-         (end-of-line 0)
-         (when (and (memq (- (point) (line-beginning-position)) '(79 80))
-                    ;; Heuristic: Don't delete the linebreak if the next line
-                    ;; is empty or starts with an opening parenthesis, or if
-                    ;; point is located after a period and in the next line no
-                    ;; word char follows.
-                    (not (memq (char-after (1+ (point))) '(?\n ?\()))
-                    (not (and (eq (char-before) ?.)
-                              (char-after (1+ (point)))
-                              (not (eq ?w (char-syntax (char-after (1+ 
(point)))))))))
-           (delete-char 1)))
-       (goto-char (marker-position (process-mark process)))
-       ;; Determine current page
-       (while (and pt
-                   (skip-chars-backward "^]" pt)
-                   (> (point) pt))
-         (setq end (point))
-         (backward-char)
-         (skip-chars-backward "-0-9\n." (max (point-min) (- pt 128)))
-         (when (and (eq ?\[ (char-before))
-                    (not (eq ?\] (char-after)))
-                    (progn
-                      (setq str (buffer-substring (1- (point)) end)
-                            pos nil)
-                      (while (setq pos (string-match "\n" str pos))
-                        (setq str (replace-match "" t t str)))
-                      (string-match
-                       "\\`\\[-?[0-9]+\\(\\.-?[0-9]+\\)\\{0,9\\}\\]\\'"
-                       str)))
-           (setq TeX-current-page str
-                 pt nil)
-           (TeX-format-mode-line process)))))))
+        (goto-char pt)
+        (insert-before-markers string)
+        (set-marker (process-mark process) (point))
+        ;; Remove line breaks at columns 79 and 80
+        (while (> (point) pt)
+          (end-of-line 0)
+          (when (and (memq (- (point) (line-beginning-position)) '(79 80))
+                     ;; Heuristic: Don't delete the linebreak if the next line
+                     ;; is empty or starts with an opening parenthesis, or if
+                     ;; point is located after a period and in the next line no
+                     ;; word char follows.
+                     (not (memq (char-after (1+ (point))) '(?\n ?\()))
+                     (not (and (eq (char-before) ?.)
+                               (char-after (1+ (point)))
+                               (not (eq ?w (char-syntax (char-after (1+ 
(point)))))))))
+            (delete-char 1)))
+        (goto-char (marker-position (process-mark process)))
+        ;; Determine current page
+        (while (and pt
+                    (skip-chars-backward "^]" pt)
+                    (> (point) pt))
+          (setq end (point))
+          (backward-char)
+          (skip-chars-backward "-0-9\n." (max (point-min) (- pt 128)))
+          (when (and (eq ?\[ (char-before))
+                     (not (eq ?\] (char-after)))
+                     (progn
+                       (setq str (buffer-substring (1- (point)) end)
+                             pos nil)
+                       (while (setq pos (string-match "\n" str pos))
+                         (setq str (replace-match "" t t str)))
+                       (string-match
+                        "\\`\\[-?[0-9]+\\(\\.-?[0-9]+\\)\\{0,9\\}\\]\\'"
+                        str)))
+            (setq TeX-current-page str
+                  pt nil)
+            (TeX-format-mode-line process)))))))
 
 (defvar TeX-parse-function nil
   "Function to call to parse content of TeX output buffer.")
@@ -1963,7 +1963,7 @@ command."
 (defun TeX-background-filter (_process string)
   "Filter to process background output."
   (let ((old-window (selected-window))
-       (pop-up-windows t))
+        (pop-up-windows t))
     (TeX-pop-to-buffer "*TeX background*" nil t)
     (goto-char (point-max))
     (insert string)
@@ -1974,19 +1974,19 @@ command."
 (defun TeX-interactive-goto-prompt (string)
   "Move point to prompt of an interactive TeX run."
   (let* ((selected (selected-window))
-        (current (current-buffer))
-        (process (get-buffer-process current)))
+         (current (current-buffer))
+         (process (get-buffer-process current)))
     (unwind-protect
-       (when process
-         (walk-windows
-          (lambda (window)
-            (when (eq (window-buffer window) current)
-              (select-window window)
-              (when (and (< (point) (process-mark process))
-                         (string-match "^\\? $" string))
-                (goto-char (process-mark process)))
-              (select-window selected)))
-          nil t))
+        (when process
+          (walk-windows
+           (lambda (window)
+             (when (eq (window-buffer window) current)
+               (select-window window)
+               (when (and (< (point) (process-mark process))
+                          (string-match "^\\? $" string))
+                 (goto-char (process-mark process)))
+               (select-window selected)))
+           nil t))
       (set-buffer current))))
 
 
@@ -2003,7 +2003,7 @@ command."
   "Return the buffer of the active process for this buffer."
   (and TeX-command-buffer
        (with-current-buffer TeX-command-buffer
-        (TeX-process-buffer (TeX-active-master)))))
+         (TeX-process-buffer (TeX-active-master)))))
 
 (defun TeX-active-master (&optional extension nondirectory _ignore)
   "The master file currently being compiled.
@@ -2054,10 +2054,10 @@ The hooks are run in the region buffer, you may use the 
variable
   (let (pos)
     (while (setq pos (string-match "\\\\" file pos))
       (setq file (replace-match "/" t t file 0)
-           pos (1+ pos)))
+            pos (1+ pos)))
     (while (setq pos (string-match "[~#]" file pos))
       (setq file (replace-match "\\\\string\\&" t nil file 0)
-           pos (+ pos 8))))
+            pos (+ pos 8))))
   ;; Use \unexpanded so that \message outputs the raw file name.
   ;; When \usepackage[utf8]{inputenc} is used in standard (pdf)latex,
   ;; \message does not output non-ascii file name in raw form without
@@ -2066,14 +2066,14 @@ The hooks are run in the region buffer, you may use the 
variable
   ;; Note that \usepackage[utf8]{inputenc} is enabled by default in
   ;; standard (pdf)latex since TeXLive 2018.
   (if (and (memq major-mode '(latex-mode doctex-mode))
-          ;; Japanese upLaTeX requires the same treatment with
-          ;; respect to non-ascii characters other than Japanese, in
-          ;; file names within \message{}.
-          ;; However, pLaTeX (non u- version) does not support
-          ;; non-ascii file name encoded in UTF-8.  So considering
-          ;; `ptex' doesn't make sense here.  We cater for only
-          ;; `default' and `uptex' engines.
-          (memq TeX-engine '(default uptex)))
+           ;; Japanese upLaTeX requires the same treatment with
+           ;; respect to non-ascii characters other than Japanese, in
+           ;; file names within \message{}.
+           ;; However, pLaTeX (non u- version) does not support
+           ;; non-ascii file name encoded in UTF-8.  So considering
+           ;; `ptex' doesn't make sense here.  We cater for only
+           ;; `default' and `uptex' engines.
+           (memq TeX-engine '(default uptex)))
       ;; It would fail to put entire `file' inside \unexpanded{} when
       ;; the above loop injects \string before "#" and "~".  So put
       ;; only multibyte characters inside \unexpanded{}.
@@ -2083,7 +2083,7 @@ The hooks are run in the region buffer, you may use the 
variable
       ;; Thus put all multibyte characters, without considering
       ;; whether they are Japanese or not, inside \unexpanded{}.
       (replace-regexp-in-string "[[:multibyte:]]+"
-                               "\\\\unexpanded{\\&}" file t)
+                                "\\\\unexpanded{\\&}" file t)
     file))
 
 (defvar font-lock-mode-enable-list)
@@ -2104,89 +2104,89 @@ that the TeX header and trailer information is also 
included.
 The OFFSET is used to provide the debugger with information about the
 original file."
   (let* (;; We shift buffer a lot, so we must keep track of the buffer
-        ;; local variables.
-        (header-end TeX-header-end)
-        (trailer-start TeX-trailer-start)
-
-        ;; We seach for header and trailer in the master file.
-        (orig-buffer (current-buffer))
-        (master-name (TeX-master-file TeX-default-extension))
-        (master-buffer (find-file-noselect master-name))
-
-        ;; Attempt to disable font lock.
-        (font-lock-defaults-alist nil)
-        (font-lock-defaults nil)
-        (font-lock-maximum-size 0)
-        (font-lock-mode-hook nil)
-        (font-lock-auto-fontify nil)
-        (font-lock-mode-enable-list nil)
-        ;; And insert them into the FILE buffer.
-        (file-buffer (let (;; Don't query for master file
-                           (TeX-transient-master t)
-                           ;; Don't choose a special mode (and call its hooks)
-                           (auto-mode-alist nil)
-                           (magic-mode-alist nil)
-                           (enable-local-variables nil)
-                           ;; Don't run any f-f hooks
-                           (find-file-hook nil))
-                       (find-file-noselect file)))
-        ;; But remember original content.
-        original-content
-
-        ;; We search for the header from the master file, if it is
-        ;; not present in the region.
-        (header (if (string-match header-end region)
-                    ""
-                  (save-excursion
-                    (save-restriction
-                      (set-buffer master-buffer)
-                      (save-excursion
-                        (save-restriction
-                          (widen)
-                          (goto-char (point-min))
-                          ;; NOTE: We use the local value of
-                          ;; TeX-header-end from the master file.
-                          (if (not (re-search-forward TeX-header-end nil t))
-                              ""
-                            (re-search-forward "[\r\n]" nil t)
-                            (buffer-substring-no-properties
-                             (point-min) (point)))))))))
-        (header-offset 0)
-        first-line
-        ;; We search for the trailer from the master file, if it is
-        ;; not present in the region.
-        (trailer-offset 0)
-        (trailer (if (string-match trailer-start region)
-                     ""
-                   (save-excursion
-                     (save-restriction
-                       (set-buffer master-buffer)
-                       (save-excursion
-                         (save-restriction
-                           (widen)
-                           (goto-char (point-max))
-                           ;; NOTE: We use the local value of
-                           ;; TeX-trailer-start from the master file.
-                           (if (not (re-search-backward TeX-trailer-start nil 
t))
-                               ""
-                             ;;(beginning-of-line 1)
-                             (re-search-backward "[\r\n]" nil t)
-                             (setq trailer-offset (TeX-current-offset))
-                             (buffer-substring-no-properties
-                              (point) (point-max))))))))))
+         ;; local variables.
+         (header-end TeX-header-end)
+         (trailer-start TeX-trailer-start)
+
+         ;; We seach for header and trailer in the master file.
+         (orig-buffer (current-buffer))
+         (master-name (TeX-master-file TeX-default-extension))
+         (master-buffer (find-file-noselect master-name))
+
+         ;; Attempt to disable font lock.
+         (font-lock-defaults-alist nil)
+         (font-lock-defaults nil)
+         (font-lock-maximum-size 0)
+         (font-lock-mode-hook nil)
+         (font-lock-auto-fontify nil)
+         (font-lock-mode-enable-list nil)
+         ;; And insert them into the FILE buffer.
+         (file-buffer (let (;; Don't query for master file
+                            (TeX-transient-master t)
+                            ;; Don't choose a special mode (and call its hooks)
+                            (auto-mode-alist nil)
+                            (magic-mode-alist nil)
+                            (enable-local-variables nil)
+                            ;; Don't run any f-f hooks
+                            (find-file-hook nil))
+                        (find-file-noselect file)))
+         ;; But remember original content.
+         original-content
+
+         ;; We search for the header from the master file, if it is
+         ;; not present in the region.
+         (header (if (string-match header-end region)
+                     ""
+                   (save-excursion
+                     (save-restriction
+                       (set-buffer master-buffer)
+                       (save-excursion
+                         (save-restriction
+                           (widen)
+                           (goto-char (point-min))
+                           ;; NOTE: We use the local value of
+                           ;; TeX-header-end from the master file.
+                           (if (not (re-search-forward TeX-header-end nil t))
+                               ""
+                             (re-search-forward "[\r\n]" nil t)
+                             (buffer-substring-no-properties
+                              (point-min) (point)))))))))
+         (header-offset 0)
+         first-line
+         ;; We search for the trailer from the master file, if it is
+         ;; not present in the region.
+         (trailer-offset 0)
+         (trailer (if (string-match trailer-start region)
+                      ""
+                    (save-excursion
+                      (save-restriction
+                        (set-buffer master-buffer)
+                        (save-excursion
+                          (save-restriction
+                            (widen)
+                            (goto-char (point-max))
+                            ;; NOTE: We use the local value of
+                            ;; TeX-trailer-start from the master file.
+                            (if (not (re-search-backward TeX-trailer-start nil 
t))
+                                ""
+                              ;;(beginning-of-line 1)
+                              (re-search-backward "[\r\n]" nil t)
+                              (setq trailer-offset (TeX-current-offset))
+                              (buffer-substring-no-properties
+                               (point) (point-max))))))))))
     ;; file name should be relative to master
     (setq original (TeX-quote-filename (file-relative-name
-                                       original (TeX-master-directory)))
-         master-name (TeX-quote-filename master-name))
+                                        original (TeX-master-directory)))
+          master-name (TeX-quote-filename master-name))
 
     ;; If the first line begins with "%&", put that line separately on
     ;; the very first line of the region file so that the first line
     ;; parsing will work.
     (setq first-line (if (and (> (length header) 1)
-                             (string= (substring header 0 2) "%&"))
-                        ;; This would work even if header has no newline.
-                        (substring header 0 (string-match "\n" header))
-                      ""))
+                              (string= (substring header 0 2) "%&"))
+                         ;; This would work even if header has no newline.
+                         (substring header 0 (string-match "\n" header))
+                       ""))
     (unless (string= first-line "")
       ;; Remove first-line from header.
       (setq header (substring header (length first-line)))
@@ -2194,32 +2194,32 @@ original file."
 
     (with-current-buffer file-buffer
       (setq buffer-read-only t
-           buffer-undo-list t)
+            buffer-undo-list t)
       (setq original-content (buffer-string))
       (let ((inhibit-read-only t))
-       (erase-buffer)
-       (setq buffer-file-coding-system
-             (with-current-buffer master-buffer buffer-file-coding-system))
-       (insert first-line
-               "\\message{ !name(" master-name ")}"
-               header
-               TeX-region-extra
-               "\n\\message{ !name(" original ") !offset(")
-       (setq header-offset (- offset
-                              (1+ (TeX-current-offset))))
-       (insert (int-to-string header-offset)
-               ") }\n"
-               region
-               "\n\\message{ !name("  master-name ") !offset(")
-       (insert (int-to-string (- trailer-offset
-                                 (1+ (TeX-current-offset))))
-               ") }\n"
-               trailer)
-       (setq TeX-region-orig-buffer orig-buffer)
-       (run-hooks 'TeX-region-hook)
-       (if (string-equal (buffer-string) original-content)
-           (set-buffer-modified-p nil)
-         (save-buffer 0))))))
+        (erase-buffer)
+        (setq buffer-file-coding-system
+              (with-current-buffer master-buffer buffer-file-coding-system))
+        (insert first-line
+                "\\message{ !name(" master-name ")}"
+                header
+                TeX-region-extra
+                "\n\\message{ !name(" original ") !offset(")
+        (setq header-offset (- offset
+                               (1+ (TeX-current-offset))))
+        (insert (int-to-string header-offset)
+                ") }\n"
+                region
+                "\n\\message{ !name("  master-name ") !offset(")
+        (insert (int-to-string (- trailer-offset
+                                  (1+ (TeX-current-offset))))
+                ") }\n"
+                trailer)
+        (setq TeX-region-orig-buffer orig-buffer)
+        (run-hooks 'TeX-region-hook)
+        (if (string-equal (buffer-string) original-content)
+            (set-buffer-modified-p nil)
+          (save-buffer 0))))))
 
 (defun TeX-region-file (&optional extension nondirectory _ignore)
   "Return TeX-region file name with EXTENSION.
@@ -2232,12 +2232,12 @@ The compatibility argument IGNORE is ignored."
   ;; where we don't know which function has to be called.  Keep this in mind
   ;; should you want to use another argument here.
   (concat (if nondirectory "" (TeX-master-directory))
-         (cond ((eq extension t)
-                (concat TeX-region "." TeX-default-extension))
-               (extension
-                (concat TeX-region "." extension))
-               (t
-                TeX-region))))
+          (cond ((eq extension t)
+                 (concat TeX-region "." TeX-default-extension))
+                (extension
+                 (concat TeX-region "." extension))
+                (t
+                 TeX-region))))
 
 (defcustom TeX-region "_region_"
   "Base name of temporary file for `TeX-command-region' and 
`TeX-command-buffer'."
@@ -2264,7 +2264,7 @@ determine the current section by `LaTeX-command-section'.
 The levels are defined by `LaTeX-section-list'."
   (interactive "p")
   (let ((old-level (car (rassoc (list (LaTeX-command-section-level))
-                               LaTeX-section-list))))
+                                LaTeX-section-list))))
     (setq LaTeX-command-section-level (+ LaTeX-command-section-level arg))
     (cond
      ((> LaTeX-command-section-level 6)
@@ -2274,29 +2274,29 @@ The levels are defined by `LaTeX-section-list'."
       (setq LaTeX-command-section-level 0)
       (message "Cannot enlarge LaTeX-command-section-level above part."))
      (t (message "Changed level from %s to %s."
-                old-level (car (rassoc (list LaTeX-command-section-level)
-                                       LaTeX-section-list)))))))
+                 old-level (car (rassoc (list LaTeX-command-section-level)
+                                        LaTeX-section-list)))))))
 
 (defun LaTeX-command-section-boundaries ()
   "Return the boundaries of the current section as (start . end).
 The section is determined by `LaTeX-command-section-level'."
   (let* ((case-fold-search nil)
-        (rx (concat "\\\\" (regexp-opt
-                            (mapcar
-                             (lambda (level)
-                               (car (rassoc (list level) LaTeX-section-list)))
-                             (let (r)
-                               (dotimes (i (1+ (LaTeX-command-section-level)))
-                                 (push i r))
-                               r)))
-                    "{")))
+         (rx (concat "\\\\" (regexp-opt
+                             (mapcar
+                              (lambda (level)
+                                (car (rassoc (list level) LaTeX-section-list)))
+                              (let (r)
+                                (dotimes (i (1+ (LaTeX-command-section-level)))
+                                  (push i r))
+                                r)))
+                     "{")))
     (cons (save-excursion
-           (re-search-backward rx nil t)
-           (point))
-         (save-excursion
-           (re-search-forward (concat rx "\\|\\\\end{document}") nil t)
-           (forward-line 0)
-           (point)))))
+            (re-search-backward rx nil t)
+            (point))
+          (save-excursion
+            (re-search-forward (concat rx "\\|\\\\end{document}") nil t)
+            (forward-line 0)
+            (point)))))
 
 (defun LaTeX-command-section (&optional override-confirm)
   "Run a command on the current section.
@@ -2315,9 +2315,9 @@ depend on it being positive instead of the entry in
   (interactive "P")
   (if (eq major-mode 'latex-mode)
       (let* ((bounds (LaTeX-command-section-boundaries))
-            (TeX-command-region-begin (car bounds))
-            (TeX-command-region-end (cdr bounds)))
-       (TeX-command-region override-confirm))
+             (TeX-command-region-begin (car bounds))
+             (TeX-command-region-end (cdr bounds)))
+        (TeX-command-region override-confirm))
     (error "LaTeX-command-section can only be run on LaTeX documents")))
 
 (defun TeX-command-run-all-region ()
@@ -2331,10 +2331,10 @@ depend on it being positive instead of the entry in
   (interactive)
   (if (eq major-mode 'latex-mode)
       (let* ((bounds (LaTeX-command-section-boundaries))
-            (TeX-command-region-begin (car bounds))
-            (TeX-command-region-end (cdr bounds)))
-       (TeX-region-update)
-       (TeX-command-sequence t t #'TeX-region-file))
+             (TeX-command-region-begin (car bounds))
+             (TeX-command-region-end (cdr bounds)))
+        (TeX-region-update)
+        (TeX-command-sequence t t #'TeX-region-file))
     (error "LaTeX-command-run-all-section can only be run on LaTeX 
documents")))
 
 (defun TeX-command-run-all (arg)
@@ -2374,10 +2374,10 @@ compile the current section instead, e.g. call
   "Reset all variables used for parsing TeX output.
 If optional argument REPARSE is non-nil, reparse the output log."
   (setq TeX-error-point (point-min)
-       TeX-error-offset nil
-       TeX-error-file nil
-       TeX-error-list nil
-       TeX-error-last-visited -1)
+        TeX-error-offset nil
+        TeX-error-file nil
+        TeX-error-list nil
+        TeX-error-last-visited -1)
   (if reparse
       (TeX-parse-all-errors)))
 
@@ -2388,9 +2388,9 @@ If optional argument REPARSE is non-nil, reparse the 
output log."
 (defun TeX-parse-command (_arg _reparse)
   "We can't parse anything but TeX."
   (error "I cannot parse %s output, sorry"
-        (if (TeX-active-process)
-            (process-name (TeX-active-process))
-          "this")))
+         (if (TeX-active-process)
+             (process-name (TeX-active-process))
+           "this")))
 
 (defun TeX-error-list-skip-warning-p (type ignore)
   "Decide if a warning of `TeX-error-list' should be skipped.
@@ -2401,13 +2401,13 @@ is the flag to choose if the warning should be skipped."
   (or
    ;; ...is a warning and we want to ignore all warnings, or...
    (and (null TeX-debug-warnings)
-       (equal type 'warning))
+        (equal type 'warning))
    ;; ...is a bad-box and we want to ignore all bad-boxes, or...
    (and (null TeX-debug-bad-boxes)
-       (equal type 'bad-box))
+        (equal type 'bad-box))
    ;; ...is a warning to be ignored.
    (and TeX-suppress-ignored-warnings
-       ignore)))
+        ignore)))
 
 (defun TeX-parse-TeX (arg reparse)
   "Find the next error produced by running TeX.
@@ -2421,51 +2421,51 @@ If the file occurs in an included file, the file is 
loaded (if not
 already in an Emacs buffer) and the cursor is placed at the error."
   (let ((old-buffer (current-buffer))
         ;; FIXME: default-major-mode has been removed in Emacs 26.
-       (default-major-mode major-mode)
-       max-index item)
+        (default-major-mode major-mode)
+        max-index item)
 
     ;; Switch to the output buffer.
     (with-current-buffer (TeX-active-buffer)
       (if reparse
-         (TeX-parse-reset reparse))
+          (TeX-parse-reset reparse))
       (if TeX-parse-all-errors
-         (progn
-           (setq arg (or arg 1)
-                 max-index (length TeX-error-list))
-           ;; This loop is needed to skip ignored warnings, when
-           ;; `TeX-suppress-ignored-warnings' is non-nil and there are ignore
-           ;; warnings.
-           (while (null (zerop arg))
-             (setq TeX-error-last-visited
-                   ;; Increase or decrese `TeX-error-last-visited' depending on
-                   ;; the sign of `arg'.  Note: `signum' is a function from
-                   ;; `cl' library, do not be tempted to use it.
-                   (if (> arg 0)
-                       (1+ TeX-error-last-visited)
-                     (1- TeX-error-last-visited))
-                   item (nth TeX-error-last-visited TeX-error-list))
-             ;; Increase or decrease `arg' only if the warning isn't to be
-             ;; skipped.
-             (unless (TeX-error-list-skip-warning-p (nth 0 item) (nth 10 item))
-               ;; Note: `signum' is a function from `cl' library, do not be
-               ;; tempted to use it.
-               (setq arg (if (> arg 0)
-                             (1- arg)
-                           (1+ arg)))))
-           (if (< TeX-error-last-visited -1)
-               (setq TeX-error-last-visited -1))
-           (cond ((or (null item)
-                      (< TeX-error-last-visited 0))
-                  (if (> TeX-error-last-visited max-index)
-                      (setq TeX-error-last-visited max-index))
-                  (message "No more errors.")
-                  (beep)
-                  (TeX-pop-to-buffer old-buffer))
-                 (t
-                  (apply #'TeX-find-display-help item))))
-
-       (goto-char TeX-error-point)
-       (TeX-parse-error old-buffer)))))
+          (progn
+            (setq arg (or arg 1)
+                  max-index (length TeX-error-list))
+            ;; This loop is needed to skip ignored warnings, when
+            ;; `TeX-suppress-ignored-warnings' is non-nil and there are ignore
+            ;; warnings.
+            (while (null (zerop arg))
+              (setq TeX-error-last-visited
+                    ;; Increase or decrese `TeX-error-last-visited' depending 
on
+                    ;; the sign of `arg'.  Note: `signum' is a function from
+                    ;; `cl' library, do not be tempted to use it.
+                    (if (> arg 0)
+                        (1+ TeX-error-last-visited)
+                      (1- TeX-error-last-visited))
+                    item (nth TeX-error-last-visited TeX-error-list))
+              ;; Increase or decrease `arg' only if the warning isn't to be
+              ;; skipped.
+              (unless (TeX-error-list-skip-warning-p (nth 0 item) (nth 10 
item))
+                ;; Note: `signum' is a function from `cl' library, do not be
+                ;; tempted to use it.
+                (setq arg (if (> arg 0)
+                              (1- arg)
+                            (1+ arg)))))
+            (if (< TeX-error-last-visited -1)
+                (setq TeX-error-last-visited -1))
+            (cond ((or (null item)
+                       (< TeX-error-last-visited 0))
+                   (if (> TeX-error-last-visited max-index)
+                       (setq TeX-error-last-visited max-index))
+                   (message "No more errors.")
+                   (beep)
+                   (TeX-pop-to-buffer old-buffer))
+                  (t
+                   (apply #'TeX-find-display-help item))))
+
+        (goto-char TeX-error-point)
+        (TeX-parse-error old-buffer)))))
 
 ;;; - Parsing (La)TeX
 
@@ -2529,184 +2529,184 @@ displaying the issue.
 
 Return non-nil if an error or warning is found."
   (let ((regexp
-        (concat
-         ;; TeX error
-         "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|"
-         ;; New file
-         "(\n?\\([^\n()]+\\)\\|"
-         ;; End of file.
-         "\\()\\)\\|"
-         ;; Hook to change line numbers
-         " !\\(?:offset(\\([---0-9]+\\))\\|"
-         ;; Hook to change file name
-         "name(\\([^)]+\\))\\)\\|"
-         ;; Start of LaTeX bad box
-         "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\) "
-         ;;   Horizontal bad box
-         "\\(?:\\\\hbox.* at lines? [0-9]+\\(?:--[0-9]+\\)?$\\|"
-         ;;   Vertical bad box.  See also `TeX-warning'.
-         "\\\\vbox ([ a-z0-9]+) has occurred while \\\\output is active 
\\[[^]]+\\]\\)\\)\\|"
-         ;; LaTeX warning
-         "^\\(" LaTeX-warnings-regexp ".*\\)"))
-       (error-found nil))
+         (concat
+          ;; TeX error
+          "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|"
+          ;; New file
+          "(\n?\\([^\n()]+\\)\\|"
+          ;; End of file.
+          "\\()\\)\\|"
+          ;; Hook to change line numbers
+          " !\\(?:offset(\\([---0-9]+\\))\\|"
+          ;; Hook to change file name
+          "name(\\([^)]+\\))\\)\\|"
+          ;; Start of LaTeX bad box
+          "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\) "
+          ;;   Horizontal bad box
+          "\\(?:\\\\hbox.* at lines? [0-9]+\\(?:--[0-9]+\\)?$\\|"
+          ;;   Vertical bad box.  See also `TeX-warning'.
+          "\\\\vbox ([ a-z0-9]+) has occurred while \\\\output is active 
\\[[^]]+\\]\\)\\)\\|"
+          ;; LaTeX warning
+          "^\\(" LaTeX-warnings-regexp ".*\\)"))
+        (error-found nil))
     (while
-       (cond
-        ((null
-          (re-search-forward regexp nil t))
-         ;; No more errors.
-         (unless store
-           (message "No more errors.")
-           (beep)
-           (TeX-pop-to-buffer old))
-         nil)
-        ;; TeX error
-        ((match-beginning 1)
-         (when (match-beginning 2)
-           (unless TeX-error-file
-             (push nil TeX-error-file)
-             (push nil TeX-error-offset))
-           (unless (car TeX-error-offset)
-             (rplaca TeX-error-file (TeX-match-buffer 2))))
-         (setq error-found t)
-         (if (looking-at "Preview ")
-             t
-           (TeX-error store)
-           nil))
-        ;; LaTeX bad box
-        ((match-beginning 7)
-         ;; In `TeX-error-list' we collect all warnings, also if they're going
-         ;; to be actually skipped.
-         (if (or store TeX-debug-bad-boxes)
-             (progn
-               (setq error-found t)
-               (TeX-warning (TeX-match-buffer 7) (match-beginning 7) t store)
-               nil)
-           (re-search-forward "\r?\n\
+        (cond
+         ((null
+           (re-search-forward regexp nil t))
+          ;; No more errors.
+          (unless store
+            (message "No more errors.")
+            (beep)
+            (TeX-pop-to-buffer old))
+          nil)
+         ;; TeX error
+         ((match-beginning 1)
+          (when (match-beginning 2)
+            (unless TeX-error-file
+              (push nil TeX-error-file)
+              (push nil TeX-error-offset))
+            (unless (car TeX-error-offset)
+              (rplaca TeX-error-file (TeX-match-buffer 2))))
+          (setq error-found t)
+          (if (looking-at "Preview ")
+              t
+            (TeX-error store)
+            nil))
+         ;; LaTeX bad box
+         ((match-beginning 7)
+          ;; In `TeX-error-list' we collect all warnings, also if they're going
+          ;; to be actually skipped.
+          (if (or store TeX-debug-bad-boxes)
+              (progn
+                (setq error-found t)
+                (TeX-warning (TeX-match-buffer 7) (match-beginning 7) t store)
+                nil)
+            (re-search-forward "\r?\n\
 \\(?:.\\{79\\}\r?\n\
 \\)*.*\r?$")
-           t))
-        ;; LaTeX warning
-        ((match-beginning 8)
-         ;; In `TeX-error-list' we collect all warnings, also if they're going
-         ;; to be actually skipped.
-         (if (or store TeX-debug-warnings)
-             (progn
-               (setq error-found t)
-               (TeX-warning (TeX-match-buffer 8) (match-beginning 8) nil store)
-               nil)
-           t))
-
-        ;; New file -- Push on stack
-        ((match-beginning 3)
-         (let ((file (TeX-match-buffer 3))
-               (end (match-end 3)))
-           ;; Strip quotation marks and remove newlines if necessary
-           (when (or (eq (string-to-char file) ?\")
-                     (string-match "[ \t\n]" file))
-             (setq file (mapconcat #'identity (split-string file "[\"\n]+") 
"")))
-           ;; Polish `file' string
-           (setq file
-                 (let ((string file))
-                   (setq string
-                         (if (string-match "\\`[ \t\n\r]+" string)
-                             (replace-match "" t t string)
-                           string))
-                   ;; Sometimes `file' is something like
-                   ;;     "./path/to/file.tex [9] [10 <./path/to/file>] "
-                   ;; where "[9]" and "[10 <./path/to/file>]" are pages of the
-                   ;; output file, with path to an included file.  Remove these
-                   ;; numbers together with whitespaces at the end of the
-                   ;; string.
-                   (if (string-match "\\( *\\(\\[[^]]+\\]\\)? *\\)*\\'" string)
-                       (replace-match "" t t string)
-                     string)))
-           (push file TeX-error-file)
-           (push nil TeX-error-offset)
-           (goto-char end))
-         t)
-
-        ;; End of file -- Pop from stack
-        ((match-beginning 4)
-         (when (> (length TeX-error-file) 0)
-           (pop TeX-error-file)
-           (pop TeX-error-offset))
-         (goto-char (match-end 4))
-         t)
-
-        ;; Hook to change line numbers
-        ((match-beginning 5)
-         (setq TeX-error-offset
-               (list (string-to-number (TeX-match-buffer 5))))
-         t)
-
-        ;; Hook to change file name
-        ((match-beginning 6)
-         (setq TeX-error-file
-               (list (TeX-match-buffer 6)))
-         t)))
+            t))
+         ;; LaTeX warning
+         ((match-beginning 8)
+          ;; In `TeX-error-list' we collect all warnings, also if they're going
+          ;; to be actually skipped.
+          (if (or store TeX-debug-warnings)
+              (progn
+                (setq error-found t)
+                (TeX-warning (TeX-match-buffer 8) (match-beginning 8) nil 
store)
+                nil)
+            t))
+
+         ;; New file -- Push on stack
+         ((match-beginning 3)
+          (let ((file (TeX-match-buffer 3))
+                (end (match-end 3)))
+            ;; Strip quotation marks and remove newlines if necessary
+            (when (or (eq (string-to-char file) ?\")
+                      (string-match "[ \t\n]" file))
+              (setq file (mapconcat #'identity (split-string file "[\"\n]+") 
"")))
+            ;; Polish `file' string
+            (setq file
+                  (let ((string file))
+                    (setq string
+                          (if (string-match "\\`[ \t\n\r]+" string)
+                              (replace-match "" t t string)
+                            string))
+                    ;; Sometimes `file' is something like
+                    ;;     "./path/to/file.tex [9] [10 <./path/to/file>] "
+                    ;; where "[9]" and "[10 <./path/to/file>]" are pages of the
+                    ;; output file, with path to an included file.  Remove 
these
+                    ;; numbers together with whitespaces at the end of the
+                    ;; string.
+                    (if (string-match "\\( *\\(\\[[^]]+\\]\\)? *\\)*\\'" 
string)
+                        (replace-match "" t t string)
+                      string)))
+            (push file TeX-error-file)
+            (push nil TeX-error-offset)
+            (goto-char end))
+          t)
+
+         ;; End of file -- Pop from stack
+         ((match-beginning 4)
+          (when (> (length TeX-error-file) 0)
+            (pop TeX-error-file)
+            (pop TeX-error-offset))
+          (goto-char (match-end 4))
+          t)
+
+         ;; Hook to change line numbers
+         ((match-beginning 5)
+          (setq TeX-error-offset
+                (list (string-to-number (TeX-match-buffer 5))))
+          t)
+
+         ;; Hook to change file name
+         ((match-beginning 6)
+          (setq TeX-error-file
+                (list (TeX-match-buffer 6)))
+          t)))
     error-found))
 
 (defun TeX-find-display-help (type file line error offset context string
-                                  line-end _bad-box error-point _ignore)
+                                   line-end _bad-box error-point _ignore)
   "Find the error and display the help.
 
 For a description of arguments, see `TeX-error-list'.  IGNORE
 value is not used here."
   ;; Go back to TeX-buffer
   (let ((runbuf (TeX-active-buffer))
-       (master (with-current-buffer TeX-command-buffer
-                 (expand-file-name (TeX-master-file))))
-       (command-buffer TeX-command-buffer)
-       error-file-buffer start)
+        (master (with-current-buffer TeX-command-buffer
+                  (expand-file-name (TeX-master-file))))
+        (command-buffer TeX-command-buffer)
+        error-file-buffer start)
     (run-hooks 'TeX-translate-location-hook)
 
     (if file
-       (progn
-         (setq error-file-buffer
-               (find-file
-                (expand-file-name file (file-name-directory master))))
-         ;; Set the value of `TeX-command-buffer' in the next file with an
-         ;; error to be displayed to the value it has in the current buffer.
-         (with-current-buffer error-file-buffer
-           (set (make-local-variable 'TeX-command-buffer) command-buffer))
-
-         ;; Find the location of the error or warning.
-         (when line
-           (goto-char (point-min))
-           (forward-line (+ offset line -1))
-           (cond
-            ;; Error.
-            ((equal type 'error)
-             (if (not (string= string " "))
-                 (search-forward string nil t)))
-            ;; Warning or bad box.
-            (t
-             (beginning-of-line 0)
-             (setq start (point))
-             (goto-char (point-min))
-             (forward-line (+ offset line-end -1))
-             (end-of-line)
-             (when string
-               (search-backward string start t)
-               (search-forward string nil t))))))
+        (progn
+          (setq error-file-buffer
+                (find-file
+                 (expand-file-name file (file-name-directory master))))
+          ;; Set the value of `TeX-command-buffer' in the next file with an
+          ;; error to be displayed to the value it has in the current buffer.
+          (with-current-buffer error-file-buffer
+            (set (make-local-variable 'TeX-command-buffer) command-buffer))
+
+          ;; Find the location of the error or warning.
+          (when line
+            (goto-char (point-min))
+            (forward-line (+ offset line -1))
+            (cond
+             ;; Error.
+             ((equal type 'error)
+              (if (not (string= string " "))
+                  (search-forward string nil t)))
+             ;; Warning or bad box.
+             (t
+              (beginning-of-line 0)
+              (setq start (point))
+              (goto-char (point-min))
+              (forward-line (+ offset line-end -1))
+              (end-of-line)
+              (when string
+                (search-backward string start t)
+                (search-forward string nil t))))))
       ;; When the file cannot be determined stay here but issue a warning.
       (message (concat "Could not determine file for "
-                      (cond ((equal type 'error) "error")
-                            (t "warning"))))
+                       (cond ((equal type 'error) "error")
+                             (t "warning"))))
       (beep))
 
     ;; Display the help.
     (cond ((eq TeX-display-help 'expert)
-          (TeX-pop-to-buffer runbuf nil t)
-          (goto-char error-point)
-          (TeX-pop-to-buffer error-file-buffer nil t))
-         (TeX-display-help
-          (TeX-help-error
-           error
-           (if (equal type 'warning) (concat "\n" context) context)
-           runbuf type))
-         (t
-          (message (concat "! " error))))))
+           (TeX-pop-to-buffer runbuf nil t)
+           (goto-char error-point)
+           (TeX-pop-to-buffer error-file-buffer nil t))
+          (TeX-display-help
+           (TeX-help-error
+            error
+            (if (equal type 'warning) (concat "\n" context) context)
+            runbuf type))
+          (t
+           (message (concat "! " error))))))
 
 (defun TeX-error (&optional store)
   "Display an error.
@@ -2715,55 +2715,55 @@ If optional argument STORE is non-nil, store the error
 information in `TeX-error-list' instead of displaying the error."
 
   (let* ( ;; We need the error message to show the user.
-        (error (progn
-                 (re-search-forward "\\(.*\\)")
-                 (TeX-match-buffer 1)))
-
-        ;; And the context for the help window.
-        (context-start (point))
-        context-available
-
-        ;; And the line number to position the cursor.
-        (line (cond
-               ;; regular style
-               ((re-search-forward "l\\.\\([0-9]+\\)" nil t)
-                (setq context-available t)
-                (string-to-number (TeX-match-buffer 1)))
-               ;; file:line:error style
-               ((save-excursion
-                  (re-search-backward ":\\([0-9]+\\): "
-                                      (line-beginning-position) t))
-                (string-to-number (TeX-match-buffer 1)))
-               ;; nothing found
-               (t 1)))
-
-        ;; And a string of the context to search for.
-        (string (progn
-                  (beginning-of-line)
-                  (re-search-forward " \\(\\([^ \t]*$\\)\\|\\($\\)\\)")
-                  (TeX-match-buffer 1)))
-
-        ;; And we have now found to the end of the context.
-        (context (if context-available
-                     (buffer-substring context-start (progn (forward-line 1)
-                                                            (end-of-line)
-                                                            (point)))
-                   ;; There is no real context available, so we
-                   ;; simply show the line with the error message.
-                   (buffer-substring (1- (line-beginning-position))
-                                     context-start)))
-        ;; We may use these in another buffer.
-        (offset (or (car TeX-error-offset) 0))
-        (file (car TeX-error-file))
-        info-list)
+         (error (progn
+                  (re-search-forward "\\(.*\\)")
+                  (TeX-match-buffer 1)))
+
+         ;; And the context for the help window.
+         (context-start (point))
+         context-available
+
+         ;; And the line number to position the cursor.
+         (line (cond
+                ;; regular style
+                ((re-search-forward "l\\.\\([0-9]+\\)" nil t)
+                 (setq context-available t)
+                 (string-to-number (TeX-match-buffer 1)))
+                ;; file:line:error style
+                ((save-excursion
+                   (re-search-backward ":\\([0-9]+\\): "
+                                       (line-beginning-position) t))
+                 (string-to-number (TeX-match-buffer 1)))
+                ;; nothing found
+                (t 1)))
+
+         ;; And a string of the context to search for.
+         (string (progn
+                   (beginning-of-line)
+                   (re-search-forward " \\(\\([^ \t]*$\\)\\|\\($\\)\\)")
+                   (TeX-match-buffer 1)))
+
+         ;; And we have now found to the end of the context.
+         (context (if context-available
+                      (buffer-substring context-start (progn (forward-line 1)
+                                                             (end-of-line)
+                                                             (point)))
+                    ;; There is no real context available, so we
+                    ;; simply show the line with the error message.
+                    (buffer-substring (1- (line-beginning-position))
+                                      context-start)))
+         ;; We may use these in another buffer.
+         (offset (or (car TeX-error-offset) 0))
+         (file (car TeX-error-file))
+         info-list)
 
     ;; Remember where we was.
     (setq TeX-error-point (point)
-         info-list (list 'error file line error offset context string nil nil
-                         TeX-error-point nil))
+          info-list (list 'error file line error offset context string nil nil
+                          TeX-error-point nil))
     (if store
-       ;; Store the error information.
-       (add-to-list 'TeX-error-list info-list t)
+        ;; Store the error information.
+        (add-to-list 'TeX-error-list info-list t)
       ;; Find the error point and display the help.
       (apply #'TeX-find-display-help info-list))))
 
@@ -2779,90 +2779,90 @@ information in `TeX-error-list' instead of displaying 
the
 warning."
 
   (let* ( ;; line-string: match 1 is beginning line, match 2 is end line
-        (line-string (if bad-box
-                         "at lines? \\([0-9]*\\)\\(?:--\\([0-9]*\\)\\)?"
-                       "on input line \\([0-9]*\\)\\."))
-        ;; word-string: match 1 is the word
-        (word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
-                       ;; Match "ref" in both "Reference `ref' on page NN
-                       ;; undefined" and "Citation 'ref' on page NN undefined".
-                       "\\(?:`\\|'\\)\\([-a-zA-Z0-9:]+\\)'"))
-
-        ;; Get error-line (warning).  Don't search before `warning-start' to
-        ;; avoid catching completely unrelated line numbers.
-        (line (when (save-excursion (re-search-backward line-string
-                                                        warning-start t))
-                (string-to-number (TeX-match-buffer 1))))
-        ;; If this is a bad box and the warning ends with "...at lines MM--NN"
-        ;; we can use "NN" as `line-end', in any other case (including bad
-        ;; boxes ending with "...at line NN") just use `line'.
-        (line-end (if (and bad-box (match-beginning 2))
-                      (string-to-number (TeX-match-buffer 2))
-                    line))
-
-        ;; Find the context
-        (context-start (progn (cond
-                               ((and bad-box (string-match "\\\\hbox" warning))
-                                ;; Horizontal bad box
-                                (end-of-line))
-                               (bad-box
-                                ;; Vertical bad box (by exclusion), don't move
-                                ;; point.  In the output buffer, unlike in the
-                                ;; actual *.log file, these warnings do not end
-                                ;; with "...is active []", but in the same line
-                                ;; there may be something else, including a new
-                                ;; file opened.  Thus, point shouldn't move
-                                ;; from the end of the actual bad box warning.
-                                ;; This is why the corresponding regexp in
-                                ;; `TeX-parse-error' doesn't match everything
-                                ;; until the end of the line.
-                                nil)
-                               (t
-                                ;; Generic warning.
-                                (beginning-of-line)))
-                              (point)))
-
-        (context (cond ((string-match LaTeX-warnings-regexp warning)
-                        ;; The warnings matching `LaTeX-warnings-regexp' are
-                        ;; emitted by \GenericWarning macro, or macros based on
-                        ;; it (\ClassWarning, \PackageWarning, etc).  After
-                        ;; such warnings there is an empty line, just look for
-                        ;; it to find the end.
-                        (beginning-of-line)
-                        (while (null (eolp))
-                          (forward-line 1))
-                        (buffer-substring context-start (progn (end-of-line)
-                                                               (point))))
-
-                       ((and bad-box (string-match "\\\\vbox" warning))
-                        ;; Vertical bad boxes don't provide any additional
-                        ;; information.  In this case, reuse the `warning' as
-                        ;; `context' and don't move point, so that we avoid
-                        ;; eating the next line that may contain another
-                        ;; warning.  See also comment for `context-start'.
-                        (concat "\n" warning))
-
-                       (t
-                        ;; Horizontal bad boxes.
-                        (forward-line 1)
-                        (end-of-line)
-                        (while (equal (current-column) 79)
-                          (forward-line 1)
-                          (end-of-line))
-                        (buffer-substring context-start (point)))))
-
-        ;; This is where we want to be.
-        (error-point (point))
-
-        ;; Now find the error word.
-        (string (when (save-excursion
-                        (re-search-backward word-string context-start t))
-                  (TeX-match-buffer 1)))
-
-        ;; We might use these in another file.
-        (offset (or (car TeX-error-offset) 0))
-        (file (car TeX-error-file))
-        info-list ignore)
+         (line-string (if bad-box
+                          "at lines? \\([0-9]*\\)\\(?:--\\([0-9]*\\)\\)?"
+                        "on input line \\([0-9]*\\)\\."))
+         ;; word-string: match 1 is the word
+         (word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
+                        ;; Match "ref" in both "Reference `ref' on page NN
+                        ;; undefined" and "Citation 'ref' on page NN 
undefined".
+                        "\\(?:`\\|'\\)\\([-a-zA-Z0-9:]+\\)'"))
+
+         ;; Get error-line (warning).  Don't search before `warning-start' to
+         ;; avoid catching completely unrelated line numbers.
+         (line (when (save-excursion (re-search-backward line-string
+                                                         warning-start t))
+                 (string-to-number (TeX-match-buffer 1))))
+         ;; If this is a bad box and the warning ends with "...at lines MM--NN"
+         ;; we can use "NN" as `line-end', in any other case (including bad
+         ;; boxes ending with "...at line NN") just use `line'.
+         (line-end (if (and bad-box (match-beginning 2))
+                       (string-to-number (TeX-match-buffer 2))
+                     line))
+
+         ;; Find the context
+         (context-start (progn (cond
+                                ((and bad-box (string-match "\\\\hbox" 
warning))
+                                 ;; Horizontal bad box
+                                 (end-of-line))
+                                (bad-box
+                                 ;; Vertical bad box (by exclusion), don't move
+                                 ;; point.  In the output buffer, unlike in the
+                                 ;; actual *.log file, these warnings do not 
end
+                                 ;; with "...is active []", but in the same 
line
+                                 ;; there may be something else, including a 
new
+                                 ;; file opened.  Thus, point shouldn't move
+                                 ;; from the end of the actual bad box warning.
+                                 ;; This is why the corresponding regexp in
+                                 ;; `TeX-parse-error' doesn't match everything
+                                 ;; until the end of the line.
+                                 nil)
+                                (t
+                                 ;; Generic warning.
+                                 (beginning-of-line)))
+                               (point)))
+
+         (context (cond ((string-match LaTeX-warnings-regexp warning)
+                         ;; The warnings matching `LaTeX-warnings-regexp' are
+                         ;; emitted by \GenericWarning macro, or macros based 
on
+                         ;; it (\ClassWarning, \PackageWarning, etc).  After
+                         ;; such warnings there is an empty line, just look for
+                         ;; it to find the end.
+                         (beginning-of-line)
+                         (while (null (eolp))
+                           (forward-line 1))
+                         (buffer-substring context-start (progn (end-of-line)
+                                                                (point))))
+
+                        ((and bad-box (string-match "\\\\vbox" warning))
+                         ;; Vertical bad boxes don't provide any additional
+                         ;; information.  In this case, reuse the `warning' as
+                         ;; `context' and don't move point, so that we avoid
+                         ;; eating the next line that may contain another
+                         ;; warning.  See also comment for `context-start'.
+                         (concat "\n" warning))
+
+                        (t
+                         ;; Horizontal bad boxes.
+                         (forward-line 1)
+                         (end-of-line)
+                         (while (equal (current-column) 79)
+                           (forward-line 1)
+                           (end-of-line))
+                         (buffer-substring context-start (point)))))
+
+         ;; This is where we want to be.
+         (error-point (point))
+
+         ;; Now find the error word.
+         (string (when (save-excursion
+                         (re-search-backward word-string context-start t))
+                   (TeX-match-buffer 1)))
+
+         ;; We might use these in another file.
+         (offset (or (car TeX-error-offset) 0))
+         (file (car TeX-error-file))
+         info-list ignore)
 
     ;; Second chance to get line number right.  If `line' is nil, check whether
     ;; the reference to the line number is in `context'.  For example, this is
@@ -2871,10 +2871,10 @@ warning."
     ;; don't know if there are cases in which it's important to get `line'
     ;; before `context'.
     (and (null line)
-        (string-match line-string context)
-        (setq line-end
-              (setq line (and (match-beginning 1)
-                              (string-to-number (match-string 1 context))))))
+         (string-match line-string context)
+         (setq line-end
+               (setq line (and (match-beginning 1)
+                               (string-to-number (match-string 1 context))))))
 
     ;; This is where we start next time.
     (goto-char error-point)
@@ -2888,21 +2888,21 @@ warning."
 
     ;; Store the list of information about the warning.
     (setq info-list (list (if bad-box 'bad-box 'warning) file line warning
-                         offset context string line-end bad-box
-                         TeX-error-point)
-         ;; Decide whether it should be ignored.
-         ignore (and TeX-ignore-warnings
-                     (cond
-                      ((stringp TeX-ignore-warnings)
-                       (string-match TeX-ignore-warnings warning))
-                      ((fboundp TeX-ignore-warnings)
-                       (apply TeX-ignore-warnings info-list))))
-         ;; Update `info-list'.
-         info-list (append info-list (list ignore)))
+                          offset context string line-end bad-box
+                          TeX-error-point)
+          ;; Decide whether it should be ignored.
+          ignore (and TeX-ignore-warnings
+                      (cond
+                       ((stringp TeX-ignore-warnings)
+                        (string-match TeX-ignore-warnings warning))
+                       ((fboundp TeX-ignore-warnings)
+                        (apply TeX-ignore-warnings info-list))))
+          ;; Update `info-list'.
+          info-list (append info-list (list ignore)))
 
     (if store
-       ;; Store the warning information.
-       (add-to-list 'TeX-error-list info-list t)
+        ;; Store the warning information.
+        (add-to-list 'TeX-error-list info-list t)
       ;; Find the warning point and display the help.
       (apply #'TeX-find-display-help info-list))))
 
@@ -3209,7 +3209,7 @@ This is probably caused by an error in a command
 definition. For example, the following command makes a circular
 definition, defining \\gnu in terms of itself:
 
-         \\newcommand{\\gnu}{a \\gnu} % This is wrong!
+          \\newcommand{\\gnu}{a \\gnu} % This is wrong!
 
 When TeX encounters this \\gnu command, it will keep chasing its tail
 trying to figure out what \\gnu should produce, and eventually run out
@@ -3315,7 +3315,7 @@ page without enough text on it. ")
     ;;
     ;; the err-regexp item should match anything
 
-    (".*" . "No help available"))      ; end definition
+    (".*" . "No help available"))       ; end definition
   "A list of the form (\"err-regexp\" . \"context\") used by function
 `TeX-help-error' to display help-text on an error message or warning.
 err-regexp should be a regular expression matching the error message
@@ -3323,8 +3323,8 @@ given from TeX/LaTeX, and context should be some lines 
describing that
 error."
   :group 'TeX-output
   :type '(repeat (cons :tag "Entry"
-                      (regexp :tag "Match")
-                      (string :format "Description:\n%v"))))
+                       (regexp :tag "Match")
+                       (string :format "Description:\n%v"))))
 
 ;;; - Help
 
@@ -3380,15 +3380,15 @@ TYPE is a symbol specifing if ERROR is a real error, a 
warning or
 a bad box."
 
   (let ((old-buffer (current-buffer))
-       (log-file (with-current-buffer runbuffer
-                   (with-current-buffer TeX-command-buffer
-                     (expand-file-name (TeX-active-master "log")))))
-       (TeX-error-pointer 0))
+        (log-file (with-current-buffer runbuffer
+                    (with-current-buffer TeX-command-buffer
+                      (expand-file-name (TeX-active-master "log")))))
+        (TeX-error-pointer 0))
 
     ;; Find help text entry.
     (while (not (string-match (car (nth TeX-error-pointer
-                                       TeX-error-description-list))
-                             error))
+                                        TeX-error-description-list))
+                              error))
       (setq TeX-error-pointer (+ TeX-error-pointer 1)))
 
     (TeX-pop-to-buffer (get-buffer-create "*TeX Help*") nil t)
@@ -3396,43 +3396,43 @@ a bad box."
       (erase-buffer)
       (insert
        (cond
-       ((equal type 'error)
-        (propertize "ERROR" 'font-lock-face 'TeX-error-description-error))
-       ((equal type 'warning)
-        (propertize "WARNING" 'font-lock-face 'TeX-error-description-warning))
-       ((equal type 'bad-box)
-        (propertize "BAD BOX" 'font-lock-face 'TeX-error-description-warning)))
+        ((equal type 'error)
+         (propertize "ERROR" 'font-lock-face 'TeX-error-description-error))
+        ((equal type 'warning)
+         (propertize "WARNING" 'font-lock-face 'TeX-error-description-warning))
+        ((equal type 'bad-box)
+         (propertize "BAD BOX" 'font-lock-face 
'TeX-error-description-warning)))
        ": " error
        (propertize "\n\n--- TeX said ---" 'font-lock-face
-                  'TeX-error-description-tex-said)
+                   'TeX-error-description-tex-said)
        output
        (propertize "\n--- HELP ---\n" 'font-lock-face
-                  'TeX-error-description-help)
+                   'TeX-error-description-help)
        (let ((help (cdr (nth TeX-error-pointer
-                            TeX-error-description-list))))
-        (save-excursion
-          (if (and (= (1+ TeX-error-pointer)
-                      (length TeX-error-description-list))
-                   (let* ((log-buffer (find-buffer-visiting log-file)))
-                     (if log-buffer
-                         (progn
-                           (set-buffer log-buffer)
-                           (revert-buffer t t))
-                       (setq log-buffer
-                             (find-file-noselect log-file))
-                       (set-buffer log-buffer))
-                     (auto-save-mode nil)
-                     (setq buffer-read-only t)
-                     (goto-char (point-min))
-                     (search-forward error nil t 1))
-                   (re-search-forward "^l\\." nil t)
-                   (re-search-forward "^ [^\n]+$" nil t))
-              (let ((start (1+ (point))))
-                (forward-char 1)
-                (re-search-forward "^$")
-                (concat "From the .log file...\n\n"
-                        (buffer-substring start (point))))
-            help)))))
+                             TeX-error-description-list))))
+         (save-excursion
+           (if (and (= (1+ TeX-error-pointer)
+                       (length TeX-error-description-list))
+                    (let* ((log-buffer (find-buffer-visiting log-file)))
+                      (if log-buffer
+                          (progn
+                            (set-buffer log-buffer)
+                            (revert-buffer t t))
+                        (setq log-buffer
+                              (find-file-noselect log-file))
+                        (set-buffer log-buffer))
+                      (auto-save-mode nil)
+                      (setq buffer-read-only t)
+                      (goto-char (point-min))
+                      (search-forward error nil t 1))
+                    (re-search-forward "^l\\." nil t)
+                    (re-search-forward "^ [^\n]+$" nil t))
+               (let ((start (1+ (point))))
+                 (forward-char 1)
+                 (re-search-forward "^$")
+                 (concat "From the .log file...\n\n"
+                         (buffer-substring start (point))))
+             help)))))
     (goto-char (point-min))
     (TeX-special-mode)
     (TeX-pop-to-buffer old-buffer nil t)))
@@ -3471,51 +3471,51 @@ If optional argument BUTTON is non-nil, go to source 
associated
 to the selected error."
   (interactive)
   (let ((index (if button (button-get button 'id) (tabulated-list-get-id)))
-       item window)
+        item window)
     (if index
-       (progn
-         ;; Select the source frame/window, if still live.
-         (if (TeX-error-overview-setup)
-             (if (frame-live-p TeX-error-overview-orig-frame)
-                 (select-frame TeX-error-overview-orig-frame)
-               (error "You have deleted a vital frame---\
+        (progn
+          ;; Select the source frame/window, if still live.
+          (if (TeX-error-overview-setup)
+              (if (frame-live-p TeX-error-overview-orig-frame)
+                  (select-frame TeX-error-overview-orig-frame)
+                (error "You have deleted a vital frame---\
 please restart TeX error overview"))
-           (if (window-live-p TeX-error-overview-orig-window)
-               (select-window TeX-error-overview-orig-window)
-             (error "You have deleted a vital window---\
+            (if (window-live-p TeX-error-overview-orig-window)
+                (select-window TeX-error-overview-orig-window)
+              (error "You have deleted a vital window---\
 please restart TeX error overview")))
-         ;; Get the error details.
-         (with-current-buffer TeX-error-overview-active-buffer
-           (setq item (nth index TeX-error-list)
-                 TeX-error-last-visited index))
-         ;; Find the error and display the help.
-         (with-current-buffer TeX-command-buffer
-           ;; For consistency with `TeX-parse-TeX', use the major mode of
-           ;; `TeX-command-buffer' when visiting the error point.
+          ;; Get the error details.
+          (with-current-buffer TeX-error-overview-active-buffer
+            (setq item (nth index TeX-error-list)
+                  TeX-error-last-visited index))
+          ;; Find the error and display the help.
+          (with-current-buffer TeX-command-buffer
+            ;; For consistency with `TeX-parse-TeX', use the major mode of
+            ;; `TeX-command-buffer' when visiting the error point.
             ;; FIXME: default-major-mode has been removed in Emacs 26.
-           (let ((default-major-mode major-mode))
-             ;; Find the error and display the help.
-             (apply #'TeX-find-display-help item)))
-         ;; Return to the error overview.
-         (if (TeX-error-overview-setup)
-             (select-frame TeX-error-overview-frame)
-           (if (setq window
-                     (get-buffer-window TeX-error-overview-buffer-name))
-               ;; If error overview window is visible just select it.
-               (select-window window)
-             ;; Otherwise, split the help window and display the error overview
-             ;; near to it.  This should be the only reason for the error
-             ;; overview window not being still visible after the beginning of
-             ;; the function.
-             (select-window
-              (get-buffer-window (cond
-                                  ((eq TeX-display-help 'expert)
-                                   TeX-error-overview-active-buffer)
-                                  (TeX-display-help  "*TeX Help*"))))
-             (if (window-splittable-p (selected-window) t)
-                 (split-window-horizontally)
-               (split-window-vertically))
-             (switch-to-buffer TeX-error-overview-buffer-name))))
+            (let ((default-major-mode major-mode))
+              ;; Find the error and display the help.
+              (apply #'TeX-find-display-help item)))
+          ;; Return to the error overview.
+          (if (TeX-error-overview-setup)
+              (select-frame TeX-error-overview-frame)
+            (if (setq window
+                      (get-buffer-window TeX-error-overview-buffer-name))
+                ;; If error overview window is visible just select it.
+                (select-window window)
+              ;; Otherwise, split the help window and display the error 
overview
+              ;; near to it.  This should be the only reason for the error
+              ;; overview window not being still visible after the beginning of
+              ;; the function.
+              (select-window
+               (get-buffer-window (cond
+                                   ((eq TeX-display-help 'expert)
+                                    TeX-error-overview-active-buffer)
+                                   (TeX-display-help  "*TeX Help*"))))
+              (if (window-splittable-p (selected-window) t)
+                  (split-window-horizontally)
+                (split-window-vertically))
+              (switch-to-buffer TeX-error-overview-buffer-name))))
       (message "No more errors.")
       (beep))))
 
@@ -3527,57 +3527,57 @@ ACTIVE-BUFFER is used as buffer from which to extract 
the list of
 errors.  If nil, defaults to `TeX-error-overview-active-buffer'."
   (with-current-buffer (or active-buffer TeX-error-overview-active-buffer)
     (let ((id 0)
-         type file line msg entries)
+          type file line msg entries)
       (mapc
        (lambda (entry)
-        (setq type (nth 0 entry)
-              file (nth 1 entry)
-              line (nth 2 entry)
-              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))
-          (push
-           (list
-            ;; ID.
-            id
-            (vector
-             ;; File.
-             (if (stringp file)
-                 (if (file-name-absolute-p file)
-                     file
-                   (file-relative-name file master-dir))
-               "")
-             ;; Line.
-             (if (numberp line)
-                 (number-to-string line)
-               "")
-             ;; Type.
-             (cond
-              ((equal type 'error)
-               (propertize "Error" 'font-lock-face 
'TeX-error-description-error))
-              ((equal type 'warning)
-               (propertize "Warning" 'font-lock-face
-                           'TeX-error-description-warning))
-              ((equal type 'bad-box)
-               (propertize "Bad box" 'font-lock-face
-                           'TeX-error-description-warning))
-              (t
-               ""))
-             ;; Message.
-             (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)))
-           entries))
-        ;; Increase the `id' counter in any case.
-        (setq id (1+ id)))
+         (setq type (nth 0 entry)
+               file (nth 1 entry)
+               line (nth 2 entry)
+               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))
+           (push
+            (list
+             ;; ID.
+             id
+             (vector
+              ;; File.
+              (if (stringp file)
+                  (if (file-name-absolute-p file)
+                      file
+                    (file-relative-name file master-dir))
+                "")
+              ;; Line.
+              (if (numberp line)
+                  (number-to-string line)
+                "")
+              ;; Type.
+              (cond
+               ((equal type 'error)
+                (propertize "Error" 'font-lock-face 
'TeX-error-description-error))
+               ((equal type 'warning)
+                (propertize "Warning" 'font-lock-face
+                            'TeX-error-description-warning))
+               ((equal type 'bad-box)
+                (propertize "Bad box" 'font-lock-face
+                            'TeX-error-description-warning))
+               (t
+                ""))
+              ;; Message.
+              (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)))
+            entries))
+         ;; Increase the `id' counter in any case.
+         (setq id (1+ id)))
        TeX-error-list)
       (reverse entries))))
 
@@ -3622,8 +3622,8 @@ forward, if negative)."
   (interactive)
   (TeX-toggle-debug-bad-boxes)
   (setq tabulated-list-entries
-       (TeX-error-overview-make-entries
-        (with-current-buffer TeX-command-buffer (TeX-master-directory))))
+        (TeX-error-overview-make-entries
+         (with-current-buffer TeX-command-buffer (TeX-master-directory))))
   (tabulated-list-init-header)
   (tabulated-list-print))
 
@@ -3632,8 +3632,8 @@ forward, if negative)."
   (interactive)
   (TeX-toggle-debug-warnings)
   (setq tabulated-list-entries
-       (TeX-error-overview-make-entries
-        (with-current-buffer TeX-command-buffer (TeX-master-directory))))
+        (TeX-error-overview-make-entries
+         (with-current-buffer TeX-command-buffer (TeX-master-directory))))
   (tabulated-list-init-header)
   (tabulated-list-print))
 
@@ -3642,8 +3642,8 @@ forward, if negative)."
   (interactive)
   (TeX-toggle-suppress-ignored-warnings)
   (setq tabulated-list-entries
-       (TeX-error-overview-make-entries
-        (with-current-buffer TeX-command-buffer (TeX-master-directory))))
+        (TeX-error-overview-make-entries
+         (with-current-buffer TeX-command-buffer (TeX-master-directory))))
   (tabulated-list-init-header)
   (tabulated-list-print))
 
@@ -3702,7 +3702,7 @@ forward, if negative)."
   "List of errors to be used in the error overview.")
 
 (define-derived-mode TeX-error-overview-mode tabulated-list-mode
-                    "TeX errors"
+                     "TeX errors"
   "Major mode for listing TeX errors."
   (setq tabulated-list-format [("File" 25 nil)
                                ("Line" 4 nil :right-align t)
@@ -3729,9 +3729,9 @@ forward, if negative)."
   :group 'TeX-output
   :type 'alist
   :options '((name string) (title string) (height integer) (width integer)
-            (top integer) (left integer) (unsplittable boolean)
-            (minibuffer boolean) (vertical-scroll-bars boolean)
-            (tool-bar-lines integer)))
+             (top integer) (left integer) (unsplittable boolean)
+             (minibuffer boolean) (vertical-scroll-bars boolean)
+             (tool-bar-lines integer)))
 
 (defcustom TeX-error-overview-open-after-TeX-run nil
   "Whether to open automatically the error overview after running TeX."
@@ -3750,59 +3750,59 @@ forward, if negative)."
       ;; entries before creating the error overview buffer in order to
       ;; decide whether we need to show anything.
       (if (setq TeX-error-overview-list-entries
-               (TeX-error-overview-make-entries
-                (TeX-master-directory)))
-         (progn
-           (setq TeX-error-overview-orig-window (selected-window)
-                 TeX-error-overview-orig-frame
-                 (window-frame TeX-error-overview-orig-window))
-           ;; Create the error overview buffer.  This is
-           ;; automatically killed before running TeX commands, so if
-           ;; exists it is up-to-date and doesn't need to be
-           ;; re-created.
-           (unless (get-buffer TeX-error-overview-buffer-name)
-             (with-current-buffer
-                 (get-buffer-create TeX-error-overview-buffer-name)
-               (TeX-error-overview-mode)))
-           ;; Move point to the line associated to the last visited
-           ;; error.
-           (with-current-buffer TeX-error-overview-buffer-name
-             (goto-char (point-min))
-             (forward-line (with-current-buffer
-                               TeX-error-overview-active-buffer
-                             TeX-error-last-visited))
-             ;; Create a new frame for the error overview or display the
-             ;; buffer in the same frame, depending on the setup.
-             (if (TeX-error-overview-setup)
-                 (if (frame-live-p TeX-error-overview-frame)
-                     ;; Do not create a duplicate frame if there is
-                     ;; already one, just select it.
-                     (select-frame-set-input-focus
-                      TeX-error-overview-frame)
-                   ;; Create a new frame and store its name.
-                   (select-frame
-                    (setq TeX-error-overview-frame
-                          (make-frame
-                           TeX-error-overview-frame-parameters)))
-                   (set-window-buffer (selected-window)
-                                      TeX-error-overview-buffer-name)
-                   (set-window-dedicated-p (selected-window) t))
-               (TeX-pop-to-buffer TeX-error-overview-buffer-name))))
-       (error (concat "No error or warning to show"
-                      ;; Suggest to display warnings and bad boxes with the
-                      ;; appropriate key-bindings if there are such
-                      ;; messages in the output buffer.  Rationale of the
-                      ;; test: `TeX-error-overview-list-entries' is nil,
-                      ;; but if `TeX-error-list' is not nil it means that
-                      ;; there are hidden warnings/bad boxes.
-                      (when (TeX-process-get-variable (TeX-active-master)
-                                                      'TeX-error-list)
-                        (format ".  Type `%s' and `%s' to display \
+                (TeX-error-overview-make-entries
+                 (TeX-master-directory)))
+          (progn
+            (setq TeX-error-overview-orig-window (selected-window)
+                  TeX-error-overview-orig-frame
+                  (window-frame TeX-error-overview-orig-window))
+            ;; Create the error overview buffer.  This is
+            ;; automatically killed before running TeX commands, so if
+            ;; exists it is up-to-date and doesn't need to be
+            ;; re-created.
+            (unless (get-buffer TeX-error-overview-buffer-name)
+              (with-current-buffer
+                  (get-buffer-create TeX-error-overview-buffer-name)
+                (TeX-error-overview-mode)))
+            ;; Move point to the line associated to the last visited
+            ;; error.
+            (with-current-buffer TeX-error-overview-buffer-name
+              (goto-char (point-min))
+              (forward-line (with-current-buffer
+                                TeX-error-overview-active-buffer
+                              TeX-error-last-visited))
+              ;; Create a new frame for the error overview or display the
+              ;; buffer in the same frame, depending on the setup.
+              (if (TeX-error-overview-setup)
+                  (if (frame-live-p TeX-error-overview-frame)
+                      ;; Do not create a duplicate frame if there is
+                      ;; already one, just select it.
+                      (select-frame-set-input-focus
+                       TeX-error-overview-frame)
+                    ;; Create a new frame and store its name.
+                    (select-frame
+                     (setq TeX-error-overview-frame
+                           (make-frame
+                            TeX-error-overview-frame-parameters)))
+                    (set-window-buffer (selected-window)
+                                       TeX-error-overview-buffer-name)
+                    (set-window-dedicated-p (selected-window) t))
+                (TeX-pop-to-buffer TeX-error-overview-buffer-name))))
+        (error (concat "No error or warning to show"
+                       ;; Suggest to display warnings and bad boxes with the
+                       ;; appropriate key-bindings if there are such
+                       ;; messages in the output buffer.  Rationale of the
+                       ;; test: `TeX-error-overview-list-entries' is nil,
+                       ;; but if `TeX-error-list' is not nil it means that
+                       ;; there are hidden warnings/bad boxes.
+                       (when (TeX-process-get-variable (TeX-active-master)
+                                                       'TeX-error-list)
+                         (format ".  Type `%s' and `%s' to display \
 warnings and bad boxes"
-                                (substitute-command-keys
-                                 
"\\<TeX-mode-map>\\[TeX-toggle-debug-warnings]")
-                                (substitute-command-keys
-                                 
"\\<TeX-mode-map>\\[TeX-toggle-debug-bad-boxes]"))))))
+                                 (substitute-command-keys
+                                  
"\\<TeX-mode-map>\\[TeX-toggle-debug-warnings]")
+                                 (substitute-command-keys
+                                  
"\\<TeX-mode-map>\\[TeX-toggle-debug-bad-boxes]"))))))
     (error "No process for this document")))
 
 ;;; Output mode
diff --git a/tex-fold.el b/tex-fold.el
index b14ec73..a281a32 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -66,9 +66,9 @@
 Valid items are the symbols 'env for environments, 'macro for
 macros, 'math for math macros and 'comment for comments."
   :type '(set (const :tag "Environments" env)
-             (const :tag "Macros" macro)
-             (const :tag "Math Macros" math)
-             (const :tag "Comments" comment))
+              (const :tag "Macros" macro)
+              (const :tag "Math Macros" math)
+              (const :tag "Comments" comment))
   :group 'TeX-fold)
 
 (defcustom TeX-fold-macro-spec-list
@@ -83,11 +83,11 @@ macros, 'math for math macros and 'comment for comments."
     ("(R)" ("textregistered"))
     ("TM"  ("texttrademark"))
     (1 ("part" "chapter" "section" "subsection" "subsubsection"
-       "paragraph" "subparagraph"
-       "part*" "chapter*" "section*" "subsection*" "subsubsection*"
-       "paragraph*" "subparagraph*"
-       "emph" "textit" "textsl" "textmd" "textrm" "textsf" "texttt"
-       "textbf" "textsc" "textup")))
+        "paragraph" "subparagraph"
+        "part*" "chapter*" "section*" "subsection*" "subsubsection*"
+        "paragraph*" "subparagraph*"
+        "emph" "textit" "textsl" "textmd" "textrm" "textsf" "texttt"
+        "textbf" "textsc" "textup")))
   "List of replacement specifiers and macros to fold.
 
 The first element of each item can be a string, an integer or a
@@ -117,9 +117,9 @@ of the function call will be used as a replacement for the 
macro.
 Setting this variable does not take effect immediately.  Use
 Customize or reset the mode."
   :type '(repeat (group (choice (string :tag "Display String")
-                               (integer :tag "Number of argument" :value 1)
-                               (function :tag "Function to execute"))
-                       (repeat :tag "Macros" (string))))
+                                (integer :tag "Number of argument" :value 1)
+                                (function :tag "Function to execute"))
+                        (repeat :tag "Macros" (string))))
   :group 'TeX-fold)
 
 (defvar TeX-fold-macro-spec-list-internal nil
@@ -134,8 +134,8 @@ and <mode-prefix>-fold-macro-spec-list.")
   '(("[comment]" ("comment")))
   "List of display strings and environments to fold."
   :type '(repeat (group (choice (string :tag "Display String")
-                               (integer :tag "Number of argument" :value 1))
-                       (repeat :tag "Environments" (string))))
+                                (integer :tag "Number of argument" :value 1))
+                        (repeat :tag "Environments" (string))))
   :group 'TeX-fold)
 
 (defvar TeX-fold-env-spec-list-internal nil
@@ -149,8 +149,8 @@ and <mode-prefix>-fold-env-spec-list.")
 (defcustom TeX-fold-math-spec-list nil
   "List of display strings and math macros to fold."
   :type '(repeat (group (choice (string :tag "Display String")
-                               (integer :tag "Number of argument" :value 1))
-                       (repeat :tag "Math Macros" (string))))
+                                (integer :tag "Number of argument" :value 1))
+                        (repeat :tag "Math Macros" (string))))
   :group 'TeX-fold)
 
 (defvar TeX-fold-math-spec-list-internal nil
@@ -280,11 +280,11 @@ region, fold all configured content in this region.  If 
there is
 no folded content but a macro or environment, fold it."
   (interactive)
   (cond ((TeX-fold-clearout-item))
-       ((TeX-active-mark) (TeX-fold-region (mark) (point)))
-       ((TeX-fold-item 'macro))
-       ((TeX-fold-item 'math))
-       ((TeX-fold-item 'env))
-       ((TeX-fold-comment))))
+        ((TeX-active-mark) (TeX-fold-region (mark) (point)))
+        ((TeX-fold-item 'macro))
+        ((TeX-fold-item 'math))
+        ((TeX-fold-item 'env))
+        ((TeX-fold-comment))))
 
 (defun TeX-fold-buffer ()
   "Hide all configured macros and environments in the current buffer.
@@ -293,9 +293,9 @@ and `TeX-fold-math-spec-list', and environments in 
`TeX-fold-env-spec-list'."
   (interactive)
   (TeX-fold-clearout-region (point-min) (point-max))
   (when (and TeX-fold-force-fontify
-            (boundp 'jit-lock-mode)
-            jit-lock-mode
-            (fboundp 'jit-lock-fontify-now))
+             (boundp 'jit-lock-mode)
+             jit-lock-mode
+             (fboundp 'jit-lock-fontify-now))
     ;; We force fontification here only because it should rarely be
     ;; needed for the other folding commands.
     (jit-lock-fontify-now))
@@ -308,7 +308,7 @@ and `TeX-fold-math-spec-list', and environments in 
`TeX-fold-env-spec-list'."
   (interactive)
   (save-excursion
     (let ((end (progn (LaTeX-forward-paragraph) (point)))
-         (start (progn (LaTeX-backward-paragraph) (point))))
+          (start (progn (LaTeX-backward-paragraph) (point))))
       (TeX-fold-clearout-region start end)
       (TeX-fold-region start end))))
 
@@ -316,7 +316,7 @@ and `TeX-fold-math-spec-list', and environments in 
`TeX-fold-env-spec-list'."
   "Fold all items in region from START to END."
   (interactive "r")
   (when (and (memq 'env TeX-fold-type-list)
-            (not (eq major-mode 'plain-tex-mode)))
+             (not (eq major-mode 'plain-tex-mode)))
     (TeX-fold-region-macro-or-env start end 'env))
   (when (memq 'macro TeX-fold-type-list)
     (TeX-fold-region-macro-or-env start end 'macro))
@@ -332,58 +332,58 @@ for macros and 'math for math macros."
   (save-excursion
     (let (fold-list item-list regexp)
       (dolist (item (cond ((eq type 'env) TeX-fold-env-spec-list-internal)
-                         ((eq type 'math) TeX-fold-math-spec-list-internal)
-                         (t TeX-fold-macro-spec-list-internal)))
-       (dolist (i (cadr item))
+                          ((eq type 'math) TeX-fold-math-spec-list-internal)
+                          (t TeX-fold-macro-spec-list-internal)))
+        (dolist (i (cadr item))
           (cl-pushnew (list i (car item)) fold-list :test #'equal)
-         (cl-pushnew i item-list :test #'equal)))
+          (cl-pushnew i item-list :test #'equal)))
       (when item-list
-       (setq regexp (cond ((and (eq type 'env)
-                                (eq major-mode 'context-mode))
-                           (concat (regexp-quote TeX-esc)
-                                   "start" (regexp-opt item-list t)))
-                          ((and (eq type 'env)
-                                (eq major-mode 'texinfo-mode))
-                           (concat (regexp-quote TeX-esc)
-                                   (regexp-opt item-list t)))
-                          ((eq type 'env)
-                           (concat (regexp-quote TeX-esc)
-                                   "begin[ \t]*{"
-                                   (regexp-opt item-list t) "}"))
-                          (t
-                           (concat (regexp-quote TeX-esc)
-                                   (regexp-opt item-list t)))))
-       (save-restriction
-         (narrow-to-region start end)
-         ;; Start from the bottom so that it is easier to prioritize
-         ;; nested macros.
-         (goto-char (point-max))
-         (let ((case-fold-search nil)
-               item-name)
-           (while (re-search-backward regexp nil t)
-             (setq item-name (match-string 1))
-             (unless (or (and TeX-fold-preserve-comments
-                              (TeX-in-commented-line))
-                         ;; Make sure no partially matched macros are
-                         ;; folded.  For macros consisting of letters
-                         ;; this means there should be none of the
-                         ;; characters [A-Za-z@*] after the matched
-                         ;; string.  Single-char non-letter macros like
-                         ;; \, don't have this requirement.
-                         (and (memq type '(macro math))
-                              (save-match-data
-                                (string-match "[A-Za-z]" item-name))
-                              (save-match-data
-                                (string-match "[A-Za-z@*]"
-                                              (string (char-after
-                                                       (match-end 0)))))))
-               (let* ((item-start (match-beginning 0))
-                      (display-string-spec (cadr (assoc item-name
-                                                        fold-list)))
-                      (item-end (TeX-fold-item-end item-start type))
-                      (ov (TeX-fold-make-overlay item-start item-end type
-                                                 display-string-spec)))
-                 (TeX-fold-hide-item ov))))))))))
+        (setq regexp (cond ((and (eq type 'env)
+                                 (eq major-mode 'context-mode))
+                            (concat (regexp-quote TeX-esc)
+                                    "start" (regexp-opt item-list t)))
+                           ((and (eq type 'env)
+                                 (eq major-mode 'texinfo-mode))
+                            (concat (regexp-quote TeX-esc)
+                                    (regexp-opt item-list t)))
+                           ((eq type 'env)
+                            (concat (regexp-quote TeX-esc)
+                                    "begin[ \t]*{"
+                                    (regexp-opt item-list t) "}"))
+                           (t
+                            (concat (regexp-quote TeX-esc)
+                                    (regexp-opt item-list t)))))
+        (save-restriction
+          (narrow-to-region start end)
+          ;; Start from the bottom so that it is easier to prioritize
+          ;; nested macros.
+          (goto-char (point-max))
+          (let ((case-fold-search nil)
+                item-name)
+            (while (re-search-backward regexp nil t)
+              (setq item-name (match-string 1))
+              (unless (or (and TeX-fold-preserve-comments
+                               (TeX-in-commented-line))
+                          ;; Make sure no partially matched macros are
+                          ;; folded.  For macros consisting of letters
+                          ;; this means there should be none of the
+                          ;; characters [A-Za-z@*] after the matched
+                          ;; string.  Single-char non-letter macros like
+                          ;; \, don't have this requirement.
+                          (and (memq type '(macro math))
+                               (save-match-data
+                                 (string-match "[A-Za-z]" item-name))
+                               (save-match-data
+                                 (string-match "[A-Za-z@*]"
+                                               (string (char-after
+                                                        (match-end 0)))))))
+                (let* ((item-start (match-beginning 0))
+                       (display-string-spec (cadr (assoc item-name
+                                                         fold-list)))
+                       (item-end (TeX-fold-item-end item-start type))
+                       (ov (TeX-fold-make-overlay item-start item-end type
+                                                  display-string-spec)))
+                  (TeX-fold-hide-item ov))))))))))
 
 (defun TeX-fold-region-comment (start end)
   "Fold all comments in region from START to END."
@@ -391,17 +391,17 @@ for macros and 'math for math macros."
     (goto-char start)
     (let (beg)
       (while (setq beg (TeX-search-forward-comment-start end))
-       (goto-char beg)
-       ;; Determine the start of the region to be folded just behind
-       ;; the comment starter.
-       (looking-at TeX-comment-start-regexp)
-       (setq beg (match-end 0))
-       ;; Search for the end of the comment.
-       (while (TeX-comment-forward))
-       (end-of-line 0)
-       ;; Hide the whole region.
-       (TeX-fold-hide-item (TeX-fold-make-overlay beg (point) 'comment
-                                                  TeX-fold-ellipsis))))))
+        (goto-char beg)
+        ;; Determine the start of the region to be folded just behind
+        ;; the comment starter.
+        (looking-at TeX-comment-start-regexp)
+        (setq beg (match-end 0))
+        ;; Search for the end of the comment.
+        (while (TeX-comment-forward))
+        (end-of-line 0)
+        ;; Hide the whole region.
+        (TeX-fold-hide-item (TeX-fold-make-overlay beg (point) 'comment
+                                                   TeX-fold-ellipsis))))))
 
 (defun TeX-fold-macro ()
   "Hide the macro on which point currently is located."
@@ -434,68 +434,68 @@ TYPE specifies the type of item and can be one of the 
symbols
 macros.
 Return non-nil if an item was found and folded, nil otherwise."
   (if (and (eq type 'env)
-          (eq major-mode 'plain-tex-mode))
+           (eq major-mode 'plain-tex-mode))
       (message
        "Folding of environments is not supported in current mode")
     (let ((item-start (cond ((and (eq type 'env)
-                                 (eq major-mode 'context-mode))
-                            (save-excursion
-                              (ConTeXt-find-matching-start) (point)))
-                           ((and (eq type 'env)
-                                 (eq major-mode 'texinfo-mode))
-                            (save-excursion
-                              (Texinfo-find-env-start) (point)))
-                           ((eq type 'env)
-                            (condition-case nil
-                                (save-excursion
-                                  (LaTeX-find-matching-begin) (point))
-                              (error nil)))
-                           (t
-                            (TeX-find-macro-start)))))
+                                  (eq major-mode 'context-mode))
+                             (save-excursion
+                               (ConTeXt-find-matching-start) (point)))
+                            ((and (eq type 'env)
+                                  (eq major-mode 'texinfo-mode))
+                             (save-excursion
+                               (Texinfo-find-env-start) (point)))
+                            ((eq type 'env)
+                             (condition-case nil
+                                 (save-excursion
+                                   (LaTeX-find-matching-begin) (point))
+                               (error nil)))
+                            (t
+                             (TeX-find-macro-start)))))
       (when item-start
-       (let* ((item-name (save-excursion
-                           (goto-char item-start)
-                           (looking-at
-                            (cond ((and (eq type 'env)
-                                        (eq major-mode 'context-mode))
-                                   (concat (regexp-quote TeX-esc)
-                                           "start\\([A-Za-z]+\\)"))
-                                  ((and (eq type 'env)
-                                        (eq major-mode 'texinfo-mode))
-                                   (concat (regexp-quote TeX-esc)
-                                           "\\([A-Za-z]+\\)"))
-                                  ((eq type 'env)
-                                   (concat (regexp-quote TeX-esc)
-                                           "begin[ \t]*{"
-                                           "\\([A-Za-z*]+\\)}"))
-                                  (t
-                                   (concat (regexp-quote TeX-esc)
-                                           "\\([A-Za-z@*]+\\)"))))
-                           (if (fboundp 'match-string-no-properties)
-                               (match-string-no-properties 1)
-                             (match-string 1))))
-              (fold-list (cond ((eq type 'env) TeX-fold-env-spec-list-internal)
-                               ((eq type 'math)
-                                TeX-fold-math-spec-list-internal)
-                               (t TeX-fold-macro-spec-list-internal)))
-              fold-item
-              (display-string-spec
-               (or (catch 'found
-                     (while fold-list
-                       (setq fold-item (car fold-list))
-                       (setq fold-list (cdr fold-list))
-                       (when (member item-name (cadr fold-item))
-                         (throw 'found (car fold-item)))))
-                   ;; Item is not specified.
-                   (if TeX-fold-unspec-use-name
-                       (concat "[" item-name "]")
-                     (if (eq type 'env)
-                         TeX-fold-unspec-env-display-string
-                       TeX-fold-unspec-macro-display-string))))
-              (item-end (TeX-fold-item-end item-start type))
-              (ov (TeX-fold-make-overlay item-start item-end type
-                                         display-string-spec)))
-         (TeX-fold-hide-item ov))))))
+        (let* ((item-name (save-excursion
+                            (goto-char item-start)
+                            (looking-at
+                             (cond ((and (eq type 'env)
+                                         (eq major-mode 'context-mode))
+                                    (concat (regexp-quote TeX-esc)
+                                            "start\\([A-Za-z]+\\)"))
+                                   ((and (eq type 'env)
+                                         (eq major-mode 'texinfo-mode))
+                                    (concat (regexp-quote TeX-esc)
+                                            "\\([A-Za-z]+\\)"))
+                                   ((eq type 'env)
+                                    (concat (regexp-quote TeX-esc)
+                                            "begin[ \t]*{"
+                                            "\\([A-Za-z*]+\\)}"))
+                                   (t
+                                    (concat (regexp-quote TeX-esc)
+                                            "\\([A-Za-z@*]+\\)"))))
+                            (if (fboundp 'match-string-no-properties)
+                                (match-string-no-properties 1)
+                              (match-string 1))))
+               (fold-list (cond ((eq type 'env) 
TeX-fold-env-spec-list-internal)
+                                ((eq type 'math)
+                                 TeX-fold-math-spec-list-internal)
+                                (t TeX-fold-macro-spec-list-internal)))
+               fold-item
+               (display-string-spec
+                (or (catch 'found
+                      (while fold-list
+                        (setq fold-item (car fold-list))
+                        (setq fold-list (cdr fold-list))
+                        (when (member item-name (cadr fold-item))
+                          (throw 'found (car fold-item)))))
+                    ;; Item is not specified.
+                    (if TeX-fold-unspec-use-name
+                        (concat "[" item-name "]")
+                      (if (eq type 'env)
+                          TeX-fold-unspec-env-display-string
+                        TeX-fold-unspec-macro-display-string))))
+               (item-end (TeX-fold-item-end item-start type))
+               (ov (TeX-fold-make-overlay item-start item-end type
+                                          display-string-spec)))
+          (TeX-fold-hide-item ov))))))
 
 (defun TeX-fold-comment-do ()
   "Hide the comment on which point currently is located.
@@ -507,18 +507,18 @@ Return non-nil if a comment was found and folded, nil 
otherwise."
       nil
     (let (beg)
       (save-excursion
-       (while (progn
-                (beginning-of-line 0)
-                (and (TeX-in-line-comment)
-                     (not (bobp)))))
-       (goto-char (TeX-search-forward-comment-start (line-end-position 2)))
-       (looking-at TeX-comment-start-regexp)
-       (setq beg (match-end 0))
-       (while (TeX-comment-forward))
-       (end-of-line 0)
-       (when (> (point) beg)
-         (TeX-fold-hide-item (TeX-fold-make-overlay beg (point) 'comment
-                                                    TeX-fold-ellipsis)))))))
+        (while (progn
+                 (beginning-of-line 0)
+                 (and (TeX-in-line-comment)
+                      (not (bobp)))))
+        (goto-char (TeX-search-forward-comment-start (line-end-position 2)))
+        (looking-at TeX-comment-start-regexp)
+        (setq beg (match-end 0))
+        (while (TeX-comment-forward))
+        (end-of-line 0)
+        (when (> (point) beg)
+          (TeX-fold-hide-item (TeX-fold-make-overlay beg (point) 'comment
+                                                     TeX-fold-ellipsis)))))))
 
 
 ;;; Utilities
@@ -534,7 +534,7 @@ string in the variables `TeX-fold-macro-spec-list' or
   ;; Calculate priority before the overlay is instantiated.  We don't
   ;; want `TeX-overlay-prioritize' to pick up a non-prioritized one.
   (let ((priority (TeX-overlay-prioritize ov-start ov-end))
-       (ov (make-overlay ov-start ov-end (current-buffer) t nil)))
+        (ov (make-overlay ov-start ov-end (current-buffer) t nil)))
     (overlay-put ov 'category 'TeX-fold)
     (overlay-put ov 'priority priority)
     (overlay-put ov 'evaporate t)
@@ -548,22 +548,22 @@ TYPE can be either 'env for environments, 'macro for 
macros or
 'math for math macros."
   (save-excursion
     (cond ((and (eq type 'env)
-               (eq major-mode 'context-mode))
-          (goto-char start)
-          (ConTeXt-find-matching-stop)
-          (point))
-         ((and (eq type 'env)
-               (eq major-mode 'texinfo-mode))
-          (goto-char (1+ start))
-          (Texinfo-find-env-end)
-          (point))
-         ((eq type 'env)
-          (goto-char (1+ start))
-          (LaTeX-find-matching-end)
-          (point))
-         (t
-          (goto-char start)
-          (TeX-find-macro-end)))))
+                (eq major-mode 'context-mode))
+           (goto-char start)
+           (ConTeXt-find-matching-stop)
+           (point))
+          ((and (eq type 'env)
+                (eq major-mode 'texinfo-mode))
+           (goto-char (1+ start))
+           (Texinfo-find-env-end)
+           (point))
+          ((eq type 'env)
+           (goto-char (1+ start))
+           (LaTeX-find-matching-end)
+           (point))
+          (t
+           (goto-char start)
+           (TeX-find-macro-end)))))
 
 (defun TeX-fold-overfull-p (ov-start ov-end display-string)
   "Return t if an overfull line will result after adding an overlay.
@@ -575,14 +575,14 @@ string DISPLAY-STRING."
      (search-backward "\n" ov-start t))
    (not (string-match "\n" display-string))
    (> (+ (- ov-start
-           (save-excursion
-             (goto-char ov-start)
-             (line-beginning-position)))
-        (length display-string)
-        (- (save-excursion
-             (goto-char ov-end)
-             (line-end-position))
-           ov-end))
+            (save-excursion
+              (goto-char ov-start)
+              (line-beginning-position)))
+         (length display-string)
+         (- (save-excursion
+              (goto-char ov-end)
+              (line-end-position))
+            ov-end))
       (current-fill-column))))
 
 (defun TeX-fold-macro-nth-arg (n macro-start &optional macro-end delims)
@@ -599,39 +599,39 @@ the argument, with text properties.  The second item is 
for
 backward compatibility and always nil."
   (save-excursion
     (let* ((macro-end (or macro-end
-                         (save-excursion (goto-char macro-start)
-                                         (TeX-find-macro-end))))
-          (open-char (if delims (car delims) ?{))
-          (open-string (char-to-string open-char))
-          (close-char (if delims (cdr delims) ?}))
-          (close-string (char-to-string close-char))
-          content-start content-end)
+                          (save-excursion (goto-char macro-start)
+                                          (TeX-find-macro-end))))
+           (open-char (if delims (car delims) ?{))
+           (open-string (char-to-string open-char))
+           (close-char (if delims (cdr delims) ?}))
+           (close-string (char-to-string close-char))
+           content-start content-end)
       (goto-char macro-start)
       (if (condition-case nil
-             (progn
-               (while (> n 0)
-                 (skip-chars-forward (concat "^" open-string) macro-end)
-                 (when (= (point) macro-end)
-                   (error nil))
-                 (setq content-start (progn
-                                       (skip-chars-forward
-                                        (concat open-string " \t"))
-                                       (point)))
-                 (goto-char
-                  (if delims
-                      (with-syntax-table
-                          (TeX-search-syntax-table open-char close-char)
-                        (scan-lists (point) 1 1))
-                    (TeX-find-closing-brace)))
-                 (setq content-end (save-excursion
-                                     (backward-char)
-                                     (skip-chars-backward " \t")
-                                     (point)))
-                 (setq n (1- n)))
-               t)
-           (error nil))
-         (list (TeX-fold-buffer-substring content-start content-end))
-       nil))))
+              (progn
+                (while (> n 0)
+                  (skip-chars-forward (concat "^" open-string) macro-end)
+                  (when (= (point) macro-end)
+                    (error nil))
+                  (setq content-start (progn
+                                        (skip-chars-forward
+                                         (concat open-string " \t"))
+                                        (point)))
+                  (goto-char
+                   (if delims
+                       (with-syntax-table
+                           (TeX-search-syntax-table open-char close-char)
+                         (scan-lists (point) 1 1))
+                     (TeX-find-closing-brace)))
+                  (setq content-end (save-excursion
+                                      (backward-char)
+                                      (skip-chars-backward " \t")
+                                      (point)))
+                  (setq n (1- n)))
+                t)
+            (error nil))
+          (list (TeX-fold-buffer-substring content-start content-end))
+        nil))))
 
 (defun TeX-fold-buffer-substring (start end)
   "Return the contents of buffer from START to END as a string.
@@ -639,39 +639,39 @@ Like `buffer-substring' but copy overlay display strings 
as well."
   ;; Swap values of `start' and `end' if necessary.
   (when (> start end) (let ((tmp start)) (setq start end end tmp)))
   (let ((overlays (overlays-in start end))
-       result)
+        result)
     ;; Get rid of overlays not under our control or not completely
     ;; inside the specified region.
     (dolist (ov overlays)
       (when (or (not (eq (overlay-get ov 'category) 'TeX-fold))
-               (< (overlay-start ov) start)
-               (> (overlay-end ov) end))
-       (setq overlays (remove ov overlays))))
+                (< (overlay-start ov) start)
+                (> (overlay-end ov) end))
+        (setq overlays (remove ov overlays))))
     (if (null overlays)
-       (buffer-substring start end)
+        (buffer-substring start end)
       ;; Sort list according to ascending starts.
       (setq overlays (sort (copy-sequence overlays)
-                          (lambda (a b)
-                            (< (overlay-start a) (overlay-start b)))))
+                           (lambda (a b)
+                             (< (overlay-start a) (overlay-start b)))))
       ;; Get the string from the start of the region up to the first overlay.
       (setq result (buffer-substring start (overlay-start (car overlays))))
       (let (ov)
-       (while overlays
-         (setq ov (car overlays)
-               overlays (cdr overlays))
-         ;; Add the display string of the overlay.
-         (setq result (concat result (overlay-get ov 'display)))
-         ;; Remove overlays contained in the current one.
-         (dolist (elt overlays)
-           (when (< (overlay-start elt) (overlay-end ov))
-             (setq overlays (remove elt overlays))))
-         ;; Add the string from the end of the current overlay up to
-         ;; the next overlay or the end of the specified region.
-         (setq result (concat result (buffer-substring (overlay-end ov)
-                                                       (if overlays
-                                                           (overlay-start
-                                                            (car overlays))
-                                                         end))))))
+        (while overlays
+          (setq ov (car overlays)
+                overlays (cdr overlays))
+          ;; Add the display string of the overlay.
+          (setq result (concat result (overlay-get ov 'display)))
+          ;; Remove overlays contained in the current one.
+          (dolist (elt overlays)
+            (when (< (overlay-start elt) (overlay-end ov))
+              (setq overlays (remove elt overlays))))
+          ;; Add the string from the end of the current overlay up to
+          ;; the next overlay or the end of the specified region.
+          (setq result (concat result (buffer-substring (overlay-end ov)
+                                                        (if overlays
+                                                            (overlay-start
+                                                             (car overlays))
+                                                          end))))))
       result)))
 
 (defun TeX-fold-make-help-echo (start end)
@@ -680,15 +680,15 @@ The text between START and END will be used for this but 
cropped
 to the length defined by `TeX-fold-help-echo-max-length'.  Line
 breaks will be replaced by spaces."
   (let* ((spill (+ start TeX-fold-help-echo-max-length))
-        (lines (split-string (buffer-substring start (min end spill)) "\n"))
-        (result (pop lines)))
+         (lines (split-string (buffer-substring start (min end spill)) "\n"))
+         (result (pop lines)))
     (dolist (line lines)
       ;; Strip leading whitespace
       (when (string-match "^[ \t]+" line)
-       (setq line (replace-match "" nil nil line)))
+        (setq line (replace-match "" nil nil line)))
       ;; Strip trailing whitespace
       (when (string-match "[ \t]+$" line)
-       (setq line (replace-match "" nil nil line)))
+        (setq line (replace-match "" nil nil line)))
       (setq result (concat result " " line)))
     (when (> end spill) (setq result (concat result "...")))
     result))
@@ -699,15 +699,15 @@ breaks will be replaced by spaces."
     ;; Get all overlays at point under our control.
     (dolist (ov (overlays-at (point)))
       (when (and (eq (overlay-get ov 'category) 'TeX-fold)
-                (numberp (overlay-get ov 'TeX-fold-display-string-spec)))
-       (cl-pushnew ov overlays)))
+                 (numberp (overlay-get ov 'TeX-fold-display-string-spec)))
+        (cl-pushnew ov overlays)))
     (when overlays
       ;; Sort list according to descending starts.
       (setq overlays (sort (copy-sequence overlays)
-                          (lambda (a b)
-                            (> (overlay-start a) (overlay-start b)))))
+                           (lambda (a b)
+                             (> (overlay-start a) (overlay-start b)))))
       (dolist (ov overlays)
-       (TeX-fold-hide-item ov)))))
+        (TeX-fold-hide-item ov)))))
 
 
 ;;; Removal
@@ -722,7 +722,7 @@ breaks will be replaced by spaces."
   (interactive)
   (save-excursion
     (let ((end (progn (LaTeX-forward-paragraph) (point)))
-         (start (progn (LaTeX-backward-paragraph) (point))))
+          (start (progn (LaTeX-backward-paragraph) (point))))
       (TeX-fold-clearout-region start end))))
 
 (defun TeX-fold-clearout-region (start end)
@@ -743,8 +743,8 @@ Return non-nil if a removal happened, nil otherwise."
   (let (found)
     (while overlays
       (when (eq (overlay-get (car overlays) 'category) 'TeX-fold)
-       (delete-overlay (car overlays))
-       (setq found t))
+        (delete-overlay (car overlays))
+        (setq found t))
       (setq overlays (cdr overlays)))
     found))
 
@@ -755,62 +755,62 @@ Return non-nil if a removal happened, nil otherwise."
   "Expand instances of {<num>}, [<num>], <<num>>, and (<num>).
 Replace them with the respective macro argument."
   (let ((spec-list (split-string spec "||"))
-       (delims '((?\{ . ?\}) (?\[ . ?\]) (?< . ?>) (?\( . ?\))))
-       index success)
+        (delims '((?\{ . ?\}) (?\[ . ?\]) (?< . ?>) (?\( . ?\))))
+        index success)
     (catch 'success
       ;; Iterate over alternatives.
       (dolist (elt spec-list)
-       (setq spec elt
-             index nil)
-       ;; Find and expand every placeholder.
-       (while (and (string-match "\\([[{<]\\)\\([1-9]\\)\\([]}>]\\)" elt index)
-                   ;; Does the closing delim match the opening one?
-                   (string-equal
-                    (match-string 3 elt)
-                    (char-to-string
-                     (cdr (assq (string-to-char (match-string 1 elt))
-                                delims)))))
-         (setq index (match-end 0))
-         (let ((arg (car (save-match-data
-                           ;; Get the argument.
-                           (TeX-fold-macro-nth-arg
-                            (string-to-number (match-string 2 elt))
-                            ov-start ov-end
-                            (assoc (string-to-char (match-string 1 elt))
-                                   delims))))))
-           (when arg (setq success t))
-           ;; Replace the placeholder in the string.
-           (setq elt (replace-match (or arg TeX-fold-ellipsis) nil t elt)
-                 index (+ index (- (length elt) (length spec)))
-                 spec elt)))
-       (when success (throw 'success nil))))
+        (setq spec elt
+              index nil)
+        ;; Find and expand every placeholder.
+        (while (and (string-match "\\([[{<]\\)\\([1-9]\\)\\([]}>]\\)" elt 
index)
+                    ;; Does the closing delim match the opening one?
+                    (string-equal
+                     (match-string 3 elt)
+                     (char-to-string
+                      (cdr (assq (string-to-char (match-string 1 elt))
+                                 delims)))))
+          (setq index (match-end 0))
+          (let ((arg (car (save-match-data
+                            ;; Get the argument.
+                            (TeX-fold-macro-nth-arg
+                             (string-to-number (match-string 2 elt))
+                             ov-start ov-end
+                             (assoc (string-to-char (match-string 1 elt))
+                                    delims))))))
+            (when arg (setq success t))
+            ;; Replace the placeholder in the string.
+            (setq elt (replace-match (or arg TeX-fold-ellipsis) nil t elt)
+                  index (+ index (- (length elt) (length spec)))
+                  spec elt)))
+        (when success (throw 'success nil))))
     spec))
 
 (defun TeX-fold-hide-item (ov)
   "Hide a single macro or environment.
 That means, put respective properties onto overlay OV."
   (let* ((ov-start (overlay-start ov))
-        (ov-end (overlay-end ov))
-        (spec (overlay-get ov 'TeX-fold-display-string-spec))
-        (computed (cond
-                   ((stringp spec)
-                    (TeX-fold-expand-spec spec ov-start ov-end))
-                   ((functionp spec)
-                    (let (arg arg-list
-                              (n 1))
-                      (while (setq arg (TeX-fold-macro-nth-arg
-                                        n ov-start ov-end))
+         (ov-end (overlay-end ov))
+         (spec (overlay-get ov 'TeX-fold-display-string-spec))
+         (computed (cond
+                    ((stringp spec)
+                     (TeX-fold-expand-spec spec ov-start ov-end))
+                    ((functionp spec)
+                     (let (arg arg-list
+                               (n 1))
+                       (while (setq arg (TeX-fold-macro-nth-arg
+                                         n ov-start ov-end))
                          (unless (member (car arg) arg-list)
                            (setq arg-list (append arg-list (list (car arg)))))
-                        (setq n (1+ n)))
-                      (or (condition-case nil
-                              (apply spec arg-list)
-                            (error nil))
-                          "[Error: No content or function found]")))
-                   (t (or (TeX-fold-macro-nth-arg spec ov-start ov-end)
-                          "[Error: No content found]"))))
-        (display-string (if (listp computed) (car computed) computed))
-        (face (when (listp computed) (cadr computed))))
+                         (setq n (1+ n)))
+                       (or (condition-case nil
+                               (apply spec arg-list)
+                             (error nil))
+                           "[Error: No content or function found]")))
+                    (t (or (TeX-fold-macro-nth-arg spec ov-start ov-end)
+                           "[Error: No content found]"))))
+         (display-string (if (listp computed) (car computed) computed))
+         (face (when (listp computed) (cadr computed))))
     ;; Do nothing if the overlay is empty.
     (when (and ov-start ov-end)
       ;; Cater for zero-length display strings.
@@ -818,18 +818,18 @@ That means, put respective properties onto overlay OV."
       ;; Add a linebreak to the display string and adjust the overlay end
       ;; in case of an overfull line.
       (when (TeX-fold-overfull-p ov-start ov-end display-string)
-       (setq display-string (concat display-string "\n"))
-       (move-overlay ov ov-start (save-excursion
-                                   (goto-char ov-end)
-                                   (skip-chars-forward " \t")
-                                   (point))))
+        (setq display-string (concat display-string "\n"))
+        (move-overlay ov ov-start (save-excursion
+                                    (goto-char ov-end)
+                                    (skip-chars-forward " \t")
+                                    (point))))
       (overlay-put ov 'mouse-face 'highlight)
       (overlay-put ov 'display display-string)
       (when font-lock-mode
-       (overlay-put ov 'face TeX-fold-folded-face))
+        (overlay-put ov 'face TeX-fold-folded-face))
       (unless (zerop TeX-fold-help-echo-max-length)
-       (overlay-put ov 'help-echo (TeX-fold-make-help-echo
-                                   (overlay-start ov) (overlay-end ov)))))))
+        (overlay-put ov 'help-echo (TeX-fold-make-help-echo
+                                    (overlay-start ov) (overlay-end ov)))))))
 
 (defun TeX-fold-show-item (ov)
   "Show a single LaTeX macro or environment.
@@ -846,50 +846,50 @@ Remove the respective properties from the overlay OV."
   ;; `with-local-quit' is not supported in XEmacs.
   (condition-case nil
       (let ((inhibit-quit nil))
-       (condition-case err
-           (let* ((spots (TeX-fold-partition-list
-                          (lambda (x)
-                            ;; We refresh any spot in the current
-                            ;; window as well as any spots associated
-                            ;; with a dead window or a window which
-                            ;; does not show this buffer any more.
-                            (or (eq (car x) (selected-window))
-                                (not (window-live-p (car x)))
-                                (not (eq (window-buffer (car x))
-                                         (current-buffer)))))
-                          TeX-fold-open-spots))
-                  (old-ols (mapcar 'cdr (car spots))))
-             (setq TeX-fold-open-spots (cdr spots))
-             (when (or (and (boundp 'disable-point-adjustment)
-                            disable-point-adjustment)
-                       (and (boundp 'global-disable-point-adjustment)
-                            global-disable-point-adjustment)
-                       ;; See preview.el on how to make this configurable.
-                       (memq this-command
-                             (list (key-binding [left]) (key-binding [right])
-                                   'backward-char 'forward-char
-                                   'mouse-set-point)))
-               ;; Open new overlays.
-               (dolist (ol (nconc (when (and TeX-fold-unfold-around-mark
-                                             (boundp 'mark-active)
-                                             mark-active)
-                                    (overlays-at (mark)))
-                                  (overlays-at (point))))
-                 (when (eq (overlay-get ol 'category) 'TeX-fold)
-                   (push (cons (selected-window) ol) TeX-fold-open-spots)
-                   (setq old-ols (delq ol old-ols))
-                   (TeX-fold-show-item ol))))
-             ;; Close old overlays.
-             (dolist (ol old-ols)
-               (when (and (eq (current-buffer) (overlay-buffer ol))
-                          (not (rassq ol TeX-fold-open-spots)))
-                 (if (and (>= (point) (overlay-start ol))
-                          (<= (point) (overlay-end ol)))
-                     ;; Still near the overlay: keep it open.
-                     (push (cons (selected-window) ol) TeX-fold-open-spots)
-                   ;; Really close it.
-                   (TeX-fold-hide-item ol)))))
-         (error (message "TeX-fold: %s" err))))
+        (condition-case err
+            (let* ((spots (TeX-fold-partition-list
+                           (lambda (x)
+                             ;; We refresh any spot in the current
+                             ;; window as well as any spots associated
+                             ;; with a dead window or a window which
+                             ;; does not show this buffer any more.
+                             (or (eq (car x) (selected-window))
+                                 (not (window-live-p (car x)))
+                                 (not (eq (window-buffer (car x))
+                                          (current-buffer)))))
+                           TeX-fold-open-spots))
+                   (old-ols (mapcar 'cdr (car spots))))
+              (setq TeX-fold-open-spots (cdr spots))
+              (when (or (and (boundp 'disable-point-adjustment)
+                             disable-point-adjustment)
+                        (and (boundp 'global-disable-point-adjustment)
+                             global-disable-point-adjustment)
+                        ;; See preview.el on how to make this configurable.
+                        (memq this-command
+                              (list (key-binding [left]) (key-binding [right])
+                                    'backward-char 'forward-char
+                                    'mouse-set-point)))
+                ;; Open new overlays.
+                (dolist (ol (nconc (when (and TeX-fold-unfold-around-mark
+                                              (boundp 'mark-active)
+                                              mark-active)
+                                     (overlays-at (mark)))
+                                   (overlays-at (point))))
+                  (when (eq (overlay-get ol 'category) 'TeX-fold)
+                    (push (cons (selected-window) ol) TeX-fold-open-spots)
+                    (setq old-ols (delq ol old-ols))
+                    (TeX-fold-show-item ol))))
+              ;; Close old overlays.
+              (dolist (ol old-ols)
+                (when (and (eq (current-buffer) (overlay-buffer ol))
+                           (not (rassq ol TeX-fold-open-spots)))
+                  (if (and (>= (point) (overlay-start ol))
+                           (<= (point) (overlay-end ol)))
+                      ;; Still near the overlay: keep it open.
+                      (push (cons (selected-window) ol) TeX-fold-open-spots)
+                    ;; Really close it.
+                    (TeX-fold-hide-item ol)))))
+          (error (message "TeX-fold: %s" err))))
     (quit (setq quit-flag t))))
 
 
@@ -920,28 +920,28 @@ With zero or negative ARG turn mode off."
   nil nil (list (cons TeX-fold-command-prefix TeX-fold-keymap))
   (if TeX-fold-mode
       (progn
-       (set (make-local-variable 'search-invisible) t)
-       (add-hook 'post-command-hook 'TeX-fold-post-command nil t)
-       (add-hook 'LaTeX-fill-newline-hook 'TeX-fold-update-at-point nil t)
-       (add-hook 'TeX-after-insert-macro-hook
-                 (lambda ()
-                   (when (and TeX-fold-mode TeX-fold-auto)
-                     (save-excursion
-                       (backward-char)
-                       (or (TeX-fold-item 'macro)
-                           (TeX-fold-item 'math)
-                           (TeX-fold-item 'env))))))
-       ;; Update the `TeX-fold-*-spec-list-internal' variables.
-       (dolist (elt '("macro" "env" "math"))
-         (set (intern (format "TeX-fold-%s-spec-list-internal" elt))
-              ;; Append the value of `TeX-fold-*-spec-list' to the
-              ;; mode-specific `<mode-prefix>-fold-*-spec-list' variable.
-              (append (symbol-value (intern (format "TeX-fold-%s-spec-list"
-                                                    elt)))
-                      (let ((symbol (intern (format "%s-fold-%s-spec-list"
-                                                    (TeX-mode-prefix) elt))))
-                        (when (boundp symbol)
-                          (symbol-value symbol)))))))
+        (set (make-local-variable 'search-invisible) t)
+        (add-hook 'post-command-hook 'TeX-fold-post-command nil t)
+        (add-hook 'LaTeX-fill-newline-hook 'TeX-fold-update-at-point nil t)
+        (add-hook 'TeX-after-insert-macro-hook
+                  (lambda ()
+                    (when (and TeX-fold-mode TeX-fold-auto)
+                      (save-excursion
+                        (backward-char)
+                        (or (TeX-fold-item 'macro)
+                            (TeX-fold-item 'math)
+                            (TeX-fold-item 'env))))))
+        ;; Update the `TeX-fold-*-spec-list-internal' variables.
+        (dolist (elt '("macro" "env" "math"))
+          (set (intern (format "TeX-fold-%s-spec-list-internal" elt))
+               ;; Append the value of `TeX-fold-*-spec-list' to the
+               ;; mode-specific `<mode-prefix>-fold-*-spec-list' variable.
+               (append (symbol-value (intern (format "TeX-fold-%s-spec-list"
+                                                     elt)))
+                       (let ((symbol (intern (format "%s-fold-%s-spec-list"
+                                                     (TeX-mode-prefix) elt))))
+                         (when (boundp symbol)
+                           (symbol-value symbol)))))))
     (kill-local-variable 'search-invisible)
     (remove-hook 'post-command-hook 'TeX-fold-post-command t)
     (remove-hook 'LaTeX-fill-newline-hook 'TeX-fold-update-at-point t)
diff --git a/tex-font.el b/tex-font.el
index cdedc42..99077d5 100644
--- a/tex-font.el
+++ b/tex-font.el
@@ -32,115 +32,115 @@
 (defconst tex-font-lock-keywords-1
   (eval-when-compile
     (let* (;; Names of commands whose arg should be fontified as heading, etc.
-          (headings (regexp-opt
-                     '("title"  "begin" "end" "chapter" "part"
-                       "section" "subsection" "subsubsection"
-                       "paragraph" "subparagraph" "subsubparagraph"
-                       "newcommand" "renewcommand" "newenvironment"
-                       "newtheorem")
-                     t))
-          (variables (regexp-opt
-                      '("newcounter" "newcounter*" "setcounter" "addtocounter"
-                        "setlength" "addtolength" "settowidth")
-                      t))
-          (includes (regexp-opt
-                     '("input" "include" "includeonly" "bibliography"
-                       "epsfig" "psfig" "epsf" "nofiles" "usepackage"
-                       "documentstyle" "documentclass" "verbatiminput"
-                       "includegraphics" "includegraphics*")
-                     t))
-          ;; Miscellany.
-          (slash "\\\\")
-          (opt " *\\(\\[[^]]*\\] *\\)*")
-          ;; This would allow highlighting \newcommand\CMD but requires
-          ;; adapting subgroup numbers below.
-          ;; (arg 
"\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)"))
-          (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
+           (headings (regexp-opt
+                      '("title"  "begin" "end" "chapter" "part"
+                        "section" "subsection" "subsubsection"
+                        "paragraph" "subparagraph" "subsubparagraph"
+                        "newcommand" "renewcommand" "newenvironment"
+                        "newtheorem")
+                      t))
+           (variables (regexp-opt
+                       '("newcounter" "newcounter*" "setcounter" "addtocounter"
+                         "setlength" "addtolength" "settowidth")
+                       t))
+           (includes (regexp-opt
+                      '("input" "include" "includeonly" "bibliography"
+                        "epsfig" "psfig" "epsf" "nofiles" "usepackage"
+                        "documentstyle" "documentclass" "verbatiminput"
+                        "includegraphics" "includegraphics*")
+                      t))
+           ;; Miscellany.
+           (slash "\\\\")
+           (opt " *\\(\\[[^]]*\\] *\\)*")
+           ;; This would allow highlighting \newcommand\CMD but requires
+           ;; adapting subgroup numbers below.
+           ;; (arg 
"\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)"))
+           (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
       (list
        ;; Heading args.
        (list (concat slash headings "\\*?" opt arg)
-            ;; If ARG ends up matching too much (if the {} don't match, f.ex)
-            ;; jit-lock will do funny things: when updating the buffer
-            ;; the re-highlighting is only done locally so it will just
-            ;; match the local line, but defer-contextually will
-            ;; match more lines at a time, so ARG will end up matching
-            ;; a lot more, which might suddenly include a comment
-            ;; so you get things highlighted bold when you type them
-            ;; but they get turned back to normal a little while later
-            ;; because "there's already a face there".
-            ;; Using `keep' works around this un-intuitive behavior as well
-            ;; as improves the behavior in the very rare case where you do
-            ;; have a comment in ARG.
-            3 'font-lock-function-name-face 'keep)
+             ;; If ARG ends up matching too much (if the {} don't match, f.ex)
+             ;; jit-lock will do funny things: when updating the buffer
+             ;; the re-highlighting is only done locally so it will just
+             ;; match the local line, but defer-contextually will
+             ;; match more lines at a time, so ARG will end up matching
+             ;; a lot more, which might suddenly include a comment
+             ;; so you get things highlighted bold when you type them
+             ;; but they get turned back to normal a little while later
+             ;; because "there's already a face there".
+             ;; Using `keep' works around this un-intuitive behavior as well
+             ;; as improves the behavior in the very rare case where you do
+             ;; have a comment in ARG.
+             3 'font-lock-function-name-face 'keep)
        (list (concat slash "\\(re\\)?newcommand\\** *\\(\\\\[A-Za-z@]+\\)")
-            2 'font-lock-function-name-face 'keep)
+             2 'font-lock-function-name-face 'keep)
        ;; Variable args.
        (list (concat slash variables " *" arg) 2 'font-lock-variable-name-face)
        ;; Include args.
        (list (concat slash includes opt arg) 3 'font-lock-builtin-face)
        ;; Definitions.  I think.
        '("^[ \t]*\\\\def *\\\\\\(\\(\\w\\|@\\)+\\)"
-        1 font-lock-function-name-face))))
+         1 font-lock-function-name-face))))
   "Subdued expressions to highlight in TeX modes.")
 
 (defconst tex-font-lock-keywords-2
   (append tex-font-lock-keywords-1
-   (eval-when-compile
-     (let* (;;
-           ;; Names of commands whose arg should be fontified with fonts.
-           (bold (regexp-opt '("textbf" "textsc" "textup"
-                               "boldsymbol" "pmb") t))
-           (italic (regexp-opt '("textit" "textsl" "emph") t))
-           (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") t))
-           ;;
-           ;; Names of commands whose arg should be fontified as a citation.
-           (citations (regexp-opt
-                       '("label" "ref" "pageref" "vref" "eqref"
-                         "cite" "nocite" "index" "glossary" "bibitem"
-                         ;; These are text, rather than citations.
-                         ;; "caption" "footnote" "footnotemark" "footnotetext"
-                         )
-                       t))
-           ;;
-           ;; Names of commands that should be fontified.
-           (specials (regexp-opt
-                      '("\\" "\\*" ;; "-"
-                        "linebreak" "nolinebreak" "pagebreak" "nopagebreak"
-                        "newline" "newpage" "clearpage" "cleardoublepage"
-                        "displaybreak" "allowdisplaybreaks" "enlargethispage")
-                      t))
-           (general "\\([a-zA-Z@]+\\**\\|[^ \t\n]\\)")
-           ;;
-           ;; Miscellany.
-           (slash "\\\\")
-           (opt " *\\(\\[[^]]*\\] *\\)*")
-           (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
-       (list
-       ;;
-       ;; Citation args.
-       (list (concat slash citations opt arg) 3 'font-lock-constant-face)
-       ;;
-       ;; Text between `` quotes ''.
-       (cons (concat (regexp-opt `("``" "\"<" "\"`" "<<" "«") t)
-                     "[^'\">»]+"       ;a bit pessimistic
-                     (regexp-opt `("''" "\">" "\"'" ">>" "»") t))
-             'font-lock-string-face)
-       ;;
-       ;; Command names, special and general.
-       (cons (concat slash specials) 'font-lock-warning-face)
-       (concat slash general)
-       ;;
-       ;; Font environments.  It seems a bit dubious to use `bold' etc. faces
-       ;; since we might not be able to display those fonts.
-       (list (concat slash bold " *" arg) 2 '(quote bold) 'append)
-       (list (concat slash italic " *" arg) 2 '(quote italic) 'append)
-       ;; (list (concat slash type arg) 2 '(quote bold-italic) 'append)
-       ;;
-       ;; Old-style bf/em/it/sl.  Stop at `\\' and un-escaped `&', for tables.
-       (list (concat "\\\\\\(\\(bf\\)\\|em\\|it\\|sl\\)\\>"
-                     "\\(\\([^}&\\]\\|\\\\[^\\]\\)+\\)")
-             3 '(if (match-beginning 2) 'bold 'italic) 'append)))))
-   "Gaudy expressions to highlight in TeX modes.")
+          (eval-when-compile
+            (let* (;;
+                   ;; Names of commands whose arg should be fontified with 
fonts.
+                   (bold (regexp-opt '("textbf" "textsc" "textup"
+                                       "boldsymbol" "pmb") t))
+                   (italic (regexp-opt '("textit" "textsl" "emph") t))
+                   (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") t))
+                   ;;
+                   ;; Names of commands whose arg should be fontified as a 
citation.
+                   (citations (regexp-opt
+                               '("label" "ref" "pageref" "vref" "eqref"
+                                 "cite" "nocite" "index" "glossary" "bibitem"
+                                 ;; These are text, rather than citations.
+                                 ;; "caption" "footnote" "footnotemark" 
"footnotetext"
+                                 )
+                               t))
+                   ;;
+                   ;; Names of commands that should be fontified.
+                   (specials (regexp-opt
+                              '("\\" "\\*" ;; "-"
+                                "linebreak" "nolinebreak" "pagebreak" 
"nopagebreak"
+                                "newline" "newpage" "clearpage" 
"cleardoublepage"
+                                "displaybreak" "allowdisplaybreaks" 
"enlargethispage")
+                              t))
+                   (general "\\([a-zA-Z@]+\\**\\|[^ \t\n]\\)")
+                   ;;
+                   ;; Miscellany.
+                   (slash "\\\\")
+                   (opt " *\\(\\[[^]]*\\] *\\)*")
+                   (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
+              (list
+               ;;
+               ;; Citation args.
+               (list (concat slash citations opt arg) 3 
'font-lock-constant-face)
+               ;;
+               ;; Text between `` quotes ''.
+               (cons (concat (regexp-opt `("``" "\"<" "\"`" "<<" "«") t)
+                             "[^'\">»]+"       ;a bit pessimistic
+                             (regexp-opt `("''" "\">" "\"'" ">>" "»") t))
+                     'font-lock-string-face)
+               ;;
+               ;; Command names, special and general.
+               (cons (concat slash specials) 'font-lock-warning-face)
+               (concat slash general)
+               ;;
+               ;; Font environments.  It seems a bit dubious to use `bold' 
etc. faces
+               ;; since we might not be able to display those fonts.
+               (list (concat slash bold " *" arg) 2 '(quote bold) 'append)
+               (list (concat slash italic " *" arg) 2 '(quote italic) 'append)
+               ;; (list (concat slash type arg) 2 '(quote bold-italic) 'append)
+               ;;
+               ;; Old-style bf/em/it/sl.  Stop at `\\' and un-escaped `&', for 
tables.
+               (list (concat "\\\\\\(\\(bf\\)\\|em\\|it\\|sl\\)\\>"
+                             "\\(\\([^}&\\]\\|\\\\[^\\]\\)+\\)")
+                     3 '(if (match-beginning 2) 'bold 'italic) 'append)))))
+  "Gaudy expressions to highlight in TeX modes.")
 
 (defvar tex-font-lock-keywords tex-font-lock-keywords-1
   "Default expressions to highlight in TeX modes.")
@@ -160,14 +160,14 @@
 (defun tex-font-setup ()
   "Setup font lock support for TeX."
   (set (make-local-variable 'font-lock-defaults)
-     '((tex-font-lock-keywords
-       tex-font-lock-keywords-1 tex-font-lock-keywords-2)
-       nil nil ((?$ . "\"")) nil
-       ;; Who ever uses that anyway ???
-       (font-lock-mark-block-function . mark-paragraph)
-       (font-lock-syntactic-face-function
-       . tex-font-lock-syntactic-face-function)))
-    )
+       '((tex-font-lock-keywords
+          tex-font-lock-keywords-1 tex-font-lock-keywords-2)
+         nil nil ((?$ . "\"")) nil
+         ;; Who ever uses that anyway ???
+         (font-lock-mark-block-function . mark-paragraph)
+         (font-lock-syntactic-face-function
+          . tex-font-lock-syntactic-face-function)))
+  )
 
 (provide 'tex-font)
 
diff --git a/tex-info.el b/tex-info.el
index 7a6729a..2f6a443 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -52,8 +52,8 @@
 (defconst texinfo-environment-regexp
   ;; Overwrite version from `texinfo.el'.
   (concat "^@\\("
-         (mapconcat 'car Texinfo-environment-list "\\|")
-         "\\|end\\)\\>")
+          (mapconcat 'car Texinfo-environment-list "\\|")
+          "\\|end\\)\\>")
   "Regexp for environment-like Texinfo list commands.
 Subexpression 1 is what goes into the corresponding `@end' statement.")
 
@@ -63,8 +63,8 @@ With optional ARG, modify current environment."
   ;; XXX: This could be enhanced to act like `LaTeX-environment',
   ;; i.e. suggest a default environment and have its own history.
   (interactive (list (completing-read "Environment: "
-                                     Texinfo-environment-list)
-                    current-prefix-arg))
+                                      Texinfo-environment-list)
+                     current-prefix-arg))
   (if arg
       (Texinfo-modify-environment env)
     (Texinfo-insert-environment env)))
@@ -72,90 +72,90 @@ With optional ARG, modify current environment."
 (defun Texinfo-insert-environment (env)
   "Insert Texinfo environment ENV."
   (if (and (TeX-active-mark)
-          (not (eq (mark) (point))))
+           (not (eq (mark) (point))))
       (progn
-       (when (< (mark) (point))
-         (exchange-point-and-mark))
-       (unless (TeX-looking-at-backward "^[ \t]*")
-         (newline))
-       (insert "@" env)
-       (newline)
-       (goto-char (mark))
-       (unless (TeX-looking-at-backward "^[ \t]*")
-         (newline))
-       (insert "@end " env)
-       (save-excursion (newline))
-       (end-of-line 0))
+        (when (< (mark) (point))
+          (exchange-point-and-mark))
+        (unless (TeX-looking-at-backward "^[ \t]*")
+          (newline))
+        (insert "@" env)
+        (newline)
+        (goto-char (mark))
+        (unless (TeX-looking-at-backward "^[ \t]*")
+          (newline))
+        (insert "@end " env)
+        (save-excursion (newline))
+        (end-of-line 0))
     (insert "@" env "\n\n@end " env "\n")
     (if (null (cdr-safe (assoc "defcv" Texinfo-environment-list)))
-       (forward-line -2))))
+        (forward-line -2))))
 
 (defun Texinfo-modify-environment (env)
   "Change current environment to environment ENV."
   (save-excursion
     (Texinfo-find-env-end)
     (re-search-backward (concat (regexp-quote TeX-esc) "end \\([a-zA-Z]*\\)")
-                       (line-beginning-position))
+                        (line-beginning-position))
     (replace-match env t t nil 1)
     (beginning-of-line)
     (Texinfo-find-env-start)
     (re-search-forward (concat (regexp-quote TeX-esc) "\\([a-zA-Z]*\\)")
-                      (line-end-position))
+                       (line-end-position))
     (replace-match env t t nil 1)))
 
 (defun Texinfo-find-env-end ()
   "Move point to the end of the current environment."
   (interactive)
   (let* ((envs (mapcar 'car Texinfo-environment-list))
-        (regexp (concat "^[ \t]*" (regexp-quote TeX-esc) "\\(end \\)*"
-                        (regexp-opt envs t) "\\b"))
-        (orig-pos (point))
-        (level 1)
-        case-fold-search)
+         (regexp (concat "^[ \t]*" (regexp-quote TeX-esc) "\\(end \\)*"
+                         (regexp-opt envs t) "\\b"))
+         (orig-pos (point))
+         (level 1)
+         case-fold-search)
     (save-restriction
       (save-excursion
-       (save-excursion
-         (beginning-of-line)
-         ;; Stop if point is inside of an @end <env> command, but not
-         ;; if it is behind it.
-         (when (and (looking-at regexp)
-                    (match-string 1)
-                    (> (match-end 0) orig-pos))
-           (setq level 0)))
-       (while (and (> level 0) (re-search-forward regexp nil t))
-         (if (match-string 1)
-             (setq level (1- level))
-           (setq level (1+ level)))))
+        (save-excursion
+          (beginning-of-line)
+          ;; Stop if point is inside of an @end <env> command, but not
+          ;; if it is behind it.
+          (when (and (looking-at regexp)
+                     (match-string 1)
+                     (> (match-end 0) orig-pos))
+            (setq level 0)))
+        (while (and (> level 0) (re-search-forward regexp nil t))
+          (if (match-string 1)
+              (setq level (1- level))
+            (setq level (1+ level)))))
       (if (= level 0)
-         (goto-char (match-end 0))
-       (error "Can't locate end of current environment")))))
+          (goto-char (match-end 0))
+        (error "Can't locate end of current environment")))))
 
 (defun Texinfo-find-env-start ()
   "Move point to the start of the current environment."
   (interactive)
   (let* ((envs (mapcar 'car Texinfo-environment-list))
-        (regexp (concat "^[ \t]*\\(" (regexp-quote TeX-esc) "\\)\\(end \\)*"
-                        (regexp-opt envs t) "\\b"))
-        (level 1)
-        (orig-pos (point))
-        case-fold-search)
+         (regexp (concat "^[ \t]*\\(" (regexp-quote TeX-esc) "\\)\\(end \\)*"
+                         (regexp-opt envs t) "\\b"))
+         (level 1)
+         (orig-pos (point))
+         case-fold-search)
     (save-restriction
       (save-excursion
-       (save-excursion
-         (beginning-of-line)
-         ;; Stop if point is inside of an @<env> command, but not if
-         ;; it is before it.
-         (when (and (looking-at regexp)
-                    (not (match-string 2))
-                    (< (match-beginning 1) orig-pos))
-           (setq level 0)))
-       (while (and (> level 0) (re-search-backward regexp nil t))
-         (if (match-string 2)
-             (setq level (1+ level))
-           (setq level (1- level)))))
+        (save-excursion
+          (beginning-of-line)
+          ;; Stop if point is inside of an @<env> command, but not if
+          ;; it is before it.
+          (when (and (looking-at regexp)
+                     (not (match-string 2))
+                     (< (match-beginning 1) orig-pos))
+            (setq level 0)))
+        (while (and (> level 0) (re-search-backward regexp nil t))
+          (if (match-string 2)
+              (setq level (1+ level))
+            (setq level (1- level)))))
       (if (= level 0)
-         (goto-char (match-beginning 0))
-       (error "Can't locate start of current environment")))))
+          (goto-char (match-beginning 0))
+        (error "Can't locate start of current environment")))))
 
 (defun Texinfo-mark-environment (&optional count)
   "Set mark to end of current environment and point to the matching begin.
@@ -173,13 +173,13 @@ environments."
     ;; Point should not end up in the middle of nowhere if the search fails.
     (save-excursion
       (dotimes (c count)
-       (Texinfo-find-env-end))
+        (Texinfo-find-env-end))
       (setq end (line-beginning-position 2))
       (goto-char cur)
       (dotimes (c count)
-       (Texinfo-find-env-start)
-       (unless (= (1+ c) count)
-         (beginning-of-line 0)))
+        (Texinfo-find-env-start)
+        (unless (= (1+ c) count)
+          (beginning-of-line 0)))
       (setq beg (point)))
     (push-mark end)
     (goto-char beg)
@@ -205,62 +205,62 @@ node commande, then the node command is also marked as 
part as
 the section."
   (interactive "P")
   (let (beg end is-beg-section is-end-section
-           (section-re (concat "^\\s-*" outline-regexp)))
+            (section-re (concat "^\\s-*" outline-regexp)))
     (if (and (consp no-subsection) (eq (car no-subsection) 4))
-       ;; section with exclusion of any subsection
-       (setq beg (save-excursion
-                   (unless (looking-at section-re)
-                     (end-of-line))
-                   (re-search-backward section-re nil t))
-             is-beg-section t
-             end (save-excursion
-                   (beginning-of-line)
-                   (when
-                       (re-search-forward (concat section-re
-                                                  "\\|^\\s-*@bye\\_>" ) nil t)
-                     (save-match-data
-                       (beginning-of-line)
-                       (point))))
-             is-end-section (match-string 1))
+        ;; section with exclusion of any subsection
+        (setq beg (save-excursion
+                    (unless (looking-at section-re)
+                      (end-of-line))
+                    (re-search-backward section-re nil t))
+              is-beg-section t
+              end (save-excursion
+                    (beginning-of-line)
+                    (when
+                        (re-search-forward (concat section-re
+                                                   "\\|^\\s-*@bye\\_>" ) nil t)
+                      (save-match-data
+                        (beginning-of-line)
+                        (point))))
+              is-end-section (match-string 1))
       ;; full section without exclusion of any subsection
       (let (section-command-level)
-       (setq beg
-             (save-excursion
-               (end-of-line)
-               (re-search-backward section-re nil t)))
-       (when beg
-         (setq is-beg-section t
-               section-command-level
-               (cadr (assoc (match-string 1) texinfo-section-list))
-               end
-               (save-excursion
-                 (beginning-of-line)
-                 (while
-                     (and (re-search-forward
-                           (concat section-re "\\|^\\s-*@bye\\_>" ) nil t)
-                          (or (null (setq is-end-section  (match-string 1)))
-                              (> (cadr (assoc is-end-section
-                                              texinfo-section-list))
-                                 section-command-level))))
-                 (when (match-string 0)
-                   (beginning-of-line)
-                   (point)))))));  (if ...)
+        (setq beg
+              (save-excursion
+                (end-of-line)
+                (re-search-backward section-re nil t)))
+        (when beg
+          (setq is-beg-section t
+                section-command-level
+                (cadr (assoc (match-string 1) texinfo-section-list))
+                end
+                (save-excursion
+                  (beginning-of-line)
+                  (while
+                      (and (re-search-forward
+                            (concat section-re "\\|^\\s-*@bye\\_>" ) nil t)
+                           (or (null (setq is-end-section  (match-string 1)))
+                               (> (cadr (assoc is-end-section
+                                               texinfo-section-list))
+                                  section-command-level))))
+                  (when (match-string 0)
+                    (beginning-of-line)
+                    (point)))))));  (if ...)
     (when (and beg end)
       ;; now take also enclosing node of beg and end
       (dolist
-         (boundary '(beg end))
-       (when (symbol-value (intern (concat "is-" (symbol-name boundary)
-                                           "-section")))
-         (save-excursion
-           (goto-char (symbol-value boundary))
-           (while
-               (and
-                (null (bobp))
-                (progn
-                  (beginning-of-line 0)
-                  (looking-at "^\\s-*\\($\\|@\\(c\\|comment\\)\\_>\\)"))))
-           (when  (looking-at "^\\s-*@node\\_>")
-             (set boundary (point))))))
+          (boundary '(beg end))
+        (when (symbol-value (intern (concat "is-" (symbol-name boundary)
+                                            "-section")))
+          (save-excursion
+            (goto-char (symbol-value boundary))
+            (while
+                (and
+                 (null (bobp))
+                 (progn
+                   (beginning-of-line 0)
+                   (looking-at "^\\s-*\\($\\|@\\(c\\|comment\\)\\_>\\)"))))
+            (when  (looking-at "^\\s-*@node\\_>")
+              (set boundary (point))))))
 
       (push-mark end)
       (goto-char beg)
@@ -273,13 +273,13 @@ previous beginning of keyword `@node' and ending at next
 beginning of keyword `@node' or `@bye'."
   (interactive)
   (let ((beg (save-excursion
-              (unless (looking-at "^\\s-*@\\(?:node\\)\\_>")
-                (end-of-line))
-              (re-search-backward "^\\s-*@\\(?:node\\)\\_>" nil t )))
-       (end (save-excursion
-              (beginning-of-line)
-              (and (re-search-forward "^\\s-*@\\(?:node\\|bye\\)\\_>" nil t )
-                   (progn (beginning-of-line) (point))))))
+               (unless (looking-at "^\\s-*@\\(?:node\\)\\_>")
+                 (end-of-line))
+               (re-search-backward "^\\s-*@\\(?:node\\)\\_>" nil t )))
+        (end (save-excursion
+               (beginning-of-line)
+               (and (re-search-forward "^\\s-*@\\(?:node\\|bye\\)\\_>" nil t )
+                    (progn (beginning-of-line) (point))))))
 
     (when (and beg end)
       (push-mark end)
@@ -291,11 +291,11 @@ beginning of keyword `@node' or `@bye'."
 character. Return the resulting string."
   (let ((pos 0) (map '(("comma" . ","))))
     (while (and (< pos (length
-                       node-name)) (string-match "@\\(comma\\)[[:blank:]]*{}" 
node-name pos))
+                        node-name)) (string-match "@\\(comma\\)[[:blank:]]*{}" 
node-name pos))
       (setq node-name (concat  (substring node-name 0 (match-beginning 0))
-                              (cdr (assoc-string (match-string 1 node-name) 
map))
-                              (substring node-name (match-end 0)))
-           pos (1+ (match-beginning 0)))))
+                               (cdr (assoc-string (match-string 1 node-name) 
map))
+                               (substring node-name (match-end 0)))
+            pos (1+ (match-beginning 0)))))
   node-name)
 
 
@@ -303,14 +303,14 @@ character. Return the resulting string."
   "Convert in NODE-NAME the `,' characters to `@comma{}'
 commands. Return the resulting string."
   (let* ((pos 0)
-        (map '(("," . "comma")))
-        (re (regexp-opt (mapcar 'car map))) )
+         (map '(("," . "comma")))
+         (re (regexp-opt (mapcar 'car map))) )
     (while (and (< pos (length node-name)) (string-match re node-name pos))
       (setq node-name (concat  (substring node-name 0 (match-beginning 0))
-                              "@" (cdr (assoc-string (match-string 0 
node-name) map))
-                              "{}"
-                              (substring node-name (match-end 0)))
-           pos (1+ (match-beginning 0)))))
+                               "@" (cdr (assoc-string (match-string 0 
node-name) map))
+                               "{}"
+                               (substring node-name (match-end 0)))
+            pos (1+ (match-beginning 0)))))
   node-name)
 
 
@@ -322,25 +322,25 @@ commands. Return the resulting string."
     (goto-char (point-min))
     (let (nodes dups)
       (while (re-search-forward "^@node\\b" nil t)
-       (skip-chars-forward "[:blank:]")
-       (cl-pushnew (list (Texinfo-nodename-de-escape
-                          (buffer-substring-no-properties
-                           (point) (progn (skip-chars-forward "^\r\n,")
-                                          (skip-chars-backward "[:blank:]")
-                                          (point)))))
-                   nodes
-                   :test (lambda (a b)
-                           (when (equal a b)
-                             (push (cons a (line-number-at-pos (point))) dups)
-                             t))))
+        (skip-chars-forward "[:blank:]")
+        (cl-pushnew (list (Texinfo-nodename-de-escape
+                           (buffer-substring-no-properties
+                            (point) (progn (skip-chars-forward "^\r\n,")
+                                           (skip-chars-backward "[:blank:]")
+                                           (point)))))
+                    nodes
+                    :test (lambda (a b)
+                            (when (equal a b)
+                              (push (cons a (line-number-at-pos (point))) dups)
+                              t))))
       (when dups
-       (display-warning
-        'AUCTeX
-        (format "There are duplicate nodes:\n%s"
-                (mapconcat (lambda (dup)
-                             (format "    %s on line %d" (car dup) (cdr dup)))
-                           (nreverse dups)
-                           "\n"))))
+        (display-warning
+         'AUCTeX
+         (format "There are duplicate nodes:\n%s"
+                 (mapconcat (lambda (dup)
+                              (format "    %s on line %d" (car dup) (cdr dup)))
+                            (nreverse dups)
+                            "\n"))))
       (nreverse nodes))))
 
 (defun Texinfo-insert-node ()
@@ -352,44 +352,44 @@ a comment on the following line indicating the order of 
arguments
 for @node."
   (interactive)
   (let ((active-mark (and (TeX-active-mark) (not (eq (mark) (point)))))
-       (nodes (Texinfo-make-node-list))
-       node-name next-node previous-node up-node)
+        (nodes (Texinfo-make-node-list))
+        node-name next-node previous-node up-node)
     (unless active-mark
       (setq node-name (Texinfo-nodename-escape
-                      (TeX-read-string "Node name: "))))
+                       (TeX-read-string "Node name: "))))
     ;; FIXME: What if key binding for `minibuffer-complete' was changed?
     ;; `substitute-command-keys' doesn't return the correct value.
     (setq next-node (Texinfo-nodename-escape
-                    (completing-read "Next node (TAB completes): " nodes)))
+                     (completing-read "Next node (TAB completes): " nodes)))
     (setq previous-node
-         (Texinfo-nodename-escape
-          (completing-read "Previous node (TAB completes): " nodes)))
+          (Texinfo-nodename-escape
+           (completing-read "Previous node (TAB completes): " nodes)))
     (setq up-node (Texinfo-nodename-escape
-                  (completing-read "Upper node (TAB completes): " nodes)))
+                   (completing-read "Upper node (TAB completes): " nodes)))
     (when (and active-mark
-              (< (mark) (point)))
+               (< (mark) (point)))
       (exchange-point-and-mark))
     (insert "@node ")
     (if active-mark
-       (goto-char (mark))
+        (goto-char (mark))
       (insert node-name))
     (insert ", " next-node ", " previous-node ", " up-node
-           "\n@comment  node-name,  next,  previous,  up\n")
+            "\n@comment  node-name,  next,  previous,  up\n")
     ;; Position point at first empty field.
     (unless (and (or (> (length node-name) 0) active-mark)
-                (> (length next-node) 0)
-                (> (length previous-node) 0)
-                (> (length  up-node) 0))
+                 (> (length next-node) 0)
+                 (> (length previous-node) 0)
+                 (> (length  up-node) 0))
       (forward-line -2)
       (forward-char 6)
       (catch 'break
-       (if (or (> (length node-name) 0) active-mark)
-           (progn (skip-chars-forward "^,") (forward-char 2))
-         (throw 'break nil))
-       (dolist (node (list next-node previous-node up-node))
-         (if (> (length node) 0)
-             (progn (skip-chars-forward "^,") (forward-char 2))
-           (throw 'break nil)))))))
+        (if (or (> (length node-name) 0) active-mark)
+            (progn (skip-chars-forward "^,") (forward-char 2))
+          (throw 'break nil))
+        (dolist (node (list next-node previous-node up-node))
+          (if (> (length node) 0)
+              (progn (skip-chars-forward "^,") (forward-char 2))
+            (throw 'break nil)))))))
 
 (defun Texinfo-arg-nodename (optional &optional prompt definition)
   "Prompt for a node name completing with known node names.
@@ -400,13 +400,13 @@ added to the list of defined node names. Current 
implementation
 ignored DEFINITION as the full document is scanned for node names at
 each invocation."
   (let ((node-name (completing-read (TeX-argument-prompt optional prompt 
"Node")
-                                   (Texinfo-make-node-list))))
+                                    (Texinfo-make-node-list))))
     (insert "{" (Texinfo-nodename-escape node-name) "}" )))
 
 (defun Texinfo-arg-lrc (optional &rest args)
   (let ((l (read-from-minibuffer "Enter left part: "))
-       (c (read-from-minibuffer "Enter center part: "))
-       (r (read-from-minibuffer "Enter right part: ")))
+        (c (read-from-minibuffer "Enter center part: "))
+        (r (read-from-minibuffer "Enter right part: ")))
     (insert " " l " @| " c " @| " r)))
 
 (defun Texinfo-arg-next-line (optional &rest args)
@@ -420,16 +420,16 @@ Use PROMPT as the prompt string.
 STYLE may be one of `:on|off' or `:true|false', if omitted `:on|off'
 is assumed by default."
 (let ((collection  (cdr (assq style
-                        '((nil . #1=("on" "off"))
-                          (:on|off . #1#)
-                          (:true|false "true" "false"))))))
+                         '((nil . #1=("on" "off"))
+                           (:on|off . #1#)
+                           (:true|false "true" "false"))))))
   (insert (if (y-or-n-p  (TeX-argument-prompt optional prompt (concat (car 
collection) ", not " (cadr collection))))
-                        (car collection)
-           (cadr collection)))))
+                         (car collection)
+            (cadr collection)))))
 
 (defun Texinfo-arg-choice (optional &optional prompt collection)
   (insert (completing-read (TeX-argument-prompt optional prompt "Key")
-                          collection)))
+                           collection)))
 
 ;; Silence the byte-compiler from warnings for variables and functions declared
 ;; in reftex.
@@ -458,7 +458,7 @@ is assumed by default."
          (section-number (reftex-section-number level unnumbered))
          (text1 (save-match-data
                   (save-excursion
-                   (buffer-substring-no-properties (point) (progn 
(end-of-line) (point))))))
+                    (buffer-substring-no-properties (point) (progn 
(end-of-line) (point))))))
          (literal (buffer-substring-no-properties
                    (1- (match-beginning 3))
                    (min (point-max) (+ (match-end 0) (length text1) 1))))
@@ -484,20 +484,20 @@ is assumed by default."
     ;; has been corrected for long enough a time
     (unless (assq 'Texinfo reftex-label-alist-builtin)
       (setq reftex-label-alist-builtin (append reftex-label-alist-builtin
-                                              '((Texinfo "Texinfo default 
environments" nil)))))
+                                               '((Texinfo "Texinfo default 
environments" nil)))))
     (dolist (v `((reftex-section-pre-regexp . "@")
-                ; section post-regexp must contain exactly one group
-                (reftex-section-post-regexp . "\\([ \t]+\\)")
-                (reftex-section-info-function . Texinfo-reftex-section-info)
-                (reftex-default-label-alist-entries . (Texinfo))
-              (reftex-section-levels
-               . ,(mapcar
-                   (lambda (x)
-                     (if (string-match 
"\\(\\`unnumbered\\)\\|\\(heading\\'\\)\\|\\(\\`top\\'\\)"
-                                       (car x))
-                         (cons (car x) (- (cadr x)))
-                       (cons (car x) (cadr x))))
-                   texinfo-section-list))))
+                 ; section post-regexp must contain exactly one group
+                 (reftex-section-post-regexp . "\\([ \t]+\\)")
+                 (reftex-section-info-function . Texinfo-reftex-section-info)
+                 (reftex-default-label-alist-entries . (Texinfo))
+               (reftex-section-levels
+                . ,(mapcar
+                    (lambda (x)
+                      (if (string-match 
"\\(\\`unnumbered\\)\\|\\(heading\\'\\)\\|\\(\\`top\\'\\)"
+                                        (car x))
+                          (cons (car x) (- (cadr x)))
+                        (cons (car x) (cadr x))))
+                    texinfo-section-list))))
       (set (make-local-variable (car v) ) (cdr v)))
     (reftex-ensure-compiled-variables)))
 
@@ -522,7 +522,7 @@ is assumed by default."
     (define-key map "\M-\C-h" 'Texinfo-mark-node)
     (define-key map "\C-c\n"   'texinfo-insert-@item)
     (or (key-binding "\e\r")
-       (define-key map "\e\r" 'texinfo-insert-@item)) ;*** Alias
+        (define-key map "\e\r" 'texinfo-insert-@item)) ;*** Alias
     (define-key map "\C-c\C-s" 'Texinfo-insert-node)
     (define-key map "\C-c]" 'texinfo-insert-@end)
 
@@ -648,9 +648,9 @@ value of `Texinfo-mode-hook'."
 
   (set (make-local-variable 'page-delimiter)
        (concat
-       "^@node [ \t]*[Tt]op\\|^@\\("
-       texinfo-chapter-level-regexp
-       "\\)"))
+        "^@node [ \t]*[Tt]op\\|^@\\("
+        texinfo-chapter-level-regexp
+        "\\)"))
   (set (make-local-variable 'require-final-newline) t)
   (set (make-local-variable 'indent-tabs-mode) nil)
   (set (make-local-variable 'paragraph-separate)
@@ -673,8 +673,8 @@ value of `Texinfo-mode-hook'."
   ;; Outline settings.
   (set (make-local-variable 'outline-regexp)
        (concat "@\\("
-              (mapconcat 'car texinfo-section-list "\\>\\|")
-              "\\>\\)"))
+               (mapconcat 'car texinfo-section-list "\\>\\|")
+               "\\>\\)"))
   (set (make-local-variable 'outline-level) 'texinfo-outline-level)
 
   ;; Mostly AUCTeX stuff
@@ -694,7 +694,7 @@ value of `Texinfo-mode-hook'."
 
   (set (make-local-variable 'TeX-complete-list)
        (list (list "@\\([a-zA-Z]*\\)" 1 'TeX-symbol-list-filtered nil)
-            (list "" TeX-complete-word)))
+             (list "" TeX-complete-word)))
 
   (set (make-local-variable 'TeX-font-list) Texinfo-font-list)
   (set (make-local-variable 'TeX-font-replace-function) 
'TeX-font-replace-macro)
@@ -706,9 +706,9 @@ value of `Texinfo-mode-hook'."
             nil t)
 
   (when (and (boundp 'add-log-current-defun-function)
-            (fboundp 'texinfo-current-defun-name))
+             (fboundp 'texinfo-current-defun-name))
     (set (make-local-variable 'add-log-current-defun-function)
-        #'texinfo-current-defun-name))
+         #'texinfo-current-defun-name))
 
   (TeX-add-symbols
    '("acronym" "Acronym")
diff --git a/tex-ispell.el b/tex-ispell.el
index 50e9c80..b6eddcf 100644
--- a/tex-ispell.el
+++ b/tex-ispell.el
@@ -343,12 +343,12 @@ not be quoted.  An opening brace `{', asterisk `*' and 
at-sign
 ;; before verb content:
 (TeX-ispell-skip-setcar
  `((,(concat "\\\\" (regexp-opt '("Verb"     "lstinline"
-                                 "py"       "pyc"       "pys"    "pyv" "pyb"
-                                 "pycon"    "pyconc"    "pyconv"
-                                 "pylab"    "pylabc"    "pylabs" "pylabv" 
"pylabb"
-                                 "pylabcon" "pylabconc" "pylabconv"
-                                 "sympy"    "sympyc"    "sympys" "sympyv" 
"sympyb"
-                                 "sympycon" "sympyconc" "sympyconv")))
+                                  "py"       "pyc"       "pys"    "pyv" "pyb"
+                                  "pycon"    "pyconc"    "pyconv"
+                                  "pylab"    "pylabc"    "pylabs" "pylabv" 
"pylabb"
+                                  "pylabcon" "pylabconc" "pylabconv"
+                                  "sympy"    "sympyc"    "sympys" "sympyv" 
"sympyb"
+                                  "sympycon" "sympyconc" "sympyconv")))
     TeX-ispell-tex-arg-verb-end)))
 
 ;; minted.sty: With opt. and mandatory argument before verb content.
@@ -377,33 +377,33 @@ not be quoted.  An opening brace `{', asterisk `*' and 
at-sign
     "Return elements from `TeX-ispell-skip-cmds-list' acc. to ARG."
     (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))))
+        (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-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 "\\\\"
-           (regexp-opt (TeX-ispell-sort-skip-cmds-list 1) t)))
+            (regexp-opt (TeX-ispell-sort-skip-cmds-list 1) t)))
   "Regexp of LaTeX commands with one argument to be skipped.")
 
 (defvar TeX-ispell-skip-cmds-two-args-regexp
   (eval-when-compile
     (concat "\\\\"
-           (regexp-opt (TeX-ispell-sort-skip-cmds-list 2) t)))
+            (regexp-opt (TeX-ispell-sort-skip-cmds-list 2) t)))
   "Regexp of LaTeX commands with two arguments to be skipped.")
 
 (defvar TeX-ispell-skip-cmds-three-args-regexp
   (eval-when-compile
     (concat "\\\\"
-           (regexp-opt (TeX-ispell-sort-skip-cmds-list 3) t)))
+            (regexp-opt (TeX-ispell-sort-skip-cmds-list 3) t)))
   "Regexp of LaTeX commands with three arguments to be skipped.")
 
 (defvar TeX-ispell-skip-envs-opt-arg-regexp
@@ -426,7 +426,7 @@ not be quoted.  An opening brace `{', asterisk `*' and 
at-sign
 (TeX-ispell-skip-setcdr
  `((,TeX-ispell-skip-envs-opt-arg-regexp ispell-tex-arg-end 0)
    ,(cons TeX-ispell-skip-envs-regexp
-         (concat "\\\\end{" TeX-ispell-skip-envs-regexp "}"))))
+          (concat "\\\\end{" TeX-ispell-skip-envs-regexp "}"))))
 
 (provide 'tex-ispell)
 
diff --git a/tex-jp.el b/tex-jp.el
index d7eae49..5b868b8 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -48,8 +48,8 @@
   "Default TeX engine for Japanese TeX."
   :group 'AUCTeX-jp
   :type '(choice (const :tag "pTeX" ptex)
-                (const :tag "jTeX" jtex)
-                (const :tag "upTeX" uptex)))
+                 (const :tag "jTeX" jtex)
+                 (const :tag "upTeX" uptex)))
 
 (defcustom japanese-TeX-use-kanji-opt-flag t
   "Add kanji option to Japanese pTeX family if non-nil.
@@ -73,16 +73,16 @@ systems are determined by their values regardless of the 
kanji option."
       ;; $B<c43=$@5$7$?(B list $B$r:n$C$?$j$7$F(B `mapcar' $B$G=8$a$k!#(B
       (mapcar
        (lambda (l)
-        (cond
-         ;; l $B$NBh(B1$BMWAG$,(B "BibTeX" $B$d(B "Index" 
$B$@$C$?$i!"(Bl $B$NBh(B2$BMWAG(B
-         ;; $B$@$1$rF~$lBX$($?JL$N(B list $B$r:n$k!#(B
-         ((equal (car l) "BibTeX")
-          (append (list (car l) "%(bibtex) %s") (cddr l)))
-         ((equal (car l) "Index")
-          (append (list (car l) "%(makeindex) %s") (cddr l)))
-         ;; $B$=$l0J30$N>l9g$O(B l $B$=$N$b$N$r;H$&!#(B
-         (t
-          l)))
+         (cond
+          ;; l $B$NBh(B1$BMWAG$,(B "BibTeX" $B$d(B "Index" 
$B$@$C$?$i!"(Bl $B$NBh(B2$BMWAG(B
+          ;; $B$@$1$rF~$lBX$($?JL$N(B list $B$r:n$k!#(B
+          ((equal (car l) "BibTeX")
+           (append (list (car l) "%(bibtex) %s") (cddr l)))
+          ((equal (car l) "Index")
+           (append (list (car l) "%(makeindex) %s") (cddr l)))
+          ;; $B$=$l0J30$N>l9g$O(B l $B$=$N$b$N$r;H$&!#(B
+          (t
+           l)))
        TeX-command-list))
 
 ;; Define before first use.
@@ -116,12 +116,12 @@ systems are determined by their values regardless of the 
kanji option."
         ;; mendex, upmendex, makeindex $B$N$&$AE,@Z$J$b$N$rA*Br$9$k!#(B
         ("%(makeindex)" (lambda ()
                           (cond
-                          ;; upmendex $B$O(B XeLaTeX $B$d(B LuaLaTeX 
$B$G$b(B
-                          ;; $B;H$($k!#(Bsee
-                          ;; http://www.t-lab.opal.ne.jp/tex/README_upmendex.md
-                          ;; FIXME: XeLaTeX $B$d(B LuaLaTeX $B$@$1$r;H$&(B
-                          ;; $BMxMQ<T$N>l9g$O!"(Btex-jp $B$O(B load 
$B$5$l$J(B
-                          ;; $B$$$N$G$3$N@_Dj$O0UL#$,$J$$!#(B
+                           ;; upmendex $B$O(B XeLaTeX $B$d(B LuaLaTeX 
$B$G$b(B
+                           ;; $B;H$($k!#(Bsee
+                           ;; 
http://www.t-lab.opal.ne.jp/tex/README_upmendex.md
+                           ;; FIXME: XeLaTeX $B$d(B LuaLaTeX $B$@$1$r;H$&(B
+                           ;; $BMxMQ<T$N>l9g$O!"(Btex-jp $B$O(B load 
$B$5$l$J(B
+                           ;; $B$$$N$G$3$N@_Dj$O0UL#$,$J$$!#(B
                            ((and (memq TeX-engine '(uptex xetex luatex))
                                  (executable-find "upmendex"))
                             "upmendex %(dic)")
@@ -136,22 +136,22 @@ systems are determined by their values regardless of the 
kanji option."
                                  (if str (format " -%c " (upcase (aref str 0)))
                                    ""))
                              "")))
-       ;; (up)mendex $BMQ<-=q;XDj%*%W%7%g%s!#(B
-       ("%(dic)" (lambda ()
-                   ;; master $B$HF1L>$G3HD%;R$,(B .dic 
$B$N%U%!%$%k$,$"$l$P(B
-                   ;; $B$=$l$r<-=qL>$H$7$F(B -d $B%*%W%7%g%s$KM?$($k!#(B
-                   ;; C-c C-r $BEy$N>l9g(B _region_.dic $B$K$9$Y$-$G$O(B
-                   ;; $B$J$$$N$G!"(B`TeX-master-file' $B$rM[$K8F$V!#(B
-                   (let ((dicname (TeX-master-file "dic" t)))
-                     (if (file-exists-p
-                          (expand-file-name dicname (TeX-master-directory)))
-                         (let ((result (format "-d %s" dicname)))
-                           ;; Advance past the file name in order to
-                           ;; prevent expanding any substring of it.
-                           (setq TeX-expand-pos
-                                 (+ TeX-expand-pos (length result)))
-                           result)
-                       ""))))
+        ;; (up)mendex $BMQ<-=q;XDj%*%W%7%g%s!#(B
+        ("%(dic)" (lambda ()
+                    ;; master $B$HF1L>$G3HD%;R$,(B .dic 
$B$N%U%!%$%k$,$"$l$P(B
+                    ;; $B$=$l$r<-=qL>$H$7$F(B -d $B%*%W%7%g%s$KM?$($k!#(B
+                    ;; C-c C-r $BEy$N>l9g(B _region_.dic $B$K$9$Y$-$G$O(B
+                    ;; $B$J$$$N$G!"(B`TeX-master-file' $B$rM[$K8F$V!#(B
+                    (let ((dicname (TeX-master-file "dic" t)))
+                      (if (file-exists-p
+                           (expand-file-name dicname (TeX-master-directory)))
+                          (let ((result (format "-d %s" dicname)))
+                            ;; Advance past the file name in order to
+                            ;; prevent expanding any substring of it.
+                            (setq TeX-expand-pos
+                                  (+ TeX-expand-pos (length result)))
+                            result)
+                        ""))))
         ;; pxdvi $B$H(B %(o?)xdvi $B$NE,@Z$JJ}$rA*Br$9$k!#(B
         ("%(xdvi)" (lambda ()
                      ;; pxdvi $B$O(B ptex, jtex $B6&MQ$J$N$G!"(B
@@ -164,31 +164,31 @@ systems are determined by their values regardless of the 
kanji option."
 (setq TeX-view-predicate-list-builtin
       (append
        '((paper-a4
-         (let ((regex 
"\\`\\(?:a4j\\|a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'"))
-           (or (TeX-match-style regex)
-               (and (fboundp 'LaTeX-match-class-option)
-                    (LaTeX-match-class-option regex)))))
+          (let ((regex 
"\\`\\(?:a4j\\|a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'"))
+            (or (TeX-match-style regex)
+                (and (fboundp 'LaTeX-match-class-option)
+                     (LaTeX-match-class-option regex)))))
          (paper-a5
-         (let ((regex "\\`\\(?:a5j\\|a5paper\\|a5comb\\)\\'"))
-           (or (TeX-match-style regex)
-               (and (fboundp 'LaTeX-match-class-option)
-                    (LaTeX-match-class-option regex)))))
+          (let ((regex "\\`\\(?:a5j\\|a5paper\\|a5comb\\)\\'"))
+            (or (TeX-match-style regex)
+                (and (fboundp 'LaTeX-match-class-option)
+                     (LaTeX-match-class-option regex)))))
          ;; jarticle $B$J$I$@$H(B b4paper, b5paper $B$O(B JIS B 
$B7ONs!#(B
          ;; j-article $B$J$I$NJ}$K$O(B a4j, b5j 
$B$H$$$C$?%*%W%7%g%s$O$J$$!#(B
          (paper-b5    ; ISO B5
           (and (fboundp 'LaTeX-match-class-option)
-              (LaTeX-match-class-option "\\`b5paper\\'")
+               (LaTeX-match-class-option "\\`b5paper\\'")
                (not (TeX-match-style 
"\\`u?[jt]s?\\(?:article\\|report\\|book\\)\\'"))))
          (paper-b5jis ; JIS B5
-         (and (fboundp 'LaTeX-match-class-option)
-              (or (LaTeX-match-class-option "\\`b5j\\'")
-                  (and (LaTeX-match-class-option "\\`b5paper\\'")
-                       (TeX-match-style 
"\\`u?[jt]s?\\(?:article\\|report\\|book\\)\\'")))))
+          (and (fboundp 'LaTeX-match-class-option)
+               (or (LaTeX-match-class-option "\\`b5j\\'")
+                   (and (LaTeX-match-class-option "\\`b5paper\\'")
+                        (TeX-match-style 
"\\`u?[jt]s?\\(?:article\\|report\\|book\\)\\'")))))
          ;; article $B$J$I$K$O(B b4paper $B$H$$$&%*%W%7%g%s$O$J$$!#(B
          ;; b4paper $B$H$$$&%*%W%7%g%s$,$"$C$?$i(B JIS B4 $B$H8+$J$9!#(B
          (paper-b4jis
-         (and (fboundp 'LaTeX-match-class-option)
-              (LaTeX-match-class-option "\\`\\(?:b4j\\|b4paper\\)\\'"))))
+          (and (fboundp 'LaTeX-match-class-option)
+               (LaTeX-match-class-option "\\`\\(?:b4j\\|b4paper\\)\\'"))))
        ;; jsclasses $B$@$HB>$K$b$b$C$HH=7?$N%*%W%7%g%s$,$"$k$,!"A4ItLLE](B
        ;; $B8+$F$k$H%-%j$,$J$$$N$G!"$3$l$/$i$$$G$$$$$@$m$&!#(B
        ;; jsarticle.el $B$d(B jsbook.el 
$B$GDI2CJ,$N=hM}$r;E9~$a$P$$$$$N$+$bCN$l$J$$!#(B
@@ -200,8 +200,8 @@ systems are determined by their values regardless of the 
kanji option."
       (setcar (cadr l) "%(xdvi) -unique")
       (setcdr (cdr l) '("%(xdvi)"))))
   (setq TeX-view-program-list-builtin
-       (append TeX-view-program-list-builtin
-               '(("MuPDF" "mupdf %o" "mupdf")))))
+        (append TeX-view-program-list-builtin
+                '(("MuPDF" "mupdf %o" "mupdf")))))
 
 ;; $B$3$l$O(B tex.el $B$K<h$jF~$l$F$b$i$&$N$OFq$7$$$+!)(B
 ;; tex-jp.el $B$,FI$_9~$^$l$k$@$1$G!"(Bdvi viewer $B$N%G%U%)%k%H$,(B 
dviout $B$K(B
@@ -209,21 +209,21 @@ systems are determined by their values regardless of the 
kanji option."
 (unless (get 'TeX-view-program-selection 'saved-value)
   (if (eq system-type 'windows-nt)
       (setq TeX-view-program-selection
-           (append
-            '((output-dvi "dviout"))
-            TeX-view-program-selection))))
+            (append
+             '((output-dvi "dviout"))
+             TeX-view-program-selection))))
 
 (mapc (lambda (dir) (add-to-list 'TeX-macro-global dir t))
       (or (TeX-tree-expand
-          '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST")
-          "platex" '("/ptex/" "/pbibtex/bst/"))
-         '("/usr/share/texmf/ptex/" "/usr/share/texmf/pbibtex/bst/")))
+           '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST")
+           "platex" '("/ptex/" "/pbibtex/bst/"))
+          '("/usr/share/texmf/ptex/" "/usr/share/texmf/pbibtex/bst/")))
 
 (mapc (lambda (dir) (add-to-list 'TeX-macro-global dir t))
       (or (TeX-tree-expand
-          '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST")
-          "jlatex" '("/jtex/" "/jbibtex/bst/"))
-         '("/usr/share/texmf/jtex/" "/usr/share/texmf/jbibtex/bst/")))
+           '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST")
+           "jlatex" '("/jtex/" "/jbibtex/bst/"))
+          '("/usr/share/texmf/jtex/" "/usr/share/texmf/jbibtex/bst/")))
 
 (defcustom japanese-TeX-error-messages t
   "If non-nil, explain TeX error messages in Japanese."
@@ -277,7 +277,7 @@ See also a user custom option 
`TeX-japanese-process-input-coding-system'."
 (setq LaTeX-font-list
       (append '((?m "\\textmc{" "}" "\\mathmc{" "}")
                 (?g "\\textgt{" "}" "\\mathgt{" "}"))
-             LaTeX-font-list))
+              LaTeX-font-list))
 
 ;;; Coding system
 
@@ -292,82 +292,82 @@ See also a user custom option 
`TeX-japanese-process-input-coding-system'."
       ;; FIXME: $B0J2<$N=hM}$O(B tex engine 
$B$rBP>]$H$9$k>l9g$7$+9M$($F$$$J$$!#(B
       ;; bibtex $B$d(B mendex 
$BEy$NJd=u%D!<%k$N>l9g$O@5$7$/$J$$=hM}$+$b$7$l$J$$!#(B
       (let*
-         ;; -kanji $B%*%W%7%g%s$"$j$N;~$NJ8;z%3!<%I!#(B
-         ((kanji (and japanese-TeX-use-kanji-opt-flag
-                      (let ((str (japanese-TeX-get-encoding-string)))
-                        (cond
-                         ((equal str "euc") 'euc-jp)
-                         ((equal str "jis") 'iso-2022-jp)
-                         ((equal str "sjis") 'shift_jis)
-                         ((equal str "utf8") 'utf-8)))))
-
-          ;; process $B$+$i$N=PNO$NJ8;z%3!<%I!#(B
-          (dec (cond
-                ;; windows $B$H(B mac $B$N>l9g!#(B
-                ((memq system-type '(windows-nt darwin))
-                 (cond
-                  ;; ptex $B$J$i(B mac $B$O(B utf-8$B!#(B
-                  ;; windows $B$G(B -kanji 
$B%*%W%7%g%s$"$j$N;~$O$=$NJ8;z%3!<%I!"(B
-                  ;; $B$J$7$N;~$O(B sjis$B!#(B
-                  ;; texlive 2018 $B$+$i$O(B sjis $B$G$O$J$/(B utf-8 
$B$K$J$C$?$N$G(B
-                  ;; $B$=$A$i$K9g$o$;$k!#(B
-                  ((eq TeX-engine 'ptex)
-                   (cond ((eq system-type 'darwin)
-                          'utf-8)
-                         ((and japanese-TeX-use-kanji-opt-flag kanji)
-                          kanji)
-                         (t 'utf-8)))
-                  ;; jtex $B$J$i(B sjis $B$K8GDj$9$k!#(B
-                  ((eq TeX-engine 'jtex)
-                   'shift_jis)
-                  ;; uptex $B$J$i(B utf-8 $B$K8GDj$9$k!#(B
-                  (t
-                   'utf-8)))
-                ;; unix $B$N>l9g!#(B
-                (t
-                 ;; jtex $B$J$i(B euc $B$K8GDj$9$k!#(B
-                 (cond
-                  ((eq TeX-engine 'jtex)
-                   'euc-jp)
-                  ;; $B$=$l0J30$O!"(Buptex $B$G$b(B locale $B$K=>$&!#(B
-                  ;; $B$?$@$7!"(Blocale $B$,F|K\8l$r%5%]!<%H$7$J$$>l9g$O(B
-                  ;; euc $B$K8GDj$9$k!#(B
-                  (t
-                   (let ((lcs locale-coding-system))
-                     (if (and lcs (japanese-TeX-coding-ejsu lcs))
-                         lcs 'euc-jp)))))))
-
-          ;; process $B$KM?$($kF~NO$NJ8;z%3!<%I!#(B
-          (enc (cond
-                ;; ptex $B$G(B -kanji 
$B%*%W%7%g%s$"$j$J$i!"$=$NJ8;z%3!<%I!#(B
-                ;; $B$J$7$J$i(B utf-8 $B$+(B sjis$B!#(B
-                ;; texlive 2018 $B$G(B w32 $B$G$b(B utf-8 
$B$,%G%U%)%k%H$K$J$C(B
-                ;; $B$?$h$&$J$N$G!"$=$l$K9g$o$;$k!#(B
-                ((eq TeX-engine 'ptex)
-                 (if (and japanese-TeX-use-kanji-opt-flag kanji)
-                     kanji
-                   'utf-8))
-                ;; jtex $B$J$i(B euc $B$+(B sjis $B$K8GDj$9$k!#(B
-                ((eq TeX-engine 'jtex)
-                 (if (memq system-type '(windows-nt darwin))
-                     'shift_jis 'euc-jp))
-                ;; uptex $B$J$i(B utf-8 $B$K8GDj$9$k!#(B
-                (t
-                 'utf-8))))
-
-       ;; $B2~9T%3!<%I$r;XDj!#(B
-       (setq dec (coding-system-change-eol-conversion
-                  dec
-                  (if (eq system-type 'windows-nt) 'dos 'unix))
-             enc (coding-system-change-eol-conversion
-                  enc
-                  (if (eq system-type 'windows-nt) 'dos 'unix)))
-
-       ;; Customize $BCM$,$"$l$P$=$l$rM%@h!#(B
-       (set-process-coding-system
-        process
-        (or TeX-japanese-process-output-coding-system dec)
-        (or TeX-japanese-process-input-coding-system enc))))))
+          ;; -kanji $B%*%W%7%g%s$"$j$N;~$NJ8;z%3!<%I!#(B
+          ((kanji (and japanese-TeX-use-kanji-opt-flag
+                       (let ((str (japanese-TeX-get-encoding-string)))
+                         (cond
+                          ((equal str "euc") 'euc-jp)
+                          ((equal str "jis") 'iso-2022-jp)
+                          ((equal str "sjis") 'shift_jis)
+                          ((equal str "utf8") 'utf-8)))))
+
+           ;; process $B$+$i$N=PNO$NJ8;z%3!<%I!#(B
+           (dec (cond
+                 ;; windows $B$H(B mac $B$N>l9g!#(B
+                 ((memq system-type '(windows-nt darwin))
+                  (cond
+                   ;; ptex $B$J$i(B mac $B$O(B utf-8$B!#(B
+                   ;; windows $B$G(B -kanji 
$B%*%W%7%g%s$"$j$N;~$O$=$NJ8;z%3!<%I!"(B
+                   ;; $B$J$7$N;~$O(B sjis$B!#(B
+                   ;; texlive 2018 $B$+$i$O(B sjis $B$G$O$J$/(B utf-8 
$B$K$J$C$?$N$G(B
+                   ;; $B$=$A$i$K9g$o$;$k!#(B
+                   ((eq TeX-engine 'ptex)
+                    (cond ((eq system-type 'darwin)
+                           'utf-8)
+                          ((and japanese-TeX-use-kanji-opt-flag kanji)
+                           kanji)
+                          (t 'utf-8)))
+                   ;; jtex $B$J$i(B sjis $B$K8GDj$9$k!#(B
+                   ((eq TeX-engine 'jtex)
+                    'shift_jis)
+                   ;; uptex $B$J$i(B utf-8 $B$K8GDj$9$k!#(B
+                   (t
+                    'utf-8)))
+                 ;; unix $B$N>l9g!#(B
+                 (t
+                  ;; jtex $B$J$i(B euc $B$K8GDj$9$k!#(B
+                  (cond
+                   ((eq TeX-engine 'jtex)
+                    'euc-jp)
+                   ;; $B$=$l0J30$O!"(Buptex $B$G$b(B locale $B$K=>$&!#(B
+                   ;; $B$?$@$7!"(Blocale $B$,F|K\8l$r%5%]!<%H$7$J$$>l9g$O(B
+                   ;; euc $B$K8GDj$9$k!#(B
+                   (t
+                    (let ((lcs locale-coding-system))
+                      (if (and lcs (japanese-TeX-coding-ejsu lcs))
+                          lcs 'euc-jp)))))))
+
+           ;; process $B$KM?$($kF~NO$NJ8;z%3!<%I!#(B
+           (enc (cond
+                 ;; ptex $B$G(B -kanji 
$B%*%W%7%g%s$"$j$J$i!"$=$NJ8;z%3!<%I!#(B
+                 ;; $B$J$7$J$i(B utf-8 $B$+(B sjis$B!#(B
+                 ;; texlive 2018 $B$G(B w32 $B$G$b(B utf-8 
$B$,%G%U%)%k%H$K$J$C(B
+                 ;; $B$?$h$&$J$N$G!"$=$l$K9g$o$;$k!#(B
+                 ((eq TeX-engine 'ptex)
+                  (if (and japanese-TeX-use-kanji-opt-flag kanji)
+                      kanji
+                    'utf-8))
+                 ;; jtex $B$J$i(B euc $B$+(B sjis $B$K8GDj$9$k!#(B
+                 ((eq TeX-engine 'jtex)
+                  (if (memq system-type '(windows-nt darwin))
+                      'shift_jis 'euc-jp))
+                 ;; uptex $B$J$i(B utf-8 $B$K8GDj$9$k!#(B
+                 (t
+                  'utf-8))))
+
+        ;; $B2~9T%3!<%I$r;XDj!#(B
+        (setq dec (coding-system-change-eol-conversion
+                   dec
+                   (if (eq system-type 'windows-nt) 'dos 'unix))
+              enc (coding-system-change-eol-conversion
+                   enc
+                   (if (eq system-type 'windows-nt) 'dos 'unix)))
+
+        ;; Customize $BCM$,$"$l$P$=$l$rM%@h!#(B
+        (set-process-coding-system
+         process
+         (or TeX-japanese-process-output-coding-system dec)
+         (or TeX-japanese-process-input-coding-system enc))))))
 
 (defun japanese-TeX-coding-ejsu (coding-system)
   "Convert japanese CODING-SYSTEM to mnemonic string.
@@ -382,7 +382,7 @@ Return nil otherwise."
                 (iso-2022-jp . "jis")
                 (japanese-shift-jis . "sjis")
                 (utf-8 . "utf8")
-               ;; TeXLive 2018 $B$+$i(B BOM $B$D$-(B UTF-8 
$B$b%5%]!<%H$5$l$?!#(B
+                ;; TeXLive 2018 $B$+$i(B BOM $B$D$-(B UTF-8 
$B$b%5%]!<%H$5$l$?!#(B
                 (utf-8-with-signature . "utf8")
 
                 (euc-jis-2004 . "euc")
@@ -433,7 +433,7 @@ Set `japanese-TeX-mode' to t, and enter 
`TeX-plain-tex-mode'."
     (when enable-local-variables
       (setq major-mode 'japanese-plain-tex-mode)
       (add-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name
-               nil t))))
+                nil t))))
 
 (add-hook 'plain-TeX-mode-hook #'japanese-plain-tex-mode-initialization)
 
@@ -456,16 +456,16 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
     ;; $B$&0lEY8F$P$l$k$N$G!"(B`TeX-parse-self' $B$,(B t $B$@$H(B parse 
$B=hM}$bL5BL(B
     ;; $B$K(B 2 $B2s9T$o$l$F$7$^$&!#(B
     (add-hook 'TeX-update-style-hook
-             #'japanese-LaTeX-guess-engine nil t)
+              #'japanese-LaTeX-guess-engine nil t)
     (setq LaTeX-default-style japanese-LaTeX-default-style)
 
     (when (and (fboundp 'font-latex-add-keywords)
-              (eq TeX-install-font-lock 'font-latex-setup))
+               (eq TeX-install-font-lock 'font-latex-setup))
       ;; jLaTeX $B$K$O$J$$%3%^%s%I$@$,!"$=$l$O$b$&5$$K$7$J$/$F$$$$$@$m$&!#(B
       (font-latex-add-keywords '(("textgt" "{") ("mathgt" "{"))
-                              'bold-command)
+                               'bold-command)
       (font-latex-add-keywords '("gtfamily")
-                              'bold-declaration))
+                               'bold-declaration))
 
     ;; The value of `major-mode' should be `latex-mode', not
     ;; `japanese-latex-mode', because the name `latex-mode' is hard
@@ -485,16 +485,16 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
     (when enable-local-variables
       (setq major-mode 'japanese-latex-mode)
       (add-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name
-               nil t))))
+                nil t))))
 
 (add-hook 'LaTeX-mode-hook #'japanese-latex-mode-initialization)
 
 ;; This function is useful only within `hack-local-variables-hook'.
 (defun japanese-TeX-reset-mode-name ()
   (cond ((eq major-mode 'japanese-latex-mode)
-        (setq major-mode 'latex-mode))
-       ((eq major-mode 'japanese-plain-tex-mode)
-        (setq major-mode 'plain-tex-mode)))
+         (setq major-mode 'latex-mode))
+        ((eq major-mode 'japanese-plain-tex-mode)
+         (setq major-mode 'plain-tex-mode)))
   (remove-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name t))
 
 ;; Make `hack-dir-local-variables' to regard `latex-mode' as parent
@@ -517,7 +517,7 @@ overwrite the value already set locally."
        'uptex)
       ((TeX-match-style "\\`[jt]s?\\(?:article\\|report\\|book\\)\\'")
        (if (LaTeX-match-class-option "\\`uplatex\\'")
-          'uptex 'ptex))
+           'uptex 'ptex))
       ((TeX-match-style "\\`j-\\(?:article\\|report\\|book\\)\\'")
        'jtex)
       (t japanese-TeX-engine-default)))))
@@ -526,13 +526,13 @@ overwrite the value already set locally."
 
 (defalias 'japanese-TeX-self-insert-command
   (cond ((fboundp 'can-n-egg-self-insert-command)
-        #'can-n-egg-self-insert-command)
-       ((fboundp 'egg-self-insert-command)
-        #'egg-self-insert-command)
-       ((fboundp 'canna-self-insert-command)
-        #'canna-self-insert-command)
-       (t
-        #'self-insert-command)))
+         #'can-n-egg-self-insert-command)
+        ((fboundp 'egg-self-insert-command)
+         #'egg-self-insert-command)
+        ((fboundp 'canna-self-insert-command)
+         #'canna-self-insert-command)
+        (t
+         #'self-insert-command)))
 
 (defun TeX-insert-punctuation ()
   "Insert point or comma, cleaning up preceding space."
@@ -545,47 +545,47 @@ overwrite the value already set locally."
 ;;; Error Messages
 
 (if japanese-TeX-error-messages
-(setq TeX-error-description-list
-  '(("\\(?:Package Preview Error\\|Preview\\):.*" .
-"`preview'$B$X(B`auctex'$B%*%W%7%g%s$rD>@\M?$($k$N$OHr$1$F$/$@$5$$!%(B
+    (setq TeX-error-description-list
+          '(("\\(?:Package Preview Error\\|Preview\\):.*" .
+             
"`preview'$B$X(B`auctex'$B%*%W%7%g%s$rD>@\M?$($k$N$OHr$1$F$/$@$5$$!%(B
 $B%W%l%S%e!<$N<B9T;~0J30$G$3$N%(%i!<$,=P$?>l9g!$M>$j$K$3$_$$$C$?$3$H$r(B
 $B$7$9$.$+!$$G$J$1$l$P(BAUCTeX$B$,$R$I$$<:GT$r$7$F$$$^$9!%(B")
 
-    ("Bad \\\\line or \\\\vector argument.*" .
-"$B@~$N79$-$r;XDj$9$k!$(B\\line$B$^$?$O(B\\vector$B$N:G=i$N0z?t$,IT@5$G$9!%(B")
+            ("Bad \\\\line or \\\\vector argument.*" .
+             
"$B@~$N79$-$r;XDj$9$k!$(B\\line$B$^$?$O(B\\vector$B$N:G=i$N0z?t$,IT@5$G$9!%(B")
 
-    ("Bad math environment delimiter.*" .
-"$B?t<0%b!<%ICf$G?t<0%b!<%I3+;O%3%^%s%I(B\\[$B$^$?$O(B\\($B!$$^$?$O!$?t<0%b!<%I30$G(B
+            ("Bad math environment delimiter.*" .
+             
"$B?t<0%b!<%ICf$G?t<0%b!<%I3+;O%3%^%s%I(B\\[$B$^$?$O(B\\($B!$$^$?$O!$?t<0%b!<%I30$G(B
 
$B?t<0%b!<%I=*N;%3%^%s%I(B\\]$B$^$?$O(B\\)$B$r(BTeX$B$,8+$D$1$^$7$?!%$3$NLdBj$O!$?t<0%b!<(B
 
$B%I$N%G%j%_%?$,%^%C%A$7$F$$$J$+$C$?$j!$3g8L$N%P%i%s%9$,$H$l$F$$$J$+$C$?$j$9(B
 $B$k$?$a$K@8$8$^$9!%(B")
 
-    ("Bad use of \\\\\\\\.*" .
-"\\\\$B%3%^%s%I$,%Q%i%0%i%UCf$K$"$j$^$7$?!%$3$N;H$$$+$?$OL50UL#$G$9!%(B
+            ("Bad use of \\\\\\\\.*" .
+             
"\\\\$B%3%^%s%I$,%Q%i%0%i%UCf$K$"$j$^$7$?!%$3$N;H$$$+$?$OL50UL#$G$9!%(B
 
$B$3$N%(%i!<%a%C%;!<%8$O(B\\\\$B$,(Bcentering$B4D6-$d(Bflushing$B4D6-$G;H$o$l$?(B
 
$B;~!$$"$k$$$O(Bcentering/flushing$B@k8@$,M-8z$J$H$3$m$G;H$o$l$?;~$K@8$8$^$9!%(B")
 
-    ("\\\\begin{[^ ]*} ended by \\\\end{[^ ]*}." .
-"$BBP1~$9$k(B\\begin$BL?Na$N$J$$(B\\end$BL?Na$r(BLaTeX$B$,8+$D$1$^$7$?!%(B\\end$BL?Na$N4D(B
+            ("\\\\begin{[^ ]*} ended by \\\\end{[^ ]*}." .
+             
"$BBP1~$9$k(B\\begin$BL?Na$N$J$$(B\\end$BL?Na$r(BLaTeX$B$,8+$D$1$^$7$?!%(B\\end$BL?Na$N4D(B
 
$B6-L>$r4V0c$($?$+!$M>J,$J(B\\begin$BL?Na$,$"$k$+!$(B\\end$BL?Na$r$o$9$l$?$+$N$$$:(B
 $B$l$+$G$7$g$&!%(B")
 
-    ("Can be used only in preamble." .
-"$B%W%j%"%s%V%k$G$7$+;H$($J$$(B\\documentclass$B!&(B\\nofiles$B!&(B\\includeonly
+            ("Can be used only in preamble." .
+             
"$B%W%j%"%s%V%k$G$7$+;H$($J$$(B\\documentclass$B!&(B\\nofiles$B!&(B\\includeonly
 
\\makeindex$B!&(B\\makeglossary$B$N$&$A$N$$$:$l$+$,(B\\begin{document}$B$h$j$b(B
 
$B8e$G;H$o$l$F$$$k$N$r(BLaTeX$B$,8!=P$7$^$7$?!%$3$N%(%i!<$O(B\\begin{document}
 $B$,M>J,$K$"$C$?;~$K$b@8$8$^$9!%(B")
 
-    ("Command name [^ ]* already used.*" .
-"$B$9$G$KDj5A$5$l$F$$$kL?NaL>$^$?$O4D6-L>$KBP$7$F(B\\newcommand$B!&(B
+            ("Command name [^ ]* already used.*" .
+             
"$B$9$G$KDj5A$5$l$F$$$kL?NaL>$^$?$O4D6-L>$KBP$7$F(B\\newcommand$B!&(B
 
\\newenvironment$B!&(B\\newlength$B!&(B\\newsavebox$B!&(B\\newtheorem$B$N$&$A$N$$$:(B
 
$B$l$+$r<B9T$7$h$&$H$7$F$$$^$9(B($B$"$k4D6-$rDj5A$9$k$HF1$8L>A0$NL?Na$,<+F0(B
 
$BE*$KDj5A$5$l$k$N$G!$4{$KB8:_$9$k4D6-$HF1L>$NL?Na$ODj5A$G$-$^$;$s(B)$B!%?7(B
 
$B$7$$L>A0$r9M$($k$+!$(B\\newcommand$B$+(B\\newenvironment$B$N>l9g$J$iBP1~$9$k(B
 \\renew...$BL?Na$r;H$o$J$1$l$P$J$j$^$;$s!%(B")
 
-    ("Counter too large." .
-"1. $BJ8;z$G=g=xIU$1$5$l$?$b$N!$$?$V$sHV9fIU$1$5$l$?%j%9%H4D6-$N%i%Y%k$,!$(B
+            ("Counter too large." .
+             "1. 
$BJ8;z$G=g=xIU$1$5$l$?$b$N!$$?$V$sHV9fIU$1$5$l$?%j%9%H4D6-$N%i%Y%k$,!$(B
 26$B$h$j$bBg$-$$HV9f$r<u$1<h$j$^$7$?!%Hs>o$KD9$$%j%9%H$r;H$C$F$$$k$+!$(B
 $B%+%&%s%?$r:F@_Dj$7$F$7$^$C$?$+$N$$$:$l$+$G$7$g$&!%(B
 
@@ -593,74 +593,74 @@ overwrite the value already set locally."
 $B;H$$@Z$C$F$7$^$$$^$7$?!%$*$=$i$/(B\\thanks$BL?Na$N;H$$$9$.$G$9!%(B")
 
 
-    ("Environment [^ ]* undefined." .
-"$BDj5A$5$l$F$$$J$$4D6-$KBP$9$k(B\\begin$BL?Na$r(BLaTeX$B$,8+$D$1$^$7$?!%$*$=$i$/(B
+            ("Environment [^ ]* undefined." .
+             
"$BDj5A$5$l$F$$$J$$4D6-$KBP$9$k(B\\begin$BL?Na$r(BLaTeX$B$,8+$D$1$^$7$?!%$*$=$i$/(B
 $B4D6-L>$r4V0c$($?$N$G$7$g$&!%(B")
 
-    ("Float(s) lost." .
-"parbox$B$N$J$+$K(Bfigure$B4D6-!&(Btable$B4D6-$^$?$O(B\\marginpar$BL?Na$,$"$j$^$7$?(B
+            ("Float(s) lost." .
+             
"parbox$B$N$J$+$K(Bfigure$B4D6-!&(Btable$B4D6-$^$?$O(B\\marginpar$BL?Na$,$"$j$^$7$?(B
 
\($B$J$*!$(Bparbox$B$O(Bminipage$B4D6-$+(B\\parbox$BL?Na$K$h$C$F:n$i$l$k$+!$5SCm$d?^(B
 
$B$J$I$KBP$7$F(BLaTeX$B$,@8@.$9$k$b$N$G$9(B\)$B!%$3$l$O=PNO;~$N%(%i!<$J$N$G!$860x(B
 
$B$H$J$C$F$$$k4D6-$"$k$$$OL?Na$O!$(BLaTeX$B$,LdBj$rH/8+$7$?>l=j$h$j$b$@$$$V(B
 $B$sA0$K$"$k2DG=@-$,$"$j$^$9!%=PNO$5$l$F$$$J$$?^!&I=!&K5Cm$J$I$,$$$/$D$+(B
 $B$"$k$+$b$7$l$^$;$s$,!$$=$l$i$,860x$G$"$k$H$O8B$j$^$;$s!%(B")
 
-    ("Illegal character in array arg." .
-"array$B4D6-$^$?$O(Btabular$B4D6-$N0z?t!$$^$?$O(B\\multicolumn$BL?Na$NBh(B2$B0z?t(B
+            ("Illegal character in array arg." .
+             
"array$B4D6-$^$?$O(Btabular$B4D6-$N0z?t!$$^$?$O(B\\multicolumn$BL?Na$NBh(B2$B0z?t(B
 $B$NCf$KIT@5$JJ8;z$,$"$j$^$7$?!%(B")
 
-    ("Missing \\\\begin{document}." .
-"\\begin{document}$BL?Na$h$jA0$K(BLaTeX$B$,=PNO$r9T$J$C$F$7$^$$$^$7$?!%(B
+            ("Missing \\\\begin{document}." .
+             
"\\begin{document}$BL?Na$h$jA0$K(BLaTeX$B$,=PNO$r9T$J$C$F$7$^$$$^$7$?!%(B
 
\\begin{document}$BL?Na$rK:$l$?$+!$%W%j%"%s%V%k$K2?$+4V0c$$$,$"$k$N$G$7$g$&!%(B
 $BBG$A4V0c$$$K$h$kJ8;z$d!$@k8@$N8m$j$K$h$k2DG=@-$b$"$j$^$9!%Nc$($P!$0z?t$r(B
 $B0O$`3g8L$rH4$+$7$?$H$+!$L?NaL>$N(B\\$B$rK:$l$?>l9g$J$I$G$9!%(B")
 
-    ("Missing p-arg in array arg.*" .
-"array$B4D6-!&(Btabular$B4D6-$N0z?t!$$"$k$$$O(B\\multicolumn$BL?Na$NBh(B2$B0z?t$NCf$K!$(B
+            ("Missing p-arg in array arg.*" .
+             
"array$B4D6-!&(Btabular$B4D6-$N0z?t!$$"$k$$$O(B\\multicolumn$BL?Na$NBh(B2$B0z?t$NCf$K!$(B
 $B3g8L$K0O$^$l$?I=8=$N$D$$$F$$$J$$(Bp$B$,$"$j$^$7$?!%(B")
 
-    ("Missing @-exp in array arg." .
-"array$B4D6-!&(Btabular$B4D6-$N0z?t!$$"$k$$$O(B\\multicolumn$BL?Na$NBh(B2$B0z?t$NCf$K!$(B
+            ("Missing @-exp in array arg." .
+             
"array$B4D6-!&(Btabular$B4D6-$N0z?t!$$"$k$$$O(B\\multicolumn$BL?Na$NBh(B2$B0z?t$NCf$K!$(B
 @$BI=8=$N$D$$$F$$$J$$(B@$B$,$"$j$^$7$?!%(B")
 
-    ("No such counter." .
-"\\setcounter$BL?Na$^$?$O(B\\addtocounter$BL?Na$G!$B8:_$7$J$$%+%&%s%?$,;XDj$5$l(B
+            ("No such counter." .
+             
"\\setcounter$BL?Na$^$?$O(B\\addtocounter$BL?Na$G!$B8:_$7$J$$%+%&%s%?$,;XDj$5$l(B
 
$B$^$7$?!%$*$=$i$/$?$@$N%?%$%W%_%9$G$7$g$&!%$?$@$7!$%(%i!<$,(Baux$B%U%!%$%k$NCf(B
 
$B$G@8$8$?>l9g$O!$(B\\newcounter$BL?Na$r%W%j%"%s%V%k$N30$G;H$C$?$N$@$H;W$o$l$^$9!%(B")
 
-    ("Not in outer par mode." .
-"figure$B4D6-!&(Btable$B4D6-$"$k$$$O(B\\marginpar$BL?Na$,?t<0%b!<%I$^$?$O(Bparbox$B$NCf(B
+            ("Not in outer par mode." .
+             
"figure$B4D6-!&(Btable$B4D6-$"$k$$$O(B\\marginpar$BL?Na$,?t<0%b!<%I$^$?$O(Bparbox$B$NCf(B
 $B$G;H$o$l$^$7$?!%(B")
 
-    ("\\\\pushtabs and \\\\poptabs don't match." .
-"\\pushtabs$B$HBP1~$7$J$$(B\\poptabs$B$,$_$D$+$C$?$+!$$^$?$O!$BP1~$9$k(B\\poptabs
+            ("\\\\pushtabs and \\\\poptabs don't match." .
+             
"\\pushtabs$B$HBP1~$7$J$$(B\\poptabs$B$,$_$D$+$C$?$+!$$^$?$O!$BP1~$9$k(B\\poptabs
 
$B$r$b$?$J$$(B\\pushtabs$B$,$"$k$N$K(B\\end{tabbing}$B$,8=$l$F$7$^$$$^$7$?!%(B")
 
-    ("Something's wrong--perhaps a missing \\\\item." .
-"$B%j%9%H4D6-$NCf$K(B\\item$BL?Na$,$J$$$N$,:G$b$"$j$=$&$J%1!<%9$G$9!%(B
+            ("Something's wrong--perhaps a missing \\\\item." .
+             
"$B%j%9%H4D6-$NCf$K(B\\item$BL?Na$,$J$$$N$,:G$b$"$j$=$&$J%1!<%9$G$9!%(B
 thebibliography$B4D6-$G0z?t$rK:$l$?>l9g$K$b@8$8$^$9!%(B")
 
-    ("Tab overflow." .
-"\\=$B$,!$(BLaTeX$B$G5v$5$l$k%?%V%9%H%C%W$N:GBg?t$rD6$($F$$$^$9!%(B")
+            ("Tab overflow." .
+             
"\\=$B$,!$(BLaTeX$B$G5v$5$l$k%?%V%9%H%C%W$N:GBg?t$rD6$($F$$$^$9!%(B")
 
-    ("There's no line here to end." .
-"\\newline$BL?Na$^$?$O(B\\\\$BL?Na$,%Q%i%0%i%U4V$K$"$j$^$9!%$3$N;H$$$+$?$O(B
+            ("There's no line here to end." .
+             
"\\newline$BL?Na$^$?$O(B\\\\$BL?Na$,%Q%i%0%i%U4V$K$"$j$^$9!%$3$N;H$$$+$?$O(B
 
$BL50UL#$G$9!%$b$76u9T$r$"$1$?$$$N$G$7$?$i!$(B\\vspace$B$r;H$C$F$/$@$5$$!%(B")
 
-    ("This may be a LaTeX bug." .
-"$B$^$C$?$/$o$1$,$o$+$i$J$/$J$C$F$7$^$$$^$7$?!%$?$V$s$3$l0JA0$K8!=P$5$l$?(B
+            ("This may be a LaTeX bug." .
+             
"$B$^$C$?$/$o$1$,$o$+$i$J$/$J$C$F$7$^$$$^$7$?!%$?$V$s$3$l0JA0$K8!=P$5$l$?(B
 
$B%(%i!<$N$;$$$@$H;W$o$l$^$9!%$7$+$7!$(BLaTeX$B<+BN$N%P%0$G$"$k2DG=@-$b$"$j$^$9!%(B
 $B$b$7$3$N%(%i!<$,F~NO%U%!%$%k$KBP$9$k:G=i$N%(%i!<$G$"$j!$2?$b4V0c$$$,8+$D(B
 $B$+$i$J$$>l9g$O!$$=$N%U%!%$%k$rJ]B8$7$F!$%m!<%+%k%,%$%I$K=q$+$l$F$$$k@UG$(B
 $B<T$KO"Mm$7$F$/$@$5$$!%(B")
 
-    ("Too deeply nested." .
-"$B%j%9%H4D6-$NF~$l;R$,?<$9$.$^$9!%2?CJ3,$NF~$l;R$,5v$5$l$k$+$O;H$C$F$$$k(B
+            ("Too deeply nested." .
+             
"$B%j%9%H4D6-$NF~$l;R$,?<$9$.$^$9!%2?CJ3,$NF~$l;R$,5v$5$l$k$+$O;H$C$F$$$k(B
 
$B%3%s%T%e!<%?$K0MB8$7$^$9$,!$>/$J$/$H$b(B4$BCJ3,$^$G$O5v$5$l$F$$$^$9(B($BIaDL$O(B
 $B$=$l$G==J,$G$7$g$&(B)$B!%(B")
 
-    ("Too many unprocessed floats." .
-"$B$3$N%(%i!<$O(B1$B%Z!<%8Cf$N(B\\marginpar$BL?Na$,B?$9$.$k$?$a$K@8$8$k>l9g$b$"(B
+            ("Too many unprocessed floats." .
+             
"$B$3$N%(%i!<$O(B1$B%Z!<%8Cf$N(B\\marginpar$BL?Na$,B?$9$.$k$?$a$K@8$8$k>l9g$b$"(B
 $B$j$^$9$,!$$b$C$H$"$j$=$&$J$N$O!$8B3&$rD6$($F?^$dI=$rJ]B8$7$h$&$H$7$?>l(B
 
$B9g$G$9!%D9$$J8=q$rAHHG$7$F$$$/$H$-!$(BLaTeX$B$O?^$dI=$r8D!9$KJ]B8$7!$%Z!<(B
 $B%8$NJ,3d$r9T$J$&;~$K$=$l$i$rA^F~$7$^$9!%$3$N%(%i!<$O!$%Z!<%8$X$NJ,3d$,(B
@@ -673,44 +673,44 @@ 
thebibliography$B4D6-$G0z?t$rK:$l$?>l9g$K$b@8$8$^$9!%(B")
 $B%s0z?t$G;XDj$5$l$?0LCV$K<}$^$i$J$$$h$&$J?^$dI=$G$"$k2DG=@-$,$"$j$^$9!%$3(B
 $B$l$O!$0z?t$K(Bp$B%*%W%7%g%s$,;XDj$5$l$F$$$J$$$H5/$-$d$9$/$J$j$^$9!%(B")
 
-    ("Undefined tab position." .
-"\\>$B!&(B\\+$B!&(B\\-$B$^$?$O(B\\<$BL?Na$G!$B8:_$7$J$$%?%V0LCV!$$9$J$o$A(B\\=$BL?Na$GDj(B
+            ("Undefined tab position." .
+             
"\\>$B!&(B\\+$B!&(B\\-$B$^$?$O(B\\<$BL?Na$G!$B8:_$7$J$$%?%V0LCV!$$9$J$o$A(B\\=$BL?Na$GDj(B
 $B5A$5$l$F$$$J$$%?%V0LCV$r;XDj$7$h$&$H$7$F$$$^$9!%(B")
 
-    ("\\\\< in mid line." .
-"\\<$BL?Na$,(Btabbing$B4D6-$N9T$NESCf$K8=$l$^$7$?!%$3$NL?Na$O9T$N@hF,$K$J$1$l$P(B
+            ("\\\\< in mid line." .
+             
"\\<$BL?Na$,(Btabbing$B4D6-$N9T$NESCf$K8=$l$^$7$?!%$3$NL?Na$O9T$N@hF,$K$J$1$l$P(B
 $B$J$j$^$;$s!%(B")
 
-    ("Double subscript." .
-"$B?t<0Cf$N(B1$B$D$NNs$K(B2$B$D$N2<IU$-J8;z$,$D$$$F$$$^$9!%Nc$($P(Bx_{2}_{3}$B$N$h$&$K!%(B
+            ("Double subscript." .
+             
"$B?t<0Cf$N(B1$B$D$NNs$K(B2$B$D$N2<IU$-J8;z$,$D$$$F$$$^$9!%Nc$($P(Bx_{2}_{3}$B$N$h$&$K!%(B
 $B$3$N$h$&$JI=8=$OL50UL#$G$9!%(B")
 
-    ("Double superscript." .
-"$B?t<0Cf$N(B1$B$D$NNs$K(B2$B$D$N>eIU$-J8;z$,$D$$$F$$$^$9!%Nc$($P(Bx^{2}^{3}$B$N$h$&$K!%(B
+            ("Double superscript." .
+             
"$B?t<0Cf$N(B1$B$D$NNs$K(B2$B$D$N>eIU$-J8;z$,$D$$$F$$$^$9!%Nc$($P(Bx^{2}^{3}$B$N$h$&$K!%(B
 $B$3$N$h$&$JI=8=$OL50UL#$G$9!%(B")
 
-    ("Extra alignment tab has been changed to \\\\cr." .
-"array$B4D6-$^$?$O(Btabular$B4D6-$N(B1$BNsCf$K$"$k9`L\$,B?$9$.$^$9!%8@$$49$($k$H!$(B
+            ("Extra alignment tab has been changed to \\\\cr." .
+             
"array$B4D6-$^$?$O(Btabular$B4D6-$N(B1$BNsCf$K$"$k9`L\$,B?$9$.$^$9!%8@$$49$($k$H!$(B
 
$BNs$N=*$o$j$^$G$K$"$k(B&$B$N?t$,B?$9$.$^$9!%$*$=$i$/A0$NNs$N:G8e$K(B\\\\$B$r$D$1(B
 $B$k$N$rK:$l$?$N$G$7$g$&!%(B")
 
-    ("Extra \\}, or forgotten \\$." .
-"$B3g8L$^$?$O?t<0%b!<%I$N%G%j%_%?$,@5$7$/BP1~$7$F$$$^$;$s!%$*$=$i$/(B{$B!&(B\\[$B!&(B
+            ("Extra \\}, or forgotten \\$." .
+             
"$B3g8L$^$?$O?t<0%b!<%I$N%G%j%_%?$,@5$7$/BP1~$7$F$$$^$;$s!%$*$=$i$/(B{$B!&(B\\[$B!&(B
 \\($B$"$k$$$O(B$$B$N$&$A$N$$$:$l$+$r=q$-K:$l$?$N$G$7$g$&!%(B")
 
-    ("Font [^ ]* not loaded: Not enough room left." .
-"$B$3$NJ8=q$O8B3&$h$j$bB?$/$N%U%)%s%H$r;H$C$F$$$^$9!%$b$7J8=q$NItJ,$4$H$K(B
+            ("Font [^ ]* not loaded: Not enough room left." .
+             
"$B$3$NJ8=q$O8B3&$h$j$bB?$/$N%U%)%s%H$r;H$C$F$$$^$9!%$b$7J8=q$NItJ,$4$H$K(B
 
$BJL!9$N%U%)%s%H$,;H$o$l$F$$$k$N$J$i!$J,3d$7$F=hM}$9$l$PLdBj$O2r7h$5$l$^$9!%(B")
 
-    ("I can't find file `.*'." .
-"$BI,MW$J%U%!%$%k$,8+$D$+$j$^$;$s$G$7$?!%$b$78+$D$+$i$J$$%U%!%$%k$N3HD%;R(B
+            ("I can't find file `.*'." .
+             
"$BI,MW$J%U%!%$%k$,8+$D$+$j$^$;$s$G$7$?!%$b$78+$D$+$i$J$$%U%!%$%k$N3HD%;R(B
 $B$,(Btex$B$N>l9g!$$"$J$?$,;XDj$7$?%U%!%$%k!$$9$J$o$A%a%$%s%U%!%$%k$^$?$O(B
 
\\input$BL?Na!&(B\\include$BL?Na$GA^F~$5$l$k%U%!%$%k$,8+$D$+$i$J$$$N$G$9!%(B
 
$B3HD%;R$,(Bsty$B$G$"$l$P!$B8:_$7$J$$J8=q%9%?%$%k$^$?$O%9%?%$%k%*%W%7%g%s$r(B
 $B;XDj$7$h$&$H$7$F$$$^$9!%(B")
 
-    ("Illegal parameter number in definition of .*" .
-"$B$3$l$O$*$=$i$/!$(B\\newcommand$B!&(B\\renewcommand$B!&(B\\newenvironment$B$^$?$O(B
+            ("Illegal parameter number in definition of .*" .
+             
"$B$3$l$O$*$=$i$/!$(B\\newcommand$B!&(B\\renewcommand$B!&(B\\newenvironment$B$^$?$O(B
 
\\renewenvironment$BL?Na$N$J$+$G(B#$B$,@5$7$/;H$o$l$J$+$C$?$?$a$K@8$8$?%(%i!<(B
 
$B$G$9!%(B\\#$BL?Na$H$7$F;H$o$l$k>l9g$r=|$1$P!$(B#$B$H$$$&J8;z$O!$Nc$($P(B2$BHVL\$N(B
 
$B0z?t$r;XDj$9$k(B#2$B$N$h$&$K!$0z?t%Q%i%a!<%?$H$7$F$7$+;H$($^$;$s!%$^$?!$(B
@@ -718,8 +718,8 @@ thebibliography$B4D6-$G0z?t$rK:$l$?>l9g$K$b@8$8$^$9!%(B")
 
$B$d!$(B\\newenvironment$BL?Na!&(B\\renewenvironment$BL?Na$G(B#2$B$N$h$&$J%Q%i%a!<%?(B
 $B$,:G8e$N0z?t$NCf$G;H$o$l$F$$$k>l9g$K$b@8$8$^$9!%(B")
 
-    ("Illegal unit of measure ([^ ]* inserted)." .
-"$B$b$7(B
+            ("Illegal unit of measure ([^ ]* inserted)." .
+             "$B$b$7(B
       ! Missing number, treated as zero.
 $B$H$$$&%(%i!<$,5/$-$?D>8e$G$"$l$P!$$3$N%(%i!<$N860x$b$=$l$HF1$8$G$9!%(B
 
$B$=$&$G$J$$>l9g$O!$(BLaTeX$B$,0z?t$H$7$F(Blength$B$r4|BT$7$F$$$k$N$K(Bnumber$B$,(B
@@ -727,28 +727,28 @@ 
thebibliography$B4D6-$G0z?t$rK:$l$?>l9g$K$b@8$8$^$9!%(B")
 
$BI=$o$9(B0in$B$N$h$&$JI=8=$NBe$o$j$K(B0$B$H$+$$$F$7$^$&$3$H$K$"$j$^$9!%$?$@$7!$(B
 $BL?Na$N0z?t$r=q$-K:$l$?>l9g$K$b$3$N%(%i!<$,@8$8$k$3$H$,$"$j$^$9!%(B")
 
-    ("Misplaced alignment tab character \\&." .
-"array$B$^$?$O(Btabular$B4D6-$G$N9`L\6h@Z$j$K$N$_;H$o$l$k$Y$-J8;z(B&$B$,IaDL$NJ8(B
+            ("Misplaced alignment tab character \\&." .
+             
"array$B$^$?$O(Btabular$B4D6-$G$N9`L\6h@Z$j$K$N$_;H$o$l$k$Y$-J8;z(B&$B$,IaDL$NJ8(B
 $B$NCf$K$"$j$^$7$?!%$?$V$s(B\\&$B$HF~NO$7$?$+$C$?$N$G$7$g$&!%(B")
 
-    ("Missing control sequence inserted." .
-"$B$3$N%(%i!<$O!$$*$=$i$/L?NaL>$G$J$$$b$N$r(B\\newcommand$B!&(B\\renewcommand$B!&(B
+            ("Missing control sequence inserted." .
+             
"$B$3$N%(%i!<$O!$$*$=$i$/L?NaL>$G$J$$$b$N$r(B\\newcommand$B!&(B\\renewcommand$B!&(B
 
\\newlength$B$^$?$O(B\\newsavebox$B$NBh(B1$B0z?t$H$7$F;H$C$?$?$a$K@8$8$?$N$G$7$g$&!%(B")
 
-    ("Missing number, treated as zero." .
-"$B$3$N%(%i!<$O$?$$$F$$!$0z?t$H$7$F(Bnumber$B$^$?$O(Blength$B$rI,MW$H$7$F$$$kL?Na$K(B
+            ("Missing number, treated as zero." .
+             
"$B$3$N%(%i!<$O$?$$$F$$!$0z?t$H$7$F(Bnumber$B$^$?$O(Blength$B$rI,MW$H$7$F$$$kL?Na$K(B
 
$BBP$7$F0z?t$,M?$($i$l$J$+$C$?$?$a$K@8$8$^$9!%0z?t$r=q$-K:$l$?$N$+!$%F%-%9%H(B
 
$B$NCf$NBg3g8L(B([])$B$,%*%W%7%g%s0z?t$N;XDj$H4V0c$($i$l$F$7$^$C$?$+$N$I$A$i$+$G(B
 
$B$7$g$&!%$^$?!$?t$r@8@.$9$k(B\\value$B$N$h$&$JL?Na$d(Blength$BL?Na$NA0$K(B\\protect$B$r(B
 $BCV$$$?>l9g$K$b$3$N%(%i!<$O@8$8$^$9!%(B")
 
-    ("Missing [{}] inserted." .
-"TeX$B$O4{$K$o$1$,$o$+$i$J$/$J$C$F$$$^$9!%%(%i!<%a%C%;!<%8$K$h$C$F<($5$l$F(B
+            ("Missing [{}] inserted." .
+             
"TeX$B$O4{$K$o$1$,$o$+$i$J$/$J$C$F$$$^$9!%%(%i!<%a%C%;!<%8$K$h$C$F<($5$l$F(B
 $B$$$k>l=j$O$?$V$sF~NO$K4V0c$$$,$"$C$?$H$3$m$h$j$b8e$m$K$J$C$F$7$^$C$F$$$k(B
 $B$G$7$g$&!%(B")
 
-    ("Missing \\$ inserted." .
-"$B$*$=$i$/!$?t<0%b!<%ICf$G$7$+;H$($J$$L?Na$r(BTeX$B$,?t<0%b!<%I30$G8!=P$7$?(B
+            ("Missing \\$ inserted." .
+             
"$B$*$=$i$/!$?t<0%b!<%ICf$G$7$+;H$($J$$L?Na$r(BTeX$B$,?t<0%b!<%I30$G8!=P$7$?(B
 $B$N$@$H;W$o$l$^$9!%FC$K5-=R$5$l$F$$$J$$8B$j!$(BLaTeX 
Book(Lamport$BCx(B,$BLu=q(B
 
$B$O%"%9%-!<=PHG(B)$B$N(B3.3$B@a$K$"$kE:;z!&J,?t!&?t3X5-9f$J$I$N%3%^%s%I$O$9$Y$F(B
 $B?t<0%b!<%I$G$7$+;H$($J$$$N$@$H$$$&$3$H$KCm0U$7$F$/$@$5$$!%$?$H$(L?Na$,(B
@@ -756,28 +756,28 @@ 
thebibliography$B4D6-$G0z?t$rK:$l$?>l9g$K$b@8$8$^$9!%(B")
 
$B;~E@$G$O!$(BTeX$B$O$^$@?t<0%b!<%I$KF~$C$F$$$J$$$N$G$9!%$^$?!$$3$N%(%i!<$O!$(B
 $B?t<0%b!<%ICf$G(BTeX$B$,6u9T$r8!=P$7$?>l9g$K$b@8$8$^$9!%(B")
 
-    ("Not a letter." .
-"\\hyphenation$BL?Na$N0z?t$NCf$K$J$K$+@5$7$/$J$$$b$N$,$"$j$^$9!%(B")
+            ("Not a letter." .
+             
"\\hyphenation$BL?Na$N0z?t$NCf$K$J$K$+@5$7$/$J$$$b$N$,$"$j$^$9!%(B")
 
-    ("Paragraph ended before [^ ]* was complete." .
-"$BL?Na$N0z?t$NCf$KIT@5$J6u9T$,F~$C$F$7$^$C$F$$$^$9!%$*$=$i$/0z?t$N=*$o$j(B
+            ("Paragraph ended before [^ ]* was complete." .
+             
"$BL?Na$N0z?t$NCf$KIT@5$J6u9T$,F~$C$F$7$^$C$F$$$^$9!%$*$=$i$/0z?t$N=*$o$j(B
 $B$KJD$83g8L$r$D$1$k$N$rK:$l$?$N$G$7$g$&!%(B")
 
-    ("\\\\[^ ]*font [^ ]* is undefined .*" .
-"$B$3$N%(%i!<$O$"$^$j0lHLE*$G$J$$%U%)%s%H$,?t<0%b!<%I$G;H$o$l$?;~$K@8$8(B
+            ("\\\\[^ ]*font [^ ]* is undefined .*" .
+             
"$B$3$N%(%i!<$O$"$^$j0lHLE*$G$J$$%U%)%s%H$,?t<0%b!<%I$G;H$o$l$?;~$K@8$8(B
 
$B$^$9!%Nc$($P!$5SCm$NCf$N?t<0$G(B\\sc$BL?Na$,;H$o$l$k$H!$(Bfootnotesize$B$N(B
 small 
caps$B%U%)%s%H$,8F$S$@$5$l$k$3$H$K$J$j$^$9!%$3$NLdBj$O(B\\load$BL?Na$r(B
 $B;H$($P2r7h$G$-$^$9!%(B")
 
-    ("Font .* not found." .
-"$BL$CN$N(Bfamily/series/shape/size$B$NAH$_9g$o$;$N%U%)%s%H$,;XDj$5$l$^$7$?!%(B
+            ("Font .* not found." .
+             
"$BL$CN$N(Bfamily/series/shape/size$B$NAH$_9g$o$;$N%U%)%s%H$,;XDj$5$l$^$7$?!%(B
 $B$3$N%(%i!<$,5/$-$k%1!<%9$O(B2$B$D9M$($i$l$^$9!%(B
    1) \\size$B%^%/%m$G;H$($J$$%5%$%:$rA*Br$7$h$&$H$7$?!%(B
    2) $B$=$&$G$J$1$l$P!$4IM}<T$N$H$3$m$K9T$C$F!$%U%)%s%HA*Br%F!<%V%k$,(B
       $BIe$C$F$$$k$HJ86g$r$D$1$F$d$j$^$7$g$&(B!")
 
-    ("TeX capacity exceeded, sorry .*" .
-"TeX$B$,%a%b%j$r;H$$$-$C$F$7$^$$!$<B9T$rCfCG$7$^$7$?!%$7$+$7!$92$F$J$$$G(B
+            ("TeX capacity exceeded, sorry .*" .
+             
"TeX$B$,%a%b%j$r;H$$$-$C$F$7$^$$!$<B9T$rCfCG$7$^$7$?!%$7$+$7!$92$F$J$$$G(B
 
$B$/$@$5$$!%$3$N%(%i!<$,@8$8$?860x$O!$$?$V$s!$(BTeX$B$K$"$J$?$NJ8=q$r=hM}$G(B
 
$B$-$k$@$1$NG=NO$,$J$$$+$i$G$O$"$j$^$;$s!%(BTeX$B$K%a%b%j$r;H$$$-$i$;$?860x(B
 $B$O!$$*$=$i$/F~NO$7$?%U%!%$%k$NA0$NJ}$G@8$8$?%(%i!<$G$9!%$"$J$?$,K\Ev$K(B
@@ -817,7 +817,7 @@ input stack size
 $B$3$N%(%i!<$O$*$=$i$/L?NaDj5ACf$N8m$j$K$h$k$b$N$G$9!%Nc$($P!$<!$NL?Na$O(B
 $B:F5"E*Dj5A$H$J$C$F$*$j!$<+J,<+?H$r;H$C$F(B\\gnu$B$rDj5A$7$F$$$^$9!%(B
 
-         \\newcommand{\\gnu}{a \\gnu} % $B$3$l$O$@$a(B
+          \\newcommand{\\gnu}{a \\gnu} % $B$3$l$O$@$a(B
 
 
$B$3$N(B\\gnu$BL?Na$r8+$D$1$k$H(BTeX$B$O(B\\gnu$B$,2?$r$&$_$@$9$N$+$r7hDj$7$h$&$H$7(B
 $B$F$=$NKvHx$r$$$D$^$G$bDI$$$D$E$1!$$d$,$F(B``input 
stack''$B$r;H$$$-$C$F$7(B
@@ -863,53 +863,53 @@ save size
 
$B$=$N$J$+$K(B\\footnotesize$B@k8@$,$"$j!$$=$N@k8@$NM-8zHO0O$K(B\\multiput$BL?Na(B
 $B$,$"$C$F!$$=$N0z?t$K(B... $B$H$$$&$h$&$J>l9g$G$9!%(B")
 
-    ("Text line contains an invalid character." .
-"$BF~NOCf$KIT@5$JJ8;z$,4^$^$l$F$$$^$9!%%U%!%$%k:n@.$N8m$j$K$h$C$F%F%-%9%H(B
+            ("Text line contains an invalid character." .
+             
"$BF~NOCf$KIT@5$JJ8;z$,4^$^$l$F$$$^$9!%%U%!%$%k:n@.$N8m$j$K$h$C$F%F%-%9%H(B
 $B%(%G%#%?$,$3$NJ8;z$rA^F~$7$F$7$^$C$?$N$G$7$g$&!%<B:]$K2?$,5/$-$?$N$+$O(B
 $B%(%G%#%?$K$h$j$^$9!%F~NO%U%!%$%k$rD4$Y$F$_$F!$;XE&$5$l$?J8;z$,8+$D$+$i(B
 $B$J$$>l9g$K$O%m!<%+%k%,%$%I$r8+$F$/$@$5$$!%(B")
 
-    ("Undefined control sequence."   .
-"TeX$B$,L$Dj5A$NL?NaL>$rH/8+$7$^$7$?!%$*$=$i$/F~NO$N8m$j$G$7$g$&!%$b$7$3(B
+            ("Undefined control sequence."   .
+             
"TeX$B$,L$Dj5A$NL?NaL>$rH/8+$7$^$7$?!%$*$=$i$/F~NO$N8m$j$G$7$g$&!%$b$7$3(B
 
$B$N%(%i!<$,(BLaTeX$BL?Na$N=hM}Cf$K@8$8$?>l9g$O!$$=$NL?Na$O4V0c$C$?0LCV$KCV$+(B
 
$B$l$F$$$^$9!%Nc$($P!$%j%9%H4D6-$NCf$G$J$$$N$K(B\\item$BL?Na$,;H$o$l$?>l9g$J$I(B
 
$B$G$9!%$^$?!$(B\\documentclass$BL?Na$,$J$$>l9g$K$b$3$N%(%i!<$,@8$8$^$9!%(B")
 
-    ("Use of [^ ]* doesn't match its definition." .
-"$B$*$=$i$/IA2h$N$?$a$NL?Na$@$H;W$o$l$^$9$,!$0z?t$N;H$$$+$?$,4V0c$C$F$$(B
+            ("Use of [^ ]* doesn't match its definition." .
+             
"$B$*$=$i$/IA2h$N$?$a$NL?Na$@$H;W$o$l$^$9$,!$0z?t$N;H$$$+$?$,4V0c$C$F$$(B
 
$B$^$9!%4V0c$C$F$$$k$N$,(B\\@array$BL?Na$N>l9g$O!$(Barray$B4D6-$+(Btabular$B4D6-$G$N(B
 
@$BI=8=$N0z?t$K$J$K$+8m$j$,$"$k$N$G$7$g$&!%(Bfragile$B$JL?Na$,(B\\protect$B$5$l$F(B
 $B$$$J$$$N$+$b$7$l$^$;$s!%(B")
 
-    ("You can't use `macro parameter character \\#' in [^ ]* mode." .
-"$BFC<lJ8;z(B#$B$,IaDL$N%F%-%9%H$NCf$K8=$l$^$7$?!%$*$=$i$/(B\\#$B$H=q$-$?$+$C$?(B
+            ("You can't use `macro parameter character \\#' in [^ ]* mode." .
+             
"$BFC<lJ8;z(B#$B$,IaDL$N%F%-%9%H$NCf$K8=$l$^$7$?!%$*$=$i$/(B\\#$B$H=q$-$?$+$C$?(B
 $B$N$G$7$g$&!%(B")
 
-    ("Overfull \\\\hbox .*" .
-"$B9TJ,3d$N$?$a$NE,@Z$J>l=j$,8+$D$+$i$J$+$C$?$N$G!$(B1$B9T$K<}$^$k$Y$-J,NL0J>e(B
+            ("Overfull \\\\hbox .*" .
+             
"$B9TJ,3d$N$?$a$NE,@Z$J>l=j$,8+$D$+$i$J$+$C$?$N$G!$(B1$B9T$K<}$^$k$Y$-J,NL0J>e(B
 $B$N=PNO$,9T$J$o$l$F$7$^$$$^$7$?!%(B")
 
-    ("Overfull \\\\vbox .*" .
-"$B%Z!<%8J,3d$N$?$a$NE,@Z$J>l=j$,8+$D$+$i$J$+$C$?$N$G!$(B1$B%Z!<%8$K<}$^$k$Y$-(B
+            ("Overfull \\\\vbox .*" .
+             
"$B%Z!<%8J,3d$N$?$a$NE,@Z$J>l=j$,8+$D$+$i$J$+$C$?$N$G!$(B1$B%Z!<%8$K<}$^$k$Y$-(B
 $BJ,NL0J>e$N=PNO$,9T$J$o$l$F$7$^$$$^$7$?!%(B")
 
-    ("Underfull \\\\hbox .*" .
-"$BM>J,$J?bD>%9%Z!<%9$,$J$$$+$I$&$+=PNO$r3N$+$a$F$/$@$5$$!%$b$7$"$l$P!$$=(B
+            ("Underfull \\\\hbox .*" .
+             
"$BM>J,$J?bD>%9%Z!<%9$,$J$$$+$I$&$+=PNO$r3N$+$a$F$/$@$5$$!%$b$7$"$l$P!$$=(B
 
$B$l$O(B\\\\$BL?Na$^$?$O(B\\newline$BL?Na$K4X78$9$kLdBj$N$?$a$K@8$8$?$b$N$G$9!%Nc(B
 
$B$($P(B2$B$D$N(B\\\\$BL?Na$,B3$$$F$$$k>l9g$J$I$G$9!%$3$N7Y9p$O(Bsloppypar$B4D6-$d(B
 
\\sloppy$B@k8@$N;HMQ!$$"$k$$$O(B\\linebreak$BL?Na$NA^F~$J$I$K$h$k>l9g$b$"$j$^$9!%(B")
 
-    ("Underfull \\\\vbox .*" .
-"$B%Z!<%8$rJ,3d$9$k$?$a$NE,@Z$J>l=j$,8+$D$1$i$l$:!$==J,$J%F%-%9%H$N$J$$(B
+            ("Underfull \\\\vbox .*" .
+             
"$B%Z!<%8$rJ,3d$9$k$?$a$NE,@Z$J>l=j$,8+$D$1$i$l$:!$==J,$J%F%-%9%H$N$J$$(B
 $B%Z!<%8$,$G$-$F$7$^$$$^$7$?!%(B")
 
-;; New list items should be placed here
-;;
-;; ("err-regexp" . "context")
-;;
-;; the err-regexp item should match anything
+            ;; New list items should be placed here
+            ;;
+            ;; ("err-regexp" . "context")
+            ;;
+            ;; the err-regexp item should match anything
 
-    (".*" . "$B$4$a$s$J$5$$!%3:Ev$9$k%X%k%W%a%C%;!<%8$,$"$j$^$;$s!%(B"))))
+            (".*" . 
"$B$4$a$s$J$5$$!%3:Ev$9$k%X%k%W%a%C%;!<%8$,$"$j$^$;$s!%(B"))))
 
 (provide 'tex-jp)
 
diff --git a/tex-mik.el b/tex-mik.el
index a37cd96..fdf72a1 100644
--- a/tex-mik.el
+++ b/tex-mik.el
@@ -41,7 +41,7 @@
 
 (unless (get 'TeX-print-command 'saved-value)
   (setq TeX-print-command
-       "start \"\" %f"))
+        "start \"\" %f"))
 
 (unless (get 'TeX-source-specials-view-position-flags 'saved-value)
   (setq TeX-source-specials-view-position-flags "-s %n%b"))
diff --git a/tex-site.el.in b/tex-site.el.in
index e088fe0..c0dd8c8 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -39,8 +39,8 @@
 ;;; Code:
 
 (when (or (< emacs-major-version 24)
-         (and (= emacs-major-version 24)
-              (< emacs-minor-version 3)))
+          (and (= emacs-major-version 24)
+               (< emacs-minor-version 3)))
   (error "AUCTeX requires Emacs 24.3 or later"))
 
 (unless (or (fboundp 'TeX-modes-set)     ;Avoid inf-looping.
@@ -94,25 +94,25 @@ shared by all users of a site."
 (defalias 'TeX-load-hack 'ignore)
 
 (add-hook 'tex-site-unload-hook
-         (lambda ()
-           (if (fboundp 'advice-add)
-               (TeX-modes-set 'TeX-modes nil)
-             (let ((list after-load-alist))
-               (while list
-                 ;; Adapted copy of the definition of `assq-delete-all'
-                 ;; from Emacs 21 as substitute for
-                 ;; `(assq-delete-all'TeX-modes-set (car list))' which
-                 ;; fails on non-list elements in Emacs 21.
-                 (let* ((alist (car list))
-                        (tail alist)
-                        (key 'TeX-modes-set))
-                   (while tail
-                     (if (and (consp (car tail))
-                              (eq (car (car tail)) key))
-                         (setq alist (delq (car tail) alist)))
-                     (setq tail (cdr tail))))
-                 (setq list (cdr list)))))
-           (setq load-path (delq TeX-lisp-directory load-path))))
+          (lambda ()
+            (if (fboundp 'advice-add)
+                (TeX-modes-set 'TeX-modes nil)
+              (let ((list after-load-alist))
+                (while list
+                  ;; Adapted copy of the definition of `assq-delete-all'
+                  ;; from Emacs 21 as substitute for
+                  ;; `(assq-delete-all'TeX-modes-set (car list))' which
+                  ;; fails on non-list elements in Emacs 21.
+                  (let* ((alist (car list))
+                         (tail alist)
+                         (key 'TeX-modes-set))
+                    (while tail
+                      (if (and (consp (car tail))
+                               (eq (car (car tail)) key))
+                          (setq alist (delq (car tail) alist)))
+                      (setq tail (cdr tail))))
+                  (setq list (cdr list)))))
+            (setq load-path (delq TeX-lisp-directory load-path))))
 
 (defun TeX-modes-set (var value &optional update)
   "Set VAR (which should be `TeX-modes') to VALUE.
@@ -146,17 +146,17 @@ definition."
 This variable can't be set normally; use customize for that, or
 set it with `TeX-modes-set'."
   :type (cons 'set
-             (mapcar (lambda(x) (list 'const (car x))) TeX-mode-alist))
+              (mapcar (lambda(x) (list 'const (car x))) TeX-mode-alist))
   :set #'TeX-modes-set
   :group 'AUCTeX
   :initialize(lambda (var value)
-              (custom-initialize-reset var value)
-              (unless (fboundp 'advice-add)
-                (let ((list TeX-mode-alist))
-                  (while list
-                    (eval-after-load (cdar list)
-                      `(TeX-modes-set ',var ,var t))
-                    (setq list (cdr list)))))) )
+               (custom-initialize-reset var value)
+               (unless (fboundp 'advice-add)
+                 (let ((list TeX-mode-alist))
+                   (while list
+                     (eval-after-load (cdar list)
+                       `(TeX-modes-set ',var ,var t))
+                     (setq list (cdr list)))))) )
 
 (defconst AUCTeX-version "@AUCTEXVERSION@"
     "AUCTeX version.
diff --git a/tex-style.el b/tex-style.el
index 4a9eeb7..182dae4 100644
--- a/tex-style.el
+++ b/tex-style.el
@@ -55,7 +55,7 @@ Amsmath equations include \"align\", \"alignat\", 
\"xalignat\",
 `LaTeX-equation-label' is used."
   :group 'LaTeX-label
   :type '(choice (const :tag "Use `LaTeX-equation-label'" nil)
-                (string)))
+                 (string)))
 
 ;; style/beamer.el
 
@@ -89,33 +89,33 @@ It can be a list of themes or a function.  If it is the 
symbol
       "Montpellier" "PaloAlto" "Pittsburgh" "Rochester" "Singapore"
       "Szeged" "Warsaw")
      (set :inline t
-         (const "Antibes")
-         (const "Bergen")
-         (const "Berkeley")
-         (const "Berlin")
-         (const "Boadilla")
-         (const "Copenhagen")
-         (const "Darmstadt")
-         (const "Dresden")
-         (const "Frankfurt")
-         (const "Goettingen")
-         (const "Hannover")
-         (const "Ilmenau")
-         (const "JuanLesPins")
-         (const "Luebeck")
-         (const "Madrid")
-         (const "Malmoe")
-         (const "Marburg")
-         (const "Montpellier")
-         (const "PaloAlto")
-         (const "Pittsburgh")
-         (const "Rochester")
-         (const "Singapore")
-         (const "Szeged")
-         (const "Warsaw"))
+          (const "Antibes")
+          (const "Bergen")
+          (const "Berkeley")
+          (const "Berlin")
+          (const "Boadilla")
+          (const "Copenhagen")
+          (const "Darmstadt")
+          (const "Dresden")
+          (const "Frankfurt")
+          (const "Goettingen")
+          (const "Hannover")
+          (const "Ilmenau")
+          (const "JuanLesPins")
+          (const "Luebeck")
+          (const "Madrid")
+          (const "Malmoe")
+          (const "Marburg")
+          (const "Montpellier")
+          (const "PaloAlto")
+          (const "Pittsburgh")
+          (const "Rochester")
+          (const "Singapore")
+          (const "Szeged")
+          (const "Warsaw"))
      (repeat :inline t
-            :tag "Other"
-            (string)))))
+             :tag "Other"
+             (string)))))
 
 (defcustom LaTeX-beamer-inner-themes 'local
   "Presentation inner themes for the LaTeX beamer package.
@@ -129,14 +129,14 @@ It can be a list of themes or a function.  If it is the 
symbol
     (list
      :value ("circles" "default" "inmargin" "rectangles" "rounded")
      (set :inline t
-         (const "circles")
-         (const "default")
-         (const "inmargin")
-         (const "rectangles")
-         (const "rounded"))
+          (const "circles")
+          (const "default")
+          (const "inmargin")
+          (const "rectangles")
+          (const "rounded"))
      (repeat :inline t
-            :tag "Other"
-            (string)))))
+             :tag "Other"
+             (string)))))
 
 (defcustom LaTeX-beamer-outer-themes 'local
   "Presentation outer themes for the LaTeX beamer package.
@@ -153,18 +153,18 @@ It can be a list of themes or a function.  If it is the 
symbol
      ("default" "infolines" "miniframes" "shadow" "sidebar" "smoothbars"
       "smoothtree" "split" "tree")
      (set :inline t
-         (const "default")
-         (const "infolines")
-         (const "miniframes")
-         (const "shadow")
-         (const "sidebar")
-         (const "smoothbars")
-         (const "smoothtree")
-         (const "split")
-         (const "tree"))
+          (const "default")
+          (const "infolines")
+          (const "miniframes")
+          (const "shadow")
+          (const "sidebar")
+          (const "smoothbars")
+          (const "smoothtree")
+          (const "split")
+          (const "tree"))
      (repeat :inline t
-            :tag "Other"
-            (string)))))
+             :tag "Other"
+             (string)))))
 
 (defcustom LaTeX-beamer-color-themes 'local
   "Presentation color themes for the LaTeX beamer package.
@@ -181,24 +181,24 @@ It can be a list of themes or a function.  If it is the 
symbol
      ("albatross" "beetle" "crane" "default" "dolphin" "dove" "fly" "lily"
       "orchid" "rose" "seagull" "seahorse" "sidebartab" "structure" "whale")
      (set :inline t
-         (const "albatross")
-         (const "beetle")
-         (const "crane")
-         (const "default")
-         (const "dolphin")
-         (const "dove")
-         (const "fly")
-         (const "lily")
-         (const "orchid")
-         (const "rose")
-         (const "seagull")
-         (const "seahorse")
-         (const "sidebartab")
-         (const "structure")
-         (const "whale"))
+          (const "albatross")
+          (const "beetle")
+          (const "crane")
+          (const "default")
+          (const "dolphin")
+          (const "dove")
+          (const "fly")
+          (const "lily")
+          (const "orchid")
+          (const "rose")
+          (const "seagull")
+          (const "seahorse")
+          (const "sidebartab")
+          (const "structure")
+          (const "whale"))
      (repeat :inline t
-            :tag "Other"
-            (string)))))
+             :tag "Other"
+             (string)))))
 
 (defcustom LaTeX-beamer-font-themes 'local
   "Presentation font themes for the LaTeX beamer package.
@@ -215,15 +215,15 @@ It can be a list of themes or a function.  If it is the 
symbol
      ("default" "professionalfonts" "serif" "structurebold"
       "structureitalicserif" "structuresmallcapsserif")
      (set :inline t
-         (const "default")
-         (const "professionalfonts")
-         (const "serif")
-         (const "structurebold")
-         (const "structureitalicserif")
-         (const "structuresmallcapsserif"))
+          (const "default")
+          (const "professionalfonts")
+          (const "serif")
+          (const "structurebold")
+          (const "structureitalicserif")
+          (const "structuresmallcapsserif"))
      (repeat :inline t
-            :tag "Other"
-            (string)))))
+             :tag "Other"
+             (string)))))
 
 ;; style/biblatex.el
 
@@ -307,9 +307,9 @@ automatically get the list of fonts.  This requires
 `luaotfload-tool' version 2.3 or higher in order to work."
   :group 'LaTeX-style
   :type '(choice
-         (const :tag "Search automatically" t)
-         (const :tag "Use default font list" nil)
-         (const :tag "Ask what to do" ask)))
+          (const :tag "Search automatically" t)
+          (const :tag "Use default font list" nil)
+          (const :tag "Ask what to do" ask)))
 
 (defcustom LaTeX-fontspec-font-list-default nil
   "List of default fonts to be used as completion for
@@ -324,13 +324,13 @@ automatically get the list of fonts.  This requires
   "Extensions for images files used by \\includegraphics."
   :group 'LaTeX-style
   :type '(list (set :inline t
-                   (const "eps")
-                   (const "jpe?g")
-                   (const "pdf")
-                   (const "png"))
-              (repeat :inline t
-                      :tag "Other"
-                      (string))))
+                    (const "eps")
+                    (const "jpe?g")
+                    (const "pdf")
+                    (const "png"))
+               (repeat :inline t
+                       :tag "Other"
+                       (string))))
 
 (defcustom LaTeX-includegraphics-strip-extension-flag t
   "Non-nil means to strip known extensions from image file name."
@@ -367,13 +367,13 @@ Inserting the subdirectory in the filename (as
   ;; information.
   :group 'LaTeX-style
   :type '(choice (const :tag "TeX" LaTeX-includegraphics-read-file-TeX)
-                (const :tag "relative"
-                       LaTeX-includegraphics-read-file-relative)
-                (const :tag "simple" (lambda ()
-                                       (file-relative-name
-                                        (read-file-name "Image file: ")
-                                        (TeX-master-directory))))
-                (function :tag "other")))
+                 (const :tag "relative"
+                        LaTeX-includegraphics-read-file-relative)
+                 (const :tag "simple" (lambda ()
+                                        (file-relative-name
+                                         (read-file-name "Image file: ")
+                                         (TeX-master-directory))))
+                 (function :tag "other")))
 
 ;; style/revtex4-2.el
 
diff --git a/tex-wizard.el b/tex-wizard.el
index 97c7628..8023e47 100644
--- a/tex-wizard.el
+++ b/tex-wizard.el
@@ -30,80 +30,80 @@
   (interactive)
   (switch-to-buffer "*TeX wizard*")
   (let ((wizwin (selected-window))
-       (wizbuf (current-buffer)))
+        (wizbuf (current-buffer)))
     (set-visited-file-name nil)
     (erase-buffer)
     (if (featurep 'tex-site)
-       (insert-before-markers "AUCTeX is enabled.  Good.\n")
+        (insert-before-markers "AUCTeX is enabled.  Good.\n")
       (insert-before-markers "\
 It appears that AUCTeX is not enabled.  AUCTeX is the main
 major mode for editing TeX/LaTeX files.\n")
       (condition-case nil
-         (info-other-window "(AUCTeX)")
-       (error (select-window wizwin)
-              (switch-to-buffer wizbuf)
-              (insert-before-markers "(I am unable to find AUCTeX's info 
file.)\n")))
+          (info-other-window "(AUCTeX)")
+        (error (select-window wizwin)
+               (switch-to-buffer wizbuf)
+               (insert-before-markers "(I am unable to find AUCTeX's info 
file.)\n")))
       (if (prog1 (y-or-n-p "Should I try enabling AUCTeX now? ")
-           (select-window wizwin)
-           (switch-to-buffer wizbuf))
-         (condition-case nil
-             (require 'tex-site)
-           (error (insert-before-markers "AUCTeX appears not to be 
installed.\n")))
-       (insert-before-markers "AUCTeX installation imprudently skipped.\n"))
+            (select-window wizwin)
+            (switch-to-buffer wizbuf))
+          (condition-case nil
+              (require 'tex-site)
+            (error (insert-before-markers "AUCTeX appears not to be 
installed.\n")))
+        (insert-before-markers "AUCTeX installation imprudently skipped.\n"))
       (when (featurep 'tex-site)
-       (when (prog1 (yes-or-no-p (format "Also enable AUCTeX in `%s'" 
user-init-file))
-               (select-window wizwin)
-               (switch-to-buffer wizbuf))
-         (write-region "\
+        (when (prog1 (yes-or-no-p (format "Also enable AUCTeX in `%s'" 
user-init-file))
+                (select-window wizwin)
+                (switch-to-buffer wizbuf))
+          (write-region "\
 ;;; Enable AUCTeX
 \(require 'tex-site)\n" nil user-init-file t))))
     (if (memq 'turn-on-reftex
-             (if (featurep 'tex-site)
-                 (and (boundp 'LaTeX-mode-hook) LaTeX-mode-hook)
-               (and (boundp 'latex-mode-hook) latex-mode-hook)))
-       (insert-before-markers "RefTeX is enabled.  Good.\n")
+              (if (featurep 'tex-site)
+                  (and (boundp 'LaTeX-mode-hook) LaTeX-mode-hook)
+                (and (boundp 'latex-mode-hook) latex-mode-hook)))
+        (insert-before-markers "RefTeX is enabled.  Good.\n")
       (insert-before-markers "\
 It appears that RefTeX is not enabled.  RefTeX is a mode
 that will greatly facilitate the management of labels
 and bibliographics references.\n")
       (condition-case nil
-         (info-other-window "(RefTeX)")
-       (error (select-window wizwin)
-              (switch-to-buffer wizbuf)
-              (insert-before-markers
-               "(I am unable to find RefTeX's info file.)\n")))
+          (info-other-window "(RefTeX)")
+        (error (select-window wizwin)
+               (switch-to-buffer wizbuf)
+               (insert-before-markers
+                "(I am unable to find RefTeX's info file.)\n")))
       (when (prog1 (yes-or-no-p
-                   (format "Enable RefTeX in `%s'" user-init-file))
-             (select-window wizwin)
-             (switch-to-buffer wizbuf))
-       (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
-       (add-hook 'latex-mode-hook 'turn-on-reftex)
-       (condition-case nil
-           (write-region "\
+                    (format "Enable RefTeX in `%s'" user-init-file))
+              (select-window wizwin)
+              (switch-to-buffer wizbuf))
+        (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
+        (add-hook 'latex-mode-hook 'turn-on-reftex)
+        (condition-case nil
+            (write-region "\
 ;;; Enable RefTeX
 \(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
 \(add-hook 'latex-mode-hook 'turn-on-reftex)
 " nil user-init-file t)
-         (error (insert-before-markers
-                 (format "Unable to write to file `%s'\n" user-init-file))))))
+          (error (insert-before-markers
+                  (format "Unable to write to file `%s'\n" user-init-file))))))
     (when (and (featurep 'tex-site)
-              (boundp 'LaTeX-mode-hook)
-              (memq 'turn-on-reftex LaTeX-mode-hook))
+               (boundp 'LaTeX-mode-hook)
+               (memq 'turn-on-reftex LaTeX-mode-hook))
       (if (and (boundp 'reftex-plug-into-AUCTeX)
-              reftex-plug-into-AUCTeX)
-         (insert-before-markers
-          "RefTeX appears to be configured for use with AUCTeX.\n")
-       (require 'reftex)
-       (insert-before-markers "\
+               reftex-plug-into-AUCTeX)
+          (insert-before-markers
+           "RefTeX appears to be configured for use with AUCTeX.\n")
+        (require 'reftex)
+        (insert-before-markers "\
 It appears that RefTeX is not configured to cooperate with
 AUCTeX.  Please configure it using the menus, save for future
 sessions, then press the finish button.")
-       (customize-variable-other-window 'reftex-plug-into-AUCTeX)
-       (set (make-local-variable 'custom-buffer-done-kill) t)
-       (add-hook 'kill-buffer-hook #'exit-recursive-edit nil t)
-       (recursive-edit)
-       (select-window wizwin)
-       (switch-to-buffer wizbuf))))
+        (customize-variable-other-window 'reftex-plug-into-AUCTeX)
+        (set (make-local-variable 'custom-buffer-done-kill) t)
+        (add-hook 'kill-buffer-hook #'exit-recursive-edit nil t)
+        (recursive-edit)
+        (select-window wizwin)
+        (switch-to-buffer wizbuf))))
   (insert-before-markers "That's all!\n"))
 
 
diff --git a/tex.el b/tex.el
index 6c66f28..936671a 100644
--- a/tex.el
+++ b/tex.el
@@ -29,8 +29,8 @@
 ;;; Code:
 
 (when (or (< emacs-major-version 24)
-         (and (= emacs-major-version 24)
-              (< emacs-minor-version 3)))
+          (and (= emacs-major-version 24)
+               (< emacs-minor-version 3)))
   (error "AUCTeX requires Emacs 24.3 or later"))
 
 (require 'custom)
@@ -41,24 +41,24 @@
 
 ;; Silence the compiler for functions:
 (declare-function dbus-ignore-errors "ext:dbus"
-                 (&rest body))
+                  (&rest body))
 (declare-function dbus-get-unique-name "ext:dbusbind.c"
-                 (bus))
+                  (bus))
 (declare-function dbus-ping "ext:dbus"
-                 (bus service &optional timeout))
+                  (bus service &optional timeout))
 (declare-function dbus-introspect-get-method "ext:dbus"
-                 (bus service path interface method))
+                  (bus service path interface method))
 (declare-function dbus-call-method "ext:dbus"
-                 (bus service path interface method &rest args))
+                  (bus service path interface method &rest args))
 (declare-function dbus-register-signal "ext:dbus"
-                 (bus service path interface signal handler &rest args))
+                  (bus service path interface signal handler &rest args))
 (declare-function LaTeX-environment-list "latex"
-                 nil)
+                  nil)
 (declare-function tex--prettify-symbols-compose-p "ext:tex-mode"
-                 (start end match))
+                  (start end match))
 ;; spell-buffer was removed in 2008 in favor of ispell
 (declare-function spell-buffer "ext:text-mode"
-                 t)
+                  t)
 
 ;; Silence the compiler for variables:
 ;; tex.el: Variables defined somewhere in this file:
@@ -98,8 +98,8 @@
 ;; graphicx.el
 (defvar LaTeX-includegraphics-global-files)
 ;; Others:
-(defvar tex--prettify-symbols-alist)   ; tex-mode.el
-(defvar Info-file-list-for-emacs)      ; info.el
+(defvar tex--prettify-symbols-alist)    ; tex-mode.el
+(defvar Info-file-list-for-emacs)       ; info.el
 (defvar dbus-debug)                     ; dbus.el
 
 (defgroup TeX-file nil
@@ -134,8 +134,8 @@
   "Command to run plain TeX on Omega."
   :group 'TeX-command
   :type '(choice (const :tag "Aleph" "aleph")
-                (const :tag "Omega" "omega")
-                (string :tag "Other command")))
+                 (const :tag "Omega" "omega")
+                 (string :tag "Other command")))
 
 (defcustom LaTeX-command "latex"
   "Command to run LaTeX."
@@ -146,8 +146,8 @@
   "Command to run LaTeX on Omega."
   :group 'TeX-command
   :type '(choice (const :tag "Lamed" "lamed")
-                (const :tag "Lambda" "lambda")
-                (string :tag "Other command")))
+                 (const :tag "Lambda" "lambda")
+                 (string :tag "Other command")))
 
 (defcustom TeX-file-line-error t
   "Whether to have TeX produce file:line:error style error messages."
@@ -159,14 +159,14 @@
 If nil, none is specified."
   :group 'TeX-command
   :type '(choice (const :tag "Unspecified" nil)
-                string))
+                 string))
 
 (defcustom ConTeXt-Omega-engine TeX-Omega-command
   "Engine to use for --engine in the texexec command in Omega mode.
 If nil, none is specified."
   :group 'TeX-command
   :type '(choice (const :tag "Unspecified" nil)
-                string))
+                 string))
 ;; At least in TeXLive 2009 ConTeXt does not support an omega option anymore.
 (make-obsolete-variable 'ConTeXt-Omega-engine 'TeX-engine-alist "11.86")
 
@@ -204,7 +204,7 @@ If nil, none is specified."
      (context-mode) :help "Run ConTeXt until completion")
     ("BibTeX" "bibtex %s" TeX-run-BibTeX nil
      (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode
-                    context-mode)
+                     context-mode)
      :help "Run BibTeX")
     ("Biber" "biber %s" TeX-run-Biber nil
      (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode)
@@ -315,40 +315,40 @@ the respective mode names.
 Any additional elements get just transferred to the respective menu entries."
   :group 'TeX-command
   :type '(repeat (group :value ("" "" TeX-run-command nil t)
-                       (string :tag "Name")
-                       (string :tag "Command")
-                       (choice :tag "How"
-                               :value TeX-run-command
-                               (function-item TeX-run-command)
-                               (function-item TeX-run-format)
-                               (function-item TeX-run-TeX)
-                               (function-item TeX-run-interactive)
-                               (function-item TeX-run-BibTeX)
-                               (function-item TeX-run-Biber)
-                               (function-item TeX-run-compile)
-                               (function-item TeX-run-shell)
-                               (function-item TeX-run-discard)
-                               (function-item TeX-run-background)
-                               (function-item TeX-run-silent)
-                               (function-item TeX-run-discard-foreground)
-                               (function-item TeX-run-function)
-                               (function-item TeX-run-discard-or-function)
-                               (function :tag "Other"))
-                       (boolean :tag "Prompt")
-                       (choice :tag "Modes"
-                               (const :tag "All" t)
-                               (set (const :tag "Plain TeX" plain-tex-mode)
-                                    (const :tag "LaTeX" latex-mode)
-                                    (const :tag "DocTeX" doctex-mode)
-                                    (const :tag "ConTeXt" context-mode)
-                                    (const :tag "Texinfo" texinfo-mode)
-                                    (const :tag "AmSTeX" ams-tex-mode)))
-                       (repeat :tag "Menu elements" :inline t sexp))))
+                        (string :tag "Name")
+                        (string :tag "Command")
+                        (choice :tag "How"
+                                :value TeX-run-command
+                                (function-item TeX-run-command)
+                                (function-item TeX-run-format)
+                                (function-item TeX-run-TeX)
+                                (function-item TeX-run-interactive)
+                                (function-item TeX-run-BibTeX)
+                                (function-item TeX-run-Biber)
+                                (function-item TeX-run-compile)
+                                (function-item TeX-run-shell)
+                                (function-item TeX-run-discard)
+                                (function-item TeX-run-background)
+                                (function-item TeX-run-silent)
+                                (function-item TeX-run-discard-foreground)
+                                (function-item TeX-run-function)
+                                (function-item TeX-run-discard-or-function)
+                                (function :tag "Other"))
+                        (boolean :tag "Prompt")
+                        (choice :tag "Modes"
+                                (const :tag "All" t)
+                                (set (const :tag "Plain TeX" plain-tex-mode)
+                                     (const :tag "LaTeX" latex-mode)
+                                     (const :tag "DocTeX" doctex-mode)
+                                     (const :tag "ConTeXt" context-mode)
+                                     (const :tag "Texinfo" texinfo-mode)
+                                     (const :tag "AmSTeX" ams-tex-mode)))
+                        (repeat :tag "Menu elements" :inline t sexp))))
 
 (defcustom TeX-command-output-list
   '(
-                                       ; Add the following line if you want to 
use htlatex (tex4ht)
-                                       ;    ("\\`htlatex" ("html"))
+                                        ; Add the following line if you want 
to use htlatex (tex4ht)
+                                        ;    ("\\`htlatex" ("html"))
     )
   "List of regexps and file extensions.
 
@@ -370,22 +370,22 @@ Extensions must be given without the \".\"."
 
   :group 'TeX-command
   :type '(repeat (group (regexp :tag "Command Regexp")
-                       (choice (string :tag "Default Extension")
-                               (group (string :tag "Fixed Extension"))))))
+                        (choice (string :tag "Default Extension")
+                                (group (string :tag "Fixed Extension"))))))
 
 ;; You may want to change the default LaTeX version for your site.
 (defcustom LaTeX-version "2e"
   "Default LaTeX version.  Currently recognized is \"2\" and \"2e\"."
   :group 'LaTeX
   :type '(radio (const :format "%v\n%h"
-                      :doc "\
+                       :doc "\
 The executable `latex' is LaTeX version 2."
-                      "2")
-               (const :format "%v\n%h"
-                      :doc "\
+                       "2")
+                (const :format "%v\n%h"
+                       :doc "\
 The executable `latex' is LaTeX version 2e."
-                      "2e")
-               (string :tag "Other")))
+                       "2e")
+                (string :tag "Other")))
 
 
 ;; Use different compilation commands depending on style.
@@ -403,7 +403,7 @@ match is used, if no match is found the `%l' is replaced 
with the empty
 string."
   :group 'TeX-command
   :type '(repeat (group :value ("" "")
-                       regexp (string :tag "Style"))))
+                        regexp (string :tag "Style"))))
 
 ;; Printing: If you want to print, TeX-print-command must be non-nil
 ;; (if it is nil, you'll get a complaint when using the print menu).
@@ -428,7 +428,7 @@ performed as specified in `TeX-expand-list'.  If it is nil,
 then customization is requested."
   :group 'TeX-command
   :type '(choice (string :tag "Print command")
-                (const :tag "No print command customized" nil)))
+                 (const :tag "No print command customized" nil)))
 
 (defcustom TeX-queue-command "lpq -P%p"
   "Command used to show the status of a printer queue.
@@ -438,7 +438,7 @@ performed as specified in `TeX-expand-list'.  If this is 
nil,
 the printer has no corresponding command."
   :group 'TeX-command
   :type '(choice (string :tag "Queue check command")
-                (const :tag "No such command" nil)))
+                 (const :tag "No such command" nil)))
 
 ;; Enter the names of the printers available at your site, or nil if
 ;; you only have one printer.
@@ -469,22 +469,22 @@ If this list is empty, only `TeX-print-command' and 
`TeX-queue-command'
 get consulted."
   :group 'TeX-command
   :type '(repeat (group (string :tag "Name")
-                       (option (group :inline t
-                                      :extra-offset -4
-                                      (choice :tag "Print"
-                                              (const :tag "default")
-                                              (string :format "%v"))
-                                      (option (choice :tag "Queue"
-                                                      (const :tag "default")
-                                                      (string
-                                                       :format "%v"))))))))
+                        (option (group :inline t
+                                       :extra-offset -4
+                                       (choice :tag "Print"
+                                               (const :tag "default")
+                                               (string :format "%v"))
+                                       (option (choice :tag "Queue"
+                                                       (const :tag "default")
+                                                       (string
+                                                        :format "%v"))))))))
 
 ;; The name of the most used printer.
 
 (defcustom TeX-printer-default (or (getenv "PRINTER")
-                                  (and TeX-printer-list
-                                       (car (car TeX-printer-list)))
-                                  "lp")
+                                   (and TeX-printer-list
+                                        (car (car TeX-printer-list)))
+                                   "lp")
   "Default printer to use with `TeX-command'."
   :group 'TeX-command
   :type 'string)
@@ -520,41 +520,41 @@ string."
 
 (defvar TeX-expand-list-builtin
   '(("%q" (lambda ()
-           (TeX-printer-query t)))
+            (TeX-printer-query t)))
     ("%V" (lambda ()
-           (TeX-source-correlate-start-server-maybe)
-           (TeX-view-command-raw)))
+            (TeX-source-correlate-start-server-maybe)
+            (TeX-view-command-raw)))
     ("%r" (lambda ()
-           (TeX-style-check TeX-print-style)))
+            (TeX-style-check TeX-print-style)))
     ("%l" (lambda ()
-           (TeX-style-check LaTeX-command-style)))
+            (TeX-style-check LaTeX-command-style)))
     ("%(PDF)" (lambda ()
-               (if (and (eq TeX-engine 'default)
-                        (if TeX-PDF-mode
-                            (not (TeX-PDF-from-DVI))
-                          TeX-DVI-via-PDFTeX))
-                   "pdf"
-                 "")))
+                (if (and (eq TeX-engine 'default)
+                         (if TeX-PDF-mode
+                             (not (TeX-PDF-from-DVI))
+                           TeX-DVI-via-PDFTeX))
+                    "pdf"
+                  "")))
     ("%(PDFout)" (lambda ()
-                  (cond ((eq major-mode 'ams-tex-mode)
-                         (if TeX-PDF-mode
-                             " -output-format=pdf"
-                           " -output-format=dvi"))
-                        ((and (eq TeX-engine 'xetex)
-                              (not TeX-PDF-mode))
-                         " -no-pdf")
-                        ((and (eq TeX-engine 'luatex)
-                              (not TeX-PDF-mode))
-                         " --output-format=dvi")
-                        ((and (eq TeX-engine 'default)
-                              (not TeX-PDF-mode)
-                              TeX-DVI-via-PDFTeX)
-                         " \"\\pdfoutput=0 \"")
-                        (t ""))))
+                   (cond ((eq major-mode 'ams-tex-mode)
+                          (if TeX-PDF-mode
+                              " -output-format=pdf"
+                            " -output-format=dvi"))
+                         ((and (eq TeX-engine 'xetex)
+                               (not TeX-PDF-mode))
+                          " -no-pdf")
+                         ((and (eq TeX-engine 'luatex)
+                               (not TeX-PDF-mode))
+                          " --output-format=dvi")
+                         ((and (eq TeX-engine 'default)
+                               (not TeX-PDF-mode)
+                               TeX-DVI-via-PDFTeX)
+                          " \"\\pdfoutput=0 \"")
+                         (t ""))))
     ("%(mode)" (lambda ()
-                (if TeX-interactive-mode
-                    ""
-                  " -interaction=nonstopmode")))
+                 (if TeX-interactive-mode
+                     ""
+                   " -interaction=nonstopmode")))
     ("%(file-line-error)"
      (lambda () (if TeX-file-line-error " -file-line-error" "")))
     ("%(o?)" (lambda () (if (eq TeX-engine 'omega) "o" "")))
@@ -567,17 +567,17 @@ string."
     ("%dS" TeX-source-specials-view-expand-options)
     ("%cS" TeX-source-specials-view-expand-client)
     ("%(outpage)" (lambda ()
-                   ;; When `TeX-source-correlate-output-page-function' is nil
-                   ;; and we are using synctex, fallback on
-                   ;; `TeX-synctex-output-page'.
-                   (and TeX-source-correlate-mode
-                        (null TeX-source-correlate-output-page-function)
-                        (eq (TeX-source-correlate-method-active) 'synctex)
-                        (setq TeX-source-correlate-output-page-function
-                              'TeX-synctex-output-page))
-                   (or (if TeX-source-correlate-output-page-function
-                           (funcall TeX-source-correlate-output-page-function))
-                       "1")))
+                    ;; When `TeX-source-correlate-output-page-function' is nil
+                    ;; and we are using synctex, fallback on
+                    ;; `TeX-synctex-output-page'.
+                    (and TeX-source-correlate-mode
+                         (null TeX-source-correlate-output-page-function)
+                         (eq (TeX-source-correlate-method-active) 'synctex)
+                         (setq TeX-source-correlate-output-page-function
+                               'TeX-synctex-output-page))
+                    (or (if TeX-source-correlate-output-page-function
+                            (funcall 
TeX-source-correlate-output-page-function))
+                        "1")))
     ;; `TeX-active-master-with-quotes' calls either `TeX-master-file'
     ;; or `TeX-region-file' returning the master or region file, and
     ;; adds suitable quotes for use in shell command line.
@@ -594,37 +594,37 @@ string."
     ;; 3. Each TeX codes between %` and %' must be enclosed in
     ;;    double quotes and preceded by a space.
     ("%`" (lambda nil
-           (setq TeX-command-pos t TeX-command-text nil)
-           ""))
+            (setq TeX-command-pos t TeX-command-text nil)
+            ""))
     (" \"\\" (lambda nil
-              (if (eq TeX-command-pos t)
-                  (setq TeX-command-pos TeX-expand-pos
-                        TeX-expand-pos (+ 3 TeX-expand-pos))
-                (setq TeX-expand-pos (1+ TeX-expand-pos)))))
+               (if (eq TeX-command-pos t)
+                   (setq TeX-command-pos TeX-expand-pos
+                         TeX-expand-pos (+ 3 TeX-expand-pos))
+                 (setq TeX-expand-pos (1+ TeX-expand-pos)))))
     ("\"" (lambda nil (if (numberp TeX-command-pos)
-                         (setq TeX-command-text
-                               (concat
-                                TeX-command-text
-                                (substring TeX-expand-command
-                                           TeX-command-pos
-                                           (1+ TeX-expand-pos)))
-                               TeX-expand-command
-                               (concat
-                                (substring TeX-expand-command
-                                           0
-                                           TeX-command-pos)
-                                (substring TeX-expand-command
-                                           (1+ TeX-expand-pos)))
-                               TeX-expand-pos TeX-command-pos
-                               TeX-command-pos t)
-                       (setq TeX-expand-pos (1+ TeX-expand-pos)))))
+                          (setq TeX-command-text
+                                (concat
+                                 TeX-command-text
+                                 (substring TeX-expand-command
+                                            TeX-command-pos
+                                            (1+ TeX-expand-pos)))
+                                TeX-expand-command
+                                (concat
+                                 (substring TeX-expand-command
+                                            0
+                                            TeX-command-pos)
+                                 (substring TeX-expand-command
+                                            (1+ TeX-expand-pos)))
+                                TeX-expand-pos TeX-command-pos
+                                TeX-command-pos t)
+                        (setq TeX-expand-pos (1+ TeX-expand-pos)))))
     ("%'" (lambda nil
-           (setq TeX-command-pos nil)
-           (if (stringp TeX-command-text)
-               (progn
-                 (setq TeX-expand-pos (+ TeX-expand-pos (length 
TeX-command-text) 9))
-                 (concat TeX-command-text " \"\\input\""))
-             "")))
+            (setq TeX-command-pos nil)
+            (if (stringp TeX-command-text)
+                (progn
+                  (setq TeX-expand-pos (+ TeX-expand-pos (length 
TeX-command-text) 9))
+                  (concat TeX-command-text " \"\\input\""))
+              "")))
     ;; The fourth argument of t directs to supply "\detokenize{}" when
     ;; necessary. See doc string and comment of
     ;; `TeX-active-master-with-quotes'.
@@ -668,10 +668,10 @@ Programs should not use these variables directly but the 
function
 `TeX-expand-list'."
   :group 'TeX-command
   :type '(repeat (group (string :tag "Key")
-                       (sexp :tag "Expander")
-                       (repeat :inline t
-                               :tag "Arguments"
-                               (sexp :format "%v")))))
+                        (sexp :tag "Expander")
+                        (repeat :inline t
+                                :tag "Arguments"
+                                (sexp :format "%v")))))
 
 (defun TeX-expand-list ()
   "Complete list of expansion strings for TeX command names.
@@ -733,7 +733,7 @@ emacs 24.1 and is then later run by emacs 24.5."
   (if (fboundp name)             ;If macro exists at compile-time, just use it.
       then
     `(if (fboundp ',name)               ;Else, check if it exists at run-time.
-        (eval ',then)                  ;If it does, then run the then code.
+         (eval ',then)                  ;If it does, then run the then code.
        ,@else)))                ;Otherwise, run the else code.
 
 (require 'easymenu)
@@ -741,20 +741,20 @@ emacs 24.1 and is then later run by emacs 24.5."
 ;;; Documentation for Info-goto-emacs-command-node and similar
 
 (eval-after-load 'info '(dolist (elt '("TeX" "LaTeX" "ConTeXt" "Texinfo"
-                                      "docTeX"))
-                         (add-to-list 'Info-file-list-for-emacs
-                                      (cons elt "AUCTeX"))))
+                                       "docTeX"))
+                          (add-to-list 'Info-file-list-for-emacs
+                                       (cons elt "AUCTeX"))))
 
 (defadvice hack-one-local-variable (after TeX-hack-one-local-variable-after
-                                         activate)
+                                          activate)
   "Call minor mode function if minor mode variable is found."
   (let ((var (ad-get-arg 0))
-       (val (ad-get-arg 1)))
+        (val (ad-get-arg 1)))
     ;; Instead of checking for each mode explicitely `minor-mode-list'
     ;; could be used.  But this may make the byte compiler pop up.
     (when (memq var '(TeX-PDF-mode
-                     TeX-source-correlate-mode TeX-interactive-mode
-                     TeX-fold-mode LaTeX-math-mode))
+                      TeX-source-correlate-mode TeX-interactive-mode
+                      TeX-fold-mode LaTeX-math-mode))
       (if (symbol-value val) (funcall var 1) (funcall var 0)))))
 
 (defvar TeX-overlay-priority-step 16
@@ -771,51 +771,51 @@ overlays between two existing ones.")
 (require 'crm)
 
 (if (or (and (= emacs-major-version 24) (>= emacs-minor-version 4))
-       (>= emacs-major-version 25))
+        (>= emacs-major-version 25))
     ;; For GNU Emacs 24.4 or later, based on `completing-read-multiple' of
     ;; git commit b14abca9476cba2f500b5eda89441d593dd0f12b
     ;;   2013-01-10  * lisp/emacs-lisp/crm.el: Allow any regexp for separators.
     (defun TeX-completing-read-multiple
-       (prompt table &optional predicate require-match initial-input
-               hist def inherit-input-method)
+        (prompt table &optional predicate require-match initial-input
+                hist def inherit-input-method)
       "Like `completing-read-multiple' which see.
 Retain zero-length substrings but ensure that empty input results
 in nil across different emacs versions."
       (unwind-protect
-         (progn
-           (add-hook 'choose-completion-string-functions
-                     'crm--choose-completion-string)
-           (let* ((minibuffer-completion-table #'crm--collection-fn)
-                  (minibuffer-completion-predicate predicate)
-                  ;; see completing_read in src/minibuf.c
-                  (minibuffer-completion-confirm
-                   (unless (eq require-match t) require-match))
-                  (crm-completion-table table)
-                  (map (if require-match
-                           crm-local-must-match-map
-                         crm-local-completion-map))
-                  ;; If the user enters empty input, `read-from-minibuffer'
-                  ;; returns the empty string, not DEF.
-                  (input (read-from-minibuffer
-                          prompt initial-input map
-                          nil hist def inherit-input-method))
-                  result)
-             (and def (string-equal input "") (setq input def))
-             (if (equal (setq result (split-string input crm-separator))
-                        '(""))
-                 nil
-               result)))
-       (remove-hook 'choose-completion-string-functions
-                    'crm--choose-completion-string)))
+          (progn
+            (add-hook 'choose-completion-string-functions
+                      'crm--choose-completion-string)
+            (let* ((minibuffer-completion-table #'crm--collection-fn)
+                   (minibuffer-completion-predicate predicate)
+                   ;; see completing_read in src/minibuf.c
+                   (minibuffer-completion-confirm
+                    (unless (eq require-match t) require-match))
+                   (crm-completion-table table)
+                   (map (if require-match
+                            crm-local-must-match-map
+                          crm-local-completion-map))
+                   ;; If the user enters empty input, `read-from-minibuffer'
+                   ;; returns the empty string, not DEF.
+                   (input (read-from-minibuffer
+                           prompt initial-input map
+                           nil hist def inherit-input-method))
+                   result)
+              (and def (string-equal input "") (setq input def))
+              (if (equal (setq result (split-string input crm-separator))
+                         '(""))
+                  nil
+                result)))
+        (remove-hook 'choose-completion-string-functions
+                     'crm--choose-completion-string)))
   ;; For GNU Emacs <= 24.3.
   (defun TeX-completing-read-multiple
       (prompt table &optional predicate require-match initial-input
-             hist def inherit-input-method)
+              hist def inherit-input-method)
     "Like `completing-read-multiple' which see.
 Ensures that empty input results in nil across different emacs versions."
     (let ((result (completing-read-multiple prompt table predicate
-                                           require-match initial-input
-                                           hist def inherit-input-method)))
+                                            require-match initial-input
+                                            hist def inherit-input-method)))
       (if (equal result '("")) nil result))))
 
 (defun TeX-read-string (prompt &optional initial-input history default-value)
@@ -836,20 +836,20 @@ overlays."
   (let (outer-priority inner-priority ov-priority)
     (dolist (ov (overlays-in start end))
       (when (or (eq (overlay-get ov 'category) 'TeX-fold)
-               (overlay-get ov 'preview-state))
-       (setq ov-priority (overlay-get ov 'priority))
-       (if (>= (overlay-start ov) start)
-           (setq inner-priority (max ov-priority (or inner-priority
-                                                     ov-priority)))
-         (setq outer-priority (min ov-priority (or outer-priority
-                                                   ov-priority))))))
+                (overlay-get ov 'preview-state))
+        (setq ov-priority (overlay-get ov 'priority))
+        (if (>= (overlay-start ov) start)
+            (setq inner-priority (max ov-priority (or inner-priority
+                                                      ov-priority)))
+          (setq outer-priority (min ov-priority (or outer-priority
+                                                    ov-priority))))))
     (cond ((and inner-priority (not outer-priority))
-          (+ inner-priority TeX-overlay-priority-step))
-         ((and (not inner-priority) outer-priority)
-          (/ outer-priority 2))
-         ((and inner-priority outer-priority)
-          (+ (/ (- outer-priority inner-priority) 2) inner-priority))
-         (t TeX-overlay-priority-step))))
+           (+ inner-priority TeX-overlay-priority-step))
+          ((and (not inner-priority) outer-priority)
+           (/ outer-priority 2))
+          ((and inner-priority outer-priority)
+           (+ (/ (- outer-priority inner-priority) 2) inner-priority))
+          (t TeX-overlay-priority-step))))
 
 (defun TeX-delete-dups-by-car (alist &optional keep-list)
   "Return a list of all elements in ALIST, but each car only once.
@@ -857,15 +857,15 @@ Elements of KEEP-LIST are not removed even if duplicate."
   ;; Copy of `reftex-uniquify-by-car' (written by David Kastrup).
   (setq keep-list (TeX-sort-strings keep-list))
   (setq alist (sort (copy-sequence alist)
-                   #'TeX-car-string-lessp))
+                    #'TeX-car-string-lessp))
   (let ((new alist) elt)
     (while (cdr new)
       (setq elt (caar new))
       (while (and keep-list (string< (car keep-list) elt))
-       (setq keep-list (cdr keep-list)))
+        (setq keep-list (cdr keep-list)))
       (unless (and keep-list (string= elt (car keep-list)))
-       (while (string= elt (car (cadr new)))
-         (setcdr new (cddr new))))
+        (while (string= elt (car (cadr new)))
+          (setcdr new (cddr new))))
       (setq new (cdr new))))
   alist)
 
@@ -876,7 +876,7 @@ Elements of KEEP-LIST are not removed even if duplicate."
     (while (cdr new)
       (setq elt (car new))
       (while (string= elt (cadr new))
-       (setcdr new (cddr new)))
+        (setcdr new (cddr new)))
       (setq new (cdr new))))
   list)
 
@@ -902,8 +902,8 @@ If t display help buffer.  If nil display message about 
error in
 echo area.  If `expert' display output buffer with raw processor output."
   :group 'TeX-output
   :type '(choice (const :tag "Help buffer" t)
-                (const :tag "Echo area" nil)
-                (const :tag "Output buffer" expert)))
+                 (const :tag "Echo area" nil)
+                 (const :tag "Output buffer" expert)))
 
 (defcustom TeX-debug-bad-boxes nil
   "Non-nil means also find overfull/underfull box warnings with 
\\[TeX-next-error]."
@@ -927,8 +927,8 @@ If you want to use the custom function, see how it is used 
in the
 code of `TeX-warning'."
   :group 'TeX-command
   :type '(choice (const  :tag "Do not ignore anything" nil)
-                (string :tag "Regexp")
-                (symbol :tag "Function name")))
+                 (string :tag "Regexp")
+                 (symbol :tag "Function name")))
 
 (defcustom TeX-suppress-ignored-warnings nil
   "Whether to actually show ignored warnings.
@@ -942,14 +942,14 @@ Note that `TeX-debug-warnings' always takes the 
precedence."
   (interactive)
   (setq TeX-debug-bad-boxes (not TeX-debug-bad-boxes))
   (message (concat "TeX-debug-bad-boxes: "
-                  (if TeX-debug-bad-boxes "on" "off"))))
+                   (if TeX-debug-bad-boxes "on" "off"))))
 
 (defun TeX-toggle-debug-warnings ()
   "Toggle if the debugger should display warnings too."
   (interactive)
   (setq TeX-debug-warnings (not TeX-debug-warnings))
   (message (concat "TeX-debug-warnings: "
-                  (if TeX-debug-warnings "on" "off"))))
+                   (if TeX-debug-warnings "on" "off"))))
 
 (defun TeX-toggle-suppress-ignored-warnings ()
   "Toggle if the debugger should display ignored warnings too.
@@ -959,7 +959,7 @@ more details."
   (interactive)
   (setq TeX-suppress-ignored-warnings (not TeX-suppress-ignored-warnings))
   (message (concat "TeX-suppress-ignored-warnings: "
-                  (if TeX-suppress-ignored-warnings "on" "off"))))
+                   (if TeX-suppress-ignored-warnings "on" "off"))))
 
 ;;; Mode names.
 
@@ -984,38 +984,38 @@ name is to be updated.
 If RESET is non-nil, `TeX-command-next' is reset to
 `TeX-command-default' in updated buffers."
   (if (and changed
-          (not (and local (local-variable-p changed (current-buffer)))))
+           (not (and local (local-variable-p changed (current-buffer)))))
       (dolist (buffer (buffer-list))
-       (and (local-variable-p 'TeX-mode-p buffer)
-            (not (local-variable-p changed buffer))
-            (with-current-buffer buffer (TeX-set-mode-name nil nil reset))))
+        (and (local-variable-p 'TeX-mode-p buffer)
+             (not (local-variable-p changed buffer))
+             (with-current-buffer buffer (TeX-set-mode-name nil nil reset))))
     (if TeX-mode-p
-       (let ((trailing-flags
-              (concat
-               (and (boundp 'TeX-fold-mode) TeX-fold-mode "F")
-               (and (boundp 'LaTeX-math-mode) LaTeX-math-mode "M")
-               (and TeX-PDF-mode "P")
-               (and TeX-interactive-mode "I")
-               (and TeX-source-correlate-mode "S"))))
-         (setq mode-name (concat TeX-base-mode-name
-                                 (when (> (length trailing-flags) 0)
-                                   (concat "/" trailing-flags))))
-         (when reset
-           (TeX-process-set-variable (TeX-master-file)
-                                     'TeX-command-next TeX-command-default)
-           (TeX-process-set-variable (TeX-region-file)
-                                     'TeX-command-next TeX-command-default))
-         (set-buffer-modified-p (buffer-modified-p))))))
+        (let ((trailing-flags
+               (concat
+                (and (boundp 'TeX-fold-mode) TeX-fold-mode "F")
+                (and (boundp 'LaTeX-math-mode) LaTeX-math-mode "M")
+                (and TeX-PDF-mode "P")
+                (and TeX-interactive-mode "I")
+                (and TeX-source-correlate-mode "S"))))
+          (setq mode-name (concat TeX-base-mode-name
+                                  (when (> (length trailing-flags) 0)
+                                    (concat "/" trailing-flags))))
+          (when reset
+            (TeX-process-set-variable (TeX-master-file)
+                                      'TeX-command-next TeX-command-default)
+            (TeX-process-set-variable (TeX-region-file)
+                                      'TeX-command-next TeX-command-default))
+          (set-buffer-modified-p (buffer-modified-p))))))
 
 (defun TeX-mode-prefix (&optional mode)
   "Return the prefix for the symbol MODE as string.
 If no mode is given the current major mode is used."
   (cdr (assoc (or mode major-mode) '((plain-tex-mode . "plain-TeX")
-                                    (latex-mode . "LaTeX")
-                                    (ams-tex-mode . "AmSTeX")
-                                    (doctex-mode . "docTeX")
-                                    (texinfo-mode . "Texinfo")
-                                    (context-mode . "ConTeXt")))))
+                                     (latex-mode . "LaTeX")
+                                     (ams-tex-mode . "AmSTeX")
+                                     (doctex-mode . "docTeX")
+                                     (texinfo-mode . "Texinfo")
+                                     (context-mode . "ConTeXt")))))
 
 ;;; Viewing
 
@@ -1042,32 +1042,32 @@ If no mode is given the current major mode is used."
      TeX-source-correlate-mode)
     (paper-landscape
      (and (fboundp 'LaTeX-match-class-option)
-         (LaTeX-match-class-option "\\`landscape\\'")))
+          (LaTeX-match-class-option "\\`landscape\\'")))
     (paper-portrait
      (not (and (fboundp 'LaTeX-match-class-option)
-              (LaTeX-match-class-option "\\`landscape\\'"))))
+               (LaTeX-match-class-option "\\`landscape\\'"))))
     (paper-a4
      (let ((regex "\\`\\(?:a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'"))
        (or (TeX-match-style regex)
-          (and (fboundp 'LaTeX-match-class-option)
-               (LaTeX-match-class-option regex)))))
+           (and (fboundp 'LaTeX-match-class-option)
+                (LaTeX-match-class-option regex)))))
     (paper-a5
      (let ((regex "\\`\\(?:a5paper\\|a5comb\\)\\'"))
        (or (TeX-match-style regex)
-          (and (fboundp 'LaTeX-match-class-option)
-               (LaTeX-match-class-option regex)))))
+           (and (fboundp 'LaTeX-match-class-option)
+                (LaTeX-match-class-option regex)))))
     (paper-b5
      (and (fboundp 'LaTeX-match-class-option)
-         (LaTeX-match-class-option "\\`b5paper\\'")))
+          (LaTeX-match-class-option "\\`b5paper\\'")))
     (paper-letter
      (and (fboundp 'LaTeX-match-class-option)
-         (LaTeX-match-class-option "\\`letterpaper\\'")))
+          (LaTeX-match-class-option "\\`letterpaper\\'")))
     (paper-legal
      (and (fboundp 'LaTeX-match-class-option)
-         (LaTeX-match-class-option "\\`legalpaper\\'")))
+          (LaTeX-match-class-option "\\`legalpaper\\'")))
     (paper-executive
      (and (fboundp 'LaTeX-match-class-option)
-         (LaTeX-match-class-option "\\`executivepaper\\'"))))
+          (LaTeX-match-class-option "\\`executivepaper\\'"))))
   "Alist of built-in predicates for viewer selection and invocation.
 See the doc string of `TeX-view-predicate-list' for a short
 description of each predicate.")
@@ -1110,7 +1110,7 @@ The following built-in predicates are available:
 ;; Require dbus at compile time to prevent errors due to `dbus-ignore-errors'
 ;; not being defined.
 (eval-when-compile (and (featurep 'dbusbind)
-                       (require 'dbus nil :no-error)))
+                        (require 'dbus nil :no-error)))
 (defun TeX-evince-dbus-p (de app &rest options)
   "Return non-nil, if an evince-compatible reader is accessible via DBUS.
 Additional OPTIONS may be given to extend the check.  If none are
@@ -1122,26 +1122,26 @@ search are checked, too.
 DE is the name of the desktop environment, APP is the name of viewer."
   (let ((dbus-debug nil))
     (and (featurep 'dbusbind)
-        (require 'dbus nil :no-error)
-        (dbus-ignore-errors (dbus-get-unique-name :session))
-        (dbus-ping :session (format "org.%s.%s.Daemon" de app))
-        (or (not (memq :forward options))
-            (let ((spec (dbus-introspect-get-method
-                         :session (format "org.%s.%s.Daemon" de app)
-                         (format "/org/%s/%s/Daemon" de app)
-                         (format "org.%s.%s.Daemon" de app)
-                         "FindDocument")))
-              ;; FindDocument must exist, and its signature must be (String,
-              ;; Boolean, String).  Evince versions between 2.30 and 2.91.x
-              ;; didn't have the Boolean spawn argument we need to start evince
-              ;; initially.
-              (and spec
-                   (equal '("s" "b" "s")
-                          (delq nil (mapcar (lambda (elem)
-                                              (when (and (listp elem)
-                                                         (eq (car elem) 'arg))
-                                                (cdr (caar (cdr elem)))))
-                                            spec)))))))))
+         (require 'dbus nil :no-error)
+         (dbus-ignore-errors (dbus-get-unique-name :session))
+         (dbus-ping :session (format "org.%s.%s.Daemon" de app))
+         (or (not (memq :forward options))
+             (let ((spec (dbus-introspect-get-method
+                          :session (format "org.%s.%s.Daemon" de app)
+                          (format "/org/%s/%s/Daemon" de app)
+                          (format "org.%s.%s.Daemon" de app)
+                          "FindDocument")))
+               ;; FindDocument must exist, and its signature must be (String,
+               ;; Boolean, String).  Evince versions between 2.30 and 2.91.x
+               ;; didn't have the Boolean spawn argument we need to start 
evince
+               ;; initially.
+               (and spec
+                    (equal '("s" "b" "s")
+                           (delq nil (mapcar (lambda (elem)
+                                               (when (and (listp elem)
+                                                          (eq (car elem) 'arg))
+                                                 (cdr (caar (cdr elem)))))
+                                             spec)))))))))
 
 (defun TeX-pdf-tools-sync-view ()
   "Focus the focused page/paragraph in `pdf-view-mode'.
@@ -1156,16 +1156,16 @@ entry in `TeX-view-program-list-builtin'."
   (unless TeX-PDF-mode
     (error "PDF Tools only work with PDF output"))
   (add-hook 'pdf-sync-backward-redirect-functions
-           #'TeX-source-correlate-handle-TeX-region)
+            #'TeX-source-correlate-handle-TeX-region)
   (if (and TeX-source-correlate-mode
-          (fboundp 'pdf-sync-forward-search))
+           (fboundp 'pdf-sync-forward-search))
       (with-current-buffer (or (when TeX-current-process-region-p
-                                (get-file-buffer (TeX-region-file t)))
-                              (current-buffer))
-       (pdf-sync-forward-search))
+                                 (get-file-buffer (TeX-region-file t)))
+                               (current-buffer))
+        (pdf-sync-forward-search))
     (let ((pdf (TeX-active-master (TeX-output-extension))))
       (pop-to-buffer (or (find-buffer-visiting pdf)
-                        (find-file-noselect pdf))))))
+                         (find-file-noselect pdf))))))
 
 (defcustom TeX-view-evince-keep-focus nil
   "Whether Emacs retains the focus when viewing PDF files with Evince.
@@ -1186,35 +1186,39 @@ DE is the name of the desktop environment, APP is the 
name of
 viewer."
   (require 'url-util)
   (let* ((uri (concat "file://"
-                      (url-encode-url
-                      (expand-file-name
-                       (TeX-active-master (TeX-output-extension))))))
-        (owner (dbus-call-method
-                :session (format "org.%s.%s.Daemon" de app)
-                (format "/org/%s/%s/Daemon" de app)
-                (format "org.%s.%s.Daemon" de app)
-                "FindDocument"
-                uri
-                t)))
+                      ;; bug#45510: ? in filenames must be escaped as
+                      ;; %3F to be a proper URI.
+                      (replace-regexp-in-string
+                       "[?]" "%3F"
+                       (url-encode-url
+                        (expand-file-name
+                         (TeX-active-master (TeX-output-extension)))))))
+         (owner (dbus-call-method
+                 :session (format "org.%s.%s.Daemon" de app)
+                 (format "/org/%s/%s/Daemon" de app)
+                 (format "org.%s.%s.Daemon" de app)
+                 "FindDocument"
+                 uri
+                 t)))
     (if owner
-       (with-current-buffer (or (when TeX-current-process-region-p
-                                  (get-file-buffer (TeX-region-file t)))
-                                (current-buffer))
-         (dbus-call-method
-          :session owner
-          (format "/org/%s/%s/Window/0" de app)
-          (format "org.%s.%s.Window" de app)
-          "SyncView"
-          (buffer-file-name)
-          (list :struct :int32 (1+ (TeX-current-offset))
-                ;; FIXME: Using `current-column' here is dubious.
-                ;; Most of CJK letters count as occupying 2 columns,
-                ;; so the column number is not equal to the number of
-                ;; the characters counting from the beginning of a
-                ;; line.  What is the right number to specify here?
-                ;; number of letters? bytes in UTF8? or other?
-                :int32 (1+ (current-column)))
-          :uint32 0)
+        (with-current-buffer (or (when TeX-current-process-region-p
+                                   (get-file-buffer (TeX-region-file t)))
+                                 (current-buffer))
+          (dbus-call-method
+           :session owner
+           (format "/org/%s/%s/Window/0" de app)
+           (format "org.%s.%s.Window" de app)
+           "SyncView"
+           (buffer-file-name)
+           (list :struct :int32 (1+ (TeX-current-offset))
+                 ;; FIXME: Using `current-column' here is dubious.
+                 ;; Most of CJK letters count as occupying 2 columns,
+                 ;; so the column number is not equal to the number of
+                 ;; the characters counting from the beginning of a
+                 ;; line.  What is the right number to specify here?
+                 ;; number of letters? bytes in UTF8? or other?
+                 :int32 (1+ (current-column)))
+           :uint32 0)
           (when TeX-view-evince-keep-focus
             (select-frame-set-input-focus (selected-frame))))
       (error "Couldn't find the %s instance for %s" (capitalize app) uri))))
@@ -1239,36 +1243,36 @@ viewer."
   (if (TeX-evince-dbus-p de app :forward)
       (intern (format "TeX-%s-sync-view" app))
     `(,app (mode-io-correlate
-           ;; With evince 3, -p N opens the page *labeled* N,
-           ;; and -i,--page-index the physical page N.
-           ,(if (string-match "--page-index"
-                              (shell-command-to-string (concat app " --help")))
-                " -i %(outpage)"
-              " -p %(outpage)")) " %o")))
+            ;; With evince 3, -p N opens the page *labeled* N,
+            ;; and -i,--page-index the physical page N.
+            ,(if (string-match "--page-index"
+                               (shell-command-to-string (concat app " 
--help")))
+                 " -i %(outpage)"
+               " -p %(outpage)")) " %o")))
 
 (defvar TeX-view-program-list-builtin
   (cond
    ((eq system-type 'windows-nt)
     '(("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o") "yap")
       ("dviout" ("dviout -1 "
-                ((paper-a4 paper-portrait) "-y=A4 ")
-                ((paper-a4 paper-landscape) "-y=A4L ")
-                ((paper-a5 paper-portrait) "-y=A5 ")
-                ((paper-a5 paper-landscape) "-y=A5L ")
-                ((paper-b5 paper-portrait) "-y=E5 ")
-                ((paper-b5 paper-landscape) "-y=E5L ")
-                ((paper-b4jis paper-portrait) "-y=B4 ")
-                ((paper-b4jis paper-landscape) "-y=B4L ")
-                ((paper-b5jis paper-portrait) "-y=B5 ")
-                ((paper-b5jis paper-landscape) "-y=B5L ")
-                (paper-legal "-y=Legal ")
-                (paper-letter "-y=Letter ")
-                (paper-executive "-y=Executive ")
-                "%d" (mode-io-correlate " \"# %n '%b'\"")) "dviout")
+                 ((paper-a4 paper-portrait) "-y=A4 ")
+                 ((paper-a4 paper-landscape) "-y=A4L ")
+                 ((paper-a5 paper-portrait) "-y=A5 ")
+                 ((paper-a5 paper-landscape) "-y=A5L ")
+                 ((paper-b5 paper-portrait) "-y=E5 ")
+                 ((paper-b5 paper-landscape) "-y=E5L ")
+                 ((paper-b4jis paper-portrait) "-y=B4 ")
+                 ((paper-b4jis paper-landscape) "-y=B4L ")
+                 ((paper-b5jis paper-portrait) "-y=B5 ")
+                 ((paper-b5jis paper-landscape) "-y=B5L ")
+                 (paper-legal "-y=Legal ")
+                 (paper-letter "-y=Letter ")
+                 (paper-executive "-y=Executive ")
+                 "%d" (mode-io-correlate " \"# %n '%b'\"")) "dviout")
       ("PDF Tools" TeX-pdf-tools-sync-view)
       ("SumatraPDF"
        ("SumatraPDF -reuse-instance"
-       (mode-io-correlate " -forward-search \"%b\" %n") " %o")
+        (mode-io-correlate " -forward-search \"%b\" %n") " %o")
        "SumatraPDF")
       ("dvips and start" "dvips %d -o && start \"\" %f" "dvips")
       ("start" "start \"\" %o")))
@@ -1281,16 +1285,16 @@ viewer."
    (t
     `(("dvi2tty" ("dvi2tty -q -w 132 %o"))
       ("xdvi" ("%(o?)xdvi"
-              (mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"")
-              ((paper-a4 paper-portrait) " -paper a4")
-              ((paper-a4 paper-landscape) " -paper a4r")
-              ((paper-a5 paper-portrait) " -paper a5")
-              ((paper-a5 paper-landscape) " -paper a5r")
-              (paper-b5 " -paper b5")
-              (paper-letter " -paper us")
-              (paper-legal " -paper legal")
-              (paper-executive " -paper 7.25x10.5in")
-              " %d") "%(o?)xdvi")
+               (mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"")
+               ((paper-a4 paper-portrait) " -paper a4")
+               ((paper-a4 paper-landscape) " -paper a4r")
+               ((paper-a5 paper-portrait) " -paper a5")
+               ((paper-a5 paper-landscape) " -paper a5r")
+               (paper-b5 " -paper b5")
+               (paper-letter " -paper us")
+               (paper-legal " -paper legal")
+               (paper-executive " -paper 7.25x10.5in")
+               " %d") "%(o?)xdvi")
       ("dvips and gv" "%(o?)dvips %d -o && gv %f" ,(list "%(o?)dvips" "gv"))
       ("gv" "gv %o" "gv")
       ("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate " %(outpage)")) 
"xpdf")
@@ -1302,8 +1306,8 @@ viewer."
       ("PDF Tools" TeX-pdf-tools-sync-view)
       ("Zathura"
        ("zathura %o"
-       (mode-io-correlate
-        " --synctex-forward %n:0:\"%b\" -x \"emacsclient +%{line} %{input}\""))
+        (mode-io-correlate
+         " --synctex-forward %n:0:\"%b\" -x \"emacsclient +%{line} 
%{input}\""))
        "zathura"))))
   "Alist of built-in viewer specifications.
 This variable should not be changed by the user who can use
@@ -1353,33 +1357,33 @@ restarting Emacs."
      (choice
       (group :tag "Command" (string :tag "Command"))
       (group :inline t :tag "Command parts"
-            (repeat
-             :tag "Command parts"
-             (choice
-              (string :tag "Command part")
-              (list :tag "Predicate and command part"
-                    ,(let (list)
-                       ;; Build the list of available predicates.
-                       (mapc (lambda (spec)
-                               (add-to-list 'list `(const ,(car spec))))
-                             (append TeX-view-predicate-list
-                                     TeX-view-predicate-list-builtin))
-                       ;; Sort the list alphabetically.
-                       (setq list (sort list
-                                        (lambda (a b)
-                                          (string<
-                                           (downcase (symbol-name (cadr a)))
-                                           (downcase (symbol-name (cadr 
b)))))))
-                       `(choice
-                         (choice :tag "Predicate" ,@list)
-                         (repeat :tag "List of predicates"
-                                 (choice :tag "Predicate" ,@list))))
-                    (string :tag "Command part")))))
+             (repeat
+              :tag "Command parts"
+              (choice
+               (string :tag "Command part")
+               (list :tag "Predicate and command part"
+                     ,(let (list)
+                        ;; Build the list of available predicates.
+                        (mapc (lambda (spec)
+                                (add-to-list 'list `(const ,(car spec))))
+                              (append TeX-view-predicate-list
+                                      TeX-view-predicate-list-builtin))
+                        ;; Sort the list alphabetically.
+                        (setq list (sort list
+                                         (lambda (a b)
+                                           (string<
+                                            (downcase (symbol-name (cadr a)))
+                                            (downcase (symbol-name (cadr 
b)))))))
+                        `(choice
+                          (choice :tag "Predicate" ,@list)
+                          (repeat :tag "List of predicates"
+                                  (choice :tag "Predicate" ,@list))))
+                     (string :tag "Command part")))))
       (group :tag "Function" function))
      (choice :tag "Viewer executable(s)"
-            (string :tag "One executable")
-            (repeat :tag "List of executables" (string :tag "Name"))
-            (const :tag "No executable" nil)))))
+             (string :tag "One executable")
+             (repeat :tag "List of executables" (string :tag "Name"))
+             (const :tag "No executable" nil)))))
 
 (defcustom TeX-view-program-selection
   (cond
@@ -1414,33 +1418,33 @@ and the viewer related to the first entry all 
predicates of which
 are evaluated positively is chosen."
   :group 'TeX-view
   :type `(alist :key-type
-               ;; Offer list of defined predicates.
-               ,(let (list)
-                  (mapc (lambda (spec)
-                          (add-to-list 'list `(const ,(car spec))))
-                        (append TeX-view-predicate-list
-                                TeX-view-predicate-list-builtin))
-                  (setq list (sort list
-                                   (lambda (a b)
-                                     (string<
-                                      (downcase (symbol-name (cadr a)))
-                                      (downcase (symbol-name (cadr b)))))))
-                  `(choice (choice :tag "Single predicate" ,@list)
-                           (repeat :tag "Multiple predicates"
-                                   (choice ,@list))))
-               :value-type
-               ;; Offer list of defined viewers.
-               (group (choice :tag "Viewer"
-                              ,@(let (list)
-                                  (mapc (lambda (spec)
-                                          (add-to-list 'list
-                                                       `(const ,(car spec))))
-                                        (append TeX-view-program-list
-                                                TeX-view-program-list-builtin))
-                                  (sort list
-                                        (lambda (a b)
-                                          (string< (downcase (cadr a))
-                                                   (downcase (cadr b))))))))))
+                ;; Offer list of defined predicates.
+                ,(let (list)
+                   (mapc (lambda (spec)
+                           (add-to-list 'list `(const ,(car spec))))
+                         (append TeX-view-predicate-list
+                                 TeX-view-predicate-list-builtin))
+                   (setq list (sort list
+                                    (lambda (a b)
+                                      (string<
+                                       (downcase (symbol-name (cadr a)))
+                                       (downcase (symbol-name (cadr b)))))))
+                   `(choice (choice :tag "Single predicate" ,@list)
+                            (repeat :tag "Multiple predicates"
+                                    (choice ,@list))))
+                :value-type
+                ;; Offer list of defined viewers.
+                (group (choice :tag "Viewer"
+                               ,@(let (list)
+                                   (mapc (lambda (spec)
+                                           (add-to-list 'list
+                                                        `(const ,(car spec))))
+                                         (append TeX-view-program-list
+                                                 
TeX-view-program-list-builtin))
+                                   (sort list
+                                         (lambda (a b)
+                                           (string< (downcase (cadr a))
+                                                    (downcase (cadr b))))))))))
 
 (defun TeX-match-style (regexp)
   "Check if a style matching REGEXP is active."
@@ -1454,67 +1458,67 @@ In case of a single symbol, return t if the predicate 
is true,
 nil otherwise.  In case of a list of symbols, return t if all
 predicates are true, nil otherwise."
   (let ((pred-symbols (if (listp predicate) predicate (list predicate)))
-       (pred-defs (append TeX-view-predicate-list
-                          TeX-view-predicate-list-builtin))
-       (result t)
-       elt)
+        (pred-defs (append TeX-view-predicate-list
+                           TeX-view-predicate-list-builtin))
+        (result t)
+        elt)
     (while (and (setq elt (pop pred-symbols)) result)
       (unless (eval (cadr (assq elt pred-defs)))
-       (setq result nil)))
+        (setq result nil)))
     result))
 
 (defun TeX-view-command-raw ()
   "Choose a viewer and return its unexpanded command string."
   (let ((selection TeX-view-program-selection)
-       entry viewer item executable spec command)
+        entry viewer item executable spec command)
     ;; Find the appropriate viewer.
     (while (and (setq entry (pop selection)) (not viewer))
       (when (TeX-view-match-predicate (car entry))
-       (setq viewer (cadr entry))))
+        (setq viewer (cadr entry))))
     (unless viewer
       (error "No matching viewer found"))
     (setq item (assoc viewer (append TeX-view-program-list
-                                    TeX-view-program-list-builtin))
-         ;; Get the command line or function spec.
-         spec (cadr item)
-         ;; Get the name of the executable(s) associated to the viewer.
-         executable (nth 2 item))
+                                     TeX-view-program-list-builtin))
+          ;; Get the command line or function spec.
+          spec (cadr item)
+          ;; Get the name of the executable(s) associated to the viewer.
+          executable (nth 2 item))
     ;; Check the executable exists.
     (unless (or (null executable)
-               (cond
-                ((stringp executable)
-                 (executable-find (TeX-command-expand executable)))
-                ((listp executable)
-                 (catch 'notfound
-                   (dolist (exec executable t)
-                     (unless (executable-find (TeX-command-expand exec))
-                       (throw 'notfound nil)))))))
+                (cond
+                 ((stringp executable)
+                  (executable-find (TeX-command-expand executable)))
+                 ((listp executable)
+                  (catch 'notfound
+                    (dolist (exec executable t)
+                      (unless (executable-find (TeX-command-expand exec))
+                        (throw 'notfound nil)))))))
       (error (format "Cannot find %S viewer.  \
 Select another one in `TeX-view-program-selection'" viewer)))
     (cond ((functionp spec)
-          ;; Converting the function call to a string is ugly, but
-          ;; the backend currently only supports strings.
-          (prin1-to-string spec))
-         ((stringp spec)
-          spec)
-         ((null spec)
-          (error
-           (format "Unknown %S viewer. \
+           ;; Converting the function call to a string is ugly, but
+           ;; the backend currently only supports strings.
+           (prin1-to-string spec))
+          ((stringp spec)
+           spec)
+          ((null spec)
+           (error
+            (format "Unknown %S viewer. \
 Check the `TeX-view-program-selection' variable" viewer)))
-         (t
-          ;; Build the unexpanded command line.  Pieces with predicates are
-          ;; only added if the predicate is evaluated positively.
-          (dolist (elt spec)
-            (cond ((stringp elt)
-                   (setq command (concat command elt)))
-                  ((listp elt)
-                   (when (TeX-view-match-predicate (car elt))
-                     (setq command (concat command (cadr elt)))))))
-          (if (stringp command)
-              command
-            ;; Signal an error if `command' isn't a string.  This prevents an
-            ;; infinite loop in `TeX-command-expand' if `command' is nil.
-            (error "Wrong viewer specification in 
`TeX-view-program-list'"))))))
+          (t
+           ;; Build the unexpanded command line.  Pieces with predicates are
+           ;; only added if the predicate is evaluated positively.
+           (dolist (elt spec)
+             (cond ((stringp elt)
+                    (setq command (concat command elt)))
+                   ((listp elt)
+                    (when (TeX-view-match-predicate (car elt))
+                      (setq command (concat command (cadr elt)))))))
+           (if (stringp command)
+               command
+             ;; Signal an error if `command' isn't a string.  This prevents an
+             ;; infinite loop in `TeX-command-expand' if `command' is nil.
+             (error "Wrong viewer specification in 
`TeX-view-program-list'"))))))
 
 ;;; Engine
 
@@ -1544,10 +1548,10 @@ You can override a built-in engine defined in the 
variable
 same symbol as the built-in entry to `TeX-engine-alist'."
   :group 'TeX-command
   :type '(repeat (group symbol
-                       (string :tag "Name")
-                       (choice :tag "Plain TeX command" string variable)
-                       (choice :tag "LaTeX command" string variable)
-                       (choice :tag "ConTeXt command" string variable))))
+                        (string :tag "Name")
+                        (choice :tag "Plain TeX command" string variable)
+                        (choice :tag "LaTeX command" string variable)
+                        (choice :tag "ConTeXt command" string variable))))
 
 (defun TeX-engine-alist ()
   "Return an alist of TeX engines.
@@ -1564,19 +1568,19 @@ Throw an error if `engine' is not present in the alist."
   (or
    (assq engine (TeX-engine-alist))
    (error "`%s' is not a known engine.  Valid values are: %s." engine
-         (mapconcat
-          (lambda (x) (prin1-to-string (car x)))
-          (TeX-engine-alist) ", "))))
+          (mapconcat
+           (lambda (x) (prin1-to-string (car x)))
+           (TeX-engine-alist) ", "))))
 
 (defcustom TeX-engine 'default
   (concat "Type of TeX engine to use.
 It should be one of the following symbols:\n\n"
-         (mapconcat (lambda (x) (format "* `%s'" (car x)))
-                    (TeX-engine-alist) "\n"))
+          (mapconcat (lambda (x) (format "* `%s'" (car x)))
+                     (TeX-engine-alist) "\n"))
   :group 'TeX-command
   :type `(choice ,@(mapcar (lambda (x)
-                            `(const :tag ,(nth 1 x) ,(car x)))
-                          (TeX-engine-alist))))
+                             `(const :tag ,(nth 1 x) ,(car x)))
+                           (TeX-engine-alist))))
 (make-variable-buffer-local 'TeX-engine)
 (put 'TeX-engine 'safe-local-variable
      (lambda (arg) (memq arg (mapcar 'car TeX-engine-alist-builtin))))
@@ -1585,18 +1589,18 @@ It should be one of the following symbols:\n\n"
   "Set TeX engine to TYPE.
 For available TYPEs, see variable `TeX-engine'."
   (interactive (list (completing-read "Engine: "
-                                     (mapcar (lambda (x)
-                                               (symbol-name (car x)))
-                                             (TeX-engine-alist))
-                                     nil t)))
+                                      (mapcar (lambda (x)
+                                                (symbol-name (car x)))
+                                              (TeX-engine-alist))
+                                      nil t)))
   (when (stringp type)
     (setq type (intern type)))
   (setq TeX-engine type)
   ;; Automatically enable or disable TeX PDF mode as a convenience
   (cond ((eq type 'xetex)
-        (TeX-PDF-mode 1)
-        (setq TeX-PDF-from-DVI nil))
-       ((eq type 'omega) (TeX-PDF-mode 0))))
+         (TeX-PDF-mode 1)
+         (setq TeX-PDF-from-DVI nil))
+        ((eq type 'omega) (TeX-PDF-mode 0))))
 
 (define-minor-mode TeX-Omega-mode
   "Minor mode for using the Omega engine."
@@ -1629,17 +1633,17 @@ Programs should not use this variable directly but the 
function
 `TeX-source-correlate-method-active' which returns the method
 actually used for forward and inverse search."
   :type '(choice (const auto)
-                (const synctex)
-                (const source-specials)
-                (list :tag "Different method for DVI and PDF"
-                      (cons (const dvi)
-                            (choice :tag "Method for DVI mode"
-                                    (const synctex)
-                                    (const source-specials)))
-                      (cons (const pdf)
-                            (choice :tag "Method for PDF mode"
-                                    (const synctex)
-                                    (const source-specials)))))
+                 (const synctex)
+                 (const source-specials)
+                 (list :tag "Different method for DVI and PDF"
+                       (cons (const dvi)
+                             (choice :tag "Method for DVI mode"
+                                     (const synctex)
+                                     (const source-specials)))
+                       (cons (const pdf)
+                             (choice :tag "Method for PDF mode"
+                                     (const synctex)
+                                     (const source-specials)))))
   :group 'TeX-view)
 
 (defvar TeX-source-correlate-output-page-function nil
@@ -1651,8 +1655,8 @@ as a string.")
 (defcustom TeX-source-correlate-start-server 'ask
   "Control if server should be started for inverse search."
   :type '(choice (const :tag "Always" t)
-                (const :tag "Never" nil)
-                (const :tag "Ask" ask))
+                 (const :tag "Never" nil)
+                 (const :tag "Ask" ask))
   :group 'TeX-view)
 (when (fboundp 'defvaralias)
   (defvaralias 'TeX-source-specials-view-start-server
@@ -1669,48 +1673,48 @@ search, can set the variable.")
 (defun TeX-source-correlate-gnuserv-p ()
   "Guess whether to use gnuserv when a server is requested."
   (cond ((and (boundp 'gnuserv-process)
-             (processp gnuserv-process)))
-       ((and (boundp 'server-process)
-             (processp server-process))
-        nil)))
+              (processp gnuserv-process)))
+        ((and (boundp 'server-process)
+              (processp server-process))
+         nil)))
 
 (defun TeX-source-correlate-server-enabled-p ()
   "Return non-nil if Emacs server or gnuserv is enabled."
   (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p))
-        (process (if gnuserv-p 'gnuserv-process 'server-process)))
+         (process (if gnuserv-p 'gnuserv-process 'server-process)))
     (and (boundp process) (processp (symbol-value process)))))
 
 (defun TeX-source-correlate-start-server-maybe ()
   "Start Emacs server or gnuserv if a feature using it is enabled.
 This is the case if `TeX-source-correlate-start-server-flag' is non-nil."
   (when (and TeX-source-correlate-start-server-flag
-            (not (TeX-source-correlate-server-enabled-p)))
+             (not (TeX-source-correlate-server-enabled-p)))
     (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p))
-          (start (if gnuserv-p 'gnuserv-start 'server-start)))
+           (start (if gnuserv-p 'gnuserv-start 'server-start)))
       (cond
        ;; Server should be started unconditionally
        ((eq TeX-source-correlate-start-server t)
-       (funcall start))
+        (funcall start))
        ;; Ask user if server is to be started
        ((and (eq TeX-source-correlate-start-server 'ask)
-            (not TeX-source-correlate-start-server-asked)
-            (prog1
-                (y-or-n-p (format "Start %s for inverse search in viewer? "
-                                  (if gnuserv-p
-                                      "gnuserv"
-                                    "Emacs server")))
-              (setq TeX-source-correlate-start-server-asked t)))
-       (funcall start))))))
+             (not TeX-source-correlate-start-server-asked)
+             (prog1
+                 (y-or-n-p (format "Start %s for inverse search in viewer? "
+                                   (if gnuserv-p
+                                       "gnuserv"
+                                     "Emacs server")))
+               (setq TeX-source-correlate-start-server-asked t)))
+        (funcall start))))))
 
 (defun TeX-source-correlate-determine-method ()
   "Determine which method is available for forward and inverse search."
   (let ((help (condition-case nil
-                 (with-output-to-string
-                   (call-process LaTeX-command
-                                 nil (list standard-output nil) nil "--help"))
-               (error ""))))
+                  (with-output-to-string
+                    (call-process LaTeX-command
+                                  nil (list standard-output nil) nil "--help"))
+                (error ""))))
     (if (string-match "^[ ]*-?-synctex" help)
-       'synctex
+        'synctex
       'source-specials)))
 
 (defun TeX-source-correlate-method-active ()
@@ -1720,7 +1724,7 @@ This is the case if 
`TeX-source-correlate-start-server-flag' is non-nil."
     (TeX-source-correlate-determine-method))
    ((listp TeX-source-correlate-method)
     (if TeX-PDF-mode
-       (cdr (assoc 'pdf TeX-source-correlate-method))
+        (cdr (assoc 'pdf TeX-source-correlate-method))
       (cdr (assoc 'dvi TeX-source-correlate-method))))
    (t
     TeX-source-correlate-method)))
@@ -1731,15 +1735,15 @@ The return value depends on the value of 
`TeX-source-correlate-mode'.
 If this is nil, an empty string will be returned."
   (if TeX-source-correlate-mode
       (if (eq (TeX-source-correlate-method-active) 'source-specials)
-         (concat TeX-source-specials-tex-flags
-                 (if TeX-source-specials-places
-                     ;; -src-specials=WHERE: insert source specials
-                     ;; in certain places of the DVI file. WHERE is a
-                     ;; comma-separated value list: cr display hbox
-                     ;; math par parend vbox
-                     (concat "=" (mapconcat 'identity
-                                            TeX-source-specials-places ","))))
-       TeX-synctex-tex-flags)
+          (concat TeX-source-specials-tex-flags
+                  (if TeX-source-specials-places
+                      ;; -src-specials=WHERE: insert source specials
+                      ;; in certain places of the DVI file. WHERE is a
+                      ;; comma-separated value list: cr display hbox
+                      ;; math par parend vbox
+                      (concat "=" (mapconcat 'identity
+                                             TeX-source-specials-places ","))))
+        TeX-synctex-tex-flags)
     ""))
 
 (defvar TeX-source-correlate-map (make-sparse-keymap)
@@ -1751,17 +1755,17 @@ You could use this for unusual mouse bindings.")
 That is, if FILE is `TeX-region', update FILE to the real tex
 file and LINE to (+ LINE offset-of-region).  Else, return nil."
   (when (string-equal TeX-region (file-name-sans-extension
-                                 (file-name-nondirectory file)))
+                                  (file-name-nondirectory file)))
     (with-current-buffer (or (find-buffer-visiting file)
-                            (find-file-noselect file))
+                             (find-file-noselect file))
       (goto-char 0)
       ;; Same regexp used in `preview-parse-messages'.  XXX: XEmacs doesn't
       ;; support regexp classes, so we can't use "[:digit:]" here.
       (when (re-search-forward "!offset(\\([---0-9]+\\))" nil t)
-       (let ((offset (string-to-number (match-string-no-properties 1))))
-         (when TeX-region-orig-buffer
-           (list (expand-file-name (buffer-file-name TeX-region-orig-buffer))
-                 (+ line offset) col)))))))
+        (let ((offset (string-to-number (match-string-no-properties 1))))
+          (when TeX-region-orig-buffer
+            (list (expand-file-name (buffer-file-name TeX-region-orig-buffer))
+                  (+ line offset) col)))))))
 
 (defcustom TeX-raise-frame-function #'raise-frame
   "A function which will be called to raise the Emacs frame.
@@ -1803,34 +1807,34 @@ If the Emacs frame isn't raised, customize
   ;; absolute file:// URL.  In the former case, the tex file has to be already
   ;; opened.
   (let* ((file (progn
-                (require 'url-parse)
-                (require 'url-util)
-                (url-unhex-string (aref (url-generic-parse-url file) 6))))
-        (flc (or (apply #'TeX-source-correlate-handle-TeX-region file linecol)
-                 (apply #'list file linecol)))
-        (file (car flc))
-        (line (cadr flc))
-        (col  (nth 2 flc)))
+                 (require 'url-parse)
+                 (require 'url-util)
+                 (url-unhex-string (aref (url-generic-parse-url file) 6))))
+         (flc (or (apply #'TeX-source-correlate-handle-TeX-region file linecol)
+                  (apply #'list file linecol)))
+         (file (car flc))
+         (line (cadr flc))
+         (col  (nth 2 flc)))
     (pop-to-buffer (or (find-buffer-visiting file)
                        (find-file-noselect file)))
     (push-mark nil 'nomsg)
     (let ((pos
-          (when (> line 0)
-            (save-excursion
-              (save-restriction
-                (widen)
-                (goto-char 1)
-                (forward-line (1- line))
-                (when (> col 0)
-                  (forward-char (1- col)))
-                (point))))))
+           (when (> line 0)
+             (save-excursion
+               (save-restriction
+                 (widen)
+                 (goto-char 1)
+                 (forward-line (1- line))
+                 (when (> col 0)
+                   (forward-char (1- col)))
+                 (point))))))
       (when pos
-       (when (or (< pos (point-min))
-                 (> pos (point-max)))
-         (widen))
-       (goto-char pos))
+        (when (or (< pos (point-min))
+                  (> pos (point-max)))
+          (widen))
+        (goto-char pos))
       (when TeX-raise-frame-function
-       (funcall TeX-raise-frame-function)))))
+        (funcall TeX-raise-frame-function)))))
 
 (define-minor-mode TeX-source-correlate-mode
   "Minor mode for forward and inverse search.
@@ -1850,7 +1854,7 @@ SyncTeX are recognized."
   ;; buffer-local.
   :global t
   (set-keymap-parent TeX-mode-map (and TeX-source-correlate-mode
-                                      TeX-source-correlate-map))
+                                       TeX-source-correlate-map))
   (TeX-set-mode-name 'TeX-source-correlate-mode t t)
   (setq TeX-source-correlate-start-server-flag TeX-source-correlate-mode)
   ;; Register Emacs for the SyncSource DBUS signal emitted by
@@ -1869,7 +1873,7 @@ SyncTeX are recognized."
 (put 'TeX-source-correlate-mode 'safe-local-variable #'booleanp)
 (setq minor-mode-map-alist
       (delq (assq 'TeX-source-correlate-mode minor-mode-map-alist)
-           minor-mode-map-alist))
+            minor-mode-map-alist))
 
 
 ;;; Source Specials
@@ -1884,18 +1888,18 @@ SyncTeX are recognized."
 If nil, use (La)TeX's defaults."
   :group 'TeX-view
   :type '(list (set :inline t
-                   ;; :tag "Options known to work"
-                   ;; cr display hbox math par parend vbox
-                   (const "cr")
-                   (const "display")
-                   (const "hbox")
-                   (const "math")
-                   (const "par")
-                   (const "parend")
-                   (const "vbox"))
-              (repeat :inline t
-                      :tag "Other options"
-                      (string))))
+                    ;; :tag "Options known to work"
+                    ;; cr display hbox math par parend vbox
+                    (const "cr")
+                    (const "display")
+                    (const "hbox")
+                    (const "math")
+                    (const "par")
+                    (const "parend")
+                    (const "vbox"))
+               (repeat :inline t
+                       :tag "Other options"
+                       (string))))
 
 (defcustom TeX-source-specials-view-position-flags
   "-sourceposition \"%n %b\""
@@ -1926,17 +1930,17 @@ If nil, use (La)TeX's defaults."
   "Return gnuclient or emacslient executable with options.
 Return the full path to the executable if possible."
   (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p))
-        (client-base (if gnuserv-p
-                         "gnuclient"
-                       "emacsclient"))
-        (client-full (and invocation-directory
-                          (expand-file-name client-base
-                                            invocation-directory)))
-        (options (if gnuserv-p
-                     TeX-source-specials-view-gnuclient-flags
-                   TeX-source-specials-view-emacsclient-flags)))
+         (client-base (if gnuserv-p
+                          "gnuclient"
+                        "emacsclient"))
+         (client-full (and invocation-directory
+                           (expand-file-name client-base
+                                             invocation-directory)))
+         (options (if gnuserv-p
+                      TeX-source-specials-view-gnuclient-flags
+                    TeX-source-specials-view-emacsclient-flags)))
     (if (and client-full (file-executable-p client-full))
-       (concat client-full " " options)
+        (concat client-full " " options)
       (concat client-base " " options))))
 
 (defun TeX-source-specials-view-expand-options (&optional _viewer)
@@ -1947,10 +1951,10 @@ The return value depends on the values of
 `source-specials' respectively, an empty string will be
 returned."
   (if (and TeX-source-correlate-mode
-          (eq (TeX-source-correlate-method-active) 'source-specials))
+           (eq (TeX-source-correlate-method-active) 'source-specials))
       (concat TeX-source-specials-view-position-flags
-             (when (TeX-source-correlate-server-enabled-p)
-               (concat " " TeX-source-specials-view-editor-flags)))
+              (when (TeX-source-correlate-server-enabled-p)
+                (concat " " TeX-source-specials-view-editor-flags)))
     ""))
 
 ;;; SyncTeX
@@ -1963,15 +1967,15 @@ returned."
 This method assumes that the document was compiled with SyncTeX
 enabled and the `synctex' binary is available."
   (let ((synctex-output
-        (with-output-to-string
-          (call-process "synctex" nil (list standard-output nil) nil "view"
-                        "-i" (format "%s:%s:%s" (1+ (TeX-current-offset))
-                                     ;; FIXME: Using `current-column'
-                                     ;; here is dubious.  See comment in
-                                     ;; `TeX-evince-sync-view-1'.
-                                     (1+ (current-column))
-                                     file)
-                        "-o" (TeX-active-master (TeX-output-extension))))))
+         (with-output-to-string
+           (call-process "synctex" nil (list standard-output nil) nil "view"
+                         "-i" (format "%s:%s:%s" (1+ (TeX-current-offset))
+                                      ;; FIXME: Using `current-column'
+                                      ;; here is dubious.  See comment in
+                                      ;; `TeX-evince-sync-view-1'.
+                                      (1+ (current-column))
+                                      file)
+                         "-o" (TeX-active-master (TeX-output-extension))))))
     (when (string-match "^Page:\\([0-9]+\\)" synctex-output)
       (match-string 1 synctex-output))))
 
@@ -1980,19 +1984,19 @@ enabled and the `synctex' binary is available."
 This method assumes that the document was compiled with SyncTeX
 enabled and the `synctex' binary is available."
   (let* ((file (file-relative-name (buffer-file-name)
-                                  (file-name-directory
-                                   (TeX-active-master))))
-        (abs-file (concat (expand-file-name (or (file-name-directory 
(TeX-active-master))
-                                                (file-name-directory 
(buffer-file-name))))
-                          "./" file)))
+                                   (file-name-directory
+                                    (TeX-active-master))))
+         (abs-file (concat (expand-file-name (or (file-name-directory 
(TeX-active-master))
+                                                 (file-name-directory 
(buffer-file-name))))
+                           "./" file)))
     ;; It's known that depending on synctex version one of
     ;; /absolute/path/./foo/bar.tex, foo/bar.tex, or ./foo/bar.tex (relative to
     ;; TeX-master, and the "." in the absolute path is important) are needed.
     ;; So try all variants before falling back to page 1.
     (or (TeX-synctex-output-page-1 abs-file)
-       (TeX-synctex-output-page-1 file)
-       (TeX-synctex-output-page-1 (concat "./" file))
-       "1")))
+        (TeX-synctex-output-page-1 file)
+        (TeX-synctex-output-page-1 (concat "./" file))
+        "1")))
 
 ;;; Miscellaneous minor modes
 
@@ -2022,7 +2026,7 @@ function `TeX-global-PDF-mode' for toggling this value."
   (setq TeX-PDF-mode-parsed nil)
   (TeX-set-mode-name nil nil t)
   (setq TeX-output-extension
-       (if TeX-PDF-mode "pdf" "dvi")))
+        (if TeX-PDF-mode "pdf" "dvi")))
 (add-to-list 'minor-mode-alist '(TeX-PDF-mode ""))
 
 (defun TeX-global-PDF-mode (&optional arg)
@@ -2030,8 +2034,8 @@ function `TeX-global-PDF-mode' for toggling this value."
   (interactive "P")
   (prog1
       (setq-default TeX-PDF-mode
-                   (if arg (> (prefix-numeric-value arg) 0)
-                     (not (default-value 'TeX-PDF-mode))))
+                    (if arg (> (prefix-numeric-value arg) 0)
+                      (not (default-value 'TeX-PDF-mode))))
     (TeX-set-mode-name 'TeX-PDF-mode nil t)))
 
 (defalias 'tex-pdf-mode 'TeX-PDF-mode)
@@ -2055,7 +2059,7 @@ already established, don't do anything."
 
   (if TeX-PDF-mode-parsed
       (unless (eq TeX-PDF-mode arg)
-       (TeX-PDF-mode (if (default-value 'TeX-PDF-mode) 1 0)))
+        (TeX-PDF-mode (if (default-value 'TeX-PDF-mode) 1 0)))
     (unless (local-variable-p 'TeX-PDF-mode (current-buffer))
       (TeX-PDF-mode (if arg 1 0))
       (setq TeX-PDF-mode-parsed t))))
@@ -2092,9 +2096,9 @@ Programs should not use this variable directly but the 
function
 `TeX-PDF-via-dvips-ps2pdf'."
   :group 'TeX-command
   :type '(choice
-         (const :tag "No DVI to PDF conversion" nil)
-         (const :tag "dvips - ps2pdf sequence" "Dvips")
-         (const :tag "dvipdfmx" "Dvipdfmx")))
+          (const :tag "No DVI to PDF conversion" nil)
+          (const :tag "dvips - ps2pdf sequence" "Dvips")
+          (const :tag "dvipdfmx" "Dvipdfmx")))
 ;; If you plan to support new values of `TeX-PDF-from-DVI' remember to update
 ;; `TeX-command-default' accordingly.
 (make-variable-buffer-local 'TeX-PDF-from-DVI)
@@ -2207,34 +2211,34 @@ If prefix ARG is non-nil, not only remove intermediate 
but also
 output files."
   (interactive "P")
   (let* ((mode-prefix (TeX-mode-prefix))
-        (suffixes (append (symbol-value
-                           (intern (concat mode-prefix
-                                           "-clean-intermediate-suffixes")))
-                          (when arg
-                            (symbol-value
-                             (intern (concat mode-prefix
-                                             "-clean-output-suffixes"))))))
-        (master (TeX-active-master))
-        (master-dir (file-name-directory master))
-        (regexp (concat "\\("
-                        (regexp-quote (file-name-nondirectory master)) "\\|"
-                        (regexp-quote (TeX-region-file nil t))
-                        "\\)"
-                        "\\("
-                        (mapconcat 'identity suffixes "\\|")
-                        "\\)\\'"
-                        "\\|" (regexp-quote (TeX-region-file t t))))
-        (files (when regexp
-                 (directory-files (or master-dir ".") nil regexp))))
+         (suffixes (append (symbol-value
+                            (intern (concat mode-prefix
+                                            "-clean-intermediate-suffixes")))
+                           (when arg
+                             (symbol-value
+                              (intern (concat mode-prefix
+                                              "-clean-output-suffixes"))))))
+         (master (TeX-active-master))
+         (master-dir (file-name-directory master))
+         (regexp (concat "\\("
+                         (regexp-quote (file-name-nondirectory master)) "\\|"
+                         (regexp-quote (TeX-region-file nil t))
+                         "\\)"
+                         "\\("
+                         (mapconcat 'identity suffixes "\\|")
+                         "\\)\\'"
+                         "\\|" (regexp-quote (TeX-region-file t t))))
+         (files (when regexp
+                  (directory-files (or master-dir ".") nil regexp))))
     (if files
-       (when (or (not TeX-clean-confirm)
-                 (dired-mark-pop-up " *Deletions*" 'delete
-                                    (if (> (length files) 1)
-                                        files
-                                      (cons t files))
-                                    'y-or-n-p "Delete files? "))
-         (dolist (file files)
-           (delete-file (concat master-dir file))))
+        (when (or (not TeX-clean-confirm)
+                  (dired-mark-pop-up " *Deletions*" 'delete
+                                     (if (> (length files) 1)
+                                         files
+                                       (cons t files))
+                                     'y-or-n-p "Delete files? "))
+          (dolist (file files)
+            (delete-file (concat master-dir file))))
       (message "No files to be deleted"))))
 
 ;;; Master File
@@ -2261,15 +2265,15 @@ the Emacs manual) to set this variable permanently for 
each file."
   :group 'TeX-command
   :group 'TeX-parse
   :type '(choice (const :tag "Query" nil)
-                (const :tag "This file" t)
-                (const :tag "Shared" shared)
-                (const :tag "Dwim" dwim)
-                (string :format "%v")))
+                 (const :tag "This file" t)
+                 (const :tag "Shared" shared)
+                 (const :tag "Dwim" dwim)
+                 (string :format "%v")))
 (make-variable-buffer-local 'TeX-master)
 (put 'TeX-master 'safe-local-variable
      '(lambda (x)
-       (or (stringp x)
-           (member x (quote (t nil shared dwim))))))
+        (or (stringp x)
+            (member x (quote (t nil shared dwim))))))
 
 (defcustom TeX-one-master "\\.\\(texi?\\|dtx\\)$"
   "Regular expression matching ordinary TeX files.
@@ -2294,8 +2298,8 @@ this variable to \"<none>\"."
     (cl-loop for buf in (buffer-list)
              until
              (when (with-current-buffer buf
-                    (and (equal dir default-directory)
-                         (stringp TeX-master)))
+                     (and (equal dir default-directory)
+                          (stringp TeX-master)))
                (cl-return (with-current-buffer buf TeX-master))))))
 
 (defun TeX-master-file-ask ()
@@ -2304,31 +2308,31 @@ this variable to \"<none>\"."
   (if (TeX-local-master-p)
       (error "Master file already set")
     (let* ((default (TeX-dwim-master))
-          (name (or (and (eq 'dwim TeX-master) default)
-                    (condition-case nil
-                        (read-file-name (format "Master file (default %s): "
-                                                (or default "this file"))
-                                        nil default)
-                      (quit "<quit>")))))
+           (name (or (and (eq 'dwim TeX-master) default)
+                     (condition-case nil
+                         (read-file-name (format "Master file (default %s): "
+                                                 (or default "this file"))
+                                         nil default)
+                       (quit "<quit>")))))
       (cond ((string= name "<quit>")
-            (setq TeX-master t))
-           ((string= name default)
-            (setq TeX-master default)
-            (TeX-add-local-master))
-           ((or
-             ;; Default `read-file-name' proposes and buffer visits a file.
-             (string= (expand-file-name name) (buffer-file-name))
-             ;; Default of `read-file-name' and buffer does not visit a file.
-             (string= name default-directory)
-             ;; User typed <RET> in an empty minibuffer.
-             (string= name ""))
-            (setq TeX-master t)
-            (TeX-add-local-master))
-           (t
-            (setq TeX-master (TeX-strip-extension (file-relative-name name)
-                                                  (list TeX-default-extension)
-                                                  'path))
-            (TeX-add-local-master))))))
+             (setq TeX-master t))
+            ((string= name default)
+             (setq TeX-master default)
+             (TeX-add-local-master))
+            ((or
+              ;; Default `read-file-name' proposes and buffer visits a file.
+              (string= (expand-file-name name) (buffer-file-name))
+              ;; Default of `read-file-name' and buffer does not visit a file.
+              (string= name default-directory)
+              ;; User typed <RET> in an empty minibuffer.
+              (string= name ""))
+             (setq TeX-master t)
+             (TeX-add-local-master))
+            (t
+             (setq TeX-master (TeX-strip-extension (file-relative-name name)
+                                                   (list TeX-default-extension)
+                                                   'path))
+             (TeX-add-local-master))))))
 
 (defun TeX-master-file (&optional extension nondirectory ask)
   "Set and return the name of the master file for the current document.
@@ -2345,70 +2349,70 @@ name of master file if it cannot be determined 
otherwise."
   (if (eq extension t)
       (setq extension TeX-default-extension))
   (let ((my-name (if (buffer-file-name)
-                    (TeX-strip-extension nil (list TeX-default-extension) t)
-                  "<none>")))
+                     (TeX-strip-extension nil (list TeX-default-extension) t)
+                   "<none>")))
     (save-excursion
       (save-restriction
-       (widen)
-       (goto-char (point-min))
-       (cond
-        ((and TeX-transient-master
-              (or (not TeX-master) (eq TeX-master 'shared)))
-         (setq TeX-master TeX-transient-master))
-        ;; Special value 't means it is own master (a free file).
-        ((equal TeX-master my-name)
-         (setq TeX-master t))
-
-        ;; For files shared between many documents.
-        ((and (eq 'shared TeX-master) ask)
-         (setq TeX-master
-               (let* ((default (TeX-dwim-master))
-                      (name (read-file-name
-                             (format "Master file (default %s): "
-                                     (or default "this file"))
-                             nil default)))
-                 (cond ((string= name default)
-                        default)
-                       ((or
-                         ;; Default `read-file-name' proposes and
-                         ;; buffer visits a file.
-                         (string= (expand-file-name name)
-                                  (buffer-file-name))
-                         ;; Default of `read-file-name' and
-                         ;; buffer does not visit a file.
-                         (string= name default-directory)
-                         ;; User typed <RET> in an empty minibuffer.
-                         (string= name ""))
-                        t)
-                       (t
-                        (TeX-strip-extension
-                         name (list TeX-default-extension) 'path))))))
-
-        ;; We might already know the name.
-        ((or (eq TeX-master t) (stringp TeX-master)) TeX-master)
-
-        ;; Ask the user (but add it as a local variable).
-        (ask (TeX-master-file-ask)))))
+        (widen)
+        (goto-char (point-min))
+        (cond
+         ((and TeX-transient-master
+               (or (not TeX-master) (eq TeX-master 'shared)))
+          (setq TeX-master TeX-transient-master))
+         ;; Special value 't means it is own master (a free file).
+         ((equal TeX-master my-name)
+          (setq TeX-master t))
+
+         ;; For files shared between many documents.
+         ((and (eq 'shared TeX-master) ask)
+          (setq TeX-master
+                (let* ((default (TeX-dwim-master))
+                       (name (read-file-name
+                              (format "Master file (default %s): "
+                                      (or default "this file"))
+                              nil default)))
+                  (cond ((string= name default)
+                         default)
+                        ((or
+                          ;; Default `read-file-name' proposes and
+                          ;; buffer visits a file.
+                          (string= (expand-file-name name)
+                                   (buffer-file-name))
+                          ;; Default of `read-file-name' and
+                          ;; buffer does not visit a file.
+                          (string= name default-directory)
+                          ;; User typed <RET> in an empty minibuffer.
+                          (string= name ""))
+                         t)
+                        (t
+                         (TeX-strip-extension
+                          name (list TeX-default-extension) 'path))))))
+
+         ;; We might already know the name.
+         ((or (eq TeX-master t) (stringp TeX-master)) TeX-master)
+
+         ;; Ask the user (but add it as a local variable).
+         (ask (TeX-master-file-ask)))))
 
     (let ((name (if (stringp TeX-master)
-                   TeX-master
-                 my-name)))
+                    TeX-master
+                  my-name)))
 
       (if (TeX-match-extension name)
-         ;; If it already has an extension...
-         (if (equal extension TeX-default-extension)
-             ;; Use instead of the default extension
-             (setq extension nil)
-           ;; Otherwise drop it.
-           (setq name (TeX-strip-extension name))))
+          ;; If it already has an extension...
+          (if (equal extension TeX-default-extension)
+              ;; Use instead of the default extension
+              (setq extension nil)
+            ;; Otherwise drop it.
+            (setq name (TeX-strip-extension name))))
 
       ;; Remove directory if needed.
       (if nondirectory
-         (setq name (file-name-nondirectory name)))
+          (setq name (file-name-nondirectory name)))
 
       (if extension
-         (concat name "." extension)
-       name))))
+          (concat name "." extension)
+        name))))
 
 (defun TeX-master-directory ()
   "Directory of master file."
@@ -2417,52 +2421,52 @@ name of master file if it cannot be determined 
otherwise."
     (substitute-in-file-name
      (expand-file-name
       (let ((dir (file-name-directory (TeX-master-file))))
-       (if dir (directory-file-name dir) "."))
+        (if dir (directory-file-name dir) "."))
       (and buffer-file-name
-          (file-name-directory buffer-file-name)))))))
+           (file-name-directory buffer-file-name)))))))
 
 (defun TeX-add-local-master ()
   "Add local variable for `TeX-master'.
 
 Get `major-mode' from master file and enable it."
   (when (and (buffer-file-name)
-            (string-match TeX-one-master
-                          (file-name-nondirectory (buffer-file-name)))
-            (not buffer-read-only))
+             (string-match TeX-one-master
+                           (file-name-nondirectory (buffer-file-name)))
+             (not buffer-read-only))
     (goto-char (point-max))
     (if (re-search-backward "^\\([^\n]+\\)Local Variables:"
-                           (- (point-max) 3000) t)
-       (let ((prefix (TeX-match-buffer 1)))
-         (re-search-forward (regexp-quote (concat prefix
-                                                  "End:")))
-         (beginning-of-line 1)
-         (insert prefix "TeX-master: " (prin1-to-string TeX-master) "\n"))
+                            (- (point-max) 3000) t)
+        (let ((prefix (TeX-match-buffer 1)))
+          (re-search-forward (regexp-quote (concat prefix
+                                                   "End:")))
+          (beginning-of-line 1)
+          (insert prefix "TeX-master: " (prin1-to-string TeX-master) "\n"))
       (let* ((mode (if (stringp TeX-master)
-                      (with-current-buffer
-                          (find-file-noselect
-                           (TeX-master-file TeX-default-extension))
-                        major-mode)
-                    major-mode))
-            (comment-prefix (cond ((eq mode 'texinfo-mode) "@c ")
-                                  ((eq mode 'doctex-mode) "% ")
-                                  (t "%%% ")))
-            (mode-string (concat (and (boundp 'japanese-TeX-mode) 
japanese-TeX-mode
-                                      "japanese-")
-                                 (substring (symbol-name mode) 0 -5))))
-       (newline)
-       (when (eq major-mode 'doctex-mode)
-         (insert comment-prefix TeX-esc "endinput\n"))
-       (insert
-        comment-prefix "Local Variables:\n"
-        comment-prefix "mode: " mode-string "\n"
-        comment-prefix "TeX-master: " (prin1-to-string TeX-master) "\n"
-        comment-prefix "End:\n")
-       (unless (eq mode major-mode)
-         (funcall mode)
-         ;; TeX modes run `VirTeX-common-initialization' which kills all local
-         ;; variables, thus `TeX-master' will be forgotten after `(funcall
-         ;; mode)'.  Reparse local variables in order to bring it back.
-         (hack-local-variables))))))
+                       (with-current-buffer
+                           (find-file-noselect
+                            (TeX-master-file TeX-default-extension))
+                         major-mode)
+                     major-mode))
+             (comment-prefix (cond ((eq mode 'texinfo-mode) "@c ")
+                                   ((eq mode 'doctex-mode) "% ")
+                                   (t "%%% ")))
+             (mode-string (concat (and (boundp 'japanese-TeX-mode) 
japanese-TeX-mode
+                                       "japanese-")
+                                  (substring (symbol-name mode) 0 -5))))
+        (newline)
+        (when (eq major-mode 'doctex-mode)
+          (insert comment-prefix TeX-esc "endinput\n"))
+        (insert
+         comment-prefix "Local Variables:\n"
+         comment-prefix "mode: " mode-string "\n"
+         comment-prefix "TeX-master: " (prin1-to-string TeX-master) "\n"
+         comment-prefix "End:\n")
+        (unless (eq mode major-mode)
+          (funcall mode)
+          ;; TeX modes run `VirTeX-common-initialization' which kills all local
+          ;; variables, thus `TeX-master' will be forgotten after `(funcall
+          ;; mode)'.  Reparse local variables in order to bring it back.
+          (hack-local-variables))))))
 
 (defun TeX-local-master-p ()
   "Return non-nil if there is a `TeX-master' entry in local variables spec.
@@ -2506,11 +2510,11 @@ seperated by REGEXP.
 Examples:
 
       (TeX-split-string \"\:\" \"abc:def:ghi\")
-         -> (\"abc\" \"def\" \"ghi\")
+          -> (\"abc\" \"def\" \"ghi\")
 
       (TeX-split-string \" +\" \"dvips  -Plw -p3 -c4 testfile.dvi\")
 
-         -> (\"dvips\" \"-Plw\" \"-p3\" \"-c4\" \"testfile.dvi\")
+          -> (\"dvips\" \"-Plw\" \"-p3\" \"-c4\" \"testfile.dvi\")
 
 If REGEXP is nil, or \"\", an error will occur."
 
@@ -2524,25 +2528,25 @@ If REGEXP is nil, or \"\", an error will occur."
 (defun TeX-parse-path (env)
   "Return a list if private TeX directories found in environment variable ENV."
   (let* ((value (getenv env))
-        (entries (and value
-                      (TeX-split-string
-                       (if (string-match ";" value) ";" ":")
-                       value)))
-        (global (append '("/" "\\")
-                        (mapcar #'file-name-as-directory
-                                TeX-macro-global)))
-        entry
-        answers)
+         (entries (and value
+                       (TeX-split-string
+                        (if (string-match ";" value) ";" ":")
+                        value)))
+         (global (append '("/" "\\")
+                         (mapcar #'file-name-as-directory
+                                 TeX-macro-global)))
+         entry
+         answers)
     (while entries
       (setq entry (car entries))
       (setq entries (cdr entries))
       (setq entry (file-name-as-directory
-                  (if (string-match "/?/?\\'" entry)
-                      (substring entry 0 (match-beginning 0))
-                    entry)))
+                   (if (string-match "/?/?\\'" entry)
+                       (substring entry 0 (match-beginning 0))
+                     entry)))
       (or (not (file-name-absolute-p entry))
-         (member entry global)
-         (setq answers (cons entry answers))))
+          (member entry global)
+          (setq answers (cons entry answers))))
     answers))
 
 (defun TeX-kpathsea-detect-path-delimiter ()
@@ -2550,20 +2554,20 @@ If REGEXP is nil, or \"\", an error will occur."
 Usually return \":\" or \";\".  If auto detect fails for some reason,
 return nil."
   (let ((res (ignore-errors
-              (with-output-to-string
-                (call-process "kpsewhich" nil
-                              (list standard-output nil) nil
-                              "--expand-path" "{.,..}")))))
+               (with-output-to-string
+                 (call-process "kpsewhich" nil
+                               (list standard-output nil) nil
+                               "--expand-path" "{.,..}")))))
     ;; kpsewhich expands "{.,..}" to ".:SOMEDIR" or ".;SOMEDIR"
     ;; according to its environment.
     ;; Don't use "{.,.}" instead because kpsewhich of MiKTeX 2.9
     ;; simplifies it to just a ".", not ".;.".
     (and (stringp res) (> (length res) 0)
-        ;; Check whether ; is contained.  This should work even if
-        ;; some implementation of kpsewhich considers it sane to
-        ;; insert drive letters or directory separators or whatever
-        ;; else to the current directory.
-        (if (string-match ";" res) ";" ":"))))
+         ;; Check whether ; is contained.  This should work even if
+         ;; some implementation of kpsewhich considers it sane to
+         ;; insert drive letters or directory separators or whatever
+         ;; else to the current directory.
+         (if (string-match ";" res) ";" ":"))))
 
 (defcustom TeX-kpathsea-path-delimiter
   (TeX-kpathsea-detect-path-delimiter)
@@ -2571,9 +2575,9 @@ return nil."
 t means autodetect, nil means kpathsea is disabled."
   :group 'TeX-file
   :type '(choice (const ":")
-                (const ";")
-                (const :tag "Autodetect" t)
-                (const :tag "Off" nil)))
+                 (const ";")
+                 (const :tag "Autodetect" t)
+                 (const :tag "Off" nil)))
 
 (defun TeX-tree-expand (vars program &optional subdirs)
   "Return directories corresponding to the kpathsea variables VARS.
@@ -2587,44 +2591,44 @@ are returned."
   ;; several elements separated by "/".
   (if (eq TeX-kpathsea-path-delimiter t)
       (setq TeX-kpathsea-path-delimiter
-           (TeX-kpathsea-detect-path-delimiter)))
+            (TeX-kpathsea-detect-path-delimiter)))
   (when TeX-kpathsea-path-delimiter
     (let* ((exit-status 1)
-          (args `(,@(if program `("--progname" ,program))
-                  "--expand-path"
-                  ,(mapconcat #'identity vars
-                              TeX-kpathsea-path-delimiter)))
-          (path-list (ignore-errors
-                       (with-output-to-string
-                         (setq exit-status
-                               (apply #'call-process
-                                      "kpsewhich" nil
-                                      (list standard-output nil) nil
-                                      args))))))
+           (args `(,@(if program `("--progname" ,program))
+                   "--expand-path"
+                   ,(mapconcat #'identity vars
+                               TeX-kpathsea-path-delimiter)))
+           (path-list (ignore-errors
+                        (with-output-to-string
+                          (setq exit-status
+                                (apply #'call-process
+                                       "kpsewhich" nil
+                                       (list standard-output nil) nil
+                                       args))))))
       (if (not (zerop exit-status))
-         ;; kpsewhich is not available.  Disable subsequent usage.
-         (setq TeX-kpathsea-path-delimiter nil)
-       (let ((separators (format "[\n\r%s]" TeX-kpathsea-path-delimiter))
-             path input-dir-list)
-         (dolist (item (split-string path-list separators t))
-           (if subdirs
-               (dolist (subdir subdirs)
-                 (setq path (file-name-as-directory (concat item subdir)))
-                 (when (file-exists-p path)
-                   (cl-pushnew path input-dir-list :test #'equal)))
-             (setq path (file-name-as-directory item))
-             (when (file-exists-p path)
-               (cl-pushnew path input-dir-list :test #'equal))))
-         ;; No duplication in result is assured since `cl-pushnew' is
-         ;; used above.  Should we introduce an option for speed just
-         ;; to accumulate all the results without care for
-         ;; duplicates?
-         (nreverse input-dir-list))))))
+          ;; kpsewhich is not available.  Disable subsequent usage.
+          (setq TeX-kpathsea-path-delimiter nil)
+        (let ((separators (format "[\n\r%s]" TeX-kpathsea-path-delimiter))
+              path input-dir-list)
+          (dolist (item (split-string path-list separators t))
+            (if subdirs
+                (dolist (subdir subdirs)
+                  (setq path (file-name-as-directory (concat item subdir)))
+                  (when (file-exists-p path)
+                    (cl-pushnew path input-dir-list :test #'equal)))
+              (setq path (file-name-as-directory item))
+              (when (file-exists-p path)
+                (cl-pushnew path input-dir-list :test #'equal))))
+          ;; No duplication in result is assured since `cl-pushnew' is
+          ;; used above.  Should we introduce an option for speed just
+          ;; to accumulate all the results without care for
+          ;; duplicates?
+          (nreverse input-dir-list))))))
 
 (defun TeX-macro-global ()
   "Return directories containing the site's TeX macro and style files."
   (or (TeX-tree-expand '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST")
-                      "latex" '("/tex/" "/bibtex/bst/"))
+                       "latex" '("/tex/" "/bibtex/bst/"))
       '("/usr/share/texmf/tex/" "/usr/share/texmf/bibtex/bst/")))
 
 (defun TeX-macro-private ()
@@ -2637,38 +2641,38 @@ are returned."
   :type '(repeat (directory :format "%v")))
 
 (defcustom TeX-macro-private (or (append (TeX-parse-path "TEXINPUTS")
-                                        (TeX-parse-path "BIBINPUTS"))
-                                (TeX-macro-private))
+                                         (TeX-parse-path "BIBINPUTS"))
+                                 (TeX-macro-private))
   "Directories where you store your personal TeX macros."
   :group 'TeX-file
   :type '(repeat (file :format "%v")))
 
 (defcustom TeX-auto-private
   (list (expand-file-name TeX-auto-local
-                         (or (and (boundp 'user-emacs-directory)
-                                  (concat user-emacs-directory "auctex/"))
-                             "~/.emacs.d/auctex/")))
+                          (or (and (boundp 'user-emacs-directory)
+                                   (concat user-emacs-directory "auctex/"))
+                              "~/.emacs.d/auctex/")))
   "List of directories containing automatically generated AUCTeX style files.
 
 These correspond to the personal TeX macros."
   :group 'TeX-file
   :type '(repeat (file :format "%v")))
 
-(if (stringp TeX-auto-private)         ;Backward compatibility
+(if (stringp TeX-auto-private)          ;Backward compatibility
     (setq TeX-auto-private (list TeX-auto-private)))
 
 (defcustom TeX-style-private
   (list (expand-file-name TeX-style-local
-                         (or (and (boundp 'user-emacs-directory)
-                                  (concat user-emacs-directory "auctex/"))
-                             "~/.emacs.d/auctex/")))
+                          (or (and (boundp 'user-emacs-directory)
+                                   (concat user-emacs-directory "auctex/"))
+                              "~/.emacs.d/auctex/")))
   "List of directories containing hand-generated AUCTeX style files.
 
 These correspond to the personal TeX macros."
   :group 'TeX-file
   :type '(repeat (file :format "%v")))
 
-(if (stringp TeX-style-private)                ;Backward compatibility
+(if (stringp TeX-style-private)         ;Backward compatibility
     (setq TeX-style-private (list TeX-style-private)))
 
 (defcustom TeX-style-path
@@ -2676,8 +2680,8 @@ These correspond to the personal TeX macros."
     ;; Put directories in an order where the more local files can
     ;; override the more global ones.
     (mapc (lambda (file)
-           (when (and file (not (member file path)))
-             (setq path (cons file path))))
+            (when (and file (not (member file path)))
+              (setq path (cons file path))))
           (append (list TeX-auto-global TeX-style-global)
                   TeX-auto-private TeX-style-private
                   (list TeX-auto-local TeX-style-local)))
@@ -2740,11 +2744,11 @@ Supported values are described below:
 * `:bibtex'  for files in BibTeX mode.
 * `:context' for files in ConTeXt mode.
 * `:latex'   for files in LaTeX mode, or any mode derived
-            thereof.
+             thereof.
 * `:plain-tex' for files in plain-TeX mode.
 * `:texinfo' for Texinfo files.
 * `:classopt' for class options of LaTeX document.  Just
-             considered as a pseudo-dialect.
+              considered as a pseudo-dialect.
 
 Purpose is notably to prevent non-Texinfo hooks to be run in
 Texinfo files, due to ambiguous style name, as this may cause bad
@@ -2762,48 +2766,48 @@ side effect e.g. on variable `TeX-font-list'.")
 (defun TeX-load-style (style)
   "Search for and load each definition for STYLE in `TeX-style-path'."
   (cond ((assoc style TeX-style-hook-list)) ; We already found it
-       ((string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style) ;Complex path
-        (let* ((dir (substring style (match-beginning 1) (match-end 1)))
-               (style (substring style (match-beginning 2) (match-end 2)))
-               (master-dir (if (stringp TeX-master)
-                               (file-name-directory
-                                (file-relative-name TeX-master))
-                             "./"))
-               (TeX-style-path (append (list (expand-file-name
-                                              TeX-auto-local dir)
-                                             (expand-file-name
-                                              TeX-auto-local master-dir)
-                                             (expand-file-name
-                                              TeX-style-local dir)
-                                             (expand-file-name
-                                              TeX-style-local master-dir))
-                                       TeX-style-path)))
-          (TeX-load-style style)))
-       (t                              ;Relative path
-        ;; Insert empty list to mark the fact that we have searched.
-        (setq TeX-style-hook-list (cons (list style) TeX-style-hook-list))
-        ;; Now check each element of the path
-        (dolist (name TeX-style-path)
-          (TeX-load-style-file (expand-file-name style name))))))
+        ((string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style) ;Complex path
+         (let* ((dir (substring style (match-beginning 1) (match-end 1)))
+                (style (substring style (match-beginning 2) (match-end 2)))
+                (master-dir (if (stringp TeX-master)
+                                (file-name-directory
+                                 (file-relative-name TeX-master))
+                              "./"))
+                (TeX-style-path (append (list (expand-file-name
+                                               TeX-auto-local dir)
+                                              (expand-file-name
+                                               TeX-auto-local master-dir)
+                                              (expand-file-name
+                                               TeX-style-local dir)
+                                              (expand-file-name
+                                               TeX-style-local master-dir))
+                                        TeX-style-path)))
+           (TeX-load-style style)))
+        (t                              ;Relative path
+         ;; Insert empty list to mark the fact that we have searched.
+         (setq TeX-style-hook-list (cons (list style) TeX-style-hook-list))
+         ;; Now check each element of the path
+         (dolist (name TeX-style-path)
+           (TeX-load-style-file (expand-file-name style name))))))
 
 (defun TeX-load-style-file (file)
   "Load FILE checking for a Lisp extensions."
   (let ((el (concat file ".el"))
-       (elc (concat file ".elc")))
+        (elc (concat file ".elc")))
     (cond ((file-newer-than-file-p el elc)
-          (if (file-readable-p el)
-              (if (and TeX-byte-compile
-                       (file-writable-p elc)
-                       (save-excursion
-                         ;; `byte-compile-file' switches buffer in Emacs 20.3.
-                         (byte-compile-file el))
-                       (file-readable-p elc))
-                  (load-file elc)
-                (load-file el))))
-         ((file-readable-p elc)
-          (load-file elc))
-         ((file-readable-p el)
-          (load-file el)))))
+           (if (file-readable-p el)
+               (if (and TeX-byte-compile
+                        (file-writable-p elc)
+                        (save-excursion
+                          ;; `byte-compile-file' switches buffer in Emacs 20.3.
+                          (byte-compile-file el))
+                        (file-readable-p elc))
+                   (load-file elc)
+                 (load-file el))))
+          ((file-readable-p elc)
+           (load-file elc))
+          ((file-readable-p el)
+           (load-file el)))))
 
 (defconst TeX-style-hook-dialect-weight-alist
   '((:latex . 1) (:texinfo . 2) (:bibtex . 4) (:plain-tex . 8) (:context . 16)
@@ -2817,12 +2821,12 @@ side effect e.g. on variable `TeX-font-list'.")
    ((symbolp dialect-expr)
     (let ((cell (assq dialect-expr TeX-style-hook-dialect-weight-alist)))
       (if cell (cdr cell)
-       (error "Invalid dialect expression : %S." dialect-expr))))
+        (error "Invalid dialect expression : %S." dialect-expr))))
    ((and (consp dialect-expr)
-        (memq (car dialect-expr) '(or not and nor)))
+         (memq (car dialect-expr) '(or not and nor)))
     (apply (intern
-           (concat "TeX-shdex-" (symbol-name  (car dialect-expr))))
-          (cdr dialect-expr)))
+            (concat "TeX-shdex-" (symbol-name  (car dialect-expr))))
+           (cdr dialect-expr)))
    (t
     (error "Invalid dialect expression : %S." dialect-expr))))
 
@@ -2846,7 +2850,7 @@ side effect e.g. on variable `TeX-font-list'.")
   "Test whether dialect DIALECT is in dialect set DIALECT-SET."
   (let ((cell (assq dialect TeX-style-hook-dialect-weight-alist)))
     (if cell
-       (/= 0 (logand (cdr cell) dialect-set))
+        (/= 0 (logand (cdr cell) dialect-set))
       (error "Invalid dialect %S" dialect))))
 
 (defsubst TeX-shdex-listify (dialect-set)
@@ -2855,7 +2859,7 @@ comprised in this set, where dialects are symbols"
   (let (ret)
     (dolist (c dialect-set)
       (when (/= 0 (logand (cdr c) dialect-set))
-       (push (car c) ret)))
+        (push (car c) ret)))
     ret))
 
 (defun TeX-add-style-hook (style hook &optional dialect-expr)
@@ -2878,17 +2882,17 @@ When omitted DIALECT-EXPR is equivalent to `(nor )', ie 
all
 dialected are allowed."
   (let ((entry (assoc-string style TeX-style-hook-list)))
     (and dialect-expr (setq hook (vector 'TeX-style-hook hook
-                                        (TeX-shdex-eval dialect-expr))))
+                                         (TeX-shdex-eval dialect-expr))))
     (cond ((null entry)
-          ;; New style, add entry.
-          (setq TeX-style-hook-list (cons (list style hook)
-                                          TeX-style-hook-list)))
-         ((member hook entry)
-          ;; Old style, hook already there, do nothing.
-          nil)
-         (t
-          ;; Old style, new hook.
-          (setcdr entry (cons hook (cdr entry)))))))
+           ;; New style, add entry.
+           (setq TeX-style-hook-list (cons (list style hook)
+                                           TeX-style-hook-list)))
+          ((member hook entry)
+           ;; Old style, hook already there, do nothing.
+           nil)
+          (t
+           ;; Old style, new hook.
+           (setcdr entry (cons hook (cdr entry)))))))
 
 (defun TeX-keep-hooks-in-dialect (hooks dialect-list)
   "Scan HOOKS for all hooks the associated dialect of which is
@@ -2896,11 +2900,11 @@ found in DIALECT-LIST and return the list thereof."
   (let (ret dialect-list-1)
     (dolist (hook hooks)
       (setq dialect-list-1 (and (vectorp hook) (eq (aref hook 0) 
'TeX-style-hook)
-                               (TeX-shdex-listify (aref hook 2))))
+                                (TeX-shdex-listify (aref hook 2))))
       (while dialect-list-1
-       (when (memq (pop dialect-list-1) dialect-list)
-         (push hook ret)
-         (setq dialect-list-1 nil)))
+        (when (memq (pop dialect-list-1) dialect-list)
+          (push hook ret)
+          (setq dialect-list-1 nil)))
     ret)))
 
 (defun TeX-unload-style (style &optional dialect-list)
@@ -2910,15 +2914,15 @@ the STYLE is only removed for those dialects in 
DIALECT-LIST.
 See variable `TeX-style-hook-dialect' for supported dialects."
   (let ((style-data (assoc-string style TeX-style-hook-list)))
     (if style-data
-       (let ((hooks (and dialect-list (TeX-keep-hooks-in-dialect (cdr 
style-data) dialect-list))))
-         (if hooks
-             (setcdr style-data hooks)
-           (setq TeX-style-hook-list (delq style-data 
TeX-style-hook-list)))))))
+        (let ((hooks (and dialect-list (TeX-keep-hooks-in-dialect (cdr 
style-data) dialect-list))))
+          (if hooks
+              (setcdr style-data hooks)
+            (setq TeX-style-hook-list (delq style-data 
TeX-style-hook-list)))))))
 
 (defcustom TeX-virgin-style (if (and TeX-auto-global
-                                    (file-directory-p TeX-auto-global))
-                               "virtex"
-                             "NoVirtexSymbols")
+                                     (file-directory-p TeX-auto-global))
+                                "virtex"
+                              "NoVirtexSymbols")
   "Style all documents use."
   :group 'TeX-parse
   :type 'string)
@@ -2930,43 +2934,43 @@ See variable `TeX-style-hook-dialect' for supported 
dialects."
 (defun TeX-run-style-hooks (&rest styles)
   "Run the TeX style hooks STYLES."
   (mapcar (lambda (style)
-           ;; Avoid recursion.
-           (unless (TeX-member style TeX-active-styles 'string-equal)
-             (setq TeX-active-styles
-                   (cons style TeX-active-styles))
-             (TeX-load-style style)
-             (let ((default-directory default-directory))
-               ;; Complex path.
-               (when (string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style)
-                 ;; Set `default-directory' to directory of master
-                 ;; file since style files not stored in the fixed
-                 ;; style directories are usually located there.
-                 (setq default-directory (save-match-data
-                                           (TeX-master-directory))
-                       style (substring style
-                                        (match-beginning 2) (match-end 2))))
-               (condition-case nil
-                   (mapcar (lambda (hook)
-                             (cond
-                              ((functionp hook)
-                               (funcall hook))
-                              ((and (vectorp hook)
-                                    (eq (aref hook 0) 'TeX-style-hook))
-                               (and (TeX-shdex-in-p TeX-style-hook-dialect 
(aref hook 2))
-                                    (funcall (aref hook 1))))
-                              (t (error "Invalid style hook %S" hook))))
-                           ;; Reverse the list of style hooks in order to run
-                           ;; styles in the order global, private, local
-                           ;; (assuming TeX-style-path has that ordering,
-                           ;; too).
-                           (reverse (cdr-safe (assoc-string style 
TeX-style-hook-list))))
-                 ;; This happens in case some style added a new parser, and
-                 ;; now the style isn't used anymore (user deleted
-                 ;; \usepackage{style}).  Then we're left over with, e.g.,
-                 ;; (LaTeX-add-siunitx-units "\\parsec"), but the function is
-                 ;; defined in a style siunitx.el that's not loaded anymore.
-                 (void-function nil)))))
-         styles))
+            ;; Avoid recursion.
+            (unless (TeX-member style TeX-active-styles 'string-equal)
+              (setq TeX-active-styles
+                    (cons style TeX-active-styles))
+              (TeX-load-style style)
+              (let ((default-directory default-directory))
+                ;; Complex path.
+                (when (string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style)
+                  ;; Set `default-directory' to directory of master
+                  ;; file since style files not stored in the fixed
+                  ;; style directories are usually located there.
+                  (setq default-directory (save-match-data
+                                            (TeX-master-directory))
+                        style (substring style
+                                         (match-beginning 2) (match-end 2))))
+                (condition-case nil
+                    (mapcar (lambda (hook)
+                              (cond
+                               ((functionp hook)
+                                (funcall hook))
+                               ((and (vectorp hook)
+                                     (eq (aref hook 0) 'TeX-style-hook))
+                                (and (TeX-shdex-in-p TeX-style-hook-dialect 
(aref hook 2))
+                                     (funcall (aref hook 1))))
+                               (t (error "Invalid style hook %S" hook))))
+                            ;; Reverse the list of style hooks in order to run
+                            ;; styles in the order global, private, local
+                            ;; (assuming TeX-style-path has that ordering,
+                            ;; too).
+                            (reverse (cdr-safe (assoc-string style 
TeX-style-hook-list))))
+                  ;; This happens in case some style added a new parser, and
+                  ;; now the style isn't used anymore (user deleted
+                  ;; \usepackage{style}).  Then we're left over with, e.g.,
+                  ;; (LaTeX-add-siunitx-units "\\parsec"), but the function is
+                  ;; defined in a style siunitx.el that's not loaded anymore.
+                  (void-function nil)))))
+          styles))
 
 (defcustom TeX-parse-self nil
   "Parse file after loading it if no style hook is found for it."
@@ -2986,22 +2990,22 @@ See variable `TeX-style-hook-dialect' for supported 
dialects."
 Only do this if it has not been done before, or if optional argument
 FORCE is not nil."
   (unless (or (and (boundp 'TeX-auto-update)
-                  (eq TeX-auto-update 'BibTeX)) ; Not a real TeX buffer
-             (and (not force)
-                  TeX-style-hook-applied-p))
+                   (eq TeX-auto-update 'BibTeX)) ; Not a real TeX buffer
+              (and (not force)
+                   TeX-style-hook-applied-p))
     (setq TeX-style-hook-applied-p t)
     (message "Applying style hooks...")
     (TeX-run-style-hooks (TeX-strip-extension nil nil t))
     ;; Run parent style hooks if it has a single parent that isn't itself.
     (if (or (not (memq TeX-master '(nil t)))
-           (and (buffer-file-name)
-                (string-match TeX-one-master
-                              (file-name-nondirectory (buffer-file-name)))))
-       (TeX-run-style-hooks (TeX-master-file)))
+            (and (buffer-file-name)
+                 (string-match TeX-one-master
+                               (file-name-nondirectory (buffer-file-name)))))
+        (TeX-run-style-hooks (TeX-master-file)))
     (if (and TeX-parse-self
-            (null (cdr-safe (assoc (TeX-strip-extension nil nil t)
-                                   TeX-style-hook-list))))
-       (TeX-auto-apply))
+             (null (cdr-safe (assoc (TeX-strip-extension nil nil t)
+                                    TeX-style-hook-list))))
+        (TeX-auto-apply))
     (run-hooks 'TeX-update-style-hook)
     (message "Applying style hooks...done")))
 
@@ -3054,44 +3058,44 @@ Possible values are nil, t, or a list of style names.
   - (STYLES ...)  Only complete expert commands of STYLES."
   :group 'TeX-macro
   :type '(choice (const  :tag "Don't complete expert commands" nil)
-                (const  :tag "Always complete expert commands" t)
-                (repeat :tag "Complete expert commands of certain styles" 
string)))
+                 (const  :tag "Always complete expert commands" t)
+                 (repeat :tag "Complete expert commands of certain styles" 
string)))
 
 (defmacro TeX-complete-make-expert-command-functions (thing list-var prefix)
   (let* ((plural (concat thing "s"))
-        (upcase-plural (upcase plural)))
+         (upcase-plural (upcase plural)))
     `(progn
        (defvar ,(intern (format "%s-expert-%s-table" prefix thing))
-        (make-hash-table :test 'equal)
-        ,(format "A hash-table mapping %s names to the style name providing it.
+         (make-hash-table :test 'equal)
+         ,(format "A hash-table mapping %s names to the style name providing 
it.
 
 A %s occuring in this table is considered an expert %s and
 treated specially in the completion." thing thing thing))
 
        (defun ,(intern (format "%s-declare-expert-%s" prefix plural)) (style 
&rest ,(intern plural))
-        ,(format "Declare %s as expert %s of STYLE.
+         ,(format "Declare %s as expert %s of STYLE.
 
 Expert %s are completed depending on `TeX-complete-expert-commands'."
-                 upcase-plural plural plural)
-        (dolist (x ,(intern plural))
-          (if (null style)
-              (remhash x TeX-expert-macro-table)
-            (puthash x style TeX-expert-macro-table))))
+                  upcase-plural plural plural)
+         (dolist (x ,(intern plural))
+           (if (null style)
+               (remhash x TeX-expert-macro-table)
+             (puthash x style TeX-expert-macro-table))))
 
        (defun ,(intern (format "%s-filtered" list-var)) ()
-        ,(format "Return (%s) filtered depending on 
`TeX-complete-expert-commands'."
-                 list-var)
-        (delq nil
-              (mapcar
-               (lambda (entry)
-                 (if (eq t TeX-complete-expert-commands)
-                     entry
-                   (let* ((cmd (car entry))
-                          (style (gethash cmd TeX-expert-macro-table)))
-                     (when (or (null style)
-                               (member style TeX-complete-expert-commands))
-                       entry))))
-               (,list-var)))))))
+         ,(format "Return (%s) filtered depending on 
`TeX-complete-expert-commands'."
+                  list-var)
+         (delq nil
+               (mapcar
+                (lambda (entry)
+                  (if (eq t TeX-complete-expert-commands)
+                      entry
+                    (let* ((cmd (car entry))
+                           (style (gethash cmd TeX-expert-macro-table)))
+                      (when (or (null style)
+                                (member style TeX-complete-expert-commands))
+                        entry))))
+                (,list-var)))))))
 
 (TeX-complete-make-expert-command-functions "macro" TeX-symbol-list "TeX")
 (TeX-complete-make-expert-command-functions "environment" 
LaTeX-environment-list "LaTeX")
@@ -3117,14 +3121,14 @@ Or alternatively:
 (defun TeX--complete-find-entry ()
   "Return the first applicable entry of `TeX-complete-list'."
   (let ((list TeX-complete-list)
-       entry)
+        entry)
     (while list
       (setq entry (car list)
-           list (cdr list))
+            list (cdr list))
       (when (if (functionp (car entry))
-               (funcall (car entry))
-             (TeX-looking-at-backward (car entry) 250))
-       (setq list nil)))
+                (funcall (car entry))
+              (TeX-looking-at-backward (car entry) 250))
+        (setq list nil)))
     entry))
 
 (defun TeX-complete-symbol ()
@@ -3133,47 +3137,47 @@ Or alternatively:
   (let ((entry (TeX--complete-find-entry)))
     (when entry
       (if (numberp (nth 1 entry))
-         (let* ((sub (nth 1 entry))
-                (close (if (and (nth 3 entry)
+          (let* ((sub (nth 1 entry))
+                 (close (if (and (nth 3 entry)
                                  (listp (nth 3 entry))
                                  (symbolp (car (nth 3 entry))))
                             (eval (nth 3 entry))
                           (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))))))
+                 (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.
@@ -3181,17 +3185,17 @@ 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))))
+          (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'."
@@ -3219,7 +3223,7 @@ will use its value to decide what to do, whatever the 
value of
 the variable `TeX-insert-braces'."
   :group 'TeX-macro
   :type '(repeat (cons (string :tag "Macro name")
-                      (boolean :tag "Append braces?"))))
+                       (boolean :tag "Append braces?"))))
 (make-variable-buffer-local 'TeX-insert-braces-alist)
 
 (defcustom TeX-insert-macro-default-style 'show-optional-args
@@ -3239,8 +3243,8 @@ Note that for some macros, there are special mechanisms, 
see e.g.
 `LaTeX-includegraphics-options-alist' and `TeX-arg-cite-note-p'."
   :group 'TeX-macro
   :type '(choice (const mandatory-args-only)
-                (const show-optional-args)
-                (const show-all-optional-args)))
+                 (const show-optional-args)
+                 (const show-all-optional-args)))
 
 (defvar TeX-arg-opening-brace nil
   "String used as an opening brace for argument insertion.
@@ -3267,11 +3271,11 @@ is called with \\[universal-argument]."
   ;; flexible solution in the future, therefore we don't document it at the
   ;; moment.
   (interactive (list (completing-read (concat "Macro (default "
-                                             TeX-default-macro
-                                             "): "
-                                             TeX-esc)
-                                     (TeX-symbol-list-filtered) nil nil nil
-                                     'TeX-macro-history TeX-default-macro)))
+                                              TeX-default-macro
+                                              "): "
+                                              TeX-esc)
+                                      (TeX-symbol-list-filtered) nil nil nil
+                                      'TeX-macro-history TeX-default-macro)))
   (when (called-interactively-p 'any)
     (setq TeX-default-macro symbol))
   (TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list))))
@@ -3290,14 +3294,14 @@ AUCTeX knows of some macros, and may query for extra 
arguments.
 Space will complete and exit."
   (interactive)
   (cond ((eq (preceding-char) ?\\)
-        (call-interactively 'self-insert-command))
-       ((eq (preceding-char) ?.)
-        (let ((TeX-default-macro " ")
-              (minibuffer-local-completion-map TeX-electric-macro-map))
-          (call-interactively 'TeX-insert-macro)))
-       (t
-        (let ((minibuffer-local-completion-map TeX-electric-macro-map))
-          (call-interactively 'TeX-insert-macro)))))
+         (call-interactively 'self-insert-command))
+        ((eq (preceding-char) ?.)
+         (let ((TeX-default-macro " ")
+               (minibuffer-local-completion-map TeX-electric-macro-map))
+           (call-interactively 'TeX-insert-macro)))
+        (t
+         (let ((minibuffer-local-completion-map TeX-electric-macro-map))
+           (call-interactively 'TeX-insert-macro)))))
 
 (defvar TeX-exit-mark nil
   "Dynamically bound by `TeX-parse-macro' and `LaTeX-env-args'.")
@@ -3339,50 +3343,50 @@ TeX macro.  What is done depend on the type of the 
element:
   Use square brackets instead of curly braces, and is not inserted
   on empty user input."
   (let ((TeX-grop (if (and (or (atom args) (= (length args) 1))
-                          (fboundp 'LaTeX-verbatim-macros-with-delims)
-                          (member symbol (LaTeX-verbatim-macros-with-delims)))
-                     LaTeX-default-verb-delimiter
-                   TeX-grop))
-       (TeX-grcl (if (and (or (atom args) (= (length args) 1))
-                          (fboundp 'LaTeX-verbatim-macros-with-delims)
-                          (member symbol (LaTeX-verbatim-macros-with-delims)))
-                     LaTeX-default-verb-delimiter
-                   TeX-grcl)))
+                           (fboundp 'LaTeX-verbatim-macros-with-delims)
+                           (member symbol (LaTeX-verbatim-macros-with-delims)))
+                      LaTeX-default-verb-delimiter
+                    TeX-grop))
+        (TeX-grcl (if (and (or (atom args) (= (length args) 1))
+                           (fboundp 'LaTeX-verbatim-macros-with-delims)
+                           (member symbol (LaTeX-verbatim-macros-with-delims)))
+                      LaTeX-default-verb-delimiter
+                    TeX-grcl)))
     (if (and (TeX-active-mark)
-            (> (point) (mark)))
-       (exchange-point-and-mark))
+             (> (point) (mark)))
+        (exchange-point-and-mark))
     (insert TeX-esc symbol)
     (let ((TeX-exit-mark (make-marker))
-         (position (point)))
+          (position (point)))
       (TeX-parse-arguments args)
       (cond ((marker-position TeX-exit-mark)
-            (goto-char (marker-position TeX-exit-mark))
-            (set-marker TeX-exit-mark nil))
-           ((let ((element (assoc symbol TeX-insert-braces-alist)))
-              ;; If in `TeX-insert-braces-alist' there is an element associated
-              ;; to the current macro, use its value to decide whether 
inserting
-              ;; a pair of braces, otherwise use the standard criterion.
-              (if element
-                  (cdr element)
-                (and TeX-insert-braces
-                     ;; Do not add braces if the argument is 0 or -1.
-                     (not (and (= (safe-length args) 1)
-                               (numberp (car args))
-                               (<= (car args) 0)))
-                     (equal position (point))
-                     (string-match "[a-zA-Z]+" symbol))))
-            (if (texmathp)
-                (when (TeX-active-mark)
-                  (insert TeX-grop)
-                  (exchange-point-and-mark)
-                  (insert TeX-grcl))
-              (insert TeX-grop)
-              (if (TeX-active-mark)
-                  (progn
-                    (exchange-point-and-mark)
-                    (insert TeX-grcl))
-                (insert TeX-grcl)
-                (backward-char))))))))
+             (goto-char (marker-position TeX-exit-mark))
+             (set-marker TeX-exit-mark nil))
+            ((let ((element (assoc symbol TeX-insert-braces-alist)))
+               ;; If in `TeX-insert-braces-alist' there is an element 
associated
+               ;; to the current macro, use its value to decide whether 
inserting
+               ;; a pair of braces, otherwise use the standard criterion.
+               (if element
+                   (cdr element)
+                 (and TeX-insert-braces
+                      ;; Do not add braces if the argument is 0 or -1.
+                      (not (and (= (safe-length args) 1)
+                                (numberp (car args))
+                                (<= (car args) 0)))
+                      (equal position (point))
+                      (string-match "[a-zA-Z]+" symbol))))
+             (if (texmathp)
+                 (when (TeX-active-mark)
+                   (insert TeX-grop)
+                   (exchange-point-and-mark)
+                   (insert TeX-grcl))
+               (insert TeX-grop)
+               (if (TeX-active-mark)
+                   (progn
+                     (exchange-point-and-mark)
+                     (insert TeX-grcl))
+                 (insert TeX-grcl)
+                 (backward-char))))))))
 
 (defun TeX-arg-string (optional &optional prompt initial-input)
   "Prompt for a string.
@@ -3392,8 +3396,8 @@ INITIAL-INPUT is a string to insert before reading input."
   (TeX-argument-insert
    (if (and (not optional) (TeX-active-mark))
        (let ((TeX-argument (buffer-substring (point) (mark))))
-        (delete-region (point) (mark))
-        TeX-argument)
+         (delete-region (point) (mark))
+         TeX-argument)
      (TeX-read-string (TeX-argument-prompt optional prompt "Text") 
initial-input))
    optional))
 
@@ -3407,28 +3411,28 @@ See `TeX-parse-macro' for details."
   (let ((TeX-last-optional-rejected nil))
     (while args
       (if (vectorp (car args))
-         ;; Maybe get rid of all optional arguments.  See `TeX-insert-macro'
-         ;; for more comments.  See `TeX-insert-macro-default-style'.
-         ;; The macro `LaTeX-check-insert-macro-default-style' in
-         ;; `latex.el' uses the code inside (unless ...)  This macro
-         ;; should be adapted if the code here changs.
-         (unless (if (eq TeX-insert-macro-default-style 
'show-all-optional-args)
-                     (equal current-prefix-arg '(4))
-                   (or
-                    (and (eq TeX-insert-macro-default-style 
'show-optional-args)
-                         (equal current-prefix-arg '(4)))
-                    (and (eq TeX-insert-macro-default-style 
'mandatory-args-only)
-                         (null (equal current-prefix-arg '(4))))
-                    TeX-last-optional-rejected))
-           (let ((TeX-arg-opening-brace LaTeX-optop)
-                 (TeX-arg-closing-brace LaTeX-optcl))
-             (TeX-parse-argument t (if (equal (length (car args)) 1)
-                                       (aref (car args) 0)
-                                     (append (car args) nil)))))
-       (let ((TeX-arg-opening-brace TeX-grop)
-             (TeX-arg-closing-brace TeX-grcl))
-         (setq TeX-last-optional-rejected nil)
-         (TeX-parse-argument nil (car args))))
+          ;; Maybe get rid of all optional arguments.  See `TeX-insert-macro'
+          ;; for more comments.  See `TeX-insert-macro-default-style'.
+          ;; The macro `LaTeX-check-insert-macro-default-style' in
+          ;; `latex.el' uses the code inside (unless ...)  This macro
+          ;; should be adapted if the code here changs.
+          (unless (if (eq TeX-insert-macro-default-style 
'show-all-optional-args)
+                      (equal current-prefix-arg '(4))
+                    (or
+                     (and (eq TeX-insert-macro-default-style 
'show-optional-args)
+                          (equal current-prefix-arg '(4)))
+                     (and (eq TeX-insert-macro-default-style 
'mandatory-args-only)
+                          (null (equal current-prefix-arg '(4))))
+                     TeX-last-optional-rejected))
+            (let ((TeX-arg-opening-brace LaTeX-optop)
+                  (TeX-arg-closing-brace LaTeX-optcl))
+              (TeX-parse-argument t (if (equal (length (car args)) 1)
+                                        (aref (car args) 0)
+                                      (append (car args) nil)))))
+        (let ((TeX-arg-opening-brace TeX-grop)
+              (TeX-arg-closing-brace TeX-grcl))
+          (setq TeX-last-optional-rejected nil)
+          (TeX-parse-argument nil (car args))))
       (setq args (cdr args)))))
 
 (defun TeX-parse-argument (optional arg)
@@ -3439,54 +3443,54 @@ then use square brackets instead of curly braces.
 See `TeX-parse-macro' for details."
   (let (insert-flag)
     (cond ((stringp arg)
-          (TeX-arg-string optional arg)
-          (setq insert-flag t))
-         ((numberp arg)
-          (cond ((< arg 0)
-                 (when (TeX-active-mark)
-                   ;; Put both the macro and the marked region in a TeX group.
-                   (let ((beg (min (point) (mark)))
-                         (end (set-marker (make-marker) (max (point) (mark)))))
-                     (insert " ")
-                     (goto-char beg)
-                     (skip-chars-backward "^\\\\")
-                     (backward-char)
-                     (insert TeX-arg-opening-brace)
-                     (goto-char (marker-position end))
-                     (insert TeX-arg-closing-brace)
-                     (setq insert-flag t))))
-                ((= arg 0)) ; nop for clarity
-                ((> arg 0)
-                 (TeX-parse-argument optional t)
-                 (while (> arg 1)
-                   (TeX-parse-argument optional nil)
-                   (setq arg (- arg 1))))))
-         ((null arg)
-          (insert TeX-arg-opening-brace)
-          (when (and (not optional) (TeX-active-mark))
-            (exchange-point-and-mark))
-          (insert TeX-arg-closing-brace)
-          (setq insert-flag t))
-         ((eq arg t)
-          (insert TeX-arg-opening-brace)
-          (if (and (not optional) (TeX-active-mark))
-              (progn
-                (exchange-point-and-mark))
-            (set-marker TeX-exit-mark (point)))
-          (insert TeX-arg-closing-brace)
-          (setq insert-flag t))
-         ((symbolp arg)
-          (funcall arg optional))
-         ((listp arg)
-          (let ((head (car arg))
-                (tail (cdr arg)))
-            (cond ((stringp head)
-                   (apply 'TeX-arg-string optional arg))
-                  ((symbolp head)
-                   (apply head optional tail))
-                  (t (error "Unknown list argument type %s"
-                            (prin1-to-string head))))))
-         (t (error "Unknown argument type %s" (prin1-to-string arg))))
+           (TeX-arg-string optional arg)
+           (setq insert-flag t))
+          ((numberp arg)
+           (cond ((< arg 0)
+                  (when (TeX-active-mark)
+                    ;; Put both the macro and the marked region in a TeX group.
+                    (let ((beg (min (point) (mark)))
+                          (end (set-marker (make-marker) (max (point) 
(mark)))))
+                      (insert " ")
+                      (goto-char beg)
+                      (skip-chars-backward "^\\\\")
+                      (backward-char)
+                      (insert TeX-arg-opening-brace)
+                      (goto-char (marker-position end))
+                      (insert TeX-arg-closing-brace)
+                      (setq insert-flag t))))
+                 ((= arg 0)) ; nop for clarity
+                 ((> arg 0)
+                  (TeX-parse-argument optional t)
+                  (while (> arg 1)
+                    (TeX-parse-argument optional nil)
+                    (setq arg (- arg 1))))))
+          ((null arg)
+           (insert TeX-arg-opening-brace)
+           (when (and (not optional) (TeX-active-mark))
+             (exchange-point-and-mark))
+           (insert TeX-arg-closing-brace)
+           (setq insert-flag t))
+          ((eq arg t)
+           (insert TeX-arg-opening-brace)
+           (if (and (not optional) (TeX-active-mark))
+               (progn
+                 (exchange-point-and-mark))
+             (set-marker TeX-exit-mark (point)))
+           (insert TeX-arg-closing-brace)
+           (setq insert-flag t))
+          ((symbolp arg)
+           (funcall arg optional))
+          ((listp arg)
+           (let ((head (car arg))
+                 (tail (cdr arg)))
+             (cond ((stringp head)
+                    (apply 'TeX-arg-string optional arg))
+                   ((symbolp head)
+                    (apply head optional tail))
+                   (t (error "Unknown list argument type %s"
+                             (prin1-to-string head))))))
+          (t (error "Unknown argument type %s" (prin1-to-string arg))))
     (when (and insert-flag (not optional) (TeX-active-mark))
       (deactivate-mark))))
 
@@ -3499,10 +3503,10 @@ If PREFIX is given, insert it before NAME."
       (setq TeX-last-optional-rejected t)
     (insert TeX-arg-opening-brace)
     (if prefix
-       (insert prefix))
+        (insert prefix))
     (if (and (string-equal name "")
-            (null (marker-position TeX-exit-mark)))
-       (set-marker TeX-exit-mark (point))
+             (null (marker-position TeX-exit-mark)))
+        (set-marker TeX-exit-mark (point))
       (insert name))
     (insert TeX-arg-closing-brace)))
 
@@ -3515,25 +3519,25 @@ PROMPT will be used if not nil, otherwise use DEFAULT.
 
 Unless optional argument COMPLETE is non-nil, ``: '' will be appended."
   (concat (if optional "(Optional) " "")
-         (if prompt prompt default)
-         (if complete "" ": ")))
+          (if prompt prompt default)
+          (if complete "" ": ")))
 
 (defun TeX-string-divide-number-unit (string)
   "Divide number and unit in STRING and return a list (number unit)."
   (if (string-match "[0-9]*\\.?[0-9]+" string)
       (list (substring string 0 (string-match "[^.0-9]" string))
-           (substring string (if (string-match "[^.0-9]" string)
-                                 (string-match "[^.0-9]" string)
-                               (length string))))
+            (substring string (if (string-match "[^.0-9]" string)
+                                  (string-match "[^.0-9]" string)
+                                (length string))))
     (list "" string)))
 
 (defcustom TeX-default-unit-for-image "cm"
   "Default unit when prompting for an image size."
   :group 'TeX-macro
   :type '(choice (const "cm")
-                (const "in")
-                (const "\\linewidth")
-                (string :tag "Other")))
+                 (const "in")
+                 (const "\\linewidth")
+                 (string :tag "Other")))
 
 (defun TeX-arg-maybe (symbol list form)
   "Evaluates FORM, if SYMBOL is an element of LIST."
@@ -3543,9 +3547,9 @@ Unless optional argument COMPLETE is non-nil, ``: '' will 
be appended."
 (defun TeX-arg-free (optional &rest args)
   "Parse its arguments but use no braces when they are inserted."
   (let ((TeX-arg-opening-brace "")
-       (TeX-arg-closing-brace ""))
+        (TeX-arg-closing-brace ""))
     (if (equal (length args) 1)
-       (TeX-parse-argument optional (car args))
+        (TeX-parse-argument optional (car args))
       (TeX-parse-argument optional args))))
 
 (defun TeX-arg-literal (_optional &rest args)
@@ -3562,9 +3566,9 @@ argument OPTIONAL is ignored."
 Choose `ignore' if you don't want AUCTeX to install support for font locking."
   :group 'TeX-misc
   :type '(radio (function-item font-latex-setup)
-               (function-item tex-font-setup)
-               (function-item ignore)
-               (function :tag "Other")))
+                (function-item tex-font-setup)
+                (function-item ignore)
+                (function :tag "Other")))
 
 ;;; The Mode
 
@@ -3603,8 +3607,8 @@ the major mode to be used.")
   "Mode to enter for a new file when it can't be determined otherwise."
   :group 'TeX-misc
   :type '(radio (function-item latex-mode)
-               (function-item plain-tex-mode)
-               (function :tag "Other")))
+                (function-item plain-tex-mode)
+                (function :tag "Other")))
 
 (defcustom TeX-force-default-mode nil
   "If set to nil, try to infer the mode of the file from its content."
@@ -3626,36 +3630,36 @@ The algorithm is as follows:
   (interactive)
 
   (funcall (if (or (equal (buffer-size) 0)
-                  TeX-force-default-mode)
-              TeX-default-mode
-            (save-excursion
-              (goto-char (point-min))
-              (let ((comment-start-skip ;Used by TeX-in-comment
-                     (concat
-                      "\\(\\(^\\|[^\\\n]\\)\\("
-                      (regexp-quote TeX-esc)
-                      (regexp-quote TeX-esc)
-                      "\\)*\\)\\(%+ *\\)"))
-                    (entry TeX-format-list)
-                    answer case-fold-search)
-                (while (and entry (not answer))
-                  (if (re-search-forward (nth 2 (car entry))
-                                         10000 t)
-                      (if (not (TeX-in-comment))
-                          (setq answer (nth 1 (car entry))))
-                    (setq entry (cdr entry))))
-                (if answer
-                    answer
-                  TeX-default-mode))))))
+                   TeX-force-default-mode)
+               TeX-default-mode
+             (save-excursion
+               (goto-char (point-min))
+               (let ((comment-start-skip ;Used by TeX-in-comment
+                      (concat
+                       "\\(\\(^\\|[^\\\n]\\)\\("
+                       (regexp-quote TeX-esc)
+                       (regexp-quote TeX-esc)
+                       "\\)*\\)\\(%+ *\\)"))
+                     (entry TeX-format-list)
+                     answer case-fold-search)
+                 (while (and entry (not answer))
+                   (if (re-search-forward (nth 2 (car entry))
+                                          10000 t)
+                       (if (not (TeX-in-comment))
+                           (setq answer (nth 1 (car entry))))
+                     (setq entry (cdr entry))))
+                 (if answer
+                     answer
+                   TeX-default-mode))))))
 
 (when (and (boundp 'tex--prettify-symbols-alist)
-          (boundp 'prettify-symbols-compose-predicate))
+           (boundp 'prettify-symbols-compose-predicate))
   (defun TeX--prettify-symbols-compose-p (start end match)
     (and (tex--prettify-symbols-compose-p start end match)
-        (not (let ((face (get-text-property end 'face)))
-               (if (consp face)
-                   (memq 'font-latex-verbatim-face face)
-                 (eq face 'font-latex-verbatim-face)))))))
+         (not (let ((face (get-text-property end 'face)))
+                (if (consp face)
+                    (memq 'font-latex-verbatim-face face)
+                  (eq face 'font-latex-verbatim-face)))))))
 
 (defun VirTeX-common-initialization ()
   "Perform basic initialization."
@@ -3674,10 +3678,10 @@ The algorithm is as follows:
   (set (make-local-variable 'comment-start) "%")
   (set (make-local-variable 'comment-start-skip)
        (concat
-       "\\(\\(^\\|[^\\\n]\\)\\("
-       (regexp-quote TeX-esc)
-       (regexp-quote TeX-esc)
-       "\\)*\\)\\(%+[ \t]*\\)"))
+        "\\(\\(^\\|[^\\\n]\\)\\("
+        (regexp-quote TeX-esc)
+        (regexp-quote TeX-esc)
+        "\\)*\\)\\(%+[ \t]*\\)"))
   (set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\|\n\\)")
   (set (make-local-variable 'comment-use-syntax) t)
   ;; `comment-padding' is defined here as an integer for compatibility
@@ -3696,16 +3700,16 @@ The algorithm is as follows:
   ;; Make TAB stand out
   ;;  (make-local-variable 'buffer-display-table)
   ;;  (setq buffer-display-table (if standard-display-table
-  ;;                            (copy-sequence standard-display-table)
-  ;;                          (make-display-table)))
+  ;;                             (copy-sequence standard-display-table)
+  ;;                           (make-display-table)))
   ;;  (aset buffer-display-table ?\t (apply 'vector (append "<TAB>" nil)))
 
   ;; Symbol completion.
   (set (make-local-variable 'TeX-complete-list)
        (list (list "\\\\\\([a-zA-Z]*\\)"
-                  1 'TeX-symbol-list-filtered
-                  (if TeX-insert-braces "{}"))
-            (list "" TeX-complete-word)))
+                   1 'TeX-symbol-list-filtered
+                   (if TeX-insert-braces "{}"))
+             (list "" TeX-complete-word)))
 
   (funcall TeX-install-font-lock)
 
@@ -3724,15 +3728,15 @@ The algorithm is as follows:
   (when (fboundp 'TeX--prettify-symbols-compose-p)
     (set (make-local-variable 'prettify-symbols-alist) 
tex--prettify-symbols-alist)
     (TeX--if-macro-fboundp add-function
-       (add-function :override (local 'prettify-symbols-compose-predicate)
-                     #'TeX--prettify-symbols-compose-p)
+        (add-function :override (local 'prettify-symbols-compose-predicate)
+                      #'TeX--prettify-symbols-compose-p)
       (set (make-local-variable 'prettify-symbols-compose-predicate)
-          #'TeX--prettify-symbols-compose-p)))
+           #'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))
+              #'TeX--completion-at-point nil t))
 
   ;; 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
@@ -3749,24 +3753,24 @@ The algorithm is as follows:
   ;; `TeX-update-style' as the latter will call `TeX-master-file'
   ;; without the `ask' bit set.
   (add-hook 'find-file-hook
-           (lambda ()
-             ;; Check if we are looking at a new or shared file.
-             (when (or (not (file-exists-p (buffer-file-name)))
-                       (eq TeX-master 'shared))
-               (TeX-master-file nil nil t))
-             (TeX-update-style t)) nil t))
+            (lambda ()
+              ;; Check if we are looking at a new or shared file.
+              (when (or (not (file-exists-p (buffer-file-name)))
+                        (eq TeX-master 'shared))
+                (TeX-master-file nil nil t))
+              (TeX-update-style t)) nil t))
 
 
 ;;; Hilighting
 
 (if (boundp 'hilit-patterns-alist)
     (let ((latex-patterns (cdr-safe (assq 'latex-mode hilit-patterns-alist)))
-         (plain-tex-patterns (cdr-safe (assq 'plain-tex-mode
-                                             hilit-patterns-alist))))
+          (plain-tex-patterns (cdr-safe (assq 'plain-tex-mode
+                                              hilit-patterns-alist))))
       (if (and latex-patterns plain-tex-patterns)
-         (setq hilit-patterns-alist
-               (append (list (cons 'ams-tex-mode plain-tex-patterns))
-                       hilit-patterns-alist)))))
+          (setq hilit-patterns-alist
+                (append (list (cons 'ams-tex-mode plain-tex-patterns))
+                        hilit-patterns-alist)))))
 
 ;;; Parsing
 
@@ -3793,12 +3797,12 @@ The algorithm is as follows:
 (defun TeX-auto-add-information (name entries)
   "For NAME in `TeX-auto-parser' add ENTRIES."
   (let* ((entry (assoc name TeX-auto-parser))
-        (change (nth TeX-auto-parser-change entry))
-        (change-value (symbol-value change))
-        (local (nth TeX-auto-parser-local entry))
-        (local-value (symbol-value local)))
+         (change (nth TeX-auto-parser-change entry))
+         (change-value (symbol-value change))
+         (local (nth TeX-auto-parser-local entry))
+         (local-value (symbol-value local)))
     (if change-value
-       (set local (cons entries local-value))
+        (set local (cons entries local-value))
       (set change t)
       (set local (list entries local-value)))))
 
@@ -3806,31 +3810,31 @@ The algorithm is as follows:
   "Return information in `TeX-auto-parser' about NAME."
   (TeX-update-style)
   (let* ((entry (assoc name TeX-auto-parser))
-        (change (nth TeX-auto-parser-change entry))
-        (change-value (symbol-value change))
-        (local (nth TeX-auto-parser-local entry)))
+         (change (nth TeX-auto-parser-change entry))
+         (change-value (symbol-value change))
+         (local (nth TeX-auto-parser-local entry)))
     (if (not change-value)
-       ()
+        ()
       (set change nil)
       ;; Sort it
       (message "Sorting %s..." name)
       (set local
-          (sort (mapcar 'TeX-listify (apply 'append (symbol-value local)))
-                'TeX-car-string-lessp))
+           (sort (mapcar 'TeX-listify (apply 'append (symbol-value local)))
+                 'TeX-car-string-lessp))
       (message "Sorting %s...done" name)
       ;; Make it unique
       (message "Removing duplicates...")
       (let ((entry (symbol-value local)))
-       (while (and entry (cdr entry))
-         (let ((this (car entry))
-               (next (car (cdr entry))))
-           (if (not (string-equal (car this) (car next)))
-               (setq entry (cdr entry))
-             ;; We have two equal symbols.  Use the one with
-             ;; most arguments.
-             (if (> (length next) (length this))
-                 (setcdr this (cdr next)))
-             (setcdr entry (cdr (cdr entry)))))))
+        (while (and entry (cdr entry))
+          (let ((this (car entry))
+                (next (car (cdr entry))))
+            (if (not (string-equal (car this) (car next)))
+                (setq entry (cdr entry))
+              ;; We have two equal symbols.  Use the one with
+              ;; most arguments.
+              (if (> (length next) (length this))
+                  (setcdr this (cdr next)))
+              (setcdr entry (cdr (cdr entry)))))))
       (message "Removing duplicates...done"))
     (symbol-value local)))
 
@@ -3843,12 +3847,12 @@ By default just add an `s'.
 This macro creates a set of variables and functions to maintain a
 separate type of information in the parser."
   (let* ((names (or plural (concat name "s")))
-        (tmp (intern (concat prefix "-auto-" name)))
-        (add (intern (concat prefix "-add-" names)))
-        (local (intern (concat prefix "-" name "-list")))
-        (change (intern (concat prefix "-" name "-changed")))
-        (vardoc (concat "Information about " names
-                         " in the current buffer.
+         (tmp (intern (concat prefix "-auto-" name)))
+         (add (intern (concat prefix "-add-" names)))
+         (local (intern (concat prefix "-" name "-list")))
+         (change (intern (concat prefix "-" name "-changed")))
+         (vardoc (concat "Information about " names
+                          " in the current buffer.
 Generated by `TeX-auto-add-type'.")))
     `(progn
        (defvar ,tmp nil ,vardoc)
@@ -3857,21 +3861,21 @@ Generated by `TeX-auto-add-type'.")))
        (defvar ,change nil ,vardoc)
        (make-variable-buffer-local ',change)
        (defun ,add (&rest ,(intern names))
-        ,(concat "Add information about " (upcase names)
-                 " to the current buffer.
+         ,(concat "Add information about " (upcase names)
+                  " to the current buffer.
 Generated by `TeX-auto-add-type'.")
-        (TeX-auto-add-information ,name ,(intern names)))
+         (TeX-auto-add-information ,name ,(intern names)))
        (defun ,local ()
-        ,(concat "List of " names
-                 " active in the current buffer.
+         ,(concat "List of " names
+                  " active in the current buffer.
 Generated by `TeX-auto-add-type'.")
-        (TeX-auto-list-information ,name))
+         (TeX-auto-list-information ,name))
        ;; Append new type to `TeX-auto-parser' in order to make `style' type
        ;; always the first.
        (add-to-list 'TeX-auto-parser ',(list name tmp add local change) t)
        (add-hook 'TeX-remove-style-hook
-                (lambda ()
-                  (setq ,local nil))))))
+                 (lambda ()
+                   (setq ,local nil))))))
 
 (TeX-auto-add-type "symbol" "TeX")
 
@@ -3887,15 +3891,15 @@ Generated by `TeX-auto-add-type'.")
 (defun TeX-auto-apply-entry (entry)
   "Apply the information in ENTRY in `TeX-auto-parser'."
   (let ((value (symbol-value (nth TeX-auto-parser-temporary entry)))
-       (add (nth TeX-auto-parser-add entry)))
+        (add (nth TeX-auto-parser-add entry)))
     (if value (apply add value))))
 
 (defun TeX-safe-auto-write ()
   "Call `TeX-auto-write' safely."
   (condition-case _ignored
       (and (boundp 'TeX-auto-update)
-          TeX-auto-update
-          (TeX-auto-write))
+           TeX-auto-update
+           (TeX-auto-write))
     (error nil))
   ;; Continue with the other write file hooks.
   nil)
@@ -3916,22 +3920,22 @@ Generated by `TeX-auto-add-type'.")
       (untabify (point-min) (point-max)))
   (if (and TeX-auto-save TeX-auto-local)
       (let* ((file (expand-file-name
-                   (concat
-                    (file-name-as-directory TeX-auto-local)
-                    (TeX-strip-extension nil TeX-all-extensions t)
-                    ".el")
-                   (TeX-master-directory)))
-            (dir (file-name-directory file)))
-       ;; Create auto directory if possible.
-       (if (not (file-exists-p dir))
-           (condition-case _ignored
-               (make-directory dir)
-             (error nil)))
-       (if (file-writable-p file)
-           (save-excursion
-             (TeX-update-style)
-             (TeX-auto-store file))
-         (message "Can't write style information.")))))
+                    (concat
+                     (file-name-as-directory TeX-auto-local)
+                     (TeX-strip-extension nil TeX-all-extensions t)
+                     ".el")
+                    (TeX-master-directory)))
+             (dir (file-name-directory file)))
+        ;; Create auto directory if possible.
+        (if (not (file-exists-p dir))
+            (condition-case _ignored
+                (make-directory dir)
+              (error nil)))
+        (if (file-writable-p file)
+            (save-excursion
+              (TeX-update-style)
+              (TeX-auto-store file))
+          (message "Can't write style information.")))))
 
 (defcustom TeX-macro-default (car-safe TeX-macro-private)
   "Default directory to search for TeX macros."
@@ -3958,8 +3962,8 @@ nil means do not recurse, a positive integer means go 
that far deep in the
 directory hierarchy, t means recurse indefinitely."
   :group 'TeX-parse
   :type '(choice (const :tag "On" t)
-                (const :tag "Off" nil)
-                (integer :tag "Depth" :value 1)))
+                 (const :tag "Off" nil)
+                 (integer :tag "Depth" :value 1)))
 
 (defvar TeX-file-extensions)
 (defvar BibTeX-file-extensions)
@@ -3970,50 +3974,50 @@ directory hierarchy, t means recurse indefinitely."
   "Generate style file for TEX and store it in AUTO.
 If TEX is a directory, generate style files for all files in the directory."
   (interactive (list (setq TeX-macro-default
-                          (expand-file-name (read-file-name
-                                             "TeX file or directory: "
-                                             TeX-macro-default
-                                             TeX-macro-default 'confirm)))
-                    (setq TeX-auto-default
-                          (expand-file-name (read-file-name
-                                             "AUTO lisp directory: "
-                                             TeX-auto-default
-                                             TeX-auto-default 'confirm)))))
+                           (expand-file-name (read-file-name
+                                              "TeX file or directory: "
+                                              TeX-macro-default
+                                              TeX-macro-default 'confirm)))
+                     (setq TeX-auto-default
+                           (expand-file-name (read-file-name
+                                              "AUTO lisp directory: "
+                                              TeX-auto-default
+                                              TeX-auto-default 'confirm)))))
   (cond ((not (file-readable-p tex)))
-       ((string-match TeX-ignore-file tex))
-       ((file-directory-p tex)
-        (let ((files (directory-files (expand-file-name tex)))
-              (default-directory (file-name-as-directory
-                                  (expand-file-name tex)))
-              (TeX-file-recurse (cond ((symbolp TeX-file-recurse)
-                                       TeX-file-recurse)
-                                      ((zerop TeX-file-recurse)
-                                       nil)
-                                      ((1- TeX-file-recurse)))))
-          (mapcar (lambda (file)
-                    (if (or TeX-file-recurse
-                            (not (file-directory-p file)))
-                        (TeX-auto-generate file auto)))
-                  files)))
-       ((not (file-newer-than-file-p
-              tex
-              (concat (file-name-as-directory auto)
-                      (TeX-strip-extension tex TeX-all-extensions t)
-                      ".el"))))
-       ((TeX-match-extension tex (TeX-delete-duplicate-strings
-                                  (append TeX-file-extensions
-                                          BibTeX-file-extensions
-                                          TeX-Biber-file-extensions)))
-        (with-current-buffer (let (enable-local-eval)
-                               (find-file-noselect tex))
-          (message "Parsing %s..." tex)
-          (TeX-auto-store (concat (file-name-as-directory auto)
-                                  (TeX-strip-extension tex
-                                                       TeX-all-extensions
-                                                       t)
-                                  ".el"))
-          (kill-buffer (current-buffer))
-          (message "Parsing %s...done" tex)))))
+        ((string-match TeX-ignore-file tex))
+        ((file-directory-p tex)
+         (let ((files (directory-files (expand-file-name tex)))
+               (default-directory (file-name-as-directory
+                                   (expand-file-name tex)))
+               (TeX-file-recurse (cond ((symbolp TeX-file-recurse)
+                                        TeX-file-recurse)
+                                       ((zerop TeX-file-recurse)
+                                        nil)
+                                       ((1- TeX-file-recurse)))))
+           (mapcar (lambda (file)
+                     (if (or TeX-file-recurse
+                             (not (file-directory-p file)))
+                         (TeX-auto-generate file auto)))
+                   files)))
+        ((not (file-newer-than-file-p
+               tex
+               (concat (file-name-as-directory auto)
+                       (TeX-strip-extension tex TeX-all-extensions t)
+                       ".el"))))
+        ((TeX-match-extension tex (TeX-delete-duplicate-strings
+                                   (append TeX-file-extensions
+                                           BibTeX-file-extensions
+                                           TeX-Biber-file-extensions)))
+         (with-current-buffer (let (enable-local-eval)
+                                (find-file-noselect tex))
+           (message "Parsing %s..." tex)
+           (TeX-auto-store (concat (file-name-as-directory auto)
+                                   (TeX-strip-extension tex
+                                                        TeX-all-extensions
+                                                        t)
+                                   ".el"))
+           (kill-buffer (current-buffer))
+           (message "Parsing %s...done" tex)))))
 
 ;;;###autoload
 (defun TeX-auto-generate-global ()
@@ -4022,10 +4026,10 @@ If TEX is a directory, generate style files for all 
files in the directory."
   (unless (file-directory-p TeX-auto-global)
     (make-directory TeX-auto-global))
   (let ((TeX-file-extensions '("cls" "sty"))
-       (BibTeX-file-extensions nil)
-       (TeX-Biber-file-extensions nil))
+        (BibTeX-file-extensions nil)
+        (TeX-Biber-file-extensions nil))
     (mapc (lambda (macro) (TeX-auto-generate macro TeX-auto-global))
-         TeX-macro-global))
+          TeX-macro-global))
   (byte-recompile-directory TeX-auto-global 0))
 
 (defun TeX-auto-store (file)
@@ -4034,55 +4038,55 @@ If TEX is a directory, generate style files for all 
files in the directory."
 
   (if (member nil (mapcar 'TeX-auto-entry-clear-p TeX-auto-parser))
       (let ((style (TeX-strip-extension nil TeX-all-extensions t))
-           (class-opts (if (boundp 'LaTeX-provided-class-options)
-                           LaTeX-provided-class-options))
-           (pkg-opts (if (boundp 'LaTeX-provided-package-options)
-                         LaTeX-provided-package-options))
-           (tex-cmd-opts TeX-command-extra-options)
-           (verb-envs (when (boundp 'LaTeX-verbatim-environments-local)
-                        LaTeX-verbatim-environments-local))
-           (verb-macros-delims (when (boundp 
'LaTeX-verbatim-macros-with-delims-local)
-                                 LaTeX-verbatim-macros-with-delims-local))
-           (verb-macros-braces (when (boundp 
'LaTeX-verbatim-macros-with-braces-local)
-                                 LaTeX-verbatim-macros-with-braces-local))
-           (dialect TeX-style-hook-dialect))
-       (TeX-unload-style style)
-       (with-current-buffer (generate-new-buffer file)
-         (erase-buffer)
-         (insert "(TeX-add-style-hook\n \""
-                 style "\"\n (lambda ()")
-         (unless (string= tex-cmd-opts "")
-           (insert "\n   (setq TeX-command-extra-options\n"
-                   "         " (prin1-to-string tex-cmd-opts) ")"))
-         (when class-opts
-           (insert "\n   (TeX-add-to-alist 'LaTeX-provided-class-options\n"
-                   "                     '" (prin1-to-string class-opts) ")"))
-         (when pkg-opts
-           (insert "\n   (TeX-add-to-alist 'LaTeX-provided-package-options\n"
-                   "                     '" (prin1-to-string pkg-opts) ")"))
-         (dolist (env verb-envs)
-           (insert
-            (format "\n   (add-to-list 'LaTeX-verbatim-environments-local 
\"%s\")"
-                    env)))
-         (dolist (env verb-macros-braces)
-           (insert
-            (format "\n   (add-to-list 
'LaTeX-verbatim-macros-with-braces-local \"%s\")"
-                    env)))
-         (dolist (env verb-macros-delims)
-           (insert
-            (format "\n   (add-to-list 
'LaTeX-verbatim-macros-with-delims-local \"%s\")"
-                    env)))
-         (mapc (lambda (el) (TeX-auto-insert el style))
-               TeX-auto-parser)
-         (insert ")")
-         (if dialect (insert (concat "\n " (prin1-to-string dialect))))
-         (insert ")\n\n")
-         (write-region (point-min) (point-max) file nil 'silent)
-         (kill-buffer (current-buffer))))
+            (class-opts (if (boundp 'LaTeX-provided-class-options)
+                            LaTeX-provided-class-options))
+            (pkg-opts (if (boundp 'LaTeX-provided-package-options)
+                          LaTeX-provided-package-options))
+            (tex-cmd-opts TeX-command-extra-options)
+            (verb-envs (when (boundp 'LaTeX-verbatim-environments-local)
+                         LaTeX-verbatim-environments-local))
+            (verb-macros-delims (when (boundp 
'LaTeX-verbatim-macros-with-delims-local)
+                                  LaTeX-verbatim-macros-with-delims-local))
+            (verb-macros-braces (when (boundp 
'LaTeX-verbatim-macros-with-braces-local)
+                                  LaTeX-verbatim-macros-with-braces-local))
+            (dialect TeX-style-hook-dialect))
+        (TeX-unload-style style)
+        (with-current-buffer (generate-new-buffer file)
+          (erase-buffer)
+          (insert "(TeX-add-style-hook\n \""
+                  style "\"\n (lambda ()")
+          (unless (string= tex-cmd-opts "")
+            (insert "\n   (setq TeX-command-extra-options\n"
+                    "         " (prin1-to-string tex-cmd-opts) ")"))
+          (when class-opts
+            (insert "\n   (TeX-add-to-alist 'LaTeX-provided-class-options\n"
+                    "                     '" (prin1-to-string class-opts) ")"))
+          (when pkg-opts
+            (insert "\n   (TeX-add-to-alist 'LaTeX-provided-package-options\n"
+                    "                     '" (prin1-to-string pkg-opts) ")"))
+          (dolist (env verb-envs)
+            (insert
+             (format "\n   (add-to-list 'LaTeX-verbatim-environments-local 
\"%s\")"
+                     env)))
+          (dolist (env verb-macros-braces)
+            (insert
+             (format "\n   (add-to-list 
'LaTeX-verbatim-macros-with-braces-local \"%s\")"
+                     env)))
+          (dolist (env verb-macros-delims)
+            (insert
+             (format "\n   (add-to-list 
'LaTeX-verbatim-macros-with-delims-local \"%s\")"
+                     env)))
+          (mapc (lambda (el) (TeX-auto-insert el style))
+                TeX-auto-parser)
+          (insert ")")
+          (if dialect (insert (concat "\n " (prin1-to-string dialect))))
+          (insert ")\n\n")
+          (write-region (point-min) (point-max) file nil 'silent)
+          (kill-buffer (current-buffer))))
     (if (file-exists-p (concat file "c"))
-       (delete-file (concat file "c")))
+        (delete-file (concat file "c")))
     (if (file-exists-p file)
-       (delete-file file))))
+        (delete-file file))))
 
 (defun TeX-auto-entry-clear-p (entry)
   "Check if the temporary for `TeX-auto-parser' entry ENTRY is clear."
@@ -4094,16 +4098,16 @@ If TEX is a directory, generate style files for all 
files in the directory."
 
 If SKIP is not-nil, don't insert code for SKIP."
   (let ((name (symbol-name (nth TeX-auto-parser-add entry)))
-       (list (symbol-value (nth TeX-auto-parser-temporary entry))))
+        (list (symbol-value (nth TeX-auto-parser-temporary entry))))
     (unless (null list)
       (insert "\n   (" name)
       (dolist (el list)
-       (cond ((and (stringp el) (not (string= el skip)))
-              (insert "\n    ")
-              (insert (prin1-to-string el)))
-             ((not (stringp el))
-              (insert "\n    ")
-              (insert "'" (prin1-to-string el)))))
+        (cond ((and (stringp el) (not (string= el skip)))
+               (insert "\n    ")
+               (insert (prin1-to-string el)))
+              ((not (stringp el))
+               (insert "\n    ")
+               (insert "'" (prin1-to-string el)))))
       (insert ")"))))
 
 (defvar TeX-auto-ignore
@@ -4117,16 +4121,16 @@ If SKIP is not-nil, don't insert code for SKIP."
 (defcustom TeX-auto-regexp-list 'TeX-auto-full-regexp-list
   "List of regular expressions used for parsing the current file."
   :type '(radio (variable-item TeX-auto-empty-regexp-list)
-               (variable-item TeX-auto-full-regexp-list)
-               (variable-item plain-TeX-auto-regexp-list)
-               (variable-item LaTeX-auto-minimal-regexp-list)
-               (variable-item LaTeX-auto-label-regexp-list)
-               (variable-item LaTeX-auto-regexp-list)
-               (symbol :tag "Other")
-               (repeat :tag "Specify"
-                       (group (regexp :tag "Match")
-                              (sexp :tag "Groups")
-                              symbol)))
+                (variable-item TeX-auto-full-regexp-list)
+                (variable-item plain-TeX-auto-regexp-list)
+                (variable-item LaTeX-auto-minimal-regexp-list)
+                (variable-item LaTeX-auto-label-regexp-list)
+                (variable-item LaTeX-auto-regexp-list)
+                (symbol :tag "Other")
+                (repeat :tag "Specify"
+                        (group (regexp :tag "Match")
+                               (sexp :tag "Groups")
+                               symbol)))
   :group 'TeX-parse)
   (make-variable-buffer-local 'TeX-auto-regexp-list)
 
@@ -4160,7 +4164,7 @@ alter the numbering of any ordinary, non-shy groups.")
       (,(concat "\\\\font\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol)
       (,(concat "\\\\chardef\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol)
       (,(concat "\\\\new\\(?:count\\|dimen\\|muskip\\|skip\\)\\\\\\(" token
-               "+\\)[^a-zA-Z@]")
+                "+\\)[^a-zA-Z@]")
        1 TeX-auto-symbol)
       (,(concat "\\\\newfont{?\\\\\\(" token "+\\)}?") 1 TeX-auto-symbol)
       (,(concat "\\\\typein\\[\\\\\\(" token "+\\)\\]") 1 TeX-auto-symbol)
@@ -4197,16 +4201,16 @@ Use `TeX-auto-x-regexp-list' for parsing the region 
between
   "List of regular expressions used for additional parsing.
 See `TeX-auto-x-parse-length'."
   :type '(radio (variable-item TeX-auto-empty-regexp-list)
-               (variable-item TeX-auto-full-regexp-list)
-               (variable-item plain-TeX-auto-regexp-list)
-               (variable-item LaTeX-auto-minimal-regexp-list)
-               (variable-item LaTeX-auto-label-regexp-list)
-               (variable-item LaTeX-auto-regexp-list)
-               (symbol :tag "Other")
-               (repeat :tag "Specify"
-                       (group (regexp :tag "Match")
-                              (sexp :tag "Groups")
-                              symbol)))
+                (variable-item TeX-auto-full-regexp-list)
+                (variable-item plain-TeX-auto-regexp-list)
+                (variable-item LaTeX-auto-minimal-regexp-list)
+                (variable-item LaTeX-auto-label-regexp-list)
+                (variable-item LaTeX-auto-regexp-list)
+                (symbol :tag "Other")
+                (repeat :tag "Specify"
+                        (group (regexp :tag "Match")
+                               (sexp :tag "Groups")
+                               symbol)))
   :group 'TeX-parse)
   (make-variable-buffer-local 'TeX-auto-x-regexp-list)
 
@@ -4215,9 +4219,9 @@ See `TeX-auto-x-parse-length'."
 you should not use something like `[\\(]' for a character range."
   (let (start (n 0))
     (while (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\([^?]"
-                        regexp start)
+                         regexp start)
       (setq start (- (match-end 0) 2)
-           n (1+ n)))
+            n (1+ n)))
     n))
 
 (defun TeX-auto-parse-region (regexp-list beg end)
@@ -4227,52 +4231,52 @@ you should not use something like `[\\(]' for a 
character range."
   (if regexp-list
       ;; Extract the information.
       (let* (groups
-            (count 1)
-            (regexp (concat "\\("
-                            (mapconcat
-                             (lambda(x)
-                               (push (cons count x) groups)
-                               (setq count
-                                     (+ 1 count
-                                        (TeX-regexp-group-count (car x))))
-                               (car x))
-                             regexp-list "\\)\\|\\(")
-                            "\\)"))
-            syms
-            lst)
-       (setq count 0)
-       (goto-char (if end (min end (point-max)) (point-max)))
-       (while (re-search-backward regexp beg t)
-         (let* ((entry (cdr (TeX-member nil groups
-                                        (lambda (_a b)
-                                          (match-beginning (car b))))))
-                (symbol (nth 2 entry))
-                (match (nth 1 entry)))
-           (unless (TeX-in-comment)
-             (looking-at (nth 0 entry))
-             (if (fboundp symbol)
-                 (funcall symbol match)
-               (puthash (if (listp match)
-                            (mapcar #'TeX-match-buffer match)
-                          (TeX-match-buffer match))
-                        (setq count (1- count))
-                        (cdr (or (assq symbol syms)
-                                 (car (push
-                                       (cons symbol
-                                             (make-hash-table :test 'equal))
-                                       syms)))))))))
-       (setq count 0)
-       (dolist (symbol syms)
-         (setq lst (symbol-value (car symbol)))
-         (while lst
-           (puthash (pop lst)
-                    (setq count (1+ count))
-                    (cdr symbol)))
-         (maphash (lambda (key value)
-                    (push (cons value key) lst))
-                  (cdr symbol))
-         (clrhash (cdr symbol))
-         (set (car symbol) (mapcar #'cdr (sort lst #'car-less-than-car)))))))
+             (count 1)
+             (regexp (concat "\\("
+                             (mapconcat
+                              (lambda(x)
+                                (push (cons count x) groups)
+                                (setq count
+                                      (+ 1 count
+                                         (TeX-regexp-group-count (car x))))
+                                (car x))
+                              regexp-list "\\)\\|\\(")
+                             "\\)"))
+             syms
+             lst)
+        (setq count 0)
+        (goto-char (if end (min end (point-max)) (point-max)))
+        (while (re-search-backward regexp beg t)
+          (let* ((entry (cdr (TeX-member nil groups
+                                         (lambda (_a b)
+                                           (match-beginning (car b))))))
+                 (symbol (nth 2 entry))
+                 (match (nth 1 entry)))
+            (unless (TeX-in-comment)
+              (looking-at (nth 0 entry))
+              (if (fboundp symbol)
+                  (funcall symbol match)
+                (puthash (if (listp match)
+                             (mapcar #'TeX-match-buffer match)
+                           (TeX-match-buffer match))
+                         (setq count (1- count))
+                         (cdr (or (assq symbol syms)
+                                  (car (push
+                                        (cons symbol
+                                              (make-hash-table :test 'equal))
+                                        syms)))))))))
+        (setq count 0)
+        (dolist (symbol syms)
+          (setq lst (symbol-value (car symbol)))
+          (while lst
+            (puthash (pop lst)
+                     (setq count (1+ count))
+                     (cdr symbol)))
+          (maphash (lambda (key value)
+                     (push (cons value key) lst))
+                   (cdr symbol))
+          (clrhash (cdr symbol))
+          (set (car symbol) (mapcar #'cdr (sort lst #'car-less-than-car)))))))
 
 (defun TeX-auto-parse ()
   "Parse TeX information in current buffer.
@@ -4287,12 +4291,12 @@ functions in `TeX-auto-cleanup-hook' after parsing."
 
     (save-excursion
       (and (> TeX-auto-x-parse-length TeX-auto-parse-length)
-          (> (point-max) TeX-auto-parse-length)
-          (TeX-auto-parse-region TeX-auto-x-regexp-list
-                                 TeX-auto-parse-length
-                                 TeX-auto-x-parse-length))
+           (> (point-max) TeX-auto-parse-length)
+           (TeX-auto-parse-region TeX-auto-x-regexp-list
+                                  TeX-auto-parse-length
+                                  TeX-auto-x-parse-length))
       (TeX-auto-parse-region TeX-auto-regexp-list
-                            nil TeX-auto-parse-length))
+                             nil TeX-auto-parse-length))
 
     ;; Cleanup ignored symbols.
 
@@ -4302,9 +4306,9 @@ functions in `TeX-auto-cleanup-hook' after parsing."
       (setq TeX-auto-symbol (cdr TeX-auto-symbol)))
     (let ((list TeX-auto-symbol))
       (while (and list (cdr list))
-       (if (member (car (cdr list)) TeX-auto-ignore)
-           (setcdr list (cdr (cdr list)))
-         (setq list (cdr list)))))
+        (if (member (car (cdr list)) TeX-auto-ignore)
+            (setcdr list (cdr (cdr list)))
+          (setq list (cdr list)))))
 
     (run-hooks 'TeX-auto-cleanup-hook)))
 
@@ -4318,16 +4322,16 @@ functions in `TeX-auto-cleanup-hook' after parsing."
   "Add MATCH to TeX-auto-symbols.
 Check for potential LaTeX environments."
   (let ((symbol (if (listp match)
-                   (mapcar 'TeX-match-buffer match)
-                 (TeX-match-buffer match))))
+                    (mapcar 'TeX-match-buffer match)
+                  (TeX-match-buffer match))))
     (if (and (stringp symbol)
-            (string-match "^end\\(.+\\)$" symbol))
-       (add-to-list 'LaTeX-auto-end-symbol
-                    (substring symbol (match-beginning 1) (match-end 1)))
+             (string-match "^end\\(.+\\)$" symbol))
+        (add-to-list 'LaTeX-auto-end-symbol
+                     (substring symbol (match-beginning 1) (match-end 1)))
       (if (listp symbol)
-         (dolist (elt symbol)
-           (add-to-list 'TeX-auto-symbol elt))
-       (add-to-list 'TeX-auto-symbol symbol)))))
+          (dolist (elt symbol)
+            (add-to-list 'TeX-auto-symbol elt))
+        (add-to-list 'TeX-auto-symbol symbol)))))
 
 
 ;;; File Extensions
@@ -4401,9 +4405,9 @@ If EXTENSIONS is not specified or nil, the value of
       (setq extensions TeX-file-extensions))
 
   (let ((regexp (concat "\\.\\("
-                       (mapconcat 'identity extensions "\\|")
-                       "\\)$"))
-       (case-fold-search t))
+                        (mapconcat 'identity extensions "\\|")
+                        "\\)$"))
+        (case-fold-search t))
     (string-match regexp file)))
 
 (defun TeX-strip-extension (&optional string extensions nodir nostrip)
@@ -4423,15 +4427,15 @@ EXTENSIONS defaults to `TeX-file-extensions'."
       (setq extensions TeX-file-extensions))
 
   (let* ((strip (if (and (not nostrip)
-                        (TeX-match-extension string extensions))
-                   (substring string 0 (match-beginning 0))
-                 string))
-        (dir (expand-file-name (or (file-name-directory strip) "./"))))
+                         (TeX-match-extension string extensions))
+                    (substring string 0 (match-beginning 0))
+                  string))
+         (dir (expand-file-name (or (file-name-directory strip) "./"))))
     (if (or (eq nodir t)
-           (string-equal dir (expand-file-name "./"))
-           (member dir (mapcar #'file-name-as-directory TeX-macro-global))
-           (member dir (mapcar #'file-name-as-directory TeX-macro-private)))
-       (file-name-nondirectory strip)
+            (string-equal dir (expand-file-name "./"))
+            (member dir (mapcar #'file-name-as-directory TeX-macro-global))
+            (member dir (mapcar #'file-name-as-directory TeX-macro-private)))
+        (file-name-nondirectory strip)
       strip)))
 
 
@@ -4441,7 +4445,7 @@ EXTENSIONS defaults to `TeX-file-extensions'."
   "Return a list of available TeX tree roots."
   (let (list)
     (dolist (dir (TeX-tree-expand '("$TEXMFHOME" "$TEXMFMAIN" "$TEXMFLOCAL"
-                                   "$TEXMFDIST")
+                                    "$TEXMFDIST")
                                   "latex"))
       (when (file-readable-p dir)
         (cl-pushnew dir list :test #'equal)))
@@ -4463,26 +4467,26 @@ nil.  If NODIR is non-nil, remove directory part.  If 
STRIP is
 non-nil, remove file extension."
   (when TeX-kpathsea-path-delimiter
     (let ((dirs (if (eq scope 'local)
-                   '("./")
-                 (TeX-tree-expand (list var) nil)))
-         result)
+                    '("./")
+                  (TeX-tree-expand (list var) nil)))
+          result)
       (if (eq scope 'global)
-         (setq dirs (delete "./" dirs)))
+          (setq dirs (delete "./" dirs)))
       (setq extensions (concat "\\.\\(?:"
-                              (mapconcat #'identity extensions "\\|")
-                              "\\)\\'")
-           result (apply #'append (mapcar (lambda (x)
-                                            (when (file-readable-p x)
-                                              (directory-files
-                                               x (not nodir) extensions t)))
-                                          dirs)))
+                               (mapconcat #'identity extensions "\\|")
+                               "\\)\\'")
+            result (apply #'append (mapcar (lambda (x)
+                                             (when (file-readable-p x)
+                                               (directory-files
+                                                x (not nodir) extensions t)))
+                                           dirs)))
       (if strip
-         (mapcar (lambda (x)
-                   (if (string-match extensions x)
-                       (substring x 0 (match-beginning 0))
-                     x))
-                 result)
-       result))))
+          (mapcar (lambda (x)
+                    (if (string-match extensions x)
+                        (substring x 0 (match-beginning 0))
+                      x))
+                  result)
+        result))))
 
 (defun TeX-search-files (&optional directories extensions nodir strip)
   "Return a list of all reachable files in DIRECTORIES ending with EXTENSIONS.
@@ -4496,34 +4500,34 @@ If optional argument EXTENSIONS is not set, use 
`TeX-file-extensions'"
   (when (null directories)
     (setq directories (cons "./" (append TeX-macro-private TeX-macro-global))))
   (let (match
-       (TeX-file-recurse (cond ((symbolp TeX-file-recurse)
-                                TeX-file-recurse)
-                               ((zerop TeX-file-recurse)
-                                nil)
-                               ((1- TeX-file-recurse)))))
+        (TeX-file-recurse (cond ((symbolp TeX-file-recurse)
+                                 TeX-file-recurse)
+                                ((zerop TeX-file-recurse)
+                                 nil)
+                                ((1- TeX-file-recurse)))))
     (while directories
       (let* ((directory (car directories))
-            (content (and directory
-                          (file-readable-p directory)
-                          (file-directory-p directory)
-                          (directory-files directory))))
-       (setq directories (cdr directories))
-       (while content
-         (let ((file (concat directory (car content))))
-           (setq content (cdr content))
-           (cond ((string-match TeX-ignore-file file))
-                 ((not (file-readable-p file)))
-                 ((file-directory-p file)
-                  (if TeX-file-recurse
-                      (setq match
-                            (append match
-                                    (TeX-search-files
-                                     (list (file-name-as-directory file))
-                                     extensions nodir strip)))))
-                 ((TeX-match-extension file extensions)
-                  (setq match (cons (TeX-strip-extension
-                                     file extensions nodir (not strip))
-                                    match))))))))
+             (content (and directory
+                           (file-readable-p directory)
+                           (file-directory-p directory)
+                           (directory-files directory))))
+        (setq directories (cdr directories))
+        (while content
+          (let ((file (concat directory (car content))))
+            (setq content (cdr content))
+            (cond ((string-match TeX-ignore-file file))
+                  ((not (file-readable-p file)))
+                  ((file-directory-p file)
+                   (if TeX-file-recurse
+                       (setq match
+                             (append match
+                                     (TeX-search-files
+                                      (list (file-name-as-directory file))
+                                      extensions nodir strip)))))
+                  ((TeX-match-extension file extensions)
+                   (setq match (cons (TeX-strip-extension
+                                      file extensions nodir (not strip))
+                                     match))))))))
     match))
 
 ;; The variables `TeX-macro-private' and `TeX-macro-global' are not
@@ -4565,29 +4569,29 @@ If optional argument NODIR is non-nil, remove directory 
part.
 
 If optional argument STRIP is non-nil, remove file extension."
   (let* ((gc-cons-threshold 10000000)
-        (spec (assq filetype TeX-search-files-type-alist))
-        (kpse-var (nth 1 spec))
-        (rawdirs (nth 2 spec))
-        (exts (nth 3 spec))
-        expdirs dirs local-files)
+         (spec (assq filetype TeX-search-files-type-alist))
+         (kpse-var (nth 1 spec))
+         (rawdirs (nth 2 spec))
+         (exts (nth 3 spec))
+         expdirs dirs local-files)
     (setq exts (if (symbolp exts) (eval exts) exts))
     (or (TeX-search-files-kpathsea kpse-var exts scope nodir strip)
-       (progn
-         (unless (eq scope 'global)
-           (setq local-files
-                 (let ((TeX-file-recurse nil))
-                   (TeX-search-files '("./") exts nodir strip))))
-         (if (eq scope 'local)
-             local-files
-           (if (null TeX-tree-roots)
-               (error "No TeX trees available; configure `TeX-tree-roots'")
-             ;; Expand variables.
+        (progn
+          (unless (eq scope 'global)
+            (setq local-files
+                  (let ((TeX-file-recurse nil))
+                    (TeX-search-files '("./") exts nodir strip))))
+          (if (eq scope 'local)
+              local-files
+            (if (null TeX-tree-roots)
+                (error "No TeX trees available; configure `TeX-tree-roots'")
+              ;; Expand variables.
               (setq expdirs
-                   ;; Don't use `delete-dups' instead of
-                   ;; `TeX-delete-duplicate-strings' here.
-                   ;; Otherwise, when the last element of `rawdirs'
-                   ;; is a variable, its value might be truncated as
-                   ;; side effect.
+                    ;; Don't use `delete-dups' instead of
+                    ;; `TeX-delete-duplicate-strings' here.
+                    ;; Otherwise, when the last element of `rawdirs'
+                    ;; is a variable, its value might be truncated as
+                    ;; side effect.
                     (TeX-delete-duplicate-strings
                      (apply #'append
                             (mapcar (lambda (rawdir)
@@ -4595,16 +4599,16 @@ If optional argument STRIP is non-nil, remove file 
extension."
                                           (symbol-value rawdir)
                                         (list rawdir)))
                                     rawdirs))))
-             ;; Assumption: Either all paths are absolute or all are relative.
-             (if (file-name-absolute-p (car expdirs))
-                 (setq dirs expdirs)
-               ;; Append relative TDS subdirs to all TeX tree roots.
-               (dolist (root TeX-tree-roots)
-                 (dolist (dir expdirs)
+              ;; Assumption: Either all paths are absolute or all are relative.
+              (if (file-name-absolute-p (car expdirs))
+                  (setq dirs expdirs)
+                ;; Append relative TDS subdirs to all TeX tree roots.
+                (dolist (root TeX-tree-roots)
+                  (dolist (dir expdirs)
                     (let ((dir (expand-file-name dir root)))
                       (unless (member dir dirs)
                         (setq dirs (append dirs (list dir)))))))))
-           (append local-files (TeX-search-files dirs exts nodir strip)))))))
+            (append local-files (TeX-search-files dirs exts nodir strip)))))))
 
 ;;; Narrowing
 
@@ -4614,15 +4618,15 @@ If optional argument STRIP is non-nil, remove file 
extension."
   (save-excursion
     (widen)
     (let ((opoint (point))
-         beg end)
+          beg end)
       (if (null (search-backward "{" nil t))
-         (message "Nothing to be narrowed here.")
-       (setq beg (point))
-       (forward-sexp)
-       (setq end (point))
-       (if (< end opoint)
-           (message "Nothing to be narrowed here.")
-         (narrow-to-region beg end))))))
+          (message "Nothing to be narrowed here.")
+        (setq beg (point))
+        (forward-sexp)
+        (setq end (point))
+        (if (< end opoint)
+            (message "Nothing to be narrowed here.")
+          (narrow-to-region beg end))))))
 (put 'TeX-narrow-to-group 'disabled t)
 
 ;;; Utilities
@@ -4647,16 +4651,16 @@ Return nil if ELT is not a member of LIST."
   (catch 'found
     (dolist (elt elts)
       (when (member elt list)
-       (throw 'found t)))))
+        (throw 'found t)))))
 
 (defun TeX-assoc (key list)
   "Return non-nil if KEY is `equal' to the car of an element of LIST.
 Like assoc, except case insensitive."
   (let ((case-fold-search t))
     (TeX-member key list
-               (lambda (a b)
-                 (string-match (concat "^" (regexp-quote a) "$")
-                               (car b))))))
+                (lambda (a b)
+                  (string-match (concat "^" (regexp-quote a) "$")
+                                (car b))))))
 
 (defun TeX-match-buffer (n)
   "Return the substring corresponding to the N'th match.
@@ -4672,9 +4676,9 @@ to look backward for."
   (let ((pos (point)))
     (save-excursion
       (and (re-search-backward regexp
-                              (if limit (max (point-min) (- (point) limit)))
-                              t)
-          (eq (match-end 0) pos)))))
+                               (if limit (max (point-min) (- (point) limit)))
+                               t)
+           (eq (match-end 0) pos)))))
 
 (defun TeX-current-line ()
   "The current line number."
@@ -4701,18 +4705,18 @@ element to ALIST-VAR."
   ;; Loop over all elements of NEW-ALIST.
   (while new-alist
     (let* ((new-element (car new-alist))
-          ;; Get the element of ALIST-VAR with the same key of the current
-          ;; element of NEW-ALIST, if any.
-          (old-element (assoc (car new-element) (symbol-value alist-var))))
+           ;; Get the element of ALIST-VAR with the same key of the current
+           ;; element of NEW-ALIST, if any.
+           (old-element (assoc (car new-element) (symbol-value alist-var))))
       (if old-element
-         (progn
-           (set alist-var (delete old-element (symbol-value alist-var)))
-           ;; Append to `old-element' the values of the current element of
-           ;; NEW-ALIST.
-           (mapc (lambda (elt) (add-to-list 'old-element elt t))
-                 (cdr new-element))
-           (set alist-var (add-to-list alist-var old-element t)))
-       (add-to-list alist-var new-element t)))
+          (progn
+            (set alist-var (delete old-element (symbol-value alist-var)))
+            ;; Append to `old-element' the values of the current element of
+            ;; NEW-ALIST.
+            (mapc (lambda (elt) (add-to-list 'old-element elt t))
+                  (cdr new-element))
+            (set alist-var (add-to-list alist-var old-element t)))
+        (add-to-list alist-var new-element t)))
     ;; Next element of NEW-ALIST.
     (setq new-alist (cdr new-alist))))
 
@@ -4725,15 +4729,15 @@ element to ALIST-VAR."
 
 (progn ; Define TeX-mode-syntax-table.
   (modify-syntax-entry (string-to-char TeX-esc)
-                      "\\" TeX-mode-syntax-table)
+                       "\\" TeX-mode-syntax-table)
   (modify-syntax-entry ?\f ">"  TeX-mode-syntax-table)
   (modify-syntax-entry ?\n ">"  TeX-mode-syntax-table)
   (modify-syntax-entry (string-to-char TeX-grop)
-                      (concat "(" TeX-grcl)
-                      TeX-mode-syntax-table)
+                       (concat "(" TeX-grcl)
+                       TeX-mode-syntax-table)
   (modify-syntax-entry (string-to-char TeX-grcl)
-                      (concat ")" TeX-grop)
-                      TeX-mode-syntax-table)
+                       (concat ")" TeX-grop)
+                       TeX-mode-syntax-table)
   (modify-syntax-entry ?%  "<"  TeX-mode-syntax-table)
   (modify-syntax-entry ?\" "."  TeX-mode-syntax-table)
   (modify-syntax-entry ?&  "."  TeX-mode-syntax-table)
@@ -4782,39 +4786,39 @@ element to ALIST-VAR."
 (defun TeX-command-menu-print (printer command name)
   "Print on PRINTER using method COMMAND to run NAME."
   (let ((TeX-printer-default (unless (string= printer "Other") printer))
-       (TeX-printer-list (and (string= printer "Other") TeX-printer-list))
-       (TeX-print-command command)
-       (TeX-queue-command command))
+        (TeX-printer-list (and (string= printer "Other") TeX-printer-list))
+        (TeX-print-command command)
+        (TeX-queue-command command))
     (TeX-command-menu name)))
 
 (defun TeX-command-menu-printer-entry (entry lookup command name)
   "Return `TeX-printer-list' ENTRY as a menu item."
   (vector (nth 0 entry)
-         (list 'TeX-command-menu-print
-               (nth 0 entry)
-               (or (nth lookup entry) command)
-               name)))
+          (list 'TeX-command-menu-print
+                (nth 0 entry)
+                (or (nth lookup entry) command)
+                name)))
 
 (defun TeX-command-menu-entry (entry)
   "Return `TeX-command-list' ENTRY as a menu item."
   (let ((name (car entry)))
     (cond ((and (string-equal name TeX-command-Print)
-               TeX-printer-list)
-          (cons TeX-command-Print
-                (mapcar (lambda (entry)
-                          (TeX-command-menu-printer-entry
-                           entry 1 TeX-print-command name))
-                        (append TeX-printer-list '(("Other"))))))
-         ((and (string-equal name TeX-command-Queue)
-               TeX-printer-list)
-          (cons TeX-command-Queue
-                (mapcar (lambda (entry)
-                          (TeX-command-menu-printer-entry
-                           entry 2 TeX-queue-command name))
-                        (append TeX-printer-list '(("Other"))))))
-         (t
-          (vconcat `(,name (TeX-command-menu ,name))
-                   (nthcdr 5 entry))))))
+                TeX-printer-list)
+           (cons TeX-command-Print
+                 (mapcar (lambda (entry)
+                           (TeX-command-menu-printer-entry
+                            entry 1 TeX-print-command name))
+                         (append TeX-printer-list '(("Other"))))))
+          ((and (string-equal name TeX-command-Queue)
+                TeX-printer-list)
+           (cons TeX-command-Queue
+                 (mapcar (lambda (entry)
+                           (TeX-command-menu-printer-entry
+                            entry 2 TeX-queue-command name))
+                         (append TeX-printer-list '(("Other"))))))
+          (t
+           (vconcat `(,name (TeX-command-menu ,name))
+                    (nthcdr 5 entry))))))
 
 (defconst TeX-command-menu-name "Command"
   "Name to be displayed for the command menu in all modes defined by AUCTeX.")
@@ -4837,9 +4841,9 @@ affected.  See `TeX-electric-macro' for detail."
   "Function to be called upon pressing `RET'."
   :group 'TeX-indentation
   :type '(choice (const newline)
-                (const newline-and-indent)
-                (const reindent-then-newline-and-indent)
-                (sexp :tag "Other")))
+                 (const newline-and-indent)
+                 (const reindent-then-newline-and-indent)
+                 (sexp :tag "Other")))
 
 (defun TeX-insert-backslash (arg)
   "Either insert typed key ARG times or call `TeX-electric-macro'.
@@ -4951,14 +4955,14 @@ Brace insertion is only done if point is in a math 
construct and
        :help "Commands in this menu work on the region"]
      [ "Fix the Region" TeX-pin-region
        :active (or (if prefix-arg
-                      (<= (prefix-numeric-value prefix-arg) 0)
-                    (and (boundp 'TeX-command-region-begin)
-                         (markerp TeX-command-region-begin)))
-                  mark-active)
+                       (<= (prefix-numeric-value prefix-arg) 0)
+                     (and (boundp 'TeX-command-region-begin)
+                          (markerp TeX-command-region-begin)))
+                   mark-active)
        ;;:visible (eq TeX-command-current 'TeX-command-region)
        :style toggle
        :selected (and (boundp 'TeX-command-region-begin)
-                     (markerp TeX-command-region-begin))
+                      (markerp TeX-command-region-begin))
        :help "Fix the region for \"Command on Region\""]
      "-"
      ["Recenter Output Buffer" TeX-recenter-output-buffer
@@ -4978,37 +4982,37 @@ Brace insertion is only done if point is in a math 
construct and
      "-"
      ("TeXing Options"
       ,@(mapcar (lambda (x)
-                 (let ((symbol (car x)) (name (nth 1 x)))
-                   `[ ,(format "Use %s engine" name) (TeX-engine-set ',symbol)
-                      :style radio :selected (eq TeX-engine ',symbol)
-                      :help ,(format "Use %s engine for compiling" name) ]))
-               (TeX-engine-alist))
+                  (let ((symbol (car x)) (name (nth 1 x)))
+                    `[ ,(format "Use %s engine" name) (TeX-engine-set ',symbol)
+                       :style radio :selected (eq TeX-engine ',symbol)
+                       :help ,(format "Use %s engine for compiling" name) ]))
+                (TeX-engine-alist))
       "-"
       [ "Generate PDF" TeX-PDF-mode
-       :style toggle :selected TeX-PDF-mode
-       :active (not (eq TeX-engine 'omega))
-       :help "Use PDFTeX to generate PDF instead of DVI"]
+        :style toggle :selected TeX-PDF-mode
+        :active (not (eq TeX-engine 'omega))
+        :help "Use PDFTeX to generate PDF instead of DVI"]
       ( "PDF from DVI"
-       :visible TeX-PDF-mode
-       :help "Compile to DVI with (La)TeX and convert to PDF"
-       [ "Compile directly to PDF"
-         (lambda () (interactive) (setq TeX-PDF-from-DVI nil))
-         :style radio :selected (null (TeX-PDF-from-DVI))
-         :help "Compile directly to PDF without intermediate conversions"]
-       [ "dvips + ps2pdf"
-         (lambda () (interactive) (setq TeX-PDF-from-DVI "Dvips"))
-         :style radio :selected (equal (TeX-PDF-from-DVI) "Dvips")
-         :help "Convert DVI to PDF with dvips + ps2pdf sequence"]
-       [ "dvipdfmx"
-         (lambda () (interactive) (setq TeX-PDF-from-DVI "Dvipdfmx"))
-         :style radio :selected (equal (TeX-PDF-from-DVI) "Dvipdfmx")
-         :help "Convert DVI to PDF with dvipdfmx"])
+        :visible TeX-PDF-mode
+        :help "Compile to DVI with (La)TeX and convert to PDF"
+        [ "Compile directly to PDF"
+          (lambda () (interactive) (setq TeX-PDF-from-DVI nil))
+          :style radio :selected (null (TeX-PDF-from-DVI))
+          :help "Compile directly to PDF without intermediate conversions"]
+        [ "dvips + ps2pdf"
+          (lambda () (interactive) (setq TeX-PDF-from-DVI "Dvips"))
+          :style radio :selected (equal (TeX-PDF-from-DVI) "Dvips")
+          :help "Convert DVI to PDF with dvips + ps2pdf sequence"]
+        [ "dvipdfmx"
+          (lambda () (interactive) (setq TeX-PDF-from-DVI "Dvipdfmx"))
+          :style radio :selected (equal (TeX-PDF-from-DVI) "Dvipdfmx")
+          :help "Convert DVI to PDF with dvipdfmx"])
       [ "Run Interactively" TeX-interactive-mode
-       :style toggle :selected TeX-interactive-mode :keys "C-c C-t C-i"
-       :help "Stop on errors in a TeX run"]
+        :style toggle :selected TeX-interactive-mode :keys "C-c C-t C-i"
+        :help "Stop on errors in a TeX run"]
       [ "Correlate I/O" TeX-source-correlate-mode
-       :style toggle :selected TeX-source-correlate-mode
-       :help "Enable forward and inverse search in the previewer"]
+        :style toggle :selected TeX-source-correlate-mode
+        :help "Enable forward and inverse search in the previewer"]
       ["Debug Bad Boxes" TeX-toggle-debug-bad-boxes
        :style toggle :selected TeX-debug-bad-boxes :keys "C-c C-t C-b"
        :help "Make \"Next Error\" show overfull and underfull boxes"]
@@ -5018,20 +5022,20 @@ Brace insertion is only done if point is in a math 
construct and
      ["Compile and view" TeX-command-run-all
       :help "Compile the document until it is ready and open the viewer"])
    (delq nil
-        (mapcar #'TeX-command-menu-entry
-                (TeX-mode-specific-command-list mode)))))
+         (mapcar #'TeX-command-menu-entry
+                 (TeX-mode-specific-command-list mode)))))
 
 (defun TeX-mode-specific-command-list (mode)
   "Return the list of commands available in the given MODE."
   (let ((full-list TeX-command-list)
-       out-list
-       entry)
+        out-list
+        entry)
     (while (setq entry (pop full-list))
       ;; `(nth 4 entry)' may be either an atom in case of which the
       ;; entry should be present in any mode or a list of major modes.
       (if (or (atom (nth 4 entry))
-             (memq mode (nth 4 entry)))
-         (push entry out-list)))
+              (memq mode (nth 4 entry)))
+          (push entry out-list)))
     (nreverse out-list)))
 
 (defvar TeX-fold-menu
@@ -5104,17 +5108,17 @@ Brace insertion is only done if point is in a math 
construct and
       :help "Open the customization buffer for AUCTeX"]
      ["Extend this Menu"
       (progn
-       (easy-menu-add-item
-        nil
-        ;; Ugly hack because docTeX mode uses the LaTeX menu.
-        (list (if (eq major-mode 'doctex-mode) "LaTeX" TeX-base-mode-name))
-        (or TeX-customization-menu
-            (setq TeX-customization-menu
-                  (customize-menu-create 'AUCTeX "Customize AUCTeX")))))
+        (easy-menu-add-item
+         nil
+         ;; Ugly hack because docTeX mode uses the LaTeX menu.
+         (list (if (eq major-mode 'doctex-mode) "LaTeX" TeX-base-mode-name))
+         (or TeX-customization-menu
+             (setq TeX-customization-menu
+                   (customize-menu-create 'AUCTeX "Customize AUCTeX")))))
       :help "Make this menu a full-blown customization menu"])
     ["Report AUCTeX Bug" TeX-submit-bug-report
      :help ,(format "Problems with AUCTeX %s? Mail us!"
-                   AUCTeX-version)]))
+                    AUCTeX-version)]))
 
 
 ;;; Verbatim constructs
@@ -5147,14 +5151,14 @@ whitespace after the comment starter or any character 
before it.")
     ;; Find first comment line
     (beginning-of-line)
     (while (and (looking-at (concat "^[ \t]*" TeX-comment-start-regexp))
-               (not (bobp)))
+                (not (bobp)))
       (forward-line -1))
     (let ((beg (point)))
       (forward-line 1)
       ;; Find last comment line
       (while (and (looking-at (concat "^[ \t]*" TeX-comment-start-regexp))
-                 (not (eobp)))
-       (forward-line 1))
+                  (not (eobp)))
+        (forward-line 1))
       ;; Uncomment region
       (uncomment-region beg (point)))))
 
@@ -5171,22 +5175,22 @@ whitespace after the comment starter or any character 
before it.")
       ;; paragraph outside the visible window which might get
       ;; commented without the user noticing.
       (unless (looking-at "^[ \t]*$")
-       (mark-paragraph)
-       (comment-region (point) (mark))))))
+        (mark-paragraph)
+        (comment-region (point) (mark))))))
 
 (defun TeX-in-comment ()
   "Return non-nil if point is in a comment."
   (if (or (bolp)
-         (null comment-start-skip)
-         (eq (preceding-char) ?\r))
+          (null comment-start-skip)
+          (eq (preceding-char) ?\r))
       nil
     (save-excursion
       (save-match-data
-       (let ((pos (point)))
-         (beginning-of-line)
-         (and (or (looking-at comment-start-skip)
-                  (re-search-forward comment-start-skip pos t))
-              (not (TeX-verbatim-p))))))))
+        (let ((pos (point)))
+          (beginning-of-line)
+          (and (or (looking-at comment-start-skip)
+                   (re-search-forward comment-start-skip pos t))
+               (not (TeX-verbatim-p))))))))
 
 (defun TeX-in-commented-line ()
   "Return non-nil if point is in a line consisting only of a comment.
@@ -5199,8 +5203,8 @@ whitespace as well."
     (forward-line 0)
     (skip-chars-forward " \t")
     (string= (buffer-substring-no-properties
-             (point) (min (point-max) (+ (point) (length comment-start))))
-            comment-start)))
+              (point) (min (point-max) (+ (point) (length comment-start))))
+             comment-start)))
 
 (defun TeX-in-line-comment ()
   "Return non-nil if point is in a line comment.
@@ -5209,8 +5213,8 @@ no whitespace before the comment sign."
   (save-excursion
     (forward-line 0)
     (string= (buffer-substring-no-properties
-             (point) (min (point-max) (+ (point) (length comment-start))))
-            comment-start)))
+              (point) (min (point-max) (+ (point) (length comment-start))))
+             comment-start)))
 
 (defun TeX-comment-prefix ()
   "Return the comment prefix of the current line.
@@ -5220,7 +5224,7 @@ the beginning of the line, return nil."
     (beginning-of-line)
     (save-match-data
       (when (looking-at (concat "\\([ \t]*" TeX-comment-start-regexp "+\\)+"))
-       (match-string 0)))))
+        (match-string 0)))))
 
 (defun TeX-forward-comment-skip (&optional count limit)
   "Move forward to the next comment skip.
@@ -5234,40 +5238,40 @@ not move point further than this value."
   (unless limit (setq limit (point-max)))
   (dotimes (_ (abs count))
     (if (< count 0)
-       (forward-line -1)
+        (forward-line -1)
       (beginning-of-line))
     (let ((prefix (when (looking-at (concat "\\([ \t]*"
-                                           TeX-comment-start-regexp "+\\)+"))
-                   (buffer-substring (+ (line-beginning-position)
-                                        (current-indentation))
-                                     (match-end 0)))))
+                                            TeX-comment-start-regexp "+\\)+"))
+                    (buffer-substring (+ (line-beginning-position)
+                                         (current-indentation))
+                                      (match-end 0)))))
       (while (save-excursion
-              (and (if (> count 0)
-                       (<= (point) limit)
-                     (>= (point) limit))
-                   (zerop (if (> count 0)
-                              (forward-line 1)
-                            (forward-line -1)))
-                   (if prefix
-                       (if (looking-at (concat "\\([ \t]*"
-                                               TeX-comment-start-regexp
-                                               "+\\)+"))
-                           ;; If the preceding line is a commented line
-                           ;; as well, check if the prefixes are
-                           ;; identical.
-                           (string= prefix
-                                    (buffer-substring
-                                     (+ (line-beginning-position)
-                                        (current-indentation))
-                                     (match-end 0)))
-                         nil)
-                     (not (looking-at (concat "[ \t]*"
-                                              TeX-comment-start-regexp))))))
-       (if (> count 0)
-           (forward-line 1)
-         (forward-line -1)))
+               (and (if (> count 0)
+                        (<= (point) limit)
+                      (>= (point) limit))
+                    (zerop (if (> count 0)
+                               (forward-line 1)
+                             (forward-line -1)))
+                    (if prefix
+                        (if (looking-at (concat "\\([ \t]*"
+                                                TeX-comment-start-regexp
+                                                "+\\)+"))
+                            ;; If the preceding line is a commented line
+                            ;; as well, check if the prefixes are
+                            ;; identical.
+                            (string= prefix
+                                     (buffer-substring
+                                      (+ (line-beginning-position)
+                                         (current-indentation))
+                                      (match-end 0)))
+                          nil)
+                      (not (looking-at (concat "[ \t]*"
+                                               TeX-comment-start-regexp))))))
+        (if (> count 0)
+            (forward-line 1)
+          (forward-line -1)))
       (if (> count 0)
-         (forward-line 1)))))
+          (forward-line 1)))))
 
 (defun TeX-backward-comment-skip (&optional count limit)
   "Move backward to the next comment skip.
@@ -5314,25 +5318,25 @@ regardless of its data type."
       (current-column)
     (skip-chars-backward " \t")
     (max (if (bolp) 0 (1+ (current-column)))
-        comment-column)))
+         comment-column)))
 
 (defun TeX-brace-count-line ()
   "Count number of open/closed braces."
   (save-excursion
     (let ((count 0) (limit (line-end-position)) char)
       (while (progn
-              (skip-chars-forward "^{}\\\\" limit)
-              (when (and (< (point) limit) (not (TeX-in-comment)))
-                (setq char (char-after))
-                (forward-char)
-                (cond ((eq char ?\{)
-                       (setq count (+ count TeX-brace-indent-level)))
-                      ((eq char ?\})
-                       (setq count (- count TeX-brace-indent-level)))
-                      ((eq char ?\\)
-                       (when (< (point) limit)
-                         (forward-char)
-                         t))))))
+               (skip-chars-forward "^{}\\\\" limit)
+               (when (and (< (point) limit) (not (TeX-in-comment)))
+                 (setq char (char-after))
+                 (forward-char)
+                 (cond ((eq char ?\{)
+                        (setq count (+ count TeX-brace-indent-level)))
+                       ((eq char ?\})
+                        (setq count (- count TeX-brace-indent-level)))
+                       ((eq char ?\\)
+                        (when (< (point) limit)
+                          (forward-char)
+                          t))))))
       count)))
 
 ;;; Navigation
@@ -5358,9 +5362,9 @@ characters ?{, ?}, ?[, ?], ?\(, ?\), ?<, and ?> are 
supported.
 The syntax of each of these characters not specified will be
 reset to \" \"."
   (let ((char-syntax-alist '((?\{ . "(}") (?\} . "){")
-                            (?\[ . "(]") (?\] . ")[")
-                            (?\( . "()") (?\) . ")(")
-                            (?\< . "(>") (?\> . ")<"))))
+                             (?\[ . "(]") (?\] . ")[")
+                             (?\( . "()") (?\) . ")(")
+                             (?\< . "(>") (?\> . ")<"))))
     ;; Clean entries possibly set before.
     (modify-syntax-entry ?\\ " " TeX-search-syntax-table)
     (modify-syntax-entry ?@ " " TeX-search-syntax-table)
@@ -5377,7 +5381,7 @@ reset to \" \"."
     (dolist (elt args)
       (unless (assoc elt char-syntax-alist) (error "Char not supported"))
       (modify-syntax-entry elt (cdr (assoc elt char-syntax-alist))
-                          TeX-search-syntax-table))
+                           TeX-search-syntax-table))
     ;; Return the syntax table.
     TeX-search-syntax-table))
 
@@ -5388,20 +5392,20 @@ Default is 1.  If COUNT is negative, it searches 
backwards.  With
 optional DEPTH>=1, find that outer level.  If LIMIT is non-nil,
 do not search further than this position in the buffer."
   (let ((count (if count
-                  (if (= count 0) (error "COUNT has to be <> 0") count)
-                1))
-       (depth (if depth
-                  (if (< depth 1) (error "DEPTH has to be > 0") depth)
-                1)))
+                   (if (= count 0) (error "COUNT has to be <> 0") count)
+                 1))
+        (depth (if depth
+                   (if (< depth 1) (error "DEPTH has to be > 0") depth)
+                 1)))
     (save-restriction
       (when limit
-       (if (> count 0)
-           (narrow-to-region (point-min) limit)
-         (narrow-to-region limit (point-max))))
+        (if (> count 0)
+            (narrow-to-region (point-min) limit)
+          (narrow-to-region limit (point-max))))
       (with-syntax-table (TeX-search-syntax-table ?\{ ?\})
-       (condition-case nil
-           (scan-lists (point) count depth)
-         (error nil))))))
+        (condition-case nil
+            (scan-lists (point) count depth)
+          (error nil))))))
 
 (defun TeX-find-closing-brace (&optional depth limit)
   "Return the position of the closing brace in a TeX group.
@@ -5428,41 +5432,41 @@ considered part of the macro."
     (when lower-bound
       (narrow-to-region lower-bound (point-max)))
     (let ((orig-point (point))
-         start-point)
+          start-point)
       ;; Point is located directly at the start of a macro. (-!-\foo{bar})
       (when (and (eq (char-after) (aref TeX-esc 0))
-                (not (TeX-escaped-p)))
-       (setq start-point (point)))
+                 (not (TeX-escaped-p)))
+        (setq start-point (point)))
       ;; Point is located on a macro. (\fo-!-o{bar})
       (unless start-point
-       (save-excursion
-         (skip-chars-backward "A-Za-z@*")
-         (when (and (eq (char-before) (aref TeX-esc 0))
-                    (not (TeX-escaped-p (1- (point)))))
-           (setq start-point (1- (point))))))
+        (save-excursion
+          (skip-chars-backward "A-Za-z@*")
+          (when (and (eq (char-before) (aref TeX-esc 0))
+                     (not (TeX-escaped-p (1- (point)))))
+            (setq start-point (1- (point))))))
       ;; Point is located in the argument of a macro. (\foo{ba-!-r})
       (unless start-point
-       (save-excursion
-         (catch 'abort
-           (let ((parse-sexp-ignore-comments t))
-             (when (condition-case nil (progn (up-list) t) (error nil))
-               (while (progn
-                        (condition-case nil (backward-sexp)
-                          (error (throw 'abort nil)))
-                        (forward-comment -1)
-                        (and (memq (char-before) '(?\] ?\}))
-                             (not (TeX-escaped-p (1- (point)))))))
-               (skip-chars-backward "A-Za-z@*")
-               (when (and (eq (char-before) (aref TeX-esc 0))
-                          (not (TeX-escaped-p (1- (point)))))
-                 (setq start-point (1- (point)))))))))
+        (save-excursion
+          (catch 'abort
+            (let ((parse-sexp-ignore-comments t))
+              (when (condition-case nil (progn (up-list) t) (error nil))
+                (while (progn
+                         (condition-case nil (backward-sexp)
+                           (error (throw 'abort nil)))
+                         (forward-comment -1)
+                         (and (memq (char-before) '(?\] ?\}))
+                              (not (TeX-escaped-p (1- (point)))))))
+                (skip-chars-backward "A-Za-z@*")
+                (when (and (eq (char-before) (aref TeX-esc 0))
+                           (not (TeX-escaped-p (1- (point)))))
+                  (setq start-point (1- (point)))))))))
       ;; Search forward for the end of the macro.
       (when start-point
-       (save-excursion
-         (goto-char (TeX-find-macro-end-helper start-point))
-         (if (< orig-point (point))
-             (cons start-point (point))
-           nil))))))
+        (save-excursion
+          (goto-char (TeX-find-macro-end-helper start-point))
+          (if (< orig-point (point))
+              (cons start-point (point))
+            nil))))))
 
 (defun TeX-find-macro-end-helper (start)
   "Find the end of a macro given its START.
@@ -5472,41 +5476,41 @@ those will be considered part of it."
   (save-excursion
     (save-match-data
       (catch 'found
-       (goto-char (1+ start))
-       (if (zerop (skip-chars-forward "A-Za-z@"))
-           (forward-char)
-         (skip-chars-forward "*"))
-       (while (not (eobp))
-         (cond
-          ;; Skip over pairs of square brackets
-          ((or (looking-at "[ \t]*\n?\\(\\[\\)") ; Be conservative: Consider
-                                       ; only consecutive lines.
-               (and (looking-at (concat "[ \t]*" TeX-comment-start-regexp))
-                    (save-excursion
-                      (forward-line 1)
-                      (looking-at "[ \t]*\\(\\[\\)"))))
-           (goto-char (match-beginning 1))
-           (condition-case nil
-               (forward-sexp)
-             (scan-error (throw 'found (point)))))
-          ;; Skip over pairs of curly braces
-          ((or (looking-at "[ \t]*\n?{") ; Be conservative: Consider
-                                       ; only consecutive lines.
-               (and (looking-at (concat "[ \t]*" TeX-comment-start-regexp))
-                    (save-excursion
-                      (forward-line 1)
-                      (looking-at "[ \t]*{"))))
-           (goto-char (match-end 0))
-           (goto-char (or (TeX-find-closing-brace)
-                          ;; If we cannot find a regular end, use the
-                          ;; next whitespace.
-                          (save-excursion (skip-chars-forward "^ \t\n")
-                                          (point)))))
-          (t
-           (throw 'found (point)))))
-       ;; Make sure that this function does not return nil, even
-       ;; when the above `while' loop is totally skipped. (bug#35638)
-       (throw 'found (point))))))
+        (goto-char (1+ start))
+        (if (zerop (skip-chars-forward "A-Za-z@"))
+            (forward-char)
+          (skip-chars-forward "*"))
+        (while (not (eobp))
+          (cond
+           ;; Skip over pairs of square brackets
+           ((or (looking-at "[ \t]*\n?\\(\\[\\)") ; Be conservative: Consider
+                                        ; only consecutive lines.
+                (and (looking-at (concat "[ \t]*" TeX-comment-start-regexp))
+                     (save-excursion
+                       (forward-line 1)
+                       (looking-at "[ \t]*\\(\\[\\)"))))
+            (goto-char (match-beginning 1))
+            (condition-case nil
+                (forward-sexp)
+              (scan-error (throw 'found (point)))))
+           ;; Skip over pairs of curly braces
+           ((or (looking-at "[ \t]*\n?{") ; Be conservative: Consider
+                                        ; only consecutive lines.
+                (and (looking-at (concat "[ \t]*" TeX-comment-start-regexp))
+                     (save-excursion
+                       (forward-line 1)
+                       (looking-at "[ \t]*{"))))
+            (goto-char (match-end 0))
+            (goto-char (or (TeX-find-closing-brace)
+                           ;; If we cannot find a regular end, use the
+                           ;; next whitespace.
+                           (save-excursion (skip-chars-forward "^ \t\n")
+                                           (point)))))
+           (t
+            (throw 'found (point)))))
+        ;; Make sure that this function does not return nil, even
+        ;; when the above `while' loop is totally skipped. (bug#35638)
+        (throw 'found (point))))))
 
 (defun TeX-find-macro-start (&optional limit)
   "Return the start of a macro.
@@ -5552,7 +5556,7 @@ characters."
   (TeX-search-unescaped regexp 'forward t bound noerror))
 
 (defun TeX-search-unescaped (pattern
-                            &optional direction regexp-flag bound noerror)
+                             &optional direction regexp-flag bound noerror)
   "Search for unescaped PATTERN in a certain DIRECTION.
 DIRECTION can be indicated by the symbols 'forward and 'backward.
 If DIRECTION is omitted, a forward search is carried out.
@@ -5565,12 +5569,12 @@ throwing an error.
 A pattern is escaped, if it is preceded by an odd number of escape
 characters."
   (let ((search-fun (if (eq direction 'backward)
-                       (if regexp-flag 're-search-backward 'search-backward)
-                     (if regexp-flag 're-search-forward 'search-forward))))
+                        (if regexp-flag 're-search-backward 'search-backward)
+                      (if regexp-flag 're-search-forward 'search-forward))))
     (catch 'found
       (while (funcall search-fun pattern bound noerror)
-       (when (not (TeX-escaped-p (match-beginning 0)))
-         (throw 'found (point)))))))
+        (when (not (TeX-escaped-p (match-beginning 0)))
+          (throw 'found (point)))))))
 
 (defun TeX-escaped-p (&optional pos)
   "Return t if the character at position POS is escaped.
@@ -5586,10 +5590,10 @@ escape characters, such as \"\\\" in LaTeX."
   (let ((macro-start (TeX-find-macro-start)))
     (when macro-start
       (save-excursion
-       (goto-char macro-start)
-       (forward-char (length TeX-esc))
-       (buffer-substring-no-properties
-        (point) (progn (skip-chars-forward "@A-Za-z") (point)))))))
+        (goto-char macro-start)
+        (forward-char (length TeX-esc))
+        (buffer-substring-no-properties
+         (point) (progn (skip-chars-forward "@A-Za-z") (point)))))))
 
 (defvar TeX-search-forward-comment-start-function nil
   "Function to find the start of a comment.
@@ -5617,13 +5621,13 @@ the default implementation."
 ;;; Fonts
 
 (defcustom TeX-font-list '((?\C-b "{\\bf " "}")
-                          (?\C-c "{\\sc " "}")
-                          (?\C-e "{\\em " "\\/}")
-                          (?\C-i "{\\it " "\\/}")
-                          (?\C-r "{\\rm " "}")
-                          (?\C-s "{\\sl " "\\/}")
-                          (?\C-t "{\\tt " "}")
-                          (?\C-d "" "" t))
+                           (?\C-c "{\\sc " "}")
+                           (?\C-e "{\\em " "\\/}")
+                           (?\C-i "{\\it " "\\/}")
+                           (?\C-r "{\\rm " "}")
+                           (?\C-s "{\\sl " "\\/}")
+                           (?\C-t "{\\tt " "}")
+                           (?\C-d "" "" t))
   "List of fonts used by `TeX-font'.
 
 Each entry is a list.
@@ -5635,16 +5639,16 @@ suffix to be used in math mode.
 An optional fourth (or sixth) element means always replace if t."
   :group 'TeX-macro
   :type '(repeat
-          (group
-           :value (?\C-a "" "")
-           (character :tag "Key")
-           (string :tag "Prefix")
-           (string :tag "Suffix")
-           (option (group
-                    :inline t
-                    (string :tag "Math Prefix")
-                    (string :tag "Math Suffix")))
-           (option (sexp :format "Replace\n" :value t)))))
+           (group
+            :value (?\C-a "" "")
+            (character :tag "Key")
+            (string :tag "Prefix")
+            (string :tag "Suffix")
+            (option (group
+                     :inline t
+                     (string :tag "Math Prefix")
+                     (string :tag "Math Suffix")))
+            (option (sexp :format "Replace\n" :value t)))))
 
 (defvar TeX-font-replace-function 'TeX-font-replace
   "Determines the function which is called when a font should be replaced.")
@@ -5652,12 +5656,12 @@ An optional fourth (or sixth) element means always 
replace if t."
 (defun TeX-describe-font-entry (entry)
   "A textual description of an ENTRY in `TeX-font-list'."
   (concat (format "%16s  " (key-description (char-to-string (nth 0 entry))))
-         (if (or (eq t (nth 3 entry)) (eq t (nth 5 entry)))
-             "-- delete font"
-           (format "%14s %-3s %14s %-3s"
-                   (nth 1 entry) (nth 2 entry)
-                   (if (stringp (nth 3 entry)) (nth 3 entry) "")
-                   (if (stringp (nth 4 entry)) (nth 4 entry) "")))))
+          (if (or (eq t (nth 3 entry)) (eq t (nth 5 entry)))
+              "-- delete font"
+            (format "%14s %-3s %14s %-3s"
+                    (nth 1 entry) (nth 2 entry)
+                    (if (stringp (nth 3 entry)) (nth 3 entry) "")
+                    (if (stringp (nth 4 entry)) (nth 4 entry) "")))))
 
 (defun TeX-font (replace what)
   "Insert template for font change command.
@@ -5666,38 +5670,38 @@ to use, as specified by `TeX-font-list'."
   (interactive "*P\nc")
   (TeX-update-style)
   (let* ((entry (assoc what TeX-font-list))
-        (in-math (texmathp))
-        (before (nth 1 entry))
-        (after (nth 2 entry)))
+         (in-math (texmathp))
+         (before (nth 1 entry))
+         (after (nth 2 entry)))
     (setq replace (or replace (eq t (nth 3 entry)) (eq t (nth 5 entry))))
     (if (and in-math (stringp (nth 3 entry)))
-       (setq before (nth 3 entry)
-             after (nth 4 entry)))
+        (setq before (nth 3 entry)
+              after (nth 4 entry)))
     (cond ((null entry)
-          (let ((help (concat
-                       "Font list:   "
-                       "KEY        TEXTFONT           MATHFONT\n\n"
-                       (mapconcat 'TeX-describe-font-entry
-                                  TeX-font-list "\n"))))
-            (with-output-to-temp-buffer "*Help*"
-              (set-buffer "*Help*")
-              (insert help))))
-         (replace
-          (funcall TeX-font-replace-function before after))
-         ((TeX-active-mark)
-          (save-excursion
-            (cond ((> (mark) (point))
-                   (insert before)
-                   (goto-char (mark))
-                   (insert after))
-                  (t
-                   (insert after)
-                   (goto-char (mark))
-                   (insert before)))))
-         (t
-          (insert before)
-          (save-excursion
-            (insert after))))))
+           (let ((help (concat
+                        "Font list:   "
+                        "KEY        TEXTFONT           MATHFONT\n\n"
+                        (mapconcat 'TeX-describe-font-entry
+                                   TeX-font-list "\n"))))
+             (with-output-to-temp-buffer "*Help*"
+               (set-buffer "*Help*")
+               (insert help))))
+          (replace
+           (funcall TeX-font-replace-function before after))
+          ((TeX-active-mark)
+           (save-excursion
+             (cond ((> (mark) (point))
+                    (insert before)
+                    (goto-char (mark))
+                    (insert after))
+                   (t
+                    (insert after)
+                    (goto-char (mark))
+                    (insert before)))))
+          (t
+           (insert before)
+           (save-excursion
+             (insert after))))))
 
 (defun TeX-font-replace (start end)
   "Replace font specification around point with START and END.
@@ -5710,13 +5714,13 @@ See also `TeX-font-replace-macro' and 
`TeX-font-replace-function'."
     (save-excursion
       (replace-match start t t))
     (if (save-excursion
-         (backward-char 3)
-         (if (looking-at (regexp-quote "\\/}"))
-             (progn
-               (delete-char 3)
-               nil)
-           t))
-       (delete-char -1))
+          (backward-char 3)
+          (if (looking-at (regexp-quote "\\/}"))
+              (progn
+                (delete-char 3)
+                nil)
+            t))
+        (delete-char -1))
     (insert end)))
 
 (defun TeX-font-replace-macro (start end)
@@ -5724,30 +5728,30 @@ See also `TeX-font-replace-macro' and 
`TeX-font-replace-function'."
 For modes with font specifications like `\\font{text}'.
 See also `TeX-font-replace' and `TeX-font-replace-function'."
   (let ((font-list TeX-font-list)
-       cmds strings regexp)
+        cmds strings regexp)
     (while font-list
       (setq strings (cdr (car font-list))
-           font-list (cdr font-list))
+            font-list (cdr font-list))
       (and (stringp (car strings)) (null (string= (car strings) ""))
-          (setq cmds (cons (car strings) cmds)))
+           (setq cmds (cons (car strings) cmds)))
       (setq strings (cdr (cdr strings)))
       (and (stringp (car strings)) (null (string= (car strings) ""))
-          (setq cmds (cons (car strings) cmds))))
+           (setq cmds (cons (car strings) cmds))))
     (setq regexp (mapconcat 'regexp-quote cmds "\\|"))
     (save-excursion
       (catch 'done
-       (while t
-         (if (/= ?\\ (following-char))
-             (skip-chars-backward "a-zA-Z "))
-         (skip-chars-backward (regexp-quote TeX-esc))
-         (if (looking-at regexp)
-             (throw 'done t)
-           (up-list -1))))
+        (while t
+          (if (/= ?\\ (following-char))
+              (skip-chars-backward "a-zA-Z "))
+          (skip-chars-backward (regexp-quote TeX-esc))
+          (if (looking-at regexp)
+              (throw 'done t)
+            (up-list -1))))
       ;; Use stripped syntax table in order to get stuff like "\emph{(}" right.
       (with-syntax-table (TeX-search-syntax-table ?\{ ?\})
-       (forward-sexp 2))
+        (forward-sexp 2))
       (save-excursion
-       (replace-match start t t))
+        (replace-match start t t))
       (delete-char -1)
       (insert end))))
 
@@ -5767,7 +5771,7 @@ See also `TeX-font-replace' and 
`TeX-font-replace-function'."
 (defconst TeX-dollar-string (char-to-string TeX-dollar-sign))
 (defconst TeX-dollar-regexp
   (concat "^" (regexp-quote TeX-dollar-string) "\\|[^" TeX-esc "]"
-         (regexp-quote TeX-dollar-string)))
+          (regexp-quote TeX-dollar-string)))
 
 (defcustom TeX-math-toggle-off-input-method t
   "If non-nil, auto turn off some input methods when entering math mode.
@@ -5796,11 +5800,11 @@ to insert before point, the CDR is the string to insert 
after
 point.  You can choose between \"$...$\" and \"\\(...\\)\"."
   :group 'TeX-macro
   :type '(choice (const :tag "No electricity" nil)
-                (const :tag "$...$" ("$" . "$"))
-                (const :tag "\\(...\\)" ("\\(" . "\\)"))
-                (cons :tag "Other"
-                      (string :tag "Insert before point")
-                      (string :tag "Insert after point"))))
+                 (const :tag "$...$" ("$" . "$"))
+                 (const :tag "\\(...\\)" ("\\(" . "\\)"))
+                 (cons :tag "Other"
+                       (string :tag "Insert before point")
+                       (string :tag "Insert after point"))))
 
 (defun TeX-insert-dollar (&optional arg)
   "Insert dollar sign.
@@ -5830,76 +5834,76 @@ sign.  With optional ARG, insert that many dollar 
signs."
     ;; We are inside math mode
     (cond
      ((and TeX-electric-math
-          (eq (preceding-char) ?\$)
-          (eq (following-char) ?\$))
+           (eq (preceding-char) ?\$)
+           (eq (following-char) ?\$))
       ;; Point is between "$$" and `TeX-electric-math' is non-nil - insert
       ;; another pair of dollar signs and leave point between them.
       (insert "$$")
       (backward-char))
      ((and (stringp (car texmathp-why))
-          (string-equal (substring (car texmathp-why) 0 1) "\$"))
+           (string-equal (substring (car texmathp-why) 0 1) "\$"))
       ;; Math mode was turned on with $ or $$ - insert a single $.
       (insert "$")
       ;; Compatibility, `TeX-math-close-double-dollar' has been removed
       ;; after AUCTeX 11.87.
       (if (boundp 'TeX-math-close-double-dollar)
-         (message
-          (concat "`TeX-math-close-double-dollar' has been removed,"
-                  "\nplease use `TeX-electric-math' instead.")))
+          (message
+           (concat "`TeX-math-close-double-dollar' has been removed,"
+                   "\nplease use `TeX-electric-math' instead.")))
       (when (and blink-matching-paren
-                (or (string= (car texmathp-why) "$")
-                    (zerop (mod (save-excursion
-                                  (skip-chars-backward "$")) 2))))
-       (save-excursion
-         (goto-char (cdr texmathp-why))
-         (if (pos-visible-in-window-p)
-             (sit-for blink-matching-delay)
-           (message "Matches %s"
-                    (buffer-substring
-                     (point) (progn (end-of-line) (point))))))))
+                 (or (string= (car texmathp-why) "$")
+                     (zerop (mod (save-excursion
+                                   (skip-chars-backward "$")) 2))))
+        (save-excursion
+          (goto-char (cdr texmathp-why))
+          (if (pos-visible-in-window-p)
+              (sit-for blink-matching-delay)
+            (message "Matches %s"
+                     (buffer-substring
+                      (point) (progn (end-of-line) (point))))))))
      (t
       ;; Math mode was not entered with dollar - we cannot finish it with one.
       (message "Math mode started with `%s' cannot be closed with dollar"
-              (car texmathp-why)))))
+               (car texmathp-why)))))
    (t
     ;; Just somewhere in the text.
     (cond
      ((and TeX-electric-math (TeX-active-mark))
       (if (> (point) (mark))
-         (exchange-point-and-mark))
+          (exchange-point-and-mark))
       (cond
        ;; $...$ to $$...$$
        ((and (eq last-command 'TeX-insert-dollar)
-            (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
-       (replace-match "$$\\1$$")
-       (set-mark (match-beginning 0)))
+             (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
+        (replace-match "$$\\1$$")
+        (set-mark (match-beginning 0)))
        ;; \(...\) to \[...\]
        ((and (eq last-command 'TeX-insert-dollar)
-            (re-search-forward "\\=\\\\(\\([^z-a]*\\)\\\\)" (mark) t))
-       (replace-match "\\\\[\\1\\\\]")
-       (set-mark (match-beginning 0)))
+             (re-search-forward "\\=\\\\(\\([^z-a]*\\)\\\\)" (mark) t))
+        (replace-match "\\\\[\\1\\\\]")
+        (set-mark (match-beginning 0)))
        ;; Strip \[...\] or $$...$$
        ((and (eq last-command 'TeX-insert-dollar)
-            (or (re-search-forward "\\=\\\\\\[\\([^z-a]*\\)\\\\\\]" (mark) t)
-                (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
-       (replace-match "\\1")
-       (set-mark (match-beginning 0)))
+             (or (re-search-forward "\\=\\\\\\[\\([^z-a]*\\)\\\\\\]" (mark) t)
+                 (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
+        (replace-match "\\1")
+        (set-mark (match-beginning 0)))
        (t
-       ;; We use `save-excursion' because point must be situated before opening
-       ;; symbol.
-       (save-excursion (insert (car TeX-electric-math)))
-       (exchange-point-and-mark)
-       (insert (cdr TeX-electric-math))))
+        ;; We use `save-excursion' because point must be situated before 
opening
+        ;; symbol.
+        (save-excursion (insert (car TeX-electric-math)))
+        (exchange-point-and-mark)
+        (insert (cdr TeX-electric-math))))
       ;; Keep the region active.
       (TeX-activate-region))
      (TeX-electric-math
       (insert (car TeX-electric-math))
       (save-excursion (insert (cdr TeX-electric-math)))
       (if blink-matching-paren
-         (progn
-           (backward-char)
-           (sit-for blink-matching-delay)
-           (forward-char))))
+          (progn
+            (backward-char)
+            (sit-for blink-matching-delay)
+            (forward-char))))
      ;; In any other case just insert a single $.
      ((insert "$")))))
   (TeX-math-input-method-off))
@@ -5918,8 +5922,8 @@ sign.  With optional ARG, insert that many dollar signs."
        (string-match TeX-math-input-method-off-regexp current-input-method)
        ;; inactivate-input-method is obsolete since emacs 24.3.
        (if (fboundp 'deactivate-input-method)
-          (deactivate-input-method)
-        (with-no-warnings
+           (deactivate-input-method)
+         (with-no-warnings
            (inactivate-input-method)))))
 
 ;;; Simple Commands
@@ -5931,16 +5935,16 @@ With optional argument ARG, also reload the style 
hooks."
   (interactive "*P")
   (if arg
       (setq TeX-style-hook-list nil
-           BibTeX-global-style-files nil
-           BibTeX-global-files nil
-           BibLaTeX-global-style-files nil
-           TeX-Biber-global-files nil
-           TeX-global-input-files nil
-           LaTeX-global-class-files nil
-           LaTeX-includegraphics-global-files nil))
+            BibTeX-global-style-files nil
+            BibTeX-global-files nil
+            BibLaTeX-global-style-files nil
+            TeX-Biber-global-files nil
+            TeX-global-input-files nil
+            LaTeX-global-class-files nil
+            LaTeX-includegraphics-global-files nil))
   (let ((TeX-auto-save t))
     (if (buffer-modified-p)
-       (save-buffer)
+        (save-buffer)
       (TeX-auto-write)))
   (normal-mode)
   ;; See also addition to `find-file-hook' in `VirTeX-common-initialization'.
@@ -5981,20 +5985,20 @@ valid languages."
   :group 'TeX-quote
   :link '(custom-manual "(auctex)European")
   :type '(repeat (group (choice
-                        (const "czech")
-                        (const "danish")
-                        (const "dutch")
-                        (const "german")
-                        (const "ngerman")
-                        (const "french") ;; not frenchb or francais
-                        (const "italian")
-                        (const "polish")
-                        (const "slovak")
-                        (const "swedish")
-                        (string :tag "Other Language"))
-                       (choice :tag "Opening quotation mark" string function)
-                       (choice :tag "Closing quotation mark" string function)
-                       (boolean :tag "Insert plain quote first" :value t))))
+                         (const "czech")
+                         (const "danish")
+                         (const "dutch")
+                         (const "german")
+                         (const "ngerman")
+                         (const "french") ;; not frenchb or francais
+                         (const "italian")
+                         (const "polish")
+                         (const "slovak")
+                         (const "swedish")
+                         (string :tag "Other Language"))
+                        (choice :tag "Opening quotation mark" string function)
+                        (choice :tag "Closing quotation mark" string function)
+                        (boolean :tag "Insert plain quote first" :value t))))
 
 (defvar TeX-quote-language nil
   "If non-nil determines behavior of quote insertion.
@@ -6014,80 +6018,80 @@ is non-nil, this insertion works only after \".
 With prefix argument FORCE, always inserts \" characters."
   (interactive "*P")
   (if (or force
-         ;; Do not insert TeX quotes in verbatim, math or comment constructs.
-         (and (fboundp 'font-latex-faces-present-p)
-              (font-latex-faces-present-p '(font-latex-verbatim-face
-                                            font-latex-math-face
-                                            font-lock-comment-face))
-              (font-latex-faces-present-p '(font-latex-verbatim-face
-                                            font-latex-math-face
-                                            font-lock-comment-face)
-                                          (1- (point))))
-         (texmathp)
-         (and (TeX-in-comment) (not (eq major-mode 'doctex-mode))))
+          ;; Do not insert TeX quotes in verbatim, math or comment constructs.
+          (and (fboundp 'font-latex-faces-present-p)
+               (font-latex-faces-present-p '(font-latex-verbatim-face
+                                             font-latex-math-face
+                                             font-lock-comment-face))
+               (font-latex-faces-present-p '(font-latex-verbatim-face
+                                             font-latex-math-face
+                                             font-lock-comment-face)
+                                           (1- (point))))
+          (texmathp)
+          (and (TeX-in-comment) (not (eq major-mode 'doctex-mode))))
       (self-insert-command (prefix-numeric-value force))
     (TeX-update-style)
     (let* ((lang-override (if (eq (car TeX-quote-language) 'override)
-                             TeX-quote-language
-                           (assoc (car TeX-quote-language)
-                                  TeX-quote-language-alist)))
-          (lang (or lang-override TeX-quote-language))
-          (open-quote (if lang (nth 1 lang) TeX-open-quote))
-          (close-quote (if lang (nth 2 lang) TeX-close-quote))
-          (q-after-q (if lang (nth 3 lang) TeX-quote-after-quote)))
+                              TeX-quote-language
+                            (assoc (car TeX-quote-language)
+                                   TeX-quote-language-alist)))
+           (lang (or lang-override TeX-quote-language))
+           (open-quote (if lang (nth 1 lang) TeX-open-quote))
+           (close-quote (if lang (nth 2 lang) TeX-close-quote))
+           (q-after-q (if lang (nth 3 lang) TeX-quote-after-quote)))
       (when (functionp open-quote)
-       (setq open-quote (funcall open-quote)))
+        (setq open-quote (funcall open-quote)))
       (when (functionp close-quote)
-       (setq close-quote (funcall close-quote)))
+        (setq close-quote (funcall close-quote)))
       (if q-after-q
-         (insert (cond ((bobp)
-                        ?\")
-                       ((save-excursion
-                          (TeX-looking-at-backward
-                           (concat (regexp-quote open-quote) "\\|"
-                                   (regexp-quote close-quote))
-                           (max (length open-quote) (length close-quote))))
-                        (delete-char (- (length (match-string 0))))
-                        "\"\"")
-                       ((< (save-excursion (skip-chars-backward "\"")) -1)
-                        ?\")
-                       ((not (= (preceding-char) ?\"))
-                        ?\")
-                       ((save-excursion
-                          (forward-char -1)
-                          (bobp))
-                        (delete-char -1)
-                        open-quote)
-                       ((save-excursion
-                          (forward-char -2) ;;; at -1 there is double quote
-                          (looking-at "[ \t\n]\\|\\s("))
-                        (delete-char -1)
-                        open-quote)
-                       (t
-                        (delete-char -1)
-                        close-quote)))
-       (insert (cond ((bobp)
-                      open-quote)
-                     ((= (preceding-char) (string-to-char TeX-esc))
-                      ?\")
-                     ((= (preceding-char) ?\")
-                      ?\")
-                     ((save-excursion
-                        (forward-char (- (length open-quote)))
-                        (looking-at (regexp-quote open-quote)))
-                      (delete-char (- (length open-quote)))
-                      ?\")
-                     ((save-excursion
-                        (forward-char (- (length close-quote)))
-                        (looking-at (regexp-quote close-quote)))
-                      (delete-char (- (length close-quote)))
-                      ?\")
-                     ((save-excursion
-                        (forward-char -1)
-                        (looking-at "[ \t\n]\\|\\s("))
-                      open-quote)
-                     (t
-                      close-quote)))))))
+          (insert (cond ((bobp)
+                         ?\")
+                        ((save-excursion
+                           (TeX-looking-at-backward
+                            (concat (regexp-quote open-quote) "\\|"
+                                    (regexp-quote close-quote))
+                            (max (length open-quote) (length close-quote))))
+                         (delete-char (- (length (match-string 0))))
+                         "\"\"")
+                        ((< (save-excursion (skip-chars-backward "\"")) -1)
+                         ?\")
+                        ((not (= (preceding-char) ?\"))
+                         ?\")
+                        ((save-excursion
+                           (forward-char -1)
+                           (bobp))
+                         (delete-char -1)
+                         open-quote)
+                        ((save-excursion
+                           (forward-char -2) ;;; at -1 there is double quote
+                           (looking-at "[ \t\n]\\|\\s("))
+                         (delete-char -1)
+                         open-quote)
+                        (t
+                         (delete-char -1)
+                         close-quote)))
+        (insert (cond ((bobp)
+                       open-quote)
+                      ((= (preceding-char) (string-to-char TeX-esc))
+                       ?\")
+                      ((= (preceding-char) ?\")
+                       ?\")
+                      ((save-excursion
+                         (forward-char (- (length open-quote)))
+                         (looking-at (regexp-quote open-quote)))
+                       (delete-char (- (length open-quote)))
+                       ?\")
+                      ((save-excursion
+                         (forward-char (- (length close-quote)))
+                         (looking-at (regexp-quote close-quote)))
+                       (delete-char (- (length close-quote)))
+                       ?\")
+                      ((save-excursion
+                         (forward-char -1)
+                         (looking-at "[ \t\n]\\|\\s("))
+                       open-quote)
+                      (t
+                       close-quote)))))))
 
 (defun TeX-insert-punctuation ()
   "Insert point or comma, cleaning up preceding space."
@@ -6108,12 +6112,12 @@ closing brace."
   (interactive "P")
   (if (TeX-active-mark)
       (progn
-       (if (< (point) (mark))
-           (exchange-point-and-mark))
-       (insert TeX-grcl)
-       (save-excursion
-         (goto-char (mark))
-         (insert TeX-grop)))
+        (if (< (point) (mark))
+            (exchange-point-and-mark))
+        (insert TeX-grcl)
+        (save-excursion
+          (goto-char (mark))
+          (insert TeX-grop)))
     (insert TeX-grop)
     (save-excursion
       (if arg (forward-sexp (prefix-numeric-value arg)))
@@ -6136,43 +6140,43 @@ information about your AUCTeX version and AUCTeX 
configuration."
      "bug-auctex@gnu.org"
      AUCTeX-version
      (list 'AUCTeX-date
-          'window-system
-          'LaTeX-version
-          'TeX-style-path
-          'TeX-auto-save
-          'TeX-parse-self
-          'TeX-master
-          'TeX-command-list)
+           'window-system
+           'LaTeX-version
+           'TeX-style-path
+           'TeX-auto-save
+           'TeX-parse-self
+           'TeX-master
+           'TeX-command-list)
      nil
      ;; reporter adds too many new lines around salutation text, that we don't
      ;; want, since it's itself a new line.
      (lambda ()
        (save-excursion
-        (goto-char (point-min))
-        (re-search-forward mail-header-separator)
-        (forward-char)
-        (delete-char 1)
-        (forward-char)
-        (delete-char 2)))
+         (goto-char (point-min))
+         (re-search-forward mail-header-separator)
+         (forward-char)
+         (delete-char 1)
+         (forward-char)
+         (delete-char 2)))
      (propertize
       "\n" 'display
       (with-temp-buffer
-       (insert
-        "Remember to cover the basics, that is, what you expected to happen and
+        (insert
+         "Remember to cover the basics, that is, what you expected to happen 
and
 what in fact did happen.
 
 Be sure to consult the FAQ section in the manual before submitting
 a bug report.  In addition check if the bug is reproducable with an
 up-to-date version of AUCTeX.  So please upgrade to the version
 available from ")
-       (insert-text-button
-        "https://www.gnu.org/software/auctex/";
-        'face 'link
-        'help-echo (concat "mouse-2, RET: Follow this link")
-        'action (lambda (_button)
-                  (browse-url "https://www.gnu.org/software/auctex/";))
-        'follow-link t)
-       (insert " if your
+        (insert-text-button
+         "https://www.gnu.org/software/auctex/";
+         'face 'link
+         'help-echo (concat "mouse-2, RET: Follow this link")
+         'action (lambda (_button)
+                   (browse-url "https://www.gnu.org/software/auctex/";))
+         'follow-link t)
+        (insert " if your
 installation is older than the one available from the web site.
 
 If the bug is triggered by a specific \(La\)TeX file, you should try
@@ -6181,16 +6185,16 @@ in your report.
 
 Your report will be posted for the auctex package at the GNU bug
 tracker.  Visit ")
-       (insert-text-button
-        "https://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex";
-        'face 'link
-        'help-echo (concat "mouse-2, RET: Follow this link")
-        'action (lambda (_button)
-                  (browse-url 
"https://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex";))
-        'follow-link t)
-       (insert "\nto browse existing AUCTeX bugs.
+        (insert-text-button
+         "https://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex";
+         'face 'link
+         'help-echo (concat "mouse-2, RET: Follow this link")
+         'action (lambda (_button)
+                   (browse-url 
"https://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex";))
+         'follow-link t)
+        (insert "\nto browse existing AUCTeX bugs.
 ------------------------------------------------------------------------\n\n")
-       (buffer-string))))))
+        (buffer-string))))))
 
 
 ;;; Documentation
@@ -6205,80 +6209,80 @@ package, prompt for selection of the manual of that 
package to
 show."
   (interactive "P")
   (let ((pkg (thing-at-point 'symbol))
-       buffer list doc)
+        buffer list doc)
     ;; Strip off properties.  XXX: XEmacs doesn't have
     ;; `substring-no-properties'.
     (set-text-properties 0 (length pkg) nil pkg)
     (setq pkg (TeX-read-string "View documentation for: " pkg))
     (unless (zerop (length pkg))
       (if arg
-         ;; Called with prefix argument: run "texdoc --list --nointeract <pkg>"
-         (progn
-           ;; Create the buffer, insert the result of the command, and
-           ;; accumulate the list of manuals.
-           (with-current-buffer (get-buffer-create
-                                 (setq buffer (format "*texdoc: %s*" pkg)))
-             (erase-buffer)
-             (insert (shell-command-to-string
-                      (concat "texdoc --list --nointeract " pkg)))
-             (goto-char 1)             ; No need to use `point-min' here.
-             (save-excursion
-               (while (re-search-forward
-                       ;; XXX: XEmacs doesn't support character classes in
-                       ;; regexps, like "[:alnum:]".
-                       "^ *\\([0-9]+\\) +\\([-~/a-zA-Z0-9_.${}#%,:\\ ()]+\\)" 
nil t)
-                 (push (cons (match-string 1) (match-string 2)) list))))
-           (unwind-protect
-               (cond
-                ((null (executable-find "texdoc"))
-                 ;; Note: `shell-command-to-string' uses shell, only
-                 ;; `call-process' looks at `exec-path', thus only here makes
-                 ;; sense to use `executable-find' to test whether texdoc is
-                 ;; available.
-                 (message "texdoc not found"))
-                (list
-                 ;; Go on if there are manuals listed: show the buffer, prompt
-                 ;; for the number of the manual, then run
-                 ;;     texdoc --just-view <doc>
-                 (TeX-pop-to-buffer (get-buffer buffer))
-                 (condition-case nil
-                     (when (setq doc
-                                 (cdr (assoc (TeX-read-string "Please enter \
+          ;; Called with prefix argument: run "texdoc --list --nointeract 
<pkg>"
+          (progn
+            ;; Create the buffer, insert the result of the command, and
+            ;; accumulate the list of manuals.
+            (with-current-buffer (get-buffer-create
+                                  (setq buffer (format "*texdoc: %s*" pkg)))
+              (erase-buffer)
+              (insert (shell-command-to-string
+                       (concat "texdoc --list --nointeract " pkg)))
+              (goto-char 1)             ; No need to use `point-min' here.
+              (save-excursion
+                (while (re-search-forward
+                        ;; XXX: XEmacs doesn't support character classes in
+                        ;; regexps, like "[:alnum:]".
+                        "^ *\\([0-9]+\\) +\\([-~/a-zA-Z0-9_.${}#%,:\\ ()]+\\)" 
nil t)
+                  (push (cons (match-string 1) (match-string 2)) list))))
+            (unwind-protect
+                (cond
+                 ((null (executable-find "texdoc"))
+                  ;; Note: `shell-command-to-string' uses shell, only
+                  ;; `call-process' looks at `exec-path', thus only here makes
+                  ;; sense to use `executable-find' to test whether texdoc is
+                  ;; available.
+                  (message "texdoc not found"))
+                 (list
+                  ;; Go on if there are manuals listed: show the buffer, prompt
+                  ;; for the number of the manual, then run
+                  ;;     texdoc --just-view <doc>
+                  (TeX-pop-to-buffer (get-buffer buffer))
+                  (condition-case nil
+                      (when (setq doc
+                                  (cdr (assoc (TeX-read-string "Please enter \
 the number of the file to view, anything else to skip: ") list)))
-                       (call-process "texdoc" nil 0 nil "--just-view" doc))
-                   ;; Exit gently if a `quit' signal is thrown.
-                   (quit nil)))
-                (t (message "No documentation found for %s" pkg)))
-             ;; In any case quit-and-kill the window.
-             (when (get-buffer-window buffer)
-               (quit-window t (get-buffer-window buffer)))))
-       ;; Called without prefix argument: just run "texdoc --view <pkg>" and
-       ;; show the output, so that the user is warned in case it doesn't find
-       ;; the documentation or "texdoc" is not available.
-       (message "%s"
-                ;; The folowing code to the end of `defun' used to be
-                ;; just
-                ;; (shell-command-to-string (concat "texdoc --view " pkg))
-                ;; , but in some cases it blocks emacs until the user
-                ;; quits the viewer (bug#28905).
-                (with-output-to-string
-                  (let* (;; Use pipe rather than pty because the
-                         ;; latter causes atril (evince variant
-                         ;; viewer) to exit before showing anything.
-                         (process-connection-type nil)
-                         (process (start-process-shell-command
-                                   "Doc view" standard-output
-                                   (concat "texdoc --view " pkg))))
-                    ;; Suppress the message "Process Doc view
-                    ;; finished".
-                    (set-process-sentinel process #'ignore)
-                    ;; Kill temp buffer without query.  This is
-                    ;; necessary, at least for some environment, if
-                    ;; the underlying shell can't find the texdoc
-                    ;; executable.
-                    (set-process-query-on-exit-flag process nil)
-                    ;; Don't discard shell output.
-                    (accept-process-output process))))))))
+                        (call-process "texdoc" nil 0 nil "--just-view" doc))
+                    ;; Exit gently if a `quit' signal is thrown.
+                    (quit nil)))
+                 (t (message "No documentation found for %s" pkg)))
+              ;; In any case quit-and-kill the window.
+              (when (get-buffer-window buffer)
+                (quit-window t (get-buffer-window buffer)))))
+        ;; Called without prefix argument: just run "texdoc --view <pkg>" and
+        ;; show the output, so that the user is warned in case it doesn't find
+        ;; the documentation or "texdoc" is not available.
+        (message "%s"
+                 ;; The folowing code to the end of `defun' used to be
+                 ;; just
+                 ;; (shell-command-to-string (concat "texdoc --view " pkg))
+                 ;; , but in some cases it blocks emacs until the user
+                 ;; quits the viewer (bug#28905).
+                 (with-output-to-string
+                   (let* (;; Use pipe rather than pty because the
+                          ;; latter causes atril (evince variant
+                          ;; viewer) to exit before showing anything.
+                          (process-connection-type nil)
+                          (process (start-process-shell-command
+                                    "Doc view" standard-output
+                                    (concat "texdoc --view " pkg))))
+                     ;; Suppress the message "Process Doc view
+                     ;; finished".
+                     (set-process-sentinel process #'ignore)
+                     ;; Kill temp buffer without query.  This is
+                     ;; necessary, at least for some environment, if
+                     ;; the underlying shell can't find the texdoc
+                     ;; executable.
+                     (set-process-query-on-exit-flag process nil)
+                     ;; Don't discard shell output.
+                     (accept-process-output process))))))))
 
 (defun TeX-goto-info-page ()
   "Read documentation for AUCTeX in the info system."
@@ -6289,32 +6293,32 @@ the number of the file to view, anything else to skip: 
") list)))
 
 (defvar TeX-doc-backend-alist
   '((texdoc (plain-tex-mode latex-mode doctex-mode ams-tex-mode context-mode)
-           (lambda ()
-             (when (executable-find "texdoc")
-               (TeX-search-files-by-type 'docs 'global t t)))
-           (lambda (doc)
-             ;; texdoc in MiKTeX requires --view in order to start
-             ;; the viewer instead of an intermediate web page.
-             (call-process "texdoc" nil 0 nil "--view" doc)))
+            (lambda ()
+              (when (executable-find "texdoc")
+                (TeX-search-files-by-type 'docs 'global t t)))
+            (lambda (doc)
+              ;; texdoc in MiKTeX requires --view in order to start
+              ;; the viewer instead of an intermediate web page.
+              (call-process "texdoc" nil 0 nil "--view" doc)))
     (latex-info (latex-mode)
-               (lambda ()
-                 (mapcar (lambda (x)
-                           (let ((x (car x)))
-                             (if (string-match "\\`\\\\" x)
-                                 (substring x 1) x)))
-                         (info-lookup->completions 'symbol 'latex-mode)))
-               (lambda (doc)
-                 (info-lookup-symbol (concat "\\" doc) 'latex-mode)))
+                (lambda ()
+                  (mapcar (lambda (x)
+                            (let ((x (car x)))
+                              (if (string-match "\\`\\\\" x)
+                                  (substring x 1) x)))
+                          (info-lookup->completions 'symbol 'latex-mode)))
+                (lambda (doc)
+                  (info-lookup-symbol (concat "\\" doc) 'latex-mode)))
     (texinfo-info (texinfo-mode)
-                 (lambda ()
-                   (mapcar (lambda (x)
-                             (let ((x (car x)))
-                               (if (string-match "\\`@" x)
-                                   (substring x 1) x)))
-                           (info-lookup->completions 'symbol
-                                                     'texinfo-mode)))
-                 (lambda (doc)
-                   (info-lookup-symbol (concat "@" doc) 'texinfo-mode))))
+                  (lambda ()
+                    (mapcar (lambda (x)
+                              (let ((x (car x)))
+                                (if (string-match "\\`@" x)
+                                    (substring x 1) x)))
+                            (info-lookup->completions 'symbol
+                                                      'texinfo-mode)))
+                  (lambda (doc)
+                    (info-lookup-symbol (concat "@" doc) 'texinfo-mode))))
   "Alist of backends used for looking up documentation.
 Each item consists of four elements.
 
@@ -6339,49 +6343,49 @@ NAME may be a package, a command, or a document."
     ;; Build the lists of available documentation used for completion.
     (dolist (elt TeX-doc-backend-alist)
       (when (memq major-mode (nth 1 elt))
-       (let ((completions (funcall (nth 2 elt))))
-         (unless (null completions)
+        (let ((completions (funcall (nth 2 elt))))
+          (unless (null completions)
             (cl-pushnew (cons completions (nth 0 elt)) docs :test #'equal)))))
     (if (null docs)
-       (progn
-         (if (executable-find "texdoc")
-             ;; Fallback if we did not find anything via the backend list.
-             (let ((doc (read-from-minibuffer "Input for `texdoc': ")))
-               (when doc (call-process "texdoc" nil 0 nil "--view" doc)))
-           ;; Give up.
-           (message "No documentation found")))
+        (progn
+          (if (executable-find "texdoc")
+              ;; Fallback if we did not find anything via the backend list.
+              (let ((doc (read-from-minibuffer "Input for `texdoc': ")))
+                (when doc (call-process "texdoc" nil 0 nil "--view" doc)))
+            ;; Give up.
+            (message "No documentation found")))
       ;; Ask the user about the package, command, or document.
       (when (and (called-interactively-p 'any)
-                (or (not name) (string= name "")))
-       (let ((symbol (thing-at-point 'symbol))
-             contained completions)
-         ;; Is the symbol at point contained in the lists of available
-         ;; documentation?
-         (setq contained (catch 'found
-                           (dolist (elt docs)
-                             (when (member symbol (car elt))
-                               (throw 'found t)))))
-         ;; Setup completion list in a format suitable for `completing-read'.
-         (dolist (elt docs)
-           (setq completions (nconc (mapcar 'list (car elt)) completions)))
-         ;; Query user.
-         (setq name (completing-read
-                     (if contained
-                         (format "Package, command, or document (default %s): "
-                                 symbol)
-                       "Package, command, or document: ")
-                     completions nil nil nil nil symbol))))
+                 (or (not name) (string= name "")))
+        (let ((symbol (thing-at-point 'symbol))
+              contained completions)
+          ;; Is the symbol at point contained in the lists of available
+          ;; documentation?
+          (setq contained (catch 'found
+                            (dolist (elt docs)
+                              (when (member symbol (car elt))
+                                (throw 'found t)))))
+          ;; Setup completion list in a format suitable for `completing-read'.
+          (dolist (elt docs)
+            (setq completions (nconc (mapcar 'list (car elt)) completions)))
+          ;; Query user.
+          (setq name (completing-read
+                      (if contained
+                          (format "Package, command, or document (default %s): 
"
+                                  symbol)
+                        "Package, command, or document: ")
+                      completions nil nil nil nil symbol))))
       (if (not name)
-         (message "No documentation specified")
-       ;; XXX: Provide way to choose in case a symbol can be found in
-       ;; more than one backend.
-       (let* ((backend (catch 'found
-                         (dolist (elt docs)
-                           (when (member name (car elt))
-                             (throw 'found (cdr elt)))))))
-         (if backend
-             (funcall (nth 3 (assoc backend TeX-doc-backend-alist)) name)
-           (message "Documentation not found")))))))
+          (message "No documentation specified")
+        ;; XXX: Provide way to choose in case a symbol can be found in
+        ;; more than one backend.
+        (let* ((backend (catch 'found
+                          (dolist (elt docs)
+                            (when (member name (car elt))
+                              (throw 'found (cdr elt)))))))
+          (if backend
+              (funcall (nth 3 (assoc backend TeX-doc-backend-alist)) name)
+            (message "Documentation not found")))))))
 
 
 ;;; Ispell Support
@@ -6389,16 +6393,16 @@ NAME may be a package, a command, or a document."
 (defun TeX-run-ispell (_command _string file)
   "Run ispell on current TeX buffer."
   (cond ((and (string-equal file (TeX-region-file))
-             (fboundp 'ispell-region))
-        (call-interactively 'ispell-region))
-       ((string-equal file (TeX-region-file))
-        (call-interactively 'spell-region))
-       ((fboundp 'ispell-buffer)
-        (ispell-buffer))
-       ((fboundp 'ispell)
-        (ispell))
-       (t
-        (spell-buffer))))
+              (fboundp 'ispell-region))
+         (call-interactively 'ispell-region))
+        ((string-equal file (TeX-region-file))
+         (call-interactively 'spell-region))
+        ((fboundp 'ispell-buffer)
+         (ispell-buffer))
+        ((fboundp 'ispell)
+         (ispell))
+        (t
+         (spell-buffer))))
 
 (defun TeX-ispell-document (name)
   "Run ispell on all open files belonging to the current document."
@@ -6407,35 +6411,35 @@ NAME may be a package, a command, or a document."
       (setq name (TeX-master-file)))
 
   (let ((regexp (concat "\\`\\("
-                       (mapconcat (lambda (dir)
-                                    (regexp-quote
-                                     (expand-file-name
-                                      (file-name-as-directory dir))))
-                                  (append (when (file-name-directory name)
-                                            (list (file-name-directory name)))
-                                          TeX-check-path)
-                                  "\\|")
-                       "\\).*\\("
-                       (mapconcat 'regexp-quote
-                                  (cons (file-name-nondirectory name)
-                                        (TeX-style-list)) "\\|")
-                       "\\)\\.\\("
-                       (mapconcat #'identity TeX-file-extensions "\\|")
-                       "\\)\\'"))
-       (buffers (buffer-list)))
+                        (mapconcat (lambda (dir)
+                                     (regexp-quote
+                                      (expand-file-name
+                                       (file-name-as-directory dir))))
+                                   (append (when (file-name-directory name)
+                                             (list (file-name-directory name)))
+                                           TeX-check-path)
+                                   "\\|")
+                        "\\).*\\("
+                        (mapconcat 'regexp-quote
+                                   (cons (file-name-nondirectory name)
+                                         (TeX-style-list)) "\\|")
+                        "\\)\\.\\("
+                        (mapconcat #'identity TeX-file-extensions "\\|")
+                        "\\)\\'"))
+        (buffers (buffer-list)))
     (while buffers
       (let* ((buffer (car buffers))
-            (name (buffer-file-name buffer)))
-       (setq buffers (cdr buffers))
-       (when (and name (string-match regexp name))
-         (save-excursion (switch-to-buffer buffer) (ispell-buffer))
+             (name (buffer-file-name buffer)))
+        (setq buffers (cdr buffers))
+        (when (and name (string-match regexp name))
+          (save-excursion (switch-to-buffer buffer) (ispell-buffer))
           t)))))
 
 ;; Some versions of ispell 3 use this.
 (defvar ispell-tex-major-modes nil)
 (setq ispell-tex-major-modes
       (append '(plain-tex-mode ams-tex-mode latex-mode doctex-mode)
-             ispell-tex-major-modes))
+              ispell-tex-major-modes))
 
 (defcustom TeX-ispell-extend-skip-list t
   "Whether to extend regions selected for skipping during spell checking."
@@ -6452,9 +6456,9 @@ of the car of `ispell-tex-skip-alists'.  This only 
happens if
 `TeX-ispell-extend-skip-list' is non-nil."
   (when TeX-ispell-extend-skip-list
     (let ((raws (car ispell-tex-skip-alists))
-         (envs (cadr ispell-tex-skip-alists)))
+          (envs (cadr ispell-tex-skip-alists)))
       (dolist (x skip)
-       (cl-pushnew x raws :test #'equal))
+        (cl-pushnew x raws :test #'equal))
       (setq ispell-tex-skip-alists (list raws envs)))))
 
 (defun TeX-ispell-skip-setcdr (skip)
@@ -6465,9 +6469,9 @@ of the cdr of `ispell-tex-skip-alists'.  This only 
happens if
 `TeX-ispell-extend-skip-list' is non-nil."
   (when TeX-ispell-extend-skip-list
     (let ((raws (car ispell-tex-skip-alists))
-         (envs (cadr ispell-tex-skip-alists)))
+          (envs (cadr ispell-tex-skip-alists)))
       (dolist (x skip)
-       (cl-pushnew x envs :test #'equal))
+        (cl-pushnew x envs :test #'equal))
       (setq ispell-tex-skip-alists (list raws envs)))))
 
 (defun TeX-ispell-tex-arg-end (&optional arg1 arg2 arg3)
@@ -6489,30 +6493,30 @@ following.  Omitting argument means 1.
 Here some examples for additions to `ispell-tex-skip-alists':
 
   \\begin{tabularx}{300pt}[t]{lrc} ...
-               ARG  1    2   3
+                ARG  1    2   3
   (\"tabularx\" TeX-ispell-tex-arg-end) or equivalent
   (\"tabularx\" TeX-ispell-tex-arg-end 1 1 1)
 
   \\fontspec{font name}[font features]
-              ARG1         ARG2        ARG3=0
+               ARG1         ARG2        ARG3=0
   (\"\\\\\\\\fontspec\" TeX-ispell-tex-arg-end 1 1 0)
 
   \\raisebox{lift}[height][depth]{contents}
-           ARG1       ARG2       ARG3=0 (checked by Ispell)
+            ARG1       ARG2       ARG3=0 (checked by Ispell)
   (\"\\\\\\\\raisebox\" TeX-ispell-tex-arg-end 1 2 0)
 
 Optional arguments before the first mandatory one are all
 skipped."
   (condition-case nil
       (progn
-       (while (looking-at "[ \t\n]*\\[") (forward-sexp))
-       (forward-sexp (or arg1 1))
-       (let ((num 0))
-         (while (and (looking-at "[ \t\n]*\\[")
-                     (< num (or arg2 1)))
-           (setq num (1+ num))
-           (forward-sexp)))
-       (forward-sexp (or arg3 1)))
+        (while (looking-at "[ \t\n]*\\[") (forward-sexp))
+        (forward-sexp (or arg1 1))
+        (let ((num 0))
+          (while (and (looking-at "[ \t\n]*\\[")
+                      (< num (or arg2 1)))
+            (setq num (1+ num))
+            (forward-sexp)))
+        (forward-sexp (or arg3 1)))
     (error
      (message "Error skipping s-expressions at point %d" (point))
      (sit-for 2))))
@@ -6527,19 +6531,19 @@ in `TeX-ispell-verb-delimiters' or in braces, otherwise 
raises an
 error."
   (condition-case nil
       (progn
-       (when (looking-at "[ \t\n]*\\[") (forward-sexp))
-       (when (and arg (looking-at "{"))
-         (forward-sexp arg))
-       (cond ((looking-at (concat "[" TeX-ispell-verb-delimiters "]"))
-              (forward-char)
-              (skip-chars-forward (concat "^" (string (char-before))))
-              (forward-char))
-             ((looking-at "{")
-              (forward-sexp))
-             (t (error nil))))
+        (when (looking-at "[ \t\n]*\\[") (forward-sexp))
+        (when (and arg (looking-at "{"))
+          (forward-sexp arg))
+        (cond ((looking-at (concat "[" TeX-ispell-verb-delimiters "]"))
+               (forward-char)
+               (skip-chars-forward (concat "^" (string (char-before))))
+               (forward-char))
+              ((looking-at "{")
+               (forward-sexp))
+              (t (error nil))))
     (error
      (message "Verbatim delimiter is not one of %s"
-             (split-string TeX-ispell-verb-delimiters "" t))
+              (split-string TeX-ispell-verb-delimiters "" t))
      (sit-for 2))))
 
 ;;; Abbrev mode
@@ -6547,13 +6551,13 @@ error."
 (defmacro TeX-abbrev-mode-setup (mode)
   "Set up the abbrev table and variable for MODE."
   (let ((symbol (intern (concat (symbol-name mode) "-abbrev-table")))
-       (name (TeX-mode-prefix mode)))
+        (name (TeX-mode-prefix mode)))
     `(progn
        (defvar ,symbol nil
-        ,(format "Abbrev table for %s mode." name))
+         ,(format "Abbrev table for %s mode." name))
        (define-abbrev-table ',symbol nil)
        (when (fboundp 'abbrev-table-put)
-        (abbrev-table-put ,symbol :parents (list text-mode-abbrev-table))))))
+         (abbrev-table-put ,symbol :parents (list text-mode-abbrev-table))))))
 
 
 ;;; Special provisions for other modes and libraries
@@ -6564,10 +6568,10 @@ error."
   '(progn
      (dolist (elt '(TeX-master))
        (unless (member elt (default-value 'desktop-locals-to-save))
-        (setq-default desktop-locals-to-save
-                      (cons elt (default-value 'desktop-locals-to-save)))))
+         (setq-default desktop-locals-to-save
+                       (cons elt (default-value 'desktop-locals-to-save)))))
      (add-hook 'desktop-after-read-hook '(lambda ()
-                                          (TeX-set-mode-name t)))))
+                                           (TeX-set-mode-name t)))))
 
 ;; delsel.el, `delete-selection-mode'
 (put 'TeX-newline 'delete-selection t)
@@ -6581,20 +6585,20 @@ error."
 ;; dynamicity has been introduced in Emacs 24.3, for previous versions keep
 ;; `TeX-insert-dollar' without this property.
 (if (or (> emacs-major-version 24)
-       (and (= emacs-major-version 24)
-            (>= emacs-minor-version 3)))
+        (and (= emacs-major-version 24)
+             (>= emacs-minor-version 3)))
     (put 'TeX-insert-dollar 'delete-selection
-        (lambda () (null TeX-electric-math))))
+         (lambda () (null TeX-electric-math))))
 
 (defun TeX--list-of-string-p (lst)
   "Return non-nil iff `LST' is a list of strings.
 Used as function for validating a variable's `safe-local-variable' property."
   (and (listp lst)
        (let ((all-strings t))
-        (while (and all-strings lst)
-          (setq all-strings (stringp (car lst)))
-          (setq lst (cdr lst)))
-        all-strings)))
+         (while (and all-strings lst)
+           (setq all-strings (stringp (car lst)))
+           (setq lst (cdr lst)))
+         all-strings)))
 
 ;; add-log.el: This function is a variation of
 ;; `tex-current-defun-name' defined in `tex-mode.el'.  In `latex.el',
@@ -6619,7 +6623,7 @@ Used as function for validating a variable's 
`safe-local-variable' property."
       (when (re-search-backward
              (if (local-variable-p 'LaTeX-section-label)
                  (concat "\\\\"
-                        (regexp-opt
+                         (regexp-opt
                           (remove "part" (mapcar #'car LaTeX-section-label)))
                          "\\*?")
                "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)\\*?")
diff --git a/texmathp.el b/texmathp.el
index 2a8519b..814dd4b 100644
--- a/texmathp.el
+++ b/texmathp.el
@@ -112,7 +112,7 @@
 (defvar texmathp-tex-commands1 nil)
 (defvar texmathp-memory nil)
 
-(defvar texmathp-tex-commands)         ; silence the compiler
+(defvar texmathp-tex-commands)          ; silence the compiler
 
 (defvar texmathp-tex-commands-default
   '(;; Plain TeX
@@ -177,24 +177,24 @@ customize (customize calls it when setting the variable)."
   ;; Extract lists and regexp.
   (setq texmathp-macros nil texmathp-environments nil)
   (setq texmathp-memory
-       (cons texmathp-tex-commands texmathp-tex-commands-default))
+        (cons texmathp-tex-commands texmathp-tex-commands-default))
   (setq texmathp-tex-commands1 (append texmathp-tex-commands
-                                      texmathp-tex-commands-default))
+                                       texmathp-tex-commands-default))
   (let ((list (reverse texmathp-tex-commands1))
-       entry type switches togglers)
+        entry type switches togglers)
     (while (setq entry (car list))
       (setq type (nth 1 entry)
-           list (cdr list))
+            list (cdr list))
       (cond ((memq type '(env-on env-off)) (push (car entry) 
texmathp-environments))
-           ((memq type '(arg-on arg-off)) (push (car entry) texmathp-macros))
-           ((memq type '(sw-on sw-off))   (push (car entry) switches))
-           ((memq type '(sw-toggle))      (push (car entry) togglers))))
+            ((memq type '(arg-on arg-off)) (push (car entry) texmathp-macros))
+            ((memq type '(sw-on sw-off))   (push (car entry) switches))
+            ((memq type '(sw-toggle))      (push (car entry) togglers))))
     (setq texmathp-onoff-regexp
-         (concat "\\(?:[^\\]\\|\\`\\)"
-                 (regexp-opt switches t))
-         texmathp-toggle-regexp
-         (concat "\\([^\\$]\\|\\`\\)"
-                 (regexp-opt togglers t)))))
+          (concat "\\(?:[^\\]\\|\\`\\)"
+                  (regexp-opt switches t))
+          texmathp-toggle-regexp
+          (concat "\\([^\\$]\\|\\`\\)"
+                  (regexp-opt togglers t)))))
 
 (defcustom texmathp-tex-commands nil
   "List of environments and macros influencing (La)TeX math mode.
@@ -260,10 +260,10 @@ it points to the limit used for searches, usually two 
paragraphs up.")
 (defvar texmathp-syntax-table
   (let ((table (make-syntax-table)))
     (mapc (lambda (x) (modify-syntax-entry (car x) (cdr x) table))
-         '((?\\ . "\\") (?\f .">")  (?\n . ">")  (?% . "<")
-           (?\[ . ".")  (?\] . ".") (?\{ . "(}") (?\} . "){")
-           (?\( . ".")  (?\) . ".") (?\" . ".")  (?& . ".")   (?_ . ".")
-           (?@ . "_")   (?~ . " ")  (?$ . "$")   (?' . "w")))
+          '((?\\ . "\\") (?\f .">")  (?\n . ">")  (?% . "<")
+            (?\[ . ".")  (?\] . ".") (?\{ . "(}") (?\} . "){")
+            (?\( . ".")  (?\) . ".") (?\" . ".")  (?& . ".")   (?_ . ".")
+            (?@ . "_")   (?~ . " ")  (?$ . "$")   (?' . "w")))
     table)
   "Syntax table used while texmathp is parsing.")
 
@@ -276,17 +276,17 @@ the buffer.
 See the variable `texmathp-tex-commands' about which commands are checked."
   (interactive)
   (let* ((pos (point)) math-on sw-match
-        (bound (save-excursion
-                 (if (re-search-backward "[\n\r][ \t]*[\n\r]"
-                                         nil 1 texmathp-search-n-paragraphs)
-                     (match-beginning 0)
-                   (point-min))))
-        (mac-match (texmathp-match-macro bound))
-        (env-match (texmathp-match-environment
-                    (if (and mac-match (> (cdr mac-match) bound))
-                        (cdr mac-match)
-                      bound)))
-        (match (cons nil bound)))
+         (bound (save-excursion
+                  (if (re-search-backward "[\n\r][ \t]*[\n\r]"
+                                          nil 1 texmathp-search-n-paragraphs)
+                      (match-beginning 0)
+                    (point-min))))
+         (mac-match (texmathp-match-macro bound))
+         (env-match (texmathp-match-environment
+                     (if (and mac-match (> (cdr mac-match) bound))
+                         (cdr mac-match)
+                       bound)))
+         (match (cons nil bound)))
 
     ;; Select the nearer match
     (and env-match (setq match env-match))
@@ -294,33 +294,33 @@ See the variable `texmathp-tex-commands' about which 
commands are checked."
     ;; beginning just at (point-min).
     (and mac-match (>= (cdr mac-match) (cdr match)) (setq match mac-match))
     (setq math-on (memq (nth 1 (assoc (car match) texmathp-tex-commands1))
-                       '(env-on arg-on)))
+                        '(env-on arg-on)))
 
     ;; Check for switches
     (and (not math-on)
-        (setq sw-match (texmathp-match-switch bound))
-        ;; Use `>=' instead of `>' by similar reason as above. (bug#41559)
-        (>= (cdr sw-match) (cdr match))
-        (eq (nth 1 (assoc (car sw-match) texmathp-tex-commands1)) 'sw-on)
-        (setq match sw-match math-on t))
+         (setq sw-match (texmathp-match-switch bound))
+         ;; Use `>=' instead of `>' by similar reason as above. (bug#41559)
+         (>= (cdr sw-match) (cdr match))
+         (eq (nth 1 (assoc (car sw-match) texmathp-tex-commands1)) 'sw-on)
+         (setq match sw-match math-on t))
 
     ;; Check for togglers
     (if (not math-on)
-       (save-excursion
-         (goto-char (cdr match))
-         (while (re-search-forward texmathp-toggle-regexp pos t)
-           (if (setq math-on (not math-on))
-               (setq sw-match (cons (match-string-no-properties 2) 
(match-beginning 2)))
-             (setq sw-match nil)))
-         (and math-on sw-match (setq match sw-match))))
+        (save-excursion
+          (goto-char (cdr match))
+          (while (re-search-forward texmathp-toggle-regexp pos t)
+            (if (setq math-on (not math-on))
+                (setq sw-match (cons (match-string-no-properties 2) 
(match-beginning 2)))
+              (setq sw-match nil)))
+          (and math-on sw-match (setq match sw-match))))
 
     ;; Store info, show as message when interactive, and return
     (setq texmathp-why match)
     (and (called-interactively-p 'any)
-        (message "math-mode is %s: %s begins at buffer position %d"
-                 (if math-on "on" "off")
-                 (or (car match) "new paragraph")
-                 (cdr match)))
+         (message "math-mode is %s: %s begins at buffer position %d"
+                  (if math-on "on" "off")
+                  (or (car match) "new paragraph")
+                  (cdr match)))
     (and math-on t)))
 
 (defun texmathp-match-environment (bound)
@@ -331,41 +331,41 @@ Limit searched to BOUND.  The return value is like 
(\"equation\" . (point))."
       (and (null texmathp-environments) (throw 'exit nil))
       ;; Check if the line we are starting with is a commented one.
       (let ((orig-comment-flag
-            ;; Could be replaced by `TeX-in-commented-line'.
-            (progn
-              (save-excursion
-                (beginning-of-line)
-                (skip-chars-forward " \t")
-                (string= (buffer-substring-no-properties
-                          (point) (min (point-max)
-                                       (+ (point) (length comment-start))))
-                         comment-start))))
-           end-list env)
-       (while (re-search-backward "\\\\\\(begin\\|end\\)[ \t]*{\\([^}]+\\)}"
-                                  bound t)
-         ;; Check if the match found is inside of a comment.
-         (let ((current-comment-flag
-                ;; Could be replaced by `TeX-in-comment'.
-                (when (save-match-data
-                        (re-search-backward comment-start-skip
-                                            (line-beginning-position) t))
-                  ;; We need a t for comparison with `orig-comment-flag',
-                  ;; not a number.
-                  t)))
-           ;; Only consider matching alternatives with respect to
-           ;; "in-commentness", i.e. if we started with a comment
-           ;; only consider matches which are in comments as well and
-           ;; vice versa.
-           (when (eq orig-comment-flag current-comment-flag)
-             (setq env (buffer-substring-no-properties
-                        (match-beginning 2) (match-end 2)))
-             (cond ((string= (match-string-no-properties 1) "end")
-                    (setq end-list (cons env end-list)))
-                   ((equal env (car end-list))
-                    (setq end-list (cdr end-list)))
-                   ((member env texmathp-environments)
-                    (throw 'exit (cons env (point))))))))
-       nil))))
+             ;; Could be replaced by `TeX-in-commented-line'.
+             (progn
+               (save-excursion
+                 (beginning-of-line)
+                 (skip-chars-forward " \t")
+                 (string= (buffer-substring-no-properties
+                           (point) (min (point-max)
+                                        (+ (point) (length comment-start))))
+                          comment-start))))
+            end-list env)
+        (while (re-search-backward "\\\\\\(begin\\|end\\)[ \t]*{\\([^}]+\\)}"
+                                   bound t)
+          ;; Check if the match found is inside of a comment.
+          (let ((current-comment-flag
+                 ;; Could be replaced by `TeX-in-comment'.
+                 (when (save-match-data
+                         (re-search-backward comment-start-skip
+                                             (line-beginning-position) t))
+                   ;; We need a t for comparison with `orig-comment-flag',
+                   ;; not a number.
+                   t)))
+            ;; Only consider matching alternatives with respect to
+            ;; "in-commentness", i.e. if we started with a comment
+            ;; only consider matches which are in comments as well and
+            ;; vice versa.
+            (when (eq orig-comment-flag current-comment-flag)
+              (setq env (buffer-substring-no-properties
+                         (match-beginning 2) (match-end 2)))
+              (cond ((string= (match-string-no-properties 1) "end")
+                     (setq end-list (cons env end-list)))
+                    ((equal env (car end-list))
+                     (setq end-list (cdr end-list)))
+                    ((member env texmathp-environments)
+                     (throw 'exit (cons env (point))))))))
+        nil))))
 
 (defun texmathp-match-macro (bound)
   "Find out if point is within the arguments of any of the Math macros.
@@ -374,53 +374,53 @@ Limit searches to BOUND.  The return value is like 
(\"\\macro\" . (point))."
     (and (null texmathp-macros) (throw 'exit nil))
     (let (pos cmd (syntax-table (syntax-table)))
       (unwind-protect
-         (save-restriction
-           (save-excursion
-             (set-syntax-table texmathp-syntax-table)
-             (narrow-to-region (max 1 bound) (point))
-             ;; Move back out of the current parenthesis
-             (while (condition-case nil (progn (up-list -1) t) (error nil))
-               ;; Move back over any touching sexps (in fact also non-touching)
-               (while
-                   (and
-                    (cond
-                     ((memq (preceding-char) '(?\] ?\})))
-                     ((and
-                       texmathp-allow-detached-args
-                       (re-search-backward
-                       "[]}][ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*\\="
-                       bound t))
-                      (goto-char (1+ (match-beginning 0))) t))
-                    (if (eq (preceding-char) ?\})
-                        ;; Jump back over {}
-                        (condition-case nil
-                            (progn (backward-sexp) t)
-                          (error nil))
-                      ;; Jump back over []. Modify syntax temporarily for this.
-                      (unwind-protect
-                          (progn
-                            (modify-syntax-entry ?\{ ".")
-                            (modify-syntax-entry ?\} ".")
-                            (modify-syntax-entry ?\[ "(]")
-                            (modify-syntax-entry ?\] ")[")
-                            (condition-case nil
-                                (progn (backward-sexp) t)
-                              (error nil)))
-                        (modify-syntax-entry ?\{ "(}")
-                        (modify-syntax-entry ?\} "){")
-                        (modify-syntax-entry ?\[ ".")
-                        (modify-syntax-entry ?\] ".")
-                        nil))))
-               (setq pos (point))
-               (and (memq (following-char) '(?\[ ?\{))
-                    (re-search-backward "\\\\[*a-zA-Z]+\\=" nil t)
-                    (setq cmd (buffer-substring-no-properties
-                               (match-beginning 0) (match-end 0)))
-                    (member cmd texmathp-macros)
-                    (throw 'exit (cons cmd (point))))
-               (goto-char pos))
-             (throw 'exit nil)))
-       (set-syntax-table syntax-table)))))
+          (save-restriction
+            (save-excursion
+              (set-syntax-table texmathp-syntax-table)
+              (narrow-to-region (max 1 bound) (point))
+              ;; Move back out of the current parenthesis
+              (while (condition-case nil (progn (up-list -1) t) (error nil))
+                ;; Move back over any touching sexps (in fact also 
non-touching)
+                (while
+                    (and
+                     (cond
+                      ((memq (preceding-char) '(?\] ?\})))
+                      ((and
+                        texmathp-allow-detached-args
+                        (re-search-backward
+                         "[]}][ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ 
\t]*\\="
+                         bound t))
+                       (goto-char (1+ (match-beginning 0))) t))
+                     (if (eq (preceding-char) ?\})
+                         ;; Jump back over {}
+                         (condition-case nil
+                             (progn (backward-sexp) t)
+                           (error nil))
+                       ;; Jump back over []. Modify syntax temporarily for 
this.
+                       (unwind-protect
+                           (progn
+                             (modify-syntax-entry ?\{ ".")
+                             (modify-syntax-entry ?\} ".")
+                             (modify-syntax-entry ?\[ "(]")
+                             (modify-syntax-entry ?\] ")[")
+                             (condition-case nil
+                                 (progn (backward-sexp) t)
+                               (error nil)))
+                         (modify-syntax-entry ?\{ "(}")
+                         (modify-syntax-entry ?\} "){")
+                         (modify-syntax-entry ?\[ ".")
+                         (modify-syntax-entry ?\] ".")
+                         nil))))
+                (setq pos (point))
+                (and (memq (following-char) '(?\[ ?\{))
+                     (re-search-backward "\\\\[*a-zA-Z]+\\=" nil t)
+                     (setq cmd (buffer-substring-no-properties
+                                (match-beginning 0) (match-end 0)))
+                     (member cmd texmathp-macros)
+                     (throw 'exit (cons cmd (point))))
+                (goto-char pos))
+              (throw 'exit nil)))
+        (set-syntax-table syntax-table)))))
 
 ;;;###autoload
 (defun texmathp-match-switch (bound)
@@ -429,8 +429,8 @@ Limit searched to BOUND."
   ;; The return value is like ("\\(" . (point)).
   (save-excursion
     (if (re-search-backward texmathp-onoff-regexp bound t)
-       (cons (buffer-substring-no-properties (match-beginning 1) (match-end 1))
-             (match-beginning 1))
+        (cons (buffer-substring-no-properties (match-beginning 1) (match-end 
1))
+              (match-beginning 1))
       nil)))
 
 (provide 'texmathp)
diff --git a/toolbar-x.el b/toolbar-x.el
index 2eab8d3..11919c9 100644
--- a/toolbar-x.el
+++ b/toolbar-x.el
@@ -37,7 +37,7 @@
 
 ;; * Supported properties:
 ;; - All editors: `:insert', `:image', `:command', `:help', `:enable',
-;;               `:append-command' and `:prepend-command';
+;;                `:append-command' and `:prepend-command';
 ;; - Emacs only: `:visible' and `:button';
 ;; - XEmacs only: `:toolbar'.
 ;; For the precise value-type for each property, see documentation of
@@ -63,7 +63,7 @@
 ;; Properties can be distributed to several buttons, using \`groups\'.
 ;; Example: (for (bar baz :toolbar (bottom . top) :insert foo-form)
 ;; means that `foo', `bar' and `baz' have `:insert foo-form' and `bar' and
-;; `baz' have the property `:toolbar (bottom . top)'.  (ps: this type
+;; `baz' have the property `:toolbar (bottom .  top)'.  (ps: this type
 ;; of value for the `:toolbar' property (XEmacs only) means that the
 ;; buttons will be in the bottom toolbar unless the default toolbar is
 ;; in the bottom, and in this case, this buttons go to the top
@@ -120,14 +120,14 @@
 (defvar toolbarx-image-path
   (nconc
    (delq nil (mapcar #'(lambda(x)
-                        (and x
-                             (member
-                              (file-name-nondirectory
-                               (directory-file-name x))
-                              '("toolbar" "images"))
-                             ;;(file-directory-p x)
-                             x))
-                    load-path))
+                         (and x
+                              (member
+                               (file-name-nondirectory
+                                (directory-file-name x))
+                               '("toolbar" "images"))
+                              ;;(file-directory-p x)
+                              x))
+                     load-path))
    (list data-directory))
   "List of directories where toolbarx finds its images.")
 
@@ -151,22 +151,22 @@
   "Return a string from the name of a SYMBOL.
 Upcase initials and replace dashes by spaces."
   (let* ((str (upcase-initials (symbol-name symbol)))
-        (str2))
+         (str2))
     (dolist (i (append str nil))
-      (if (eq i 45)                    ; if dash, push space
-         (push 32 str2)
-       (push i str2)))                 ; else push identical
+      (if (eq i 45)                     ; if dash, push space
+          (push 32 str2)
+        (push i str2)))                 ; else push identical
     (concat (nreverse str2))))
 
 (defun toolbarx-make-symbol-from-string (string)
   "Return a (intern) symbol from STRING.
 Downcase string and replace spaces by dashes."
   (let* ((str1 (append (downcase string) nil))
-        (str2))
+         (str2))
     (dolist (i str1)
-      (if (eq i 32)                    ; if dash, push space
-         (push 45 str2)
-       (push i str2)))
+      (if (eq i 32)                     ; if dash, push space
+          (push 45 str2)
+        (push i str2)))
     (intern (concat (nreverse str2)))))
 
 (defun toolbarx-good-option-list-p (option-list valid-options)
@@ -174,41 +174,41 @@ Downcase string and replace spaces by dashes."
 Each OPT is member of VALID-OPTIONS and OPT are pairwise
 different.  OPTION-LIST equal to nil is a good option list."
   (let ((elt-in-valid t)
-       (temp-opt-list option-list)
-       (list-diff)
-       (n (/ (length option-list) 2)))
+        (temp-opt-list option-list)
+        (list-diff)
+        (n (/ (length option-list) 2)))
     (dotimes (i n)
       (when (> i 0)
-       (setq temp-opt-list (cddr temp-opt-list)))
+        (setq temp-opt-list (cddr temp-opt-list)))
       (cl-pushnew (car temp-opt-list) list-diff :test #'equal)
       (setq elt-in-valid (and elt-in-valid
-                             (memq (car temp-opt-list)
-                                   valid-options))))
-    (and elt-in-valid                  ; options are on VALID-OPTOPNS
-        ;; OPTION-LIST has all option different from each other
-        (eq (length list-diff) n)
-        ;; OPTION-LIST has even number of elements
-        (eq (% (length option-list) 2) 0))))
+                              (memq (car temp-opt-list)
+                                    valid-options))))
+    (and elt-in-valid                   ; options are on VALID-OPTOPNS
+         ;; OPTION-LIST has all option different from each other
+         (eq (length list-diff) n)
+         ;; OPTION-LIST has even number of elements
+         (eq (% (length option-list) 2) 0))))
 
 (defun toolbarx-separate-options (group-list valid-options &optional check)
   "Return a cons cell with non-options and options of GROUP-LIST.
 The options-part is the largest tail of the list GROUP-LIST that
 has an element of VALID-OPTIONS (the comparation is made with
 `memq'.)  The non-options-part is the beginning of GROUP-LIST
-less its tail. Return a cons cell which `car' is the
+less its tail.  Return a cons cell which `car' is the
 non-options-part and the `cdr' is the options-part.
 
 If CHECK is non-nil, the tail is the largest that yield non-nil
 when applied to `toolbarx-good-option-list-p'."
   (let ((maximal)
-       (temp))
+        (temp))
     (dolist (i valid-options)
       (setq temp (memq i group-list))
       (when (and (> (length temp) (length maximal))
-                (if check
-                    (toolbarx-good-option-list-p temp valid-options)
-                  t))
-       (setq maximal (memq i group-list))))
+                 (if check
+                     (toolbarx-good-option-list-p temp valid-options)
+                   t))
+        (setq maximal (memq i group-list))))
     (cons (butlast group-list (length maximal)) maximal)))
 
 
@@ -225,33 +225,33 @@ INNER-PROPS is used.  The value of a property in ADD will 
be a
 list with first element the symbol `:add-value-list' and the rest
 are the properties, inner properties first."
   (let* ((merged)
-        (inner-prop)
-        (outer-prop))
+         (inner-prop)
+         (outer-prop))
     (dolist (prop override)
       (if (memq prop inner-props)
-         (setq merged (append merged
-                              (list prop (cadr (memq prop inner-props)))))
-       (when (memq prop outer-props)
-         (setq merged (append merged
-                              (list prop (cadr (memq prop outer-props))))))))
+          (setq merged (append merged
+                               (list prop (cadr (memq prop inner-props)))))
+        (when (memq prop outer-props)
+          (setq merged (append merged
+                               (list prop (cadr (memq prop outer-props))))))))
     (dolist (prop add merged)
       (setq inner-prop (memq prop inner-props))
       (when inner-prop
-       (if (and (listp (cadr inner-prop))
-                (eq (car (cadr inner-prop)) :add-value-list))
-           (setq inner-prop (cdr (cadr inner-prop)))
-         (setq inner-prop (list (cadr inner-prop)))))
+        (if (and (listp (cadr inner-prop))
+                 (eq (car (cadr inner-prop)) :add-value-list))
+            (setq inner-prop (cdr (cadr inner-prop)))
+          (setq inner-prop (list (cadr inner-prop)))))
       (setq outer-prop (memq prop outer-props))
       (when outer-prop
-       (if (and (listp (cadr outer-prop))
-                (eq (car (cadr outer-prop)) :add-value-list))
-           (setq outer-prop (cdr (cadr outer-prop)))
-         (setq outer-prop (list (cadr outer-prop)))))
+        (if (and (listp (cadr outer-prop))
+                 (eq (car (cadr outer-prop)) :add-value-list))
+            (setq outer-prop (cdr (cadr outer-prop)))
+          (setq outer-prop (list (cadr outer-prop)))))
       (when (append inner-prop outer-prop)
-       (setq merged (append merged
-                            (list prop (cons :add-value-list
-                                             (append inner-prop
-                                                     outer-prop)))))))))
+        (setq merged (append merged
+                             (list prop (cons :add-value-list
+                                              (append inner-prop
+                                                      outer-prop)))))))))
 
 (defun toolbarx-make-command (comm prep app)
   "Return a command made from COMM, PREP and APP.
@@ -261,16 +261,16 @@ beginning and end, respectively.  If both are nil and 
COMM is a
 command, COMM is returned."
   (let ((comm-is-command (commandp comm)))
     (if (and (not prep)
-            (not app)
-            comm-is-command)
-       comm
+             (not app)
+             comm-is-command)
+        comm
       (append '(lambda nil (interactive))
-             (when prep (list prep))
-             (when comm
-               (if comm-is-command
-                   `((call-interactively (function ,comm)))
-                 (list comm)))
-             (when app (list app))))))
+              (when prep (list prep))
+              (when comm
+                (if comm-is-command
+                    `((call-interactively (function ,comm)))
+                  (list comm)))
+              (when app (list app))))))
 
 ;; in Emacs, menus are made of keymaps (vectors are possible, but editors
 ;; handle `menu titles' differently) meanwhile in XEmacs, menus are lists of
@@ -284,65 +284,65 @@ inside Emacs. See documentation of that function for 
more."
   ;; making the menu keymap by adding each menu-item definition
   ;; see (info "(elisp)Menu keymaps")
   (let* ((keymap (make-sparse-keymap title))
-        (count 1)
-        (used-symbols '(nil))
-        (key)
-        (real-type (if (eq type 'toggle) 'toggle 'radio))
-        (real-save (when save (if (eq save 'offer) 'offer 'always))))
+         (count 1)
+         (used-symbols '(nil))
+         (key)
+         (real-type (if (eq type 'toggle) 'toggle 'radio))
+         (real-save (when save (if (eq save 'offer) 'offer 'always))))
     ;; warn if type is not `radio' ot `toggle'; use `radio' if incorrect.
     (unless (eq type real-type)
       (display-warning 'toolbarx
-                      (format (concat "TYPE should be symbols `radio' or "
-                                      "`toggle', but %s found; using `radio'")
-                              type)))
+                       (format (concat "TYPE should be symbols `radio' or "
+                                       "`toggle', but %s found; using `radio'")
+                               type)))
     ;; warn if save is not `nil', `offer' or `always'; use nil when incorrect
     (unless (eq save real-save)
       (setq real-save nil)
       (display-warning 'toolbarx
-                      (format (concat "SAVE should be symbols `nil', "
-                                      "`offer' or `always', but %s found; "
-                                      "using `nil'")
-                              save)))
+                       (format (concat "SAVE should be symbols `nil', "
+                                       "`offer' or `always', but %s found; "
+                                       "using `nil'")
+                               save)))
     (dolist (i strings)
       ;; finding a new symbol
       (let* ((aux-count 0)
-            (i-symb (toolbarx-make-symbol-from-string i)))
-       (setq key i-symb)
-       (while (memq key used-symbols)
-         (setq aux-count (1+ aux-count))
-         (setq key (intern (format "%s-%d" i-symb aux-count))))
-       (setq used-symbols (cons key used-symbols)))
+             (i-symb (toolbarx-make-symbol-from-string i)))
+        (setq key i-symb)
+        (while (memq key used-symbols)
+          (setq aux-count (1+ aux-count))
+          (setq key (intern (format "%s-%d" i-symb aux-count))))
+        (setq used-symbols (cons key used-symbols)))
       (define-key-after keymap (vector key)
-       `(menu-item ,i
-                   ,(append
-                     `(lambda nil (interactive)
-                        ,(if (eq real-type 'radio)
-                             `(setq ,var ,count)
-                           `(if (memq ,count ,var)
-                                (setq ,var (delete ,count ,var))
-                              (setq ,var (sort (cons ,count ,var) '<))))
-                        (toolbarx-refresh))
-                     (when (eq real-save 'always)
-                       `((customize-save-variable
-                          (quote ,var) ,var)))
-                     `(,var))
-                   :button ,(if (eq real-type 'radio)
-                                `(:radio eq ,var ,count)
-                              `(:toggle memq ,count ,var))))
+        `(menu-item ,i
+                    ,(append
+                      `(lambda nil (interactive)
+                         ,(if (eq real-type 'radio)
+                              `(setq ,var ,count)
+                            `(if (memq ,count ,var)
+                                 (setq ,var (delete ,count ,var))
+                               (setq ,var (sort (cons ,count ,var) '<))))
+                         (toolbarx-refresh))
+                      (when (eq real-save 'always)
+                        `((customize-save-variable
+                           (quote ,var) ,var)))
+                      `(,var))
+                    :button ,(if (eq real-type 'radio)
+                                 `(:radio eq ,var ,count)
+                               `(:toggle memq ,count ,var))))
       (setq count (1+ count)))
     (when (eq real-save 'offer)
       (define-key-after keymap [sep] '(menu-item "--shadow-etched-in-dash"))
       (let* ((aux-count 0)
-            (i-symb 'custom-save))
-       (setq key i-symb)
-       (while (memq key used-symbols)
-         (setq aux-count (1+ aux-count))
-         (setq key (intern (format "%s-%d" i-symb aux-count))))
-       (setq used-symbols (cons key used-symbols)))
+             (i-symb 'custom-save))
+        (setq key i-symb)
+        (while (memq key used-symbols)
+          (setq aux-count (1+ aux-count))
+          (setq key (intern (format "%s-%d" i-symb aux-count))))
+        (setq used-symbols (cons key used-symbols)))
       (define-key-after keymap (vector key)
-       `(menu-item "Save state of this menu"
-                   (lambda nil (interactive)
-                     (customize-save-variable (quote ,var) ,var)))))
+        `(menu-item "Save state of this menu"
+                    (lambda nil (interactive)
+                      (customize-save-variable (quote ,var) ,var)))))
     ;; returns a `lambda'-expression
     `(lambda nil (interactive) (popup-menu (quote ,keymap)))))
 
@@ -356,7 +356,7 @@ VAR is a symbol that is set when an item is clicked.  TYPE 
should
 be one of the symbols `radio' or `toggle': `radio' means that the
 nth item is selected if VAR is `n' and this item sets VAR to `n';
 `toggle' means that VAR should be a list of integers and the nth
-item is selected if `n' belongs to VAR.         The item inserts or
+item is selected if `n' belongs to VAR.  The item inserts or
 deletes `n' from VAR.
 
 TITLE is a string (the title of the popup menu) or nil for no
@@ -375,7 +375,7 @@ If OPT is vector and length is smaller than the necessary, 
then
 nil is returned."
   (if (vectorp opt)
       (when (> (length opt) 0)
-       (aref opt 0))
+        (aref opt 0))
     opt))
 
 (defun toolbarx-eval-function-or-symbol (object type-test-func)
@@ -386,21 +386,21 @@ cons cell in the same format as the return of this 
function.
 
 If OBJECT applied to TYPE-TEST-FUNC return (GOOD-OBJ . VAL), and
 GOOD-OBJ is non-nil, return that.  Else, check if OBJECT is a
-function.  If so, evaluate and test again with TYPE-TEST-FUNC. If
+function.  If so, evaluate and test again with TYPE-TEST-FUNC.  If
 not a function or if GOOD-OBJ is again nil, test if OBJECT is a
 bound symbol, evaluate that and return the result of
 TYPE-TEST-FUNC."
   (let* ((ret (funcall type-test-func object)))
     (unless (car ret)
       (if (functionp object)
-         (progn
-           (setq ret (funcall type-test-func (funcall object)))
-           (unless (car ret)
-             (when (and (symbolp object) (boundp object))
-               (setq ret (funcall type-test-func (symbol-value object))))))
-       ;; ok, obj is not function; try symbol
-       (when (and (symbolp object) (boundp object))
-         (setq ret (funcall type-test-func (symbol-value object))))))
+          (progn
+            (setq ret (funcall type-test-func (funcall object)))
+            (unless (car ret)
+              (when (and (symbolp object) (boundp object))
+                (setq ret (funcall type-test-func (symbol-value object))))))
+        ;; ok, obj is not function; try symbol
+        (when (and (symbolp object) (boundp object))
+          (setq ret (funcall type-test-func (symbol-value object))))))
     ret))
 
 (defun toolbarx-test-image-type (obj)
@@ -408,29 +408,29 @@ TYPE-TEST-FUNC."
 GOOD-OBJ is non-nil if OBJ yields a valid image object VAL (see
 documentation of function `toolbarx-process-symbol')."
   (let ((toolbarx-test-image-type-simple
-        (lambda (img)
-          (let* ((val (toolbarx-option-value img))
-                 (all-obj-ok t)
-                 (good-obj
-                  (or (stringp val)      ; string
-                      (and (consp val) ; or image descriptor
-                           (eq (car val) 'image))
-                      (and (symbolp val) ; or a symbol bound to a
-                           (boundp val)  ; image descriptor
-                                       ; (defined with `defimage')
-                           (consp (eval val))
-                           (eq (car (eval val)) 'image))
-                      (and (listp val) ; or list with 4 strings or
-                                       ; image descriptors
-                           (= (length val) 4)
-                           (dolist (i val all-obj-ok)
-                             (setq all-obj-ok
-                                   (and all-obj-ok
-                                        (or (stringp i)
-                                            (and (consp i)
-                                                 (eq (car i)
-                                                     'image))))))))))
-            (cons good-obj val)))))
+         (lambda (img)
+           (let* ((val (toolbarx-option-value img))
+                  (all-obj-ok t)
+                  (good-obj
+                   (or (stringp val)      ; string
+                       (and (consp val) ; or image descriptor
+                            (eq (car val) 'image))
+                       (and (symbolp val) ; or a symbol bound to a
+                            (boundp val)  ; image descriptor
+                                        ; (defined with `defimage')
+                            (consp (eval val))
+                            (eq (car (eval val)) 'image))
+                       (and (listp val) ; or list with 4 strings or
+                                        ; image descriptors
+                            (= (length val) 4)
+                            (dolist (i val all-obj-ok)
+                              (setq all-obj-ok
+                                    (and all-obj-ok
+                                         (or (stringp i)
+                                             (and (consp i)
+                                                  (eq (car i)
+                                                      'image))))))))))
+             (cons good-obj val)))))
     (toolbarx-eval-function-or-symbol obj toolbarx-test-image-type-simple)))
 
 (defun toolbarx-test-button-type (obj)
@@ -438,12 +438,12 @@ documentation of function `toolbarx-process-symbol')."
 GOOD-OBJ is non-nil if OBJ yields a valid button object VAL (see
 documentation of function `toolbarx-process-symbol')."
   (let ((toolbarx-test-button-type-simple
-        (lambda (but)
-          (let* ((val (toolbarx-option-value but))
-                 (good-obj
-                  (and (consp val)
-                       (memq (car val) '(:toggle :radio)))))
-            (cons good-obj val)))))
+         (lambda (but)
+           (let* ((val (toolbarx-option-value but))
+                  (good-obj
+                   (and (consp val)
+                        (memq (car val) '(:toggle :radio)))))
+             (cons good-obj val)))))
     (toolbarx-eval-function-or-symbol obj toolbarx-test-button-type-simple)))
 
 (defun toolbarx-test-any-type (obj)
@@ -457,11 +457,11 @@ OBJ, because it is a form anyway."
 GOOD-OBJ is non-nil if OBJ yields a valid help object VAL (see
 documentation of function `toolbarx-process-symbol')."
   (let ((toolbarx-test-string-or-nil-simple
-        (lambda (obj)
-          (let* ((val (toolbarx-option-value obj))
-                 (good-obj (or (stringp val)
-                               (not val))))
-            (cons good-obj val)))))
+         (lambda (obj)
+           (let* ((val (toolbarx-option-value obj))
+                  (good-obj (or (stringp val)
+                                (not val))))
+             (cons good-obj val)))))
     (toolbarx-eval-function-or-symbol obj toolbarx-test-string-or-nil-simple)))
 
 (defun toolbarx-test-toolbar-type (obj)
@@ -469,12 +469,12 @@ documentation of function `toolbarx-process-symbol')."
 GOOD-OBJ is non-nil if OBJ yields a valid toolbar property object
 VAL (see documentation of function `toolbarx-process-symbol')."
   (let ((toolbarx-test-toolbar-type-simple
-        (lambda (obj)
-          (let* ((val (toolbarx-option-value obj))
-                 (all-but-def-opts '(top bottom left right))
-                 (all-opts '(default top bottom left right))
-                 (good-obj t))
-            (cons good-obj val)))))
+         (lambda (obj)
+           (let* ((val (toolbarx-option-value obj))
+                  (all-but-def-opts '(top bottom left right))
+                  (all-opts '(default top bottom left right))
+                  (good-obj t))
+             (cons good-obj val)))))
     (toolbarx-eval-function-or-symbol obj toolbarx-test-toolbar-type-simple)))
 
 (defun toolbarx-test-dropdown-type (obj)
@@ -483,10 +483,10 @@ GOOD-OBJ is non-nil if OBJ yields a valid `:type' 
property object
 VAL of a dropdown group (see documentation of function
 `toolbarx-process-dropdown-group'."
   (let ((toolbarx-test-dropdown-type-simple
-        (lambda (obj)
-          (let* ((val (toolbarx-option-value obj))
-                 (good-obj (memq val '(radio toggle))))
-            (cons good-obj val)))))
+         (lambda (obj)
+           (let* ((val (toolbarx-option-value obj))
+                  (good-obj (memq val '(radio toggle))))
+             (cons good-obj val)))))
     (toolbarx-eval-function-or-symbol obj toolbarx-test-dropdown-type-simple)))
 
 (defun toolbarx-test-symbol (obj)
@@ -495,10 +495,10 @@ GOOD-OBJ is non-nil if OBJ yields a valid `:variable' 
property
 object VAL of a dropdown group (see documentation of function
 `toolbarx-process-dropdown-group'."
   (let ((toolbarx-test-symbol-simple
-        (lambda (obj)
-          (let* ((val (toolbarx-option-value obj))
-                 (good-obj (symbolp val)))
-            (cons good-obj val)))))
+         (lambda (obj)
+           (let* ((val (toolbarx-option-value obj))
+                  (good-obj (symbolp val)))
+             (cons good-obj val)))))
     (toolbarx-eval-function-or-symbol obj toolbarx-test-symbol-simple)))
 
 (defun toolbarx-test-dropdown-default (obj)
@@ -507,16 +507,16 @@ GOOD-OBJ is non-nil if OBJ yields a valid `:default' 
property
 object VAL of a dropdown group (see documentation of function
 `toolbarx-process-dropdown-group'."
   (let ((toolbarx-test-dropdown-default-simple
-        (lambda (obj)
-          (let* ((val (toolbarx-option-value obj))
-                 (good-obj (or (integerp val)
-                               (and (listp val)
-                                    (let ((ok t))
-                                      (dolist (i val ok)
-                                        (setq ok (and ok (integerp i)))))))))
-            (cons good-obj val)))))
+         (lambda (obj)
+           (let* ((val (toolbarx-option-value obj))
+                  (good-obj (or (integerp val)
+                                (and (listp val)
+                                     (let ((ok t))
+                                       (dolist (i val ok)
+                                         (setq ok (and ok (integerp i)))))))))
+             (cons good-obj val)))))
     (toolbarx-eval-function-or-symbol obj
-                                     toolbarx-test-dropdown-default-simple)))
+                                      toolbarx-test-dropdown-default-simple)))
 
 (defun toolbarx-test-dropdown-save (obj)
   "Return a cons cell (GOOD-OBJ . VAL).
@@ -524,35 +524,35 @@ GOOD-OBJ is non-nil if OBJ yields a valid `:save' property
 object VAL of a dropdown group (see documentation of function
 `toolbarx-process-dropdown-group'."
   (let ((toolbarx-test-dropdown-save-simple
-        (lambda (obj)
-          (let* ((val (toolbarx-option-value obj))
-                 (good-obj (memq val '(nil offer always))))
-            (cons good-obj val)))))
+         (lambda (obj)
+           (let* ((val (toolbarx-option-value obj))
+                  (good-obj (memq val '(nil offer always))))
+             (cons good-obj val)))))
     (toolbarx-eval-function-or-symbol obj toolbarx-test-dropdown-save-simple)))
 
 (defconst toolbarx-button-props
   (let* ((props-types-alist
-         '((:image           toolbarx-test-image-type)
-           (:command         toolbarx-test-any-type)
-           (:enable          toolbarx-test-any-type)
-           (:visible         toolbarx-test-any-type)
-           (:help            toolbarx-test-string-or-nil)
-           (:insert          toolbarx-test-any-type       . and)
-           (:toolbar         toolbarx-test-toolbar-type)
-           (:button          toolbarx-test-button-type)
-           (:append-command  toolbarx-test-any-type       . progn)
-           (:prepend-command toolbarx-test-any-type       . progn)))
-        (possible-props (nreverse (let* ((props ()))
-                                    (dolist (p props-types-alist props)
-                                      (setq props (cons (car p) props))))))
-        (props-override (nreverse (let* ((props ()))
-                                    (dolist (p props-types-alist props)
-                                      (unless (cddr p)
-                                        (setq props (cons (car p) props)))))))
-        (props-add (nreverse (let* ((props ()))
-                               (dolist (p props-types-alist props)
-                                 (when (cddr p)
-                                   (setq props (cons (car p) props))))))))
+          '((:image           toolbarx-test-image-type)
+            (:command         toolbarx-test-any-type)
+            (:enable          toolbarx-test-any-type)
+            (:visible         toolbarx-test-any-type)
+            (:help            toolbarx-test-string-or-nil)
+            (:insert          toolbarx-test-any-type       . and)
+            (:toolbar         toolbarx-test-toolbar-type)
+            (:button          toolbarx-test-button-type)
+            (:append-command  toolbarx-test-any-type       . progn)
+            (:prepend-command toolbarx-test-any-type       . progn)))
+         (possible-props (nreverse (let* ((props ()))
+                                     (dolist (p props-types-alist props)
+                                       (setq props (cons (car p) props))))))
+         (props-override (nreverse (let* ((props ()))
+                                     (dolist (p props-types-alist props)
+                                       (unless (cddr p)
+                                         (setq props (cons (car p) props)))))))
+         (props-add (nreverse (let* ((props ()))
+                                (dolist (p props-types-alist props)
+                                  (when (cddr p)
+                                    (setq props (cons (car p) props))))))))
     (list props-types-alist possible-props props-override props-add))
   "List yielding all encarnations of properties of a button.
 First element: alist, where each element is of form
@@ -564,30 +564,30 @@ Fourth, a list of lists, each in the format (PROP ADD).")
 (defconst toolbarx-dropdown-props
   ;; for naming dropdown properties see `Convention' in the doc string
   (let* ((props-types-alist
-         '((:type                     toolbarx-test-dropdown-type)
-           (:variable                 toolbarx-test-symbol)
-           (:default                  toolbarx-test-dropdown-default)
-           (:save                     toolbarx-test-dropdown-save)
-           (:title                    toolbarx-test-string-or-nil)
-           (:dropdown-image           toolbarx-test-image-type)
-           (:dropdown-enable          toolbarx-test-any-type)
-           (:dropdown-visible         toolbarx-test-any-type)
-           (:dropdown-insert          toolbarx-test-any-type       . and)
-           (:dropdown-help            toolbarx-test-string-or-nil)
-           (:dropdown-toolbar         toolbarx-test-toolbar-type)
-           (:dropdown-append-command  toolbarx-test-any-type       . progn)
-           (:dropdown-prepend-command toolbarx-test-any-type       . progn)))
-        (possible-props (nreverse (let* ((props ()))
-                                    (dolist (p props-types-alist props)
-                                      (setq props (cons (car p) props))))))
-        (props-override (nreverse (let* ((props ()))
-                                    (dolist (p props-types-alist props)
-                                      (unless (cddr p)
-                                        (setq props (cons (car p) props)))))))
-        (props-add (nreverse (let* ((props ()))
-                               (dolist (p props-types-alist props)
-                                 (when (cddr p)
-                                   (setq props (cons (car p) props))))))))
+          '((:type                     toolbarx-test-dropdown-type)
+            (:variable                 toolbarx-test-symbol)
+            (:default                  toolbarx-test-dropdown-default)
+            (:save                     toolbarx-test-dropdown-save)
+            (:title                    toolbarx-test-string-or-nil)
+            (:dropdown-image           toolbarx-test-image-type)
+            (:dropdown-enable          toolbarx-test-any-type)
+            (:dropdown-visible         toolbarx-test-any-type)
+            (:dropdown-insert          toolbarx-test-any-type       . and)
+            (:dropdown-help            toolbarx-test-string-or-nil)
+            (:dropdown-toolbar         toolbarx-test-toolbar-type)
+            (:dropdown-append-command  toolbarx-test-any-type       . progn)
+            (:dropdown-prepend-command toolbarx-test-any-type       . progn)))
+         (possible-props (nreverse (let* ((props ()))
+                                     (dolist (p props-types-alist props)
+                                       (setq props (cons (car p) props))))))
+         (props-override (nreverse (let* ((props ()))
+                                     (dolist (p props-types-alist props)
+                                       (unless (cddr p)
+                                         (setq props (cons (car p) props)))))))
+         (props-add (nreverse (let* ((props ()))
+                                (dolist (p props-types-alist props)
+                                  (when (cddr p)
+                                    (setq props (cons (car p) props))))))))
     (list props-types-alist possible-props props-override props-add))
   "List yielding all encarnations of properties of a dropdown group.
 First element: alist, where each element is of form
@@ -601,8 +601,8 @@ with the strings \":dropdown-\" with the button property 
name
 without `:'. This is used on the implementation.")
 
 (defun toolbarx-process-group-without-insert (group-without-props
-                                             merged-props-without-insert
-                                             meaning-alist switches)
+                                              merged-props-without-insert
+                                              meaning-alist switches)
   "Return an updated version of SWITCHES.
 GROUP-WITHOUT-PROPS and MERGED-PROPS-WITHOUT-INSERT are
 preprocessed variables in `toolbarx-process-group'."
@@ -610,15 +610,15 @@ preprocessed variables in `toolbarx-process-group'."
     (dolist (i group-without-props current-switches)
       (setq i (toolbarx-option-value i))
       (if (symbolp i)
-         (setq current-switches
-               (toolbarx-process-symbol i meaning-alist
-                                        merged-props-without-insert
-                                        current-switches))
-       (when (listp i)
-         (setq current-switches
-               (toolbarx-process-group i meaning-alist
-                                       merged-props-without-insert
-                                       current-switches)))))))
+          (setq current-switches
+                (toolbarx-process-symbol i meaning-alist
+                                         merged-props-without-insert
+                                         current-switches))
+        (when (listp i)
+          (setq current-switches
+                (toolbarx-process-group i meaning-alist
+                                        merged-props-without-insert
+                                        current-switches)))))))
 
 (defun toolbarx-process-group (group meaning-alist props switches)
   "Return an updated version of SWITCHES.
@@ -637,67 +637,67 @@ value, and after that a list in the same format as 
SWITCHES."
    ((eq (car group) :eval-group)
     (let ((current-switches switches))
       (dolist (elt (cdr group) current-switches)
-       (let ((eval-elt (eval elt)))
-         (setq current-switches
-               (toolbarx-process-group (if (listp eval-elt)
-                                           eval-elt
-                                         (list eval-elt))
-                                       meaning-alist props
-                                       current-switches))))))
+        (let ((eval-elt (eval elt)))
+          (setq current-switches
+                (toolbarx-process-group (if (listp eval-elt)
+                                            eval-elt
+                                          (list eval-elt))
+                                        meaning-alist props
+                                        current-switches))))))
    ;; if normal group
    (t
     (let* ((splited-props
-           (toolbarx-separate-options
-            group (append (nth 1 toolbarx-button-props)
-                          (nth 1 toolbarx-dropdown-props))))
-          (intern-props (cdr splited-props))
-          (group-without-props (car splited-props))
-          (merged-props
-           (toolbarx-merge-props intern-props props
-                                 (append (nth 2 toolbarx-button-props)
-                                         (nth 2 toolbarx-dropdown-props))
-                                 (append (nth 3 toolbarx-button-props)
-                                         (nth 3 toolbarx-dropdown-props)))))
+            (toolbarx-separate-options
+             group (append (nth 1 toolbarx-button-props)
+                           (nth 1 toolbarx-dropdown-props))))
+           (intern-props (cdr splited-props))
+           (group-without-props (car splited-props))
+           (merged-props
+            (toolbarx-merge-props intern-props props
+                                  (append (nth 2 toolbarx-button-props)
+                                          (nth 2 toolbarx-dropdown-props))
+                                  (append (nth 3 toolbarx-button-props)
+                                          (nth 3 toolbarx-dropdown-props)))))
       ;; check whether merged props have an `:insert'
       (if (memq :insert merged-props)
-         ;; if yes, prepend switches with a (:insert cond elements)
-         (let* ((memq-ins (memq :insert merged-props))
-                (ins-val (if (and (listp (cadr memq-ins))
-                                  (eq :add-value-list
-                                      (car (cadr memq-ins))))
-                             ;; if property is add-value property
-                             (let* ((p (assq
-                                        :insert
-                                        (nth 0 toolbarx-button-props)))
-                                    (add-list (list (cddr p)))
-                                    (prop-good-val))
-                               (dolist (val (cdr (cadr memq-ins)))
-                                 (setq prop-good-val (funcall (cadr p) val))
-                                 (when (car prop-good-val)
-                                   (setq add-list (cons (cdr prop-good-val)
-                                                        add-list))))
-                               ;; return: (nreverse add-list)
-                               (setq add-list (nreverse add-list))
-                               (if (eq 2 (length add-list))
-                                   (cadr add-list) ; just 1 value, no
-                                 add-list))        ; add-function
-                           ;; if property is not add-value
-                           (cadr memq-ins)))
-                (merged-props-without-insert
-                 (append (butlast merged-props (length memq-ins))
-                         (cddr memq-ins)))
-                (group-switches
-                 (toolbarx-process-group-without-insert
-                  group-without-props merged-props-without-insert
-                  meaning-alist nil)))
-           ;; return
-           (nreverse (cons (append (list :insert ins-val)
-                                   group-switches)
-                           (nreverse switches))))
-       ;; if not, just append what is processed to switches
-       (toolbarx-process-group-without-insert group-without-props
-                                              merged-props meaning-alist
-                                              switches))))))
+          ;; if yes, prepend switches with a (:insert cond elements)
+          (let* ((memq-ins (memq :insert merged-props))
+                 (ins-val (if (and (listp (cadr memq-ins))
+                                   (eq :add-value-list
+                                       (car (cadr memq-ins))))
+                              ;; if property is add-value property
+                              (let* ((p (assq
+                                         :insert
+                                         (nth 0 toolbarx-button-props)))
+                                     (add-list (list (cddr p)))
+                                     (prop-good-val))
+                                (dolist (val (cdr (cadr memq-ins)))
+                                  (setq prop-good-val (funcall (cadr p) val))
+                                  (when (car prop-good-val)
+                                    (setq add-list (cons (cdr prop-good-val)
+                                                         add-list))))
+                                ;; return: (nreverse add-list)
+                                (setq add-list (nreverse add-list))
+                                (if (eq 2 (length add-list))
+                                    (cadr add-list) ; just 1 value, no
+                                  add-list))        ; add-function
+                            ;; if property is not add-value
+                            (cadr memq-ins)))
+                 (merged-props-without-insert
+                  (append (butlast merged-props (length memq-ins))
+                          (cddr memq-ins)))
+                 (group-switches
+                  (toolbarx-process-group-without-insert
+                   group-without-props merged-props-without-insert
+                   meaning-alist nil)))
+            ;; return
+            (nreverse (cons (append (list :insert ins-val)
+                                    group-switches)
+                            (nreverse switches))))
+        ;; if not, just append what is processed to switches
+        (toolbarx-process-group-without-insert group-without-props
+                                               merged-props meaning-alist
+                                               switches))))))
 
 (defun toolbarx-process-symbol (symbol meaning-alist props switches)
   "Process a button given by SYMBOL in MEANING-ALIST.
@@ -705,7 +705,7 @@ The processed button is appended in SWITCHES, which is 
returned.
 Look for a association of SYMBOL in MEANING-ALIST for collecting
 properties.  Such association is a list that represents either a
 normal button (a description of the button) or an alias
-group (the symbol is an alias for a group of buttons). PROPS is
+group (the symbol is an alias for a group of buttons).  PROPS is
 a externel list of properties that are merged and then applied to
 the button.  Scope is given by GLOBAL-FLAG."
   ;; there are 3 situations: symbol is :new-line, there is an alias group
@@ -723,282 +723,282 @@ the button.  Scope is given by GLOBAL-FLAG."
       ;; properties need to be processed, that is, merge internal
       ;; and external (given by PROPS) properties
       (let* (;; button properties defined in `toolbarx-button-props'
-            (props-override    (nth 2 toolbarx-button-props))
-            (props-add         (nth 3 toolbarx-button-props))
-            ;; split considering also dropdown-group properties
-            (button-assq-split
-             (toolbarx-separate-options
-              button-assq
-              (append (nth 1 toolbarx-button-props)
-                      (nth 1 toolbarx-dropdown-props))))
-            (button-split-no-props (car button-assq-split))
-            (button-split-props (cdr button-assq-split))
-            ;; if there is no :image or :command in the props,
-            ;; try to get them from no-props part
-            (button-image-no-prop
-             (unless (memq :image button-split-props)
-               (when (> (length button-split-no-props) 0)
-                 (list :image (nth 0 button-split-no-props)))))
-            (button-command-no-prop
-             (unless (memq :command button-split-props)
-               (when (> (length button-split-no-props) 1)
-                 (list :command (nth 1 button-split-no-props)))))
-            (button-props (append button-split-props
-                                  button-image-no-prop
-                                  button-command-no-prop))
-            ;; merge props
-            (merged-props (toolbarx-merge-props button-props props
-                                                props-override
-                                                props-add)))
-       ;; return:
-       (nreverse (cons (cons symbol merged-props) (nreverse switches))))))))
+             (props-override    (nth 2 toolbarx-button-props))
+             (props-add         (nth 3 toolbarx-button-props))
+             ;; split considering also dropdown-group properties
+             (button-assq-split
+              (toolbarx-separate-options
+               button-assq
+               (append (nth 1 toolbarx-button-props)
+                       (nth 1 toolbarx-dropdown-props))))
+             (button-split-no-props (car button-assq-split))
+             (button-split-props (cdr button-assq-split))
+             ;; if there is no :image or :command in the props,
+             ;; try to get them from no-props part
+             (button-image-no-prop
+              (unless (memq :image button-split-props)
+                (when (> (length button-split-no-props) 0)
+                  (list :image (nth 0 button-split-no-props)))))
+             (button-command-no-prop
+              (unless (memq :command button-split-props)
+                (when (> (length button-split-no-props) 1)
+                  (list :command (nth 1 button-split-no-props)))))
+             (button-props (append button-split-props
+                                   button-image-no-prop
+                                   button-command-no-prop))
+             ;; merge props
+             (merged-props (toolbarx-merge-props button-props props
+                                                 props-override
+                                                 props-add)))
+        ;; return:
+        (nreverse (cons (cons symbol merged-props) (nreverse switches))))))))
 
 (defun toolbarx-process-dropdown-group (dropdown meaning-alist props switches)
   "Process buttons that appear according to dropdown menu.
 Process a dropdown group DROPDOWN with meaning alist
 MEANING-ALIST, external property list PROP and GLOBAL-FLAG
 specifying scope. For a complete description, see documentation
-of `toolbarx-install-toolbar'. The processed buttons are stored
+of `toolbarx-install-toolbar'.  The processed buttons are stored
 in the end of SWITCHES, which is returned."
   (let* ((dropdown-group (if (eq (car dropdown) :dropdown-group)
-                            (cdr dropdown)
-                          dropdown))
-        (dropdown-list-splited
-         (toolbarx-separate-options dropdown-group
-                                    (append
-                                     (nth 1 toolbarx-button-props)
-                                     (nth 1 toolbarx-dropdown-props))))
-        (dropdown-list  (car dropdown-list-splited))
-        (dropdown-props (cdr dropdown-list-splited))
-        (merged-props
-         (toolbarx-merge-props dropdown-props props
-                               (append (nth 2 toolbarx-button-props)
-                                       (nth 2 toolbarx-dropdown-props))
-                               (append (nth 3 toolbarx-button-props)
-                                       (nth 3 toolbarx-dropdown-props))))
-        (merged-props-button-only
-         (let* ((props-button-only)
-                (prop))
-           (dolist (p (nth 1 toolbarx-button-props) props-button-only)
-             (setq prop (memq p merged-props))
-             (when prop
-               (setq props-button-only
-                     (append (list p (cadr prop))
-                             props-button-only))))))
-        (merged-props-dropdown-only
-         (let* ((props-dropdown-only)
-                (prop))
-           (dolist (p (nth 1 toolbarx-dropdown-props) props-dropdown-only)
-             (setq prop (memq p merged-props))
-             (when prop
-               (setq props-dropdown-only
-                     (append (list p (cadr prop))
-                             props-dropdown-only))))))
-        ;; get value for each property and check type ONLY for props that do
-        ;; not concern the dropdown button, like `:type', `:save', etc. The
-        ;; props that concern the button are going to be handled in refresh
-        ;; time.
-        (filtered-dropdown-group-props-only
-         (let* ((filtered-props-temp)
-                (prop-good-val)
-                (prop))
-           (save-match-data
-             (dolist (p (nth 0 toolbarx-dropdown-props) filtered-props-temp)
-               (unless (string-match "^:dropdown-.*$"
-                                     (symbol-name (car p)))
-                 ;;    property           -> (car p)
-                 ;;    test type function -> (cadr p)
-                 (setq prop (memq (car p) merged-props-dropdown-only))
-                 ;; if so, check if value is of correct type
-                 (when prop
-                   (setq prop-good-val (funcall (cadr p) (cadr prop)))
-                   (if (car prop-good-val)
-                       (setq filtered-props-temp
-                             (append filtered-props-temp
-                                     (list (car p) (cdr prop-good-val))))
-                     (display-warning
-                      'toolbarx
-                      (format (concat "Wrong type for value in "
-                                      "property `%s' in dropdown group")
-                              (car p))))))))))
-        ;; properties for the dropdown button from dropdown merged properties
-        (dropdown-button-props
-         (let* ((props))
-           (save-match-data
-             (dolist (pr (nth 1 toolbarx-dropdown-props))
-               (when (and (memq pr merged-props-dropdown-only)
-                          (string-match "^:dropdown-\\(.*\\)$"
-                                        (symbol-name pr)))
-                 (let* ((new-pr (intern (concat ":"
-                                                (substring (symbol-name pr)
-                                                           (match-beginning 1)
-                                                           (match-end 1)))))
-                        (val (cadr (memq pr merged-props-dropdown-only))))
-                   (setq props (append (list new-pr val) props))))))
-           (unless (memq :image props)
-             (setq props (append (list :image "dropdown") props)))
-           props))
-        (dropdown-button-without-command
-         (cons 'dropdown dropdown-button-props))
-        ;; `:type' defaults to `radio'
-        (type (if (memq :type filtered-dropdown-group-props-only)
-                  (cadr (memq :type filtered-dropdown-group-props-only))
-                'radio))
-        ;; `:default' defaults to 1 or nil depending on `type'
-        ;; if type is toggle and default is not a list, but a
-        ;; integer, set as the list with integer
-        (default
-          (let* ((memq-default (memq :default
-                                     filtered-dropdown-group-props-only))
-                 (def-temp (cadr memq-default))
-                 (default-temp (if memq-default
-                                   def-temp
-                                 (if (eq type 'radio) 1 (list 1)))))
-            default-temp))
-        ;; `:save' defaults to nil and require `:variable'
-        (save (let* ((save-temp
-                      (when (memq :save filtered-dropdown-group-props-only)
-                        (cadr (memq :save
-                                    filtered-dropdown-group-props-only)))))
-                (if (and save-temp
-                         (not (memq :variable
-                                    filtered-dropdown-group-props-only)))
-                    (progn
-                      (display-warning
-                       'toolbarx
-                       (concat "`:save' property with non-nil value should "
-                               "be used only with the `:variable' property; "
-                               "using value nil for `:save'."))
-                      nil)
-                  save-temp)))
-        ;; `:title' defaults to nil
-        (title (when (memq :title filtered-dropdown-group-props-only)
-                 (cadr (memq :title filtered-dropdown-group-props-only))))
-        ;; the menu variable is buildt from the `:variable' option or
-        ;; make a symbol not used
-        (variable (if (memq :variable filtered-dropdown-group-props-only)
-                      (cadr (memq :variable
-                                  filtered-dropdown-group-props-only))
-                    (let* ((count 0)
-                           (symb (intern (format
-                                          "toolbarx-internal-menu-var-%d"
-                                          count))))
-                      (while (boundp symb)
-                        (setq count (1+ count))
-                        (setq symb
-                              (intern (format "toolbarx-internal-menu-var-%d"
-                                              count))))
-                      symb)))
-        ;; auxiliary variables
-        (list-strings)
-        (list-buttons))
+                             (cdr dropdown)
+                           dropdown))
+         (dropdown-list-splited
+          (toolbarx-separate-options dropdown-group
+                                     (append
+                                      (nth 1 toolbarx-button-props)
+                                      (nth 1 toolbarx-dropdown-props))))
+         (dropdown-list  (car dropdown-list-splited))
+         (dropdown-props (cdr dropdown-list-splited))
+         (merged-props
+          (toolbarx-merge-props dropdown-props props
+                                (append (nth 2 toolbarx-button-props)
+                                        (nth 2 toolbarx-dropdown-props))
+                                (append (nth 3 toolbarx-button-props)
+                                        (nth 3 toolbarx-dropdown-props))))
+         (merged-props-button-only
+          (let* ((props-button-only)
+                 (prop))
+            (dolist (p (nth 1 toolbarx-button-props) props-button-only)
+              (setq prop (memq p merged-props))
+              (when prop
+                (setq props-button-only
+                      (append (list p (cadr prop))
+                              props-button-only))))))
+         (merged-props-dropdown-only
+          (let* ((props-dropdown-only)
+                 (prop))
+            (dolist (p (nth 1 toolbarx-dropdown-props) props-dropdown-only)
+              (setq prop (memq p merged-props))
+              (when prop
+                (setq props-dropdown-only
+                      (append (list p (cadr prop))
+                              props-dropdown-only))))))
+         ;; get value for each property and check type ONLY for props that do
+         ;; not concern the dropdown button, like `:type', `:save', etc. The
+         ;; props that concern the button are going to be handled in refresh
+         ;; time.
+         (filtered-dropdown-group-props-only
+          (let* ((filtered-props-temp)
+                 (prop-good-val)
+                 (prop))
+            (save-match-data
+              (dolist (p (nth 0 toolbarx-dropdown-props) filtered-props-temp)
+                (unless (string-match "^:dropdown-.*$"
+                                      (symbol-name (car p)))
+                  ;;    property           -> (car p)
+                  ;;    test type function -> (cadr p)
+                  (setq prop (memq (car p) merged-props-dropdown-only))
+                  ;; if so, check if value is of correct type
+                  (when prop
+                    (setq prop-good-val (funcall (cadr p) (cadr prop)))
+                    (if (car prop-good-val)
+                        (setq filtered-props-temp
+                              (append filtered-props-temp
+                                      (list (car p) (cdr prop-good-val))))
+                      (display-warning
+                       'toolbarx
+                       (format (concat "Wrong type for value in "
+                                       "property `%s' in dropdown group")
+                               (car p))))))))))
+         ;; properties for the dropdown button from dropdown merged properties
+         (dropdown-button-props
+          (let* ((props))
+            (save-match-data
+              (dolist (pr (nth 1 toolbarx-dropdown-props))
+                (when (and (memq pr merged-props-dropdown-only)
+                           (string-match "^:dropdown-\\(.*\\)$"
+                                         (symbol-name pr)))
+                  (let* ((new-pr (intern (concat ":"
+                                                 (substring (symbol-name pr)
+                                                            (match-beginning 1)
+                                                            (match-end 1)))))
+                         (val (cadr (memq pr merged-props-dropdown-only))))
+                    (setq props (append (list new-pr val) props))))))
+            (unless (memq :image props)
+              (setq props (append (list :image "dropdown") props)))
+            props))
+         (dropdown-button-without-command
+          (cons 'dropdown dropdown-button-props))
+         ;; `:type' defaults to `radio'
+         (type (if (memq :type filtered-dropdown-group-props-only)
+                   (cadr (memq :type filtered-dropdown-group-props-only))
+                 'radio))
+         ;; `:default' defaults to 1 or nil depending on `type'
+         ;; if type is toggle and default is not a list, but a
+         ;; integer, set as the list with integer
+         (default
+           (let* ((memq-default (memq :default
+                                      filtered-dropdown-group-props-only))
+                  (def-temp (cadr memq-default))
+                  (default-temp (if memq-default
+                                    def-temp
+                                  (if (eq type 'radio) 1 (list 1)))))
+             default-temp))
+         ;; `:save' defaults to nil and require `:variable'
+         (save (let* ((save-temp
+                       (when (memq :save filtered-dropdown-group-props-only)
+                         (cadr (memq :save
+                                     filtered-dropdown-group-props-only)))))
+                 (if (and save-temp
+                          (not (memq :variable
+                                     filtered-dropdown-group-props-only)))
+                     (progn
+                       (display-warning
+                        'toolbarx
+                        (concat "`:save' property with non-nil value should "
+                                "be used only with the `:variable' property; "
+                                "using value nil for `:save'."))
+                       nil)
+                   save-temp)))
+         ;; `:title' defaults to nil
+         (title (when (memq :title filtered-dropdown-group-props-only)
+                  (cadr (memq :title filtered-dropdown-group-props-only))))
+         ;; the menu variable is buildt from the `:variable' option or
+         ;; make a symbol not used
+         (variable (if (memq :variable filtered-dropdown-group-props-only)
+                       (cadr (memq :variable
+                                   filtered-dropdown-group-props-only))
+                     (let* ((count 0)
+                            (symb (intern (format
+                                           "toolbarx-internal-menu-var-%d"
+                                           count))))
+                       (while (boundp symb)
+                         (setq count (1+ count))
+                         (setq symb
+                               (intern (format "toolbarx-internal-menu-var-%d"
+                                               count))))
+                       symb)))
+         ;; auxiliary variables
+         (list-strings)
+         (list-buttons))
     ;; setting `variable'
     (if save
-       (custom-declare-variable
-        variable default
-        "Used as variable of dropdown menu defined with `toolbarx'.")
+        (custom-declare-variable
+         variable default
+         "Used as variable of dropdown menu defined with `toolbarx'.")
       (when (not (boundp variable))
-       (set variable default)))
+        (set variable default)))
     ;; now check `variable' content
     (set variable
-        (let ((val (eval variable)))
-          (if (eq type 'toggle)
-              (if (listp val)
-                  val
-                (if (integerp val)
-                    (list val)
-                  (list 1)))
-            ;; then, type is radio
-            (if (integerp val)
-                val
-              (if (and val
-                       (listp val)
-                       (integerp (car val)))
-                  (car val)
-                1)))))
+         (let ((val (eval variable)))
+           (if (eq type 'toggle)
+               (if (listp val)
+                   val
+                 (if (integerp val)
+                     (list val)
+                   (list 1)))
+             ;; then, type is radio
+             (if (integerp val)
+                 val
+               (if (and val
+                        (listp val)
+                        (integerp (car val)))
+                   (car val)
+                 1)))))
     ;; === buiding `list-strings' and `list-buttons' ===
     ;; if only symbols, build `list-strings' and `list-buttons' from symbols
     (if (let ((only-symbols-flag t))
-         (dolist (i dropdown-list only-symbols-flag)
-           (setq only-symbols-flag (and only-symbols-flag (symbolp i)))))
-       (let ((count 0))
-         (dolist (i dropdown-list)
-           ;; list-strings and list-buttons are buildt reversed
-           (setq list-strings (cons (toolbarx-make-string-from-symbol i)
-                                    list-strings))
-           (setq count (1+ count))
-           (setq list-buttons (cons (list i
-                                          :insert
-                                          (if (eq type 'radio)
-                                              (list 'eq count variable)
-                                            (list 'memq count variable)))
-                                    list-buttons))))
+          (dolist (i dropdown-list only-symbols-flag)
+            (setq only-symbols-flag (and only-symbols-flag (symbolp i)))))
+        (let ((count 0))
+          (dolist (i dropdown-list)
+            ;; list-strings and list-buttons are buildt reversed
+            (setq list-strings (cons (toolbarx-make-string-from-symbol i)
+                                     list-strings))
+            (setq count (1+ count))
+            (setq list-buttons (cons (list i
+                                           :insert
+                                           (if (eq type 'radio)
+                                               (list 'eq count variable)
+                                             (list 'memq count variable)))
+                                     list-buttons))))
       ;; if not, the it must start with string
       (unless (stringp (car dropdown-list))
-       (error "%s %s %s"
-              "If not all itens on dropdown are symbols, then a string"
-              "must come before each set of buttons; no string found"
-              "in first position."))
+        (error "%s %s %s"
+               "If not all itens on dropdown are symbols, then a string"
+               "must come before each set of buttons; no string found"
+               "in first position."))
       (let ((count 0)
-           (elem)
-           (temp-list-buttons))
-       (while dropdown-list
-         (setq elem (car dropdown-list))
-         (setq dropdown-list (cdr dropdown-list))
-         (if (stringp elem)
-             ;; if string, output `temp-list-buttons' and prepair it again
-             (progn
-               ;; list-strings and list-buttons are buildt reversed
-               (setq list-strings (cons elem list-strings))
-               (when temp-list-buttons
-                 (setq list-buttons (cons (append (nreverse temp-list-buttons)
-                                                  (list :insert
-                                                        (if (eq type 'radio)
-                                                            (list 'eq count
-                                                                  variable)
-                                                          (list 'memq count
-                                                                variable))))
-                                          list-buttons)))
-               (setq temp-list-buttons nil)
-               (setq count (1+ count)))
-           ;; else, if not string, just insert it to `temp-list-buttons'
-           ;; which is also buildt reversed
-           (setq temp-list-buttons (cons elem temp-list-buttons))))
-       ;; output last temp list, left behind
-       (when temp-list-buttons
-         (setq list-buttons (cons (append (nreverse
-                                           temp-list-buttons)
-                                          (list
-                                           :insert (if (eq type 'radio)
-                                                       (list 'eq count
-                                                             variable)
-                                                     (list 'memq count
-                                                           variable))))
-                                  list-buttons)))))
+            (elem)
+            (temp-list-buttons))
+        (while dropdown-list
+          (setq elem (car dropdown-list))
+          (setq dropdown-list (cdr dropdown-list))
+          (if (stringp elem)
+              ;; if string, output `temp-list-buttons' and prepair it again
+              (progn
+                ;; list-strings and list-buttons are buildt reversed
+                (setq list-strings (cons elem list-strings))
+                (when temp-list-buttons
+                  (setq list-buttons (cons (append (nreverse temp-list-buttons)
+                                                   (list :insert
+                                                         (if (eq type 'radio)
+                                                             (list 'eq count
+                                                                   variable)
+                                                           (list 'memq count
+                                                                 variable))))
+                                           list-buttons)))
+                (setq temp-list-buttons nil)
+                (setq count (1+ count)))
+            ;; else, if not string, just insert it to `temp-list-buttons'
+            ;; which is also buildt reversed
+            (setq temp-list-buttons (cons elem temp-list-buttons))))
+        ;; output last temp list, left behind
+        (when temp-list-buttons
+          (setq list-buttons (cons (append (nreverse
+                                            temp-list-buttons)
+                                           (list
+                                            :insert (if (eq type 'radio)
+                                                        (list 'eq count
+                                                              variable)
+                                                      (list 'memq count
+                                                            variable))))
+                                   list-buttons)))))
     ;; lists were made reversed (elements inserted at the beginning)
     (setq list-strings (nreverse list-strings))
     (setq list-buttons (nreverse list-buttons))
     ;; now, pass `list-buttons' as a group to `toolbarx-process-group'
     (let ((current-switches switches))
       (setq current-switches
-           (toolbarx-process-group list-buttons meaning-alist
-                                   merged-props ; pass non-processed props
-                                   current-switches))
+            (toolbarx-process-group list-buttons meaning-alist
+                                    merged-props ; pass non-processed props
+                                    current-switches))
       (setq current-switches
-           ;; outputing dropdown button
-           (toolbarx-process-group (append dropdown-button-without-command
-                                           (list :command
-                                                 (toolbarx-mount-popup-menu
-                                                  list-strings variable type
-                                                  title save)))
-                                   meaning-alist merged-props-button-only
-                                   switches))
+            ;; outputing dropdown button
+            (toolbarx-process-group (append dropdown-button-without-command
+                                            (list :command
+                                                  (toolbarx-mount-popup-menu
+                                                   list-strings variable type
+                                                   title save)))
+                                    meaning-alist merged-props-button-only
+                                    switches))
       current-switches)))
 
 
 
 ;; Still functions `toolbarx-install-toolbar' and `toolbarx-refresh'to
-;; complete the parsing engine.         Since they interface with other 
engines,
+;; complete the parsing engine.  Since they interface with other engines,
 ;; they must come in the end.
 
 ;;; How a image is made, giving a string as (part of) file name.
@@ -1015,12 +1015,12 @@ an extension.  If the extension is omitted, `xpm', 
`xbm' and
   (let ((file))
     (dolist (i '("" ".xpm" ".xbm" ".pbm"))
       (unless file
-       (setq file (locate-library (concat image i) t toolbarx-image-path))))
+        (setq file (locate-library (concat image i) t toolbarx-image-path))))
     (if file
-       (create-image file)
+        (create-image file)
       (find-image `((:type xpm :file ,(concat image ".xpm"))
-                   (:type xbm :file ,(concat image ".xbm"))
-                   (:type pbm :file ,(concat image ".pbm")))))))
+                    (:type xbm :file ,(concat image ".xbm"))
+                    (:type pbm :file ,(concat image ".pbm")))))))
 
 ;; next variable interfaces between parsing and display engines
 (defvar toolbarx-internal-button-switches nil
@@ -1042,121 +1042,121 @@ the end of KEYMAP.
 
 BUTTON should be a list of form (SYMBOL . PROP-LIST).  SYMBOL is
 a symbol that \"names\" this button.  PROP-LIST is a list in the
-format (PROP VAL ... PROP VAL).         The supported properties are
+format (PROP VAL ... PROP VAL).  The supported properties are
 `:image', `:command', `:append-command', `:prepend-command',
 `:help', `:enable', `:visible', `:button', `:insert' and
 `:toolbar'. For a description of properties, see documentation of
 function `toolbar-install-toolbar'."
   (let* ((symbol (nth 0 button))
-        (used-keys-list (when used-keys
-                          (cdr used-keys)))
-        (filtered-props
-         (let* ((filtered-props-temp)
-                (prop-good-val)
-                (prop))
-           (dolist (p (nth 0 toolbarx-button-props) filtered-props-temp)
-             ;;    property           -> (car p)
-             ;;    test type function -> (cadr p)
-             ;;    add-function       -> (cddr p)
-             (setq prop (memq (car p) button))
-             ;; if so, check if value is of correct type
-             (when prop
-               ;; if property is of add-type, them the value is a list
-               ;; (:add-value-list VAL VAL). Each VAL should be checked.
-               (if (and (cddr p) (eq :add-value-list (car (cadr prop))))
-                   (let* ((add-list (list (cddr p))))
-                     (dolist (val (cdr (cadr prop)))
-                       (setq prop-good-val (funcall (cadr p) val))
-                       (when (car prop-good-val)
-                         (setq add-list (cons (cdr prop-good-val) add-list))))
-                     (setq add-list (nreverse add-list))
-                     (when (eq 2 (length add-list)) ; just 1 value, no
-                                       ; add-function
-                       (setq add-list (cadr add-list)))
-                     (setq filtered-props-temp (append
-                                                (list (car p) add-list)
-                                                filtered-props-temp)))
-                 ;; if override-property
-                 (setq prop-good-val (funcall (cadr p) (cadr prop)))
-                 (when (car prop-good-val)
-                   (setq filtered-props-temp (append
-                                              (list (car p)
-                                                    (cdr prop-good-val))
-                                              filtered-props-temp))))))))
-        (insert (or (not (memq :insert filtered-props))
-                    ;; (memq :insert filtered-props)
-                    (eval (nth 1 (memq :insert filtered-props))))))
+         (used-keys-list (when used-keys
+                           (cdr used-keys)))
+         (filtered-props
+          (let* ((filtered-props-temp)
+                 (prop-good-val)
+                 (prop))
+            (dolist (p (nth 0 toolbarx-button-props) filtered-props-temp)
+              ;;    property           -> (car p)
+              ;;    test type function -> (cadr p)
+              ;;    add-function       -> (cddr p)
+              (setq prop (memq (car p) button))
+              ;; if so, check if value is of correct type
+              (when prop
+                ;; if property is of add-type, them the value is a list
+                ;; (:add-value-list VAL VAL). Each VAL should be checked.
+                (if (and (cddr p) (eq :add-value-list (car (cadr prop))))
+                    (let* ((add-list (list (cddr p))))
+                      (dolist (val (cdr (cadr prop)))
+                        (setq prop-good-val (funcall (cadr p) val))
+                        (when (car prop-good-val)
+                          (setq add-list (cons (cdr prop-good-val) add-list))))
+                      (setq add-list (nreverse add-list))
+                      (when (eq 2 (length add-list)) ; just 1 value, no
+                                        ; add-function
+                        (setq add-list (cadr add-list)))
+                      (setq filtered-props-temp (append
+                                                 (list (car p) add-list)
+                                                 filtered-props-temp)))
+                  ;; if override-property
+                  (setq prop-good-val (funcall (cadr p) (cadr prop)))
+                  (when (car prop-good-val)
+                    (setq filtered-props-temp (append
+                                               (list (car p)
+                                                     (cdr prop-good-val))
+                                               filtered-props-temp))))))))
+         (insert (or (not (memq :insert filtered-props))
+                     ;; (memq :insert filtered-props)
+                     (eval (nth 1 (memq :insert filtered-props))))))
     (when insert
       (cond
        (t
-       ;; symbol is not :new-line, therefore a normal button
-       (let* ((image (cadr (memq :image filtered-props)))
-              (image-descriptor
-               (when (memq :image filtered-props)
-                 (cond
-                  ((stringp image)     ; string
-                   (toolbarx-find-image image))
-                  ((and (consp image)  ; or image descriptor
-                        (eq (car image) 'image))
-                   image)
-                  ((and (symbolp image) ; or a symbol bound to a
-                        (boundp image)  ; image descriptor (defined
-                                       ; with `defimage')g
-                        (consp (eval image))
-                        (eq (car (eval image)) 'image))
-                   (eval image))
-                  (t                   ; otherwise, must be a list
-                                       ; with 4 strings or image
-                                       ; descriptors
-                   (apply 'vector (mapcar (lambda (img)
-                                            (if (stringp img)
-                                                (toolbarx-find-image img)
-                                              img))
-                                          image))))))
-              (command
-               (let* ((com (nth 1 (memq :command filtered-props)))
-                      (app (nth 1 (memq :append-command filtered-props)))
-                      (prep (nth 1 (memq :prepend-command filtered-props))))
-                 (when (or com app prep)
-                   (toolbarx-make-command com prep app))))
-              (help (cons (memq :help filtered-props)
-                          (cadr (memq :help filtered-props))))
-              (enable (cons (memq :enable filtered-props)
-                            (cadr (memq :enable filtered-props))))
-              (visible (cons (memq :visible filtered-props)
-                             (cadr (memq :visible filtered-props))))
-              (button (cons (memq :button filtered-props)
-                            (cadr (memq :button filtered-props))))
-              (menuitem (append
-                         (list 'menu-item
-                               (toolbarx-make-string-from-symbol symbol)
-                               command
-                               :image image-descriptor)
-                         (when (car help)
-                           (list :help (cdr help)))
-                         (when (car enable)
-                           (list :enable (cdr enable)))
-                         (when (car visible)
-                           (list :visible (cdr visible)))
-                         (when (car button)
-                           (list :button (cdr button)))))
-              (key-not-used
-               (let* ((count 0)
-                      (symb symbol))
-                 (while (memq symb used-keys-list)
-                   (setq count (1+ count))
-                   (setq symb (intern (format "%s-%d" symbol count))))
-                 symb)))
-         (when (and image-descriptor command)
-           (setq used-keys-list (cons key-not-used used-keys-list))
-           (define-key-after keymap
-             (vector key-not-used) menuitem))))))
+        ;; symbol is not :new-line, therefore a normal button
+        (let* ((image (cadr (memq :image filtered-props)))
+               (image-descriptor
+                (when (memq :image filtered-props)
+                  (cond
+                   ((stringp image)     ; string
+                    (toolbarx-find-image image))
+                   ((and (consp image)  ; or image descriptor
+                         (eq (car image) 'image))
+                    image)
+                   ((and (symbolp image) ; or a symbol bound to a
+                         (boundp image)  ; image descriptor (defined
+                                        ; with `defimage')g
+                         (consp (eval image))
+                         (eq (car (eval image)) 'image))
+                    (eval image))
+                   (t                   ; otherwise, must be a list
+                                        ; with 4 strings or image
+                                        ; descriptors
+                    (apply 'vector (mapcar (lambda (img)
+                                             (if (stringp img)
+                                                 (toolbarx-find-image img)
+                                               img))
+                                           image))))))
+               (command
+                (let* ((com (nth 1 (memq :command filtered-props)))
+                       (app (nth 1 (memq :append-command filtered-props)))
+                       (prep (nth 1 (memq :prepend-command filtered-props))))
+                  (when (or com app prep)
+                    (toolbarx-make-command com prep app))))
+               (help (cons (memq :help filtered-props)
+                           (cadr (memq :help filtered-props))))
+               (enable (cons (memq :enable filtered-props)
+                             (cadr (memq :enable filtered-props))))
+               (visible (cons (memq :visible filtered-props)
+                              (cadr (memq :visible filtered-props))))
+               (button (cons (memq :button filtered-props)
+                             (cadr (memq :button filtered-props))))
+               (menuitem (append
+                          (list 'menu-item
+                                (toolbarx-make-string-from-symbol symbol)
+                                command
+                                :image image-descriptor)
+                          (when (car help)
+                            (list :help (cdr help)))
+                          (when (car enable)
+                            (list :enable (cdr enable)))
+                          (when (car visible)
+                            (list :visible (cdr visible)))
+                          (when (car button)
+                            (list :button (cdr button)))))
+               (key-not-used
+                (let* ((count 0)
+                       (symb symbol))
+                  (while (memq symb used-keys-list)
+                    (setq count (1+ count))
+                    (setq symb (intern (format "%s-%d" symbol count))))
+                  symb)))
+          (when (and image-descriptor command)
+            (setq used-keys-list (cons key-not-used used-keys-list))
+            (define-key-after keymap
+              (vector key-not-used) menuitem))))))
     (when used-keys (setcdr used-keys used-keys-list))))
 
 
 (defun toolbarx-emacs-refresh-process-button-or-insert-list (switches
-                                                            used-keys
-                                                            keymap)
+                                                             used-keys
+                                                             keymap)
   "Process SWITCHES, inserting buttons in `tool-bar-map'.
 If a button is actually a `:insert' clause group (if `car' is
 `:insert') and evaluation of `cdr' yields non-nil, process `cddr'
@@ -1165,10 +1165,10 @@ recursively as SWITCHES.  USED-KEYS is a list which 
`car' is
 been used as keys in the keymap `tool-bar-map'."
   (dolist (button switches)
     (if (eq (car button) :insert)
-       (when (eval (cadr button))
-         (toolbarx-emacs-refresh-process-button-or-insert-list (cddr button)
-                                                               used-keys
-                                                               keymap))
+        (when (eval (cadr button))
+          (toolbarx-emacs-refresh-process-button-or-insert-list (cddr button)
+                                                                used-keys
+                                                                keymap))
       (toolbarx-emacs-add-button button used-keys keymap))))
 
 
@@ -1178,16 +1178,16 @@ been used as keys in the keymap `tool-bar-map'."
 If GLOBAL-FLAG is non-nil, the default value of toolbar switches
 is used and the default value of `toolbarx-map' is changed."
   (let* ((switches (if global-flag
-                      (if (default-boundp 'toolbarx-internal-button-switches)
-                          (default-value 'toolbarx-internal-button-switches)
-                        toolbarx-internal-button-switches)
-                    toolbarx-internal-button-switches))
-        (used-keys (list :used-symbols nil))
-        (tool-bar-map-temp (make-sparse-keymap)))
+                       (if (default-boundp 'toolbarx-internal-button-switches)
+                           (default-value 'toolbarx-internal-button-switches)
+                         toolbarx-internal-button-switches)
+                     toolbarx-internal-button-switches))
+         (used-keys (list :used-symbols nil))
+         (tool-bar-map-temp (make-sparse-keymap)))
     (toolbarx-emacs-refresh-process-button-or-insert-list switches used-keys
-                                                         tool-bar-map-temp)
+                                                          tool-bar-map-temp)
     (if global-flag
-       (setq-default tool-bar-map tool-bar-map-temp)
+        (setq-default tool-bar-map tool-bar-map-temp)
       (setq tool-bar-map tool-bar-map-temp))))
 
 
@@ -1245,7 +1245,7 @@ and the cdr shall be processed as a group.
 
 However, a symbol is not required to have an association in
 MEANING-ALIST, which is only a way to specify properties to a
-button.         One can use groups to specify properties.  Nil is a good
+button.  One can use groups to specify properties.  Nil is a good
 MEANING-ALIST.
 
 Buttons
@@ -1363,7 +1363,7 @@ For each property PROP, its value should be either:
       and the return should be ot type i) or ii) above
   iv) a symbol bound to a element of type i) or ii).
 
-The type is cheched in the order i), ii) iii) and iv). This
+The type is cheched in the order i), ii) iii) and iv).  This
 evaluations are done every time that the oolbar is refresh.
 
 Ps.: in order to specify a vector as value of a property (like
@@ -1378,7 +1378,7 @@ Eval groups
 
 If the first element of a group is the symbol `:eval-group', each
 element is evaluated (with `eval'), put inside a list and
-processed like a group.         Eval groups are useful to store
+processed like a group.  Eval groups are useful to store
 definition of buttons in a variable.
 
 Dropdown groups
@@ -1398,7 +1398,7 @@ or
   (:dropdown-group
      STRING-1 ITEM-11 ... ITEM-1n
      STRING-2 ITEM-21 ... ITEM-2m
-          . . .
+           . . .
      STRING-n ITEM-n1 ... ITEM-np
        PROP-1 VAL-1 ... PROP-j VAL-j)
 where
@@ -1411,7 +1411,7 @@ second by making strings from the symbols and each symbol 
is the
 item)
 
 The same rules for obtaining property values, described above,
-apply here.  Properties are also distributed by groups.         The
+apply here.  Properties are also distributed by groups.  The
 supported properties and their basic type are:
 
  :type -- one of the symbols `radio' (default) or `toggle'; if
@@ -1431,11 +1431,11 @@ supported properties and their basic type are:
 
  :save -- one of the symbols nil (default), `offer' or
    `always'; determined if it is possible for the user to save
-   the which menu itens are active, for a next session.         If value
+   the which menu itens are active, for a next session.  If value
    is `offer', a item (offering to save) is added to the
-   popup menu. If the value is `always', every time that a item
-   is selected, the variable is saved. If value is nil, variable
-   shall not be saved. If value is non-nil then `:variable' is
+   popup menu.  If the value is `always', every time that a item
+   is selected, the variable is saved.  If value is nil, variable
+   shall not be saved.  If value is non-nil then `:variable' is
    mandatory.
 
  :title -- a string or nil; if a string, the popup menu will show
@@ -1483,10 +1483,10 @@ line of buttons.  The only property supported for this 
button is
 this button is ignored."
   (let ((switches (toolbarx-process-group buttons meaning-alist nil nil)))
     (if global-flag
-       (setq-default toolbarx-internal-button-switches
-                     switches)
+        (setq-default toolbarx-internal-button-switches
+                      switches)
       (set (make-local-variable 'toolbarx-internal-button-switches)
-          switches)
+           switches)
       (make-local-variable 'tool-bar-map)))
   (toolbarx-refresh global-flag))
 
@@ -1498,145 +1498,145 @@ this button is ignored."
      :image ["new" toolbar-file-icon]
      :command [find-file toolbar-open]
      :enable [(not (window-minibuffer-p
-                   (frame-selected-window menu-updating-frame)))
-             t]
+                    (frame-selected-window menu-updating-frame)))
+              t]
      :help ["Specify a new file's name, to edit the file" "Visit new file"])
 
     (open-file :image ["open" toolbar-file-icon]
-               :command [menu-find-file-existing toolbar-open]
-               :enable [(not (window-minibuffer-p
-                              (frame-selected-window menu-updating-frame)))
-                        t]
-               :help ["Read a file into an Emacs buffer" "Open a file"])
+               :command [menu-find-file-existing toolbar-open]
+               :enable [(not (window-minibuffer-p
+                              (frame-selected-window menu-updating-frame)))
+                        t]
+               :help ["Read a file into an Emacs buffer" "Open a file"])
 
     (dired :image ["diropen"
-                  toolbar-folder-icon]
-          :command [dired toolbar-dired]
-          :help ["Read a directory, operate on its files" "Edit a directory"])
+                   toolbar-folder-icon]
+           :command [dired toolbar-dired]
+           :help ["Read a directory, operate on its files" "Edit a directory"])
 
     (save-buffer :image ["save" toolbar-disk-icon]
-                :command [save-buffer toolbar-save]
-                :enable [(and
-                          (buffer-modified-p)
-                          (buffer-file-name)
-                          (not (window-minibuffer-p
-                                (frame-selected-window menu-updating-frame))))
-                         t]
-                :help ["Save current buffer to its file"  "Save buffer"]
-                :visible (or buffer-file-name
-                             (not (eq 'special
-                                      (get major-mode 'mode-class)))))
+                 :command [save-buffer toolbar-save]
+                 :enable [(and
+                           (buffer-modified-p)
+                           (buffer-file-name)
+                           (not (window-minibuffer-p
+                                 (frame-selected-window menu-updating-frame))))
+                          t]
+                 :help ["Save current buffer to its file"  "Save buffer"]
+                 :visible (or buffer-file-name
+                              (not (eq 'special
+                                       (get major-mode 'mode-class)))))
 
     ;; Emacs only
     (write-file :image "saveas"
-               :command write-file
-               :enable (not
-                        (window-minibuffer-p
-                         (frame-selected-window menu-updating-frame)))
-               :insert [t nil]
-               :help "Write current buffer to another file"
-               :visible (or buffer-file-name
-                            (not (eq 'special (get major-mode 'mode-class)))))
+                :command write-file
+                :enable (not
+                         (window-minibuffer-p
+                          (frame-selected-window menu-updating-frame)))
+                :insert [t nil]
+                :help "Write current buffer to another file"
+                :visible (or buffer-file-name
+                             (not (eq 'special (get major-mode 'mode-class)))))
 
     (undo :image ["undo" toolbar-undo-icon]
-         :command [undo toolbar-undo]
-         :enable [(and (not buffer-read-only)
-                       (not (eq t buffer-undo-list))
-                       (if (eq last-command 'undo)
-                           pending-undo-list
-                         (consp buffer-undo-list)))
-                  t]
-         :help ["Undo last operation" "Undo edit"]
-         :visible (not (eq 'special (get major-mode 'mode-class))))
+          :command [undo toolbar-undo]
+          :enable [(and (not buffer-read-only)
+                        (not (eq t buffer-undo-list))
+                        (if (eq last-command 'undo)
+                            pending-undo-list
+                          (consp buffer-undo-list)))
+                   t]
+          :help ["Undo last operation" "Undo edit"]
+          :visible (not (eq 'special (get major-mode 'mode-class))))
 
     (cut :image ["cut" toolbar-cut-icon]
-        :help ["Delete text in region and copy it to the clipboard"
-               "Kill region"]
-        :command [clipboard-kill-region toolbar-cut]
-        :visible (not (eq 'special (get major-mode 'mode-class))))
+         :help ["Delete text in region and copy it to the clipboard"
+                "Kill region"]
+         :command [clipboard-kill-region toolbar-cut]
+         :visible (not (eq 'special (get major-mode 'mode-class))))
 
     (copy :image ["copy" toolbar-copy-icon]
-         :help ["Copy text in region to the clipboard" "Copy region"]
-         :command [clipboard-kill-ring-save toolbar-copy])
+          :help ["Copy text in region to the clipboard" "Copy region"]
+          :command [clipboard-kill-ring-save toolbar-copy])
 
     (paste :image ["paste" toolbar-paste-icon]
-          :help ["Paste text from clipboard" "Paste from clipboard"]
-          :command [clipboard-yank toolbar-paste]
-          :visible (not (eq 'special (get major-mode 'mode-class))))
+           :help ["Paste text from clipboard" "Paste from clipboard"]
+           :command [clipboard-yank toolbar-paste]
+           :visible (not (eq 'special (get major-mode 'mode-class))))
 
     ;; Emacs only
     (search-forward :command nonincremental-search-forward
-                   :help "Search forward for a string"
-                   :image "search"
-                   :insert [t nil])
+                    :help "Search forward for a string"
+                    :image "search"
+                    :insert [t nil])
 
     (search-replace
      :image ["search-replace" toolbar-replace-icon]
      :command [query-replace toolbar-replace]
      :help ["Replace string interactively, ask about each occurrence"
-           "Search & Replace"])
+            "Search & Replace"])
 
     (print-buffer :image ["print" toolbar-printer-icon]
-                 :command [print-buffer toolbar-print]
-                 :help ["Print current buffer with page headings"
-                        "Print buffer"])
+                  :command [print-buffer toolbar-print]
+                  :help ["Print current buffer with page headings"
+                         "Print buffer"])
 
     ;; Emacs only
     (customize :image "preferences"
-              :command customize
-              :help "Edit preferences (customize)"
-              :insert [t nil])
+               :command customize
+               :help "Edit preferences (customize)"
+               :insert [t nil])
 
     ;; Emacs only
     (help :image "help"
-         :command (lambda () (interactive) (popup-menu menu-bar-help-menu))
-         :help "Pop up the Help menu"
-         :insert [t nil])
+          :command (lambda () (interactive) (popup-menu menu-bar-help-menu))
+          :help "Pop up the Help menu"
+          :insert [t nil])
 
     ;; Emacs only
     (kill-buffer :command kill-this-buffer
-                :enable (kill-this-buffer-enabled-p)
-                :help "Discard current buffer"
-                :image "close"
-                :insert [t nil])
+                 :enable (kill-this-buffer-enabled-p)
+                 :help "Discard current buffer"
+                 :image "close"
+                 :insert [t nil])
 
     ;; Emacs only
     (exit-emacs :image "exit"
-               :command save-buffers-kill-emacs
-               :help "Offer to save unsaved buffers, then exit Emacs"
-               :insert [t nil])
+                :command save-buffers-kill-emacs
+                :help "Offer to save unsaved buffers, then exit Emacs"
+                :insert [t nil])
 
     (spell-buffer :image ["spell" toolbar-spell-icon]
-                 :command [ispell-buffer toolbar-ispell]
-                 :help ["Check spelling of selected buffer" "Check spelling"])
+                  :command [ispell-buffer toolbar-ispell]
+                  :help ["Check spelling of selected buffer" "Check spelling"])
 
     (info :image ["info" toolbar-info-icon]
-         :command [info toolbar-info]
-         :help ["Enter Info, the documentation browser" "Info documentation"])
+          :command [info toolbar-info]
+          :help ["Enter Info, the documentation browser" "Info documentation"])
 
     ;; XEmacs only
     (mail :image toolbar-mail-icon
-         :command toolbar-mail
-         :help "Read mail"
-         :insert [nil t])
+          :command toolbar-mail
+          :help "Read mail"
+          :insert [nil t])
 
     ;; XEmacs only
     (compile :image toolbar-compile-icon
-            :command toolbar-compile
-            :help "Start a compilation"
-            :insert [nil t])
+             :command toolbar-compile
+             :help "Start a compilation"
+             :insert [nil t])
 
     ;; XEmacs only
     (debug :image toolbar-debug-icon
-          :command toolbar-debug
-          :help "Start a debugger"
-          :insert [nil t])
+           :command toolbar-debug
+           :help "Start a debugger"
+           :insert [nil t])
 
     ;; XEmacs only
     (news :image toolbar-news-icon
-         :command toolbar-news
-         :help "Read news"
-         :insert [nil t]))
+          :command toolbar-news
+          :help "Read news"
+          :insert [nil t]))
   "A meaning alist with definition of the default buttons.
 The following buttons are available:
 



reply via email to

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