auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 700839defdcffb7144f4a


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 700839defdcffb7144f4ac26885a70c354fcd603
Date: Tue, 29 Dec 2020 12:09:43 -0500 (EST)

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

The branch, master has been updated
       via  700839defdcffb7144f4ac26885a70c354fcd603 (commit)
      from  c8d5756b03790d630b42dc9b179b748d2c12aed9 (commit)

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

- Log -----------------------------------------------------------------
commit 700839defdcffb7144f4ac26885a70c354fcd603
Author: Tassilo Horn <tsdh@gnu.org>
Date:   Tue Dec 29 18:01:02 2020 +0100

    Convert tabs to spaces in all lisp files according to .dir-locals.el

diff --git a/.dir-locals.el b/.dir-locals.el
index c507fe7..58cf88a 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -2,17 +2,17 @@
 ;;; 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)))
+         (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)))
+                     (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)))
+                     (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))))
+                  (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 2aa99a1..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 additional-indent)
+        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,47 +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)
-          ;; 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)))))
+           ;; 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
@@ -754,48 +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)
-              ;; 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))))))
+        (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))
@@ -812,36 +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))
     ;; 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)))
+                    (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'.
@@ -853,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.
 
@@ -900,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."
@@ -925,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
@@ -948,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")
@@ -973,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
@@ -1033,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:"
@@ -1052,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'
@@ -1068,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
@@ -1092,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)
 
@@ -1115,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
@@ -1168,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)
@@ -1180,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")
@@ -1198,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)
@@ -1262,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))
@@ -1271,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)
@@ -1331,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)
@@ -1354,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)
@@ -1366,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
@@ -1378,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)
@@ -1386,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)
@@ -1439,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)))
 
@@ -1452,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 ()
@@ -1520,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.
@@ -1562,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)))))
 
@@ -1632,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.")
@@ -1692,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)))
@@ -1734,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)
 
@@ -1766,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
@@ -1813,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.
@@ -1838,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)
@@ -1850,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)
 
@@ -2029,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"
@@ -2094,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)
@@ -2109,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)
@@ -2124,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)))
 
@@ -2138,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)))
 
@@ -2149,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)
@@ -2162,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))
@@ -2177,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)))
 
@@ -2199,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.
@@ -2306,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
@@ -2356,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)
@@ -2421,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)
@@ -2442,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)
@@ -2467,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)
@@ -2479,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 ()
@@ -2491,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")
@@ -2502,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)
@@ -2523,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.
@@ -2539,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))
@@ -2587,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
@@ -2616,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'.
@@ -2637,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)
@@ -2648,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)
@@ -2659,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"
@@ -2676,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)
@@ -2687,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)
@@ -2697,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 ?|
@@ -2712,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)))
 
@@ -2730,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"
@@ -2761,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.
@@ -2796,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.")
@@ -2847,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)
@@ -2871,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.
@@ -2895,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)
@@ -2973,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.
@@ -3007,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"
@@ -3028,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.
@@ -3037,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)
@@ -3148,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.
@@ -3169,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
@@ -3319,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."
@@ -3336,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."
@@ -3367,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
@@ -3385,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)
@@ -3460,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
@@ -3524,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.
@@ -3553,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
@@ -3572,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.
@@ -3661,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)))
 
@@ -3691,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)))
 
 
@@ -3715,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
@@ -3757,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
@@ -3841,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))
 
@@ -3854,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))
@@ -3864,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))
 
@@ -3881,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))
@@ -4010,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
@@ -4040,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
@@ -4197,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.
@@ -4209,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
@@ -4230,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.
@@ -4401,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 "")))
 
@@ -4434,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 ()
@@ -4471,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.
@@ -4524,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."
@@ -4533,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.
@@ -4546,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))
@@ -4592,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)
 
@@ -4612,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.")
@@ -4621,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.
@@ -4650,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
@@ -4675,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.
@@ -4704,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.
@@ -4774,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)))
 
 
@@ -4804,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 ()
@@ -5364,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))))
@@ -5448,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)
@@ -5497,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
@@ -5517,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))))
@@ -5539,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
@@ -5587,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)
@@ -5627,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)
 
@@ -5659,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)
@@ -5681,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.
@@ -5694,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.
@@ -5736,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)
@@ -5754,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.
@@ -5787,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
@@ -5888,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
@@ -5933,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.
@@ -5954,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)
@@ -6083,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
@@ -6127,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))
@@ -6162,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 $."
@@ -6205,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)
@@ -6213,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)
@@ -6310,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")
@@ -6354,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")
@@ -6366,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")
@@ -6393,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"
@@ -6447,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)
@@ -6725,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
@@ -6757,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)
@@ -6769,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.
@@ -6805,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':
@@ -6816,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
@@ -6839,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))
 
@@ -6891,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."
@@ -6908,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:
 
@@ -6945,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)
@@ -6979,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/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