auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 93430d7ab0 48/48: Merge remote-tracking branch '


From: Tassilo Horn
Subject: [elpa] externals/auctex 93430d7ab0 48/48: Merge remote-tracking branch 'origin/master' into externals/auctex
Date: Fri, 18 Nov 2022 14:27:46 -0500 (EST)

branch: externals/auctex
commit 93430d7ab0de430d336c199558e217739062c176
Merge: c569c7d486 6cbeff713b
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>

    Merge remote-tracking branch 'origin/master' into externals/auctex
---
 context-en.el                  |   5 +-
 context-nl.el                  |   5 +-
 context.el                     |  25 +-
 doc/auctex.texi                |  52 +++-
 doc/changes.texi               |  15 +
 font-latex.el                  |   2 +-
 latex.el                       | 669 ++++++++++++++++++++++++++++++++++++++---
 style/MyriadPro.el             |   8 +-
 style/XCharter.el              | 116 +++++--
 style/afterpage.el             |  18 +-
 style/amsthm.el                |   4 +-
 style/arabxetex.el             |  16 +-
 style/babel.el                 |  37 +--
 style/biblatex.el              |  20 +-
 style/bigdelim.el              |  33 +-
 style/caption.el               |  28 +-
 style/changes.el               |  10 +-
 style/csquotes.el              |  24 +-
 style/currvita.el              |  51 +---
 style/doc.el                   |  19 +-
 style/enumitem.el              | 236 +++++++--------
 style/environ.el               |   4 +-
 style/etoolbox.el              |  13 +-
 style/exam.el                  |  64 +---
 style/fancyhdr.el              |  62 ++--
 style/fancyvrb.el              |  44 +--
 style/floatrow.el              |  36 +--
 style/fontaxes.el              |  26 +-
 style/fontspec.el              |  17 +-
 style/footmisc.el              |  43 ++-
 style/graphicx.el              |  52 ++--
 style/harvard.el               |  17 +-
 style/hologo.el                |  12 +-
 style/ifthen.el                |   4 +-
 style/imakeidx.el              |  23 +-
 style/l3doc.el                 |  12 +-
 style/ltugboat.el              |  18 +-
 style/ltxdoc.el                |   4 +-
 style/makeidx.el               |  17 +-
 style/mathtools.el             |  16 +-
 style/mdframed.el              |  31 +-
 style/menukeys.el              | 128 +++-----
 style/metalogo.el              |  10 +-
 style/multind.el               |  20 +-
 style/multirow.el              |  20 +-
 style/natbib.el                |  10 +-
 style/newfloat.el              |  12 +-
 style/ntheorem.el              |  51 ++--
 style/paracol.el               |  24 +-
 style/polyglossia.el           |   7 +-
 style/pythontex.el             | 139 +++------
 style/siunitx.el               |  14 +-
 style/splitidx.el              |  32 +-
 style/subcaption.el            |  50 +--
 style/tcolorbox.el             |  77 +++--
 style/tcolorboxlib-raster.el   | 101 ++-----
 style/tcolorboxlib-theorems.el |  50 ++-
 style/tex-live.el              |  45 ++-
 style/textpos.el               |  42 ++-
 style/theorem.el               | 117 +++----
 style/thm-restate.el           |  93 +++---
 style/thmtools.el              | 196 ++++++------
 style/tikz.el                  |  71 ++++-
 style/titleps.el               |  34 +--
 style/titlesec.el              |  91 +++---
 style/titletoc.el              |  24 +-
 style/ulem.el                  |  56 +---
 style/url.el                   |  19 +-
 style/wrapfig.el               |  98 ++----
 style/xcolor.el                |  86 ++----
 style/xr-hyper.el              |   6 +-
 style/xspace.el                |   9 +-
 tex-bar.el                     |  18 +-
 tex.el                         | 193 +++++++-----
 texmathp.el                    |  17 +-
 75 files changed, 2069 insertions(+), 1799 deletions(-)

diff --git a/context-en.el b/context-en.el
index f4b8fdf87c..54f30da3be 100644
--- a/context-en.el
+++ b/context-en.el
@@ -1,7 +1,7 @@
 ;;; context-en.el --- Support for the ConTeXt english interface. -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2003-2004, 2006, 2008
-;;               2010, 2014, 2020, 2021 Free Software Foundation, Inc.
+;;               2010, 2014, 2020-2022 Free Software Foundation, Inc.
 
 ;; Maintainer: Berend de Boer <berend@pobox.com>
 ;; Keywords: tex
@@ -188,6 +188,9 @@ That is, besides the section(-block) commands.")
 
 (defun ConTeXt-en-mode-initialization ()
   "ConTeXt english interface specific initialization."
+  ;; FIXME: This `mapc' seems spurious because
+  ;; `ConTeXt-language-variable-list' includes
+  ;; `ConTeXt-environment-list'.
   (mapc #'ConTeXt-add-environments (reverse ConTeXt-environment-list-en))
 
   (TeX-add-symbols
diff --git a/context-nl.el b/context-nl.el
index 9b49cce236..143a18a388 100644
--- a/context-nl.el
+++ b/context-nl.el
@@ -1,7 +1,7 @@
 ;;; context-nl.el --- Support for the ConTeXt dutch interface. -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2003, 2004, 2006, 2010,
-;;               2015, 2020, 2021 Free Software Foundation, Inc.
+;;               2015, 2020-2022 Free Software Foundation, Inc.
 
 ;; Maintainer: Berend de Boer <berend@pobox.com>
 ;; Keywords: tex
@@ -163,6 +163,9 @@ That is, besides the section(-block) commands.")
 
 (defun ConTeXt-nl-mode-initialization ()
   "ConTeXt dutch interface specific initialization."
+  ;; FIXME: This `mapc' seems spurious because
+  ;; `ConTeXt-language-variable-list' includes
+  ;; `ConTeXt-environment-list'.
   (mapc #'ConTeXt-add-environments (reverse ConTeXt-environment-list-nl))
 
   (TeX-add-symbols
diff --git a/context.el b/context.el
index 50fb1adfee..40eacda811 100644
--- a/context.el
+++ b/context.el
@@ -680,14 +680,14 @@ With optional ARG, modify current environment."
                    (t ConTeXt-default-environment)))
          (environment
           (completing-read (concat "Environment type (default " default "): ")
-                           ConTeXt-environment-list nil nil nil
+                           (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)
       (setq ConTeXt-default-environment environment))
 
-    (let ((entry (assoc environment ConTeXt-environment-list)))
+    (let ((entry (assoc environment (ConTeXt-environment-list))))
       (if (null entry)
           (ConTeXt-add-environments (list environment)))
 
@@ -717,7 +717,7 @@ With optional ARG, modify current environment."
 
 (defun ConTeXt-environment-menu (environment)
   "Insert ENVIRONMENT around point or region."
-  (let ((entry (assoc environment ConTeXt-environment-list)))
+  (let ((entry (assoc environment (ConTeXt-environment-list))))
     (cond ((not (and entry (nth 1 entry)))
            (ConTeXt-insert-environment environment))
           ((numberp (nth 1 entry))
@@ -727,16 +727,19 @@ With optional ARG, modify current environment."
                (setq args (concat args TeX-grop TeX-grcl))
                (setq count (- count 1)))
              (ConTeXt-insert-environment environment args)))
-          ((stringp (nth 1 entry))
+          ((or (stringp (nth 1 entry)) (vectorp (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)))
+             (dolist (elt prompts)
+               (let* ((optional (vectorp elt))
+                      (elt (if optional (elt elt 0) elt))
+                      (arg (TeX-read-string
+                            (TeX-argument-prompt optional elt nil))))
+                 (setq args (concat args
+                                    (cond ((and optional (> (length arg) 0))
+                                           (concat ConTeXt-optop arg 
ConTeXt-optcl))
+                                          ((not optional)
+                                           (concat TeX-grop arg TeX-grcl)))))))
              (ConTeXt-insert-environment environment args)))
           (t
            (apply (nth 1 entry) environment (nthcdr 2 entry))))))
diff --git a/doc/auctex.texi b/doc/auctex.texi
index fb34568b44..a74489c2a2 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -433,14 +433,14 @@ will blink when @code{blink-matching-paren} is non-nil.  
If
 @code{TeX-electric-math} is nil, typing @kbd{$} simply inserts @samp{$}
 at point, this is the default.
 
-Besides @code{nil}, possible values for this variable are @code{(cons
-"$" "$")} for @TeX{} inline equations @samp{$...$}, and @code{(cons
-"\\(" "\\)")} for @LaTeX{} inline equations @samp{\(...\)}.
+Besides @code{nil}, possible values for this variable are @code{("$"
+. "$")} for @TeX{} inline equations @samp{$...$}, and @code{("\(" . "\)")}
+for @LaTeX{} inline equations @samp{\(...\)}.
 
 If the variable is non-nil and point is inside math mode right between a
 couple of single dollars, pressing @kbd{$} will insert another pair of
 dollar signs and leave the point between them.  Thus, if
-@code{TeX-electric-math} is set to @code{(cons "$" "$")} you can easily
+@code{TeX-electric-math} is set to @code{("$" . "$")} you can easily
 obtain a @TeX{} display equation @samp{$$...$$} by pressing @kbd{$}
 twice in a row.  (Note that you should not use double dollar signs in
 @LaTeX{} because this practice can lead to wrong spacing in typeset
@@ -468,6 +468,20 @@ following to your init file
                           (cons "\\(" "\\)"))))
 @end lisp
 
+Math mode which didn't start with dollar(s) shouldn't be closed with dollar.
+@defopt TeX-refuse-unmatched-dollar
+This option determines the behavior when the user types @kbd{$} at a
+position where @AUCTeX{} thinks that it is in math mode which didn't start
+with dollar(s).
+
+When this option is @code{nil}, @AUCTeX{} behaves in the same way as
+non-math mode, assuming that the user knows it isn't in math mode
+actually.  This is the default.
+
+When this option is non-@code{nil}, @AUCTeX{} refuses to insert @samp{$}
+to prevent unmatched dollar.
+@end defopt
+
 Note that Texinfo mode does nothing special for @kbd{$}.  It inserts
 dollar sign(s) just in the same way as the other normal keys do.
 
@@ -1326,7 +1340,7 @@ define and register custom @code{completion-at-point} 
functions and when the
 user invokes @code{completion-at-point} (usually bound to
 @kbd{M-@key{TAB}}), all such registered functions are consulted for
 checking for possible completions.  Modern completion UIs like
-@i{company-mode} support this completion-at-point facility.
+@i{company-mode} or @i{corfu} support this completion-at-point facility.
 
 @defun TeX--completion-at-point
 @AUCTeX{}'s completion-at-point function which is automatically added to
@@ -1339,6 +1353,17 @@ It offers the same completion candidates as would
 like @i{company-mode}.
 @end defun
 
+@defun LaTeX--arguments-completion-at-point
+@AUCTeX{}'s completion-at-point function inside arguments which is
+automatically added to @code{completion-at-point-functions} in @LaTeX{}
+buffers.
+
+It offers the completion candidates stored in the variables
+@code{TeX-symbol-list} and @code{LaTeX-environment-list} for single
+candidate, multiple candidates separated by commas, or key-value
+candidates separated by commas and/or equal signs.
+@end defun
+
 A more direct way to insert a macro is with @code{TeX-insert-macro},
 bound to @kbd{C-c C-m} which is equivalent to @kbd{C-c @key{RET}}.  It
 has the advantage over completion that it knows about the argument of
@@ -5625,6 +5650,19 @@ Following is a list of available hooks for
 @item LaTeX-env-item
 Insert the given environment and the first item.
 
+@item LaTeX-env-item-args
+Insert the given environment plus further arguments, and the first item.
+You can use this as a hook in case you want to specify multiple complex
+arguments just like in elements of @code{TeX-add-symbols}.  Here is an
+example from @file{enumitem.el} in order to prompt for a @samp{key=value}
+list to be inserted as an optional argument to the @samp{itemize}
+environment:
+@lisp
+(LaTeX-add-environments
+ '("itemize" LaTeX-env-item-args
+   [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
+@end lisp
+
 @item LaTeX-env-figure
 Insert the given figure-like environment with a caption and a label.
 
@@ -5635,6 +5673,10 @@ specifications.
 @item LaTeX-env-label
 Insert the given environment with a label.
 
+@item LaTeX-env-label-args
+Insert the given environment with a label and further arguments to the
+environment.
+
 @item LaTeX-env-list
 Insert the given list-like environment, a specifier for the label and
 the first item.
diff --git a/doc/changes.texi b/doc/changes.texi
index debfec688b..d6973153c1 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -11,6 +11,21 @@
 @heading News since last release
 
 @itemize @bullet
+@item
+@AUCTeX{} no longer refuses to insert dollar sign when you type @kbd{$} at
+point where @AUCTeX{} thinks the current math mode didn't start with
+dollar(s).  @AUCTeX{} assumes the user knows that it isn't in math mode
+actually.
+
+You can keep the former behavior by enabling the new customize option
+@code{TeX-refuse-unmatched-dollar}.
+
+@item
+@AUCTeX{} supports completion-at-point of macro and environment arguments
+in @LaTeX{} buffers.  The responsible function recognizes the argument
+position and extracts the corresponding candidates from the variables
+@code{TeX-symbol-list} and @code{LaTeX-environment-list}.
+
 @item
 @AUCTeX{} underlines the argument of macros which produce underlined text
 in the final product with @code{font-latex-underline-face}.  The
diff --git a/font-latex.el b/font-latex.el
index 52c0fca11e..4067564d17 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -378,7 +378,7 @@ variable `font-latex-fontify-sectioning'." ',num)
       ("TeX" "") ("LaTeX" "") ("LaTeXe" "")
       ("normalfont" "") ("normalshape" "")
       ("tableofcontents" "") ("listoffigures" "") ("listoftables" "")
-      ("maketitle" ""))
+      ("maketitle" "") ("makeindex" "") ("makeglossary" ""))
      font-lock-function-name-face 2 command)
     ("sectioning-0"
      (("part" "*[{"))
diff --git a/latex.el b/latex.el
index ae8dd89f30..744257e3c9 100644
--- a/latex.el
+++ b/latex.el
@@ -632,8 +632,8 @@ It may be customized with the following variables:
              (dolist (elt prompts)
                (let* ((optional (vectorp elt))
                       (elt (if optional (elt elt 0) elt))
-                      (arg (TeX-read-string (concat (when optional "(Optional) 
")
-                                                elt ": "))))
+                      (arg (TeX-read-string
+                            (TeX-argument-prompt optional elt nil))))
                  (setq args (concat args
                                     (cond ((and optional (> (length arg) 0))
                                            (concat LaTeX-optop arg 
LaTeX-optcl))
@@ -1061,9 +1061,22 @@ If nil, act like the empty string is given, but do not 
prompt."
   :group 'LaTeX-label
   :type 'string)
 
-(defun LaTeX-env-item (environment)
-  "Insert ENVIRONMENT and the first item."
-  (LaTeX-insert-environment environment)
+(defun LaTeX--env-parse-args (args)
+  "Helper function to insert arguments defined by ARGS.
+This function checks if `TeX-exit-mark' is set, otherwise it's
+set to the point where this function starts.  Point will be at
+`TeX-exit-mark' when this function exits."
+  (let ((TeX-exit-mark (or TeX-exit-mark
+                           (point-marker))))
+    (LaTeX-find-matching-begin)
+    (end-of-line)
+    (TeX-parse-arguments args)
+    (goto-char TeX-exit-mark)
+    (set-marker TeX-exit-mark nil)))
+
+(defun LaTeX--env-item (environment)
+  "Helper function running inside `LaTeX-env-item'.
+The body of this function used to be part of `LaTeX-env-item'."
   (if (TeX-active-mark)
       (progn
         (LaTeX-find-matching-begin)
@@ -1088,6 +1101,19 @@ If nil, act like the empty string is given, but do not 
prompt."
                 (current-fill-column)))
     (LaTeX-fill-paragraph nil)))
 
+(defun LaTeX-env-item (environment)
+  "Insert ENVIRONMENT and the first item.
+The first item is inserted by the function `LaTeX--env-item'."
+  (LaTeX-insert-environment environment)
+  (LaTeX--env-item environment))
+
+(defun LaTeX-env-item-args (environment &rest args)
+  "Insert ENVIRONMENT followed by ARGS and first item.
+The first item is inserted by the function `LaTeX--env-item'."
+  (LaTeX-insert-environment environment)
+  (LaTeX--env-parse-args args)
+  (LaTeX--env-item environment))
+
 (defcustom LaTeX-label-alist
   '(("figure" . LaTeX-figure-label)
     ("table" . LaTeX-table-label)
@@ -1296,6 +1322,11 @@ Just like array and tabular."
     ;; Restore the positions of point and mark.
     (exchange-point-and-mark)))
 
+(defun LaTeX-env-label-args (environment &rest args)
+  "Run `LaTeX-env-label' on ENVIRONMENT and insert ARGS."
+  (LaTeX-env-label environment)
+  (LaTeX--env-parse-args args))
+
 (defun LaTeX-env-list (environment)
   "Insert ENVIRONMENT and the first item."
   (let ((label (TeX-read-string "Default Label: ")))
@@ -1422,12 +1453,7 @@ Just like array and tabular."
 (defun LaTeX-env-args (environment &rest args)
   "Insert ENVIRONMENT and arguments defined by ARGS."
   (LaTeX-insert-environment environment)
-  (save-excursion
-    (LaTeX-find-matching-begin)
-    (end-of-line)
-    (let ((TeX-exit-mark (or TeX-exit-mark
-                             (make-marker))))
-      (TeX-parse-arguments args))))
+  (LaTeX--env-parse-args args))
 
 (defun LaTeX-env-label-as-keyval (_optional &optional keyword keyvals 
environment)
   "Query for a label and insert it in the optional argument of an environment.
@@ -1748,12 +1774,14 @@ This is necessary since index entries may contain 
commands and stuff.")
   "List of regular expressions matching LaTeX pagestyles only.")
 
 (defvar LaTeX-auto-counter-regexp-list
-  '(("\\\\newcounter *{\\([A-Za-z]+\\)}" 1 LaTeX-auto-counter)
-    ("\\\\@definecounter{\\([A-Za-z]+\\)}" 1 LaTeX-auto-counter))
+  (let ((token TeX-token-char))
+    `((,(concat "\\\\newcounter *{\\(" token "+\\)}") 1 LaTeX-auto-counter)
+      (,(concat "\\\\@definecounter{\\(" token "+\\)}") 1 LaTeX-auto-counter)))
   "List of regular expressions matching LaTeX counters only.")
 
 (defvar LaTeX-auto-length-regexp-list
-  '(("\\\\newlength *{?\\\\\\([A-Za-z]+\\)}?" 1 LaTeX-auto-length))
+  (let ((token TeX-token-char))
+    `((,(concat "\\\\newlength *{?\\\\\\(" token "+\\)}?") 1 
LaTeX-auto-length)))
   "List of regular expressions matching LaTeX lengths only.")
 
 (defvar LaTeX-auto-savebox-regexp-list
@@ -2044,7 +2072,7 @@ The value is actually the tail of the list of options 
given to PACKAGE."
                                                LaTeX-auto-environment))
                                    LaTeX-auto-environment)))
           (add-to-list 'LaTeX-auto-environment
-                       (list (nth 0 entry) 'LaTeX-env-args (vector "argument")
+                       (list (nth 0 entry) #'LaTeX-env-args (vector "argument")
                              (1- (string-to-number (nth 1 entry))))))
         LaTeX-auto-env-args-with-opt)
 
@@ -2109,6 +2137,7 @@ It will setup BibTeX to store keys in an auto file."
 If EXPR evaluate to true, parse THEN as an argument list, else
 parse ELSE as an argument list.  The compatibility argument
 OPTIONAL is ignored."
+  (declare (indent 2))
   (TeX-parse-arguments (if (eval expr t) then else)))
 
 (defun TeX-arg-eval (optional &rest args)
@@ -3219,7 +3248,10 @@ prompt string.  `LaTeX-default-author' is the initial 
input."
                   "")))
     (TeX-argument-insert author optional nil)))
 
-(defun TeX-read-key-val (optional key-val-alist &optional prompt)
+(defun TeX-read-key-val (optional key-val-alist &optional prompt complete
+                                  predicate require-match
+                                  initial-input hist def
+                                  inherit-input-method)
   "Prompt for keys and values in KEY-VAL-ALIST and return them.
 If OPTIONAL is non-nil, indicate in the prompt that we are
 reading an optional argument.  KEY-VAL-ALIST can be
@@ -3230,9 +3262,24 @@ reading an optional argument.  KEY-VAL-ALIST can be
 
 The car of each element should be a string representing a key and
 the optional cdr should be a list with strings to be used as
-values for the key.  Use PROMPT as the prompt string."
+values for the key.
+
+PROMPT replaces the standard one where \\=' (k=v): \\=' is
+appended to it.  If you want the full control over the prompt,
+set COMPLETE to non-nil and then provide a full PROMPT.
+
+PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF,
+INHERIT-INPUT-METHOD are passed to `multi-prompt-key-value',
+which see."
   (multi-prompt-key-value
-   (TeX-argument-prompt optional prompt "Options (k=v)")
+   (TeX-argument-prompt optional
+                        (cond ((and prompt (not complete))
+                               (concat prompt " (k=v)"))
+                              ((and prompt complete)
+                               prompt)
+                              (t nil))
+                        "Options (k=v)"
+                        complete)
    (cond ((and (listp key-val-alist)
                (symbolp (car key-val-alist))
                (fboundp (car key-val-alist)))
@@ -3246,18 +3293,51 @@ values for the key.  Use PROMPT as the prompt string."
                (listp (car key-val-alist)))
           key-val-alist)
          (t
-          (error "Cannot interpret key-val-alist %S" key-val-alist)))))
+          (error "Cannot interpret key-val-alist %S" key-val-alist)))
+   predicate require-match initial-input hist def inherit-input-method))
 
-(defun TeX-arg-key-val (optional key-val-alist &optional prompt)
+(defun TeX-arg-key-val (optional key-val-alist &optional prompt complete
+                                 rem-char leftbrace rightbrace
+                                 predicate require-match
+                                 initial-input hist def
+                                 inherit-input-method)
   "Prompt for keys and values in KEY-VAL-ALIST.
 Insert the given value as a TeX macro argument.  If OPTIONAL is
 non-nil, insert it as an optional argument.  KEY-VAL-ALIST is an
 alist.  The car of each element should be a string representing a
 key and the optional cdr should be a list with strings to be used
 as values for the key.  Refer to `TeX-read-key-val' for more
-about KEY-VAL-ALIST.  Use PROMPT as the prompt string."
-  (let ((options (TeX-read-key-val optional key-val-alist prompt)))
-    (TeX-argument-insert options optional)))
+about KEY-VAL-ALIST.
+
+PROMPT replaces the standard one where \\=' (k=v): \\=' is
+appended to it.  If you want the full control over the prompt,
+set COMPLETE to non-nil and then provide a full PROMPT.
+
+REM-CHAR is a character removed from `crm-local-completion-map'
+and `minibuffer-local-completion-map' when performing completion.
+In most cases it will be ?\\s.
+
+The brackets used are controlled by the string values of
+LEFTBRACE and RIGHTBRACE.
+
+PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF,
+INHERIT-INPUT-METHOD are passed to `multi-prompt-key-value',
+which see."
+  (let ((TeX-arg-opening-brace (or leftbrace TeX-arg-opening-brace))
+        (TeX-arg-closing-brace (or rightbrace TeX-arg-closing-brace))
+        (crm-local-completion-map
+         (if rem-char (remove (assoc rem-char crm-local-completion-map)
+                              crm-local-completion-map)
+           crm-local-completion-map))
+        (minibuffer-local-completion-map
+         (if rem-char (remove (assoc rem-char minibuffer-local-completion-map)
+                              minibuffer-local-completion-map)
+           minibuffer-local-completion-map)))
+    (TeX-argument-insert
+     (TeX-read-key-val optional key-val-alist prompt complete
+                       predicate require-match initial-input
+                       hist def inherit-input-method)
+     optional)))
 
 (defun TeX-read-completing-read (optional collection &optional prompt complete
                                           predicate require-match
@@ -3365,29 +3445,39 @@ INHERIT-INPUT-METHOD are passed to
    predicate require-match initial-input hist def inherit-input-method))
 
 (defun TeX-arg-completing-read-multiple (optional table &optional prompt 
complete
-                                                  prefix leftbrace rightbrace
+                                                  prefix crm-sep concat-sep
+                                                  leftbrace rightbrace
                                                   predicate require-match
                                                   initial-input hist def
                                                   inherit-input-method)
   "Read multiple strings in the minibuffer, with completion and insert them.
 If OPTIONAL is non-nil, indicate it in the minibuffer and insert
-the result in brackets if not empty.  The brackets used are
-controlled by the string values of LEFTBRACE and RIGHTBRACE.
+the result in brackets if not empty.
+
+For TABLE, PROMPT and COMPLETE, see `TeX-read-completing-read-multiple'.
 
-For TABLE, PROMPT and COMPLETE, refer to `TeX-read-completing-read-multiple'.
 For PREFIX, see `TeX-argument-insert'.
+CRM-SEP is a regexp which is bound locally to `crm-separator'.
+CONCAT-SEP is a string which will be used to concat the queried
+items, defaults to \",\".
+
+The brackets used to insert the argument are controlled by the
+string values of LEFTBRACE and RIGHTBRACE.
+
 PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF and
 INHERIT-INPUT-METHOD are passed to
 `TeX-completing-read-multiple', which see."
   (let ((TeX-arg-opening-brace (or leftbrace TeX-arg-opening-brace))
-        (TeX-arg-closing-brace (or rightbrace TeX-arg-closing-brace)))
+        (TeX-arg-closing-brace (or rightbrace TeX-arg-closing-brace))
+        (crm-separator (or crm-sep crm-separator))
+        (concat-sep (or concat-sep ",")))
     (TeX-argument-insert
      (mapconcat #'identity
                 (TeX-read-completing-read-multiple optional table prompt
                                                    complete predicate
                                                    require-match initial-input
                                                    hist def 
inherit-input-method)
-                ",")
+                concat-sep)
      optional prefix)))
 
 (defun TeX-read-hook ()
@@ -7184,6 +7274,475 @@ page without enough text on it. ")
 Used as buffer local value of `TeX-error-description-list-local'.
 See its doc string for detail.")
 
+
+;;; LaTeX Capf for macro/environment arguments:
+
+;; tex.el defines the function `TeX--completion-at-point' which
+;; provides completion at point for (La)TeX macros.  Here we define
+;; `LaTeX--arguments-completion-at-point' which is the entry point for
+;; completion at point when inside a macro or environment argument.
+;; The general idea is:
+;;
+;; - Find out in which argument of macro/env the point is; this is
+;; done by the function `LaTeX-what-macro'.
+;;
+;; - Match the result against the information available in
+;; `TeX-symbol-list' or `LaTeX-environment-list' by the function
+;; `LaTeX-completion-parse-args'.
+;;
+;; - If there is a match, pass it to `LaTeX-completion-parse-arg'
+;; (note the missing `s') which parses the match and runs the
+;; corresponding function to calculate the candidates.  These are the
+;; functions `LaTeX-completion-candidates-key-val',
+;; `LaTeX-completion-candidates-completing-read-multiple', and
+;; `LaTeX-completion-candidates-completing-read'.
+;;
+;; Two mapping variables `LaTeX-completion-function-map-alist-keyval'
+;; and `LaTeX-completion-function-map-alist-cr' are provided in order
+;; to allow a redirection of the entry in `TeX-symbol-list' or
+;; `LaTeX-environment-list' to another function.
+
+(defvar LaTeX-completion-macro-delimiters
+  '((?\[ . ?\])
+    (?\{ . ?\})
+    (?\( . ?\))
+    (?\< . ?\>))
+  "List of characters delimiting mandatory and optional arguments.
+Each element in the list is cons with opening char as car and the
+closing char as cdr.")
+
+(defun LaTeX-completion-macro-delimiters (&optional which)
+  "Return elements of the variable `LaTeX-completion-macro-delimiters'.
+If the optional WHICH is the symbol `open', return the car's of
+each element in the variable `LaTeX-completion-macro-delimiters'.
+If it is the symbol `close', return the cdr's.  If omitted or
+nil, return all elements."
+  (cond ((eq which 'open)
+         (mapcar #'car LaTeX-completion-macro-delimiters))
+        ((eq which 'close)
+         (mapcar #'cdr LaTeX-completion-macro-delimiters))
+        (t
+         (append
+          (mapcar #'car LaTeX-completion-macro-delimiters)
+          (mapcar #'cdr LaTeX-completion-macro-delimiters)))))
+
+(defun LaTeX-move-to-previous-arg (&optional bound)
+  "Move backward to the closing parenthesis of the previous argument.
+Closing parenthesis is in this context all characters which can
+be used to delimit an argument.  Currently, these are the
+following characters:
+
+  } ] ) >
+
+This happens under the assumption that we are in front of a macro
+argument.  This function understands the splitting of macros over
+several lines in TeX."
+  (cond
+   ;; Just to be quick:
+   ((memql (preceding-char) (LaTeX-completion-macro-delimiters 'close)))
+   ;; Do a search:
+   ((re-search-backward
+     "[]})>][ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*\\=" bound t)
+    (goto-char (1+ (match-beginning 0)))
+    t)
+   (t nil)))
+
+(defun LaTeX-what-macro (&optional bound)
+  "Find out if point is within the arguments of any TeX-macro.
+The return value is
+
+  (\"name\" mac-or-env total-num type opt-num opt-distance)
+
+\"name\" is the name of the macro (without backslash) or
+  environment as a string.
+mac-or-env is one of the symbols `mac' or `env'.
+total-num is the total number of the argument before the point started.
+type is one of the symbols `mandatory' or `optional'.
+opt-num is the number of optional arguments before the point started.
+opt-distance the number of optional arguments after the last mandatory.
+
+If the optional BOUND is an integer, limit backward searches to
+this point.  If nil, limit to the previous 15 lines."
+  (let ((bound (or bound (line-beginning-position -15)))
+        (env-or-mac 'mac)
+        cmd cnt cnt-opt type result ;; env-or-mac-start
+        (cnt-distance 0))
+    (save-excursion
+      (save-restriction
+        (narrow-to-region (max (point-min) bound) (point-max))
+        ;; Move back out of the current parenthesis
+        (with-syntax-table (apply #'TeX-search-syntax-table
+                                  (LaTeX-completion-macro-delimiters))
+          (condition-case nil
+              (let ((forward-sexp-function nil))
+                (up-list -1))
+            (error nil))
+          ;; Set the initial value of argument counter
+          (setq cnt 1)
+          ;; Note that we count also the right opt. or man. arg:
+          (setq cnt-opt (if (= (following-char) ?\{) 0 1))
+          ;; Record if we're inside a mand. or opt. argument
+          (setq type (if (= (following-char) ?\{) 'mandatory 'optional))
+          ;; Move back over any touching sexps
+          (while (and (LaTeX-move-to-previous-arg bound)
+                      (condition-case nil
+                          (let ((forward-sexp-function nil))
+                            (backward-sexp) t)
+                        (error nil)))
+            (unless (= (following-char) ?\{)
+              (cl-incf cnt-opt))
+            (cl-incf cnt)))
+        ;; (setq env-or-mac-start (point))
+        (when (and (memql (following-char) ;; '(?\[ ?\{ ?\( ?<)
+                          (LaTeX-completion-macro-delimiters 'open))
+                   (re-search-backward "\\\\[*a-zA-Z]+\\=" nil t))
+          (setq cmd (TeX-match-buffer 0))
+          (when (looking-at "\\\\begin{\\([^}]+\\)}")
+            (setq cmd (TeX-match-buffer 1))
+            (setq env-or-mac 'env)
+            (cl-decf cnt))
+          (when (and cmd (not (string= cmd "")))
+            (setq result (list (if (eq env-or-mac 'mac)
+                                   ;; Strip leading backslash from
+                                   ;; the macro
+                                   (substring cmd 1)
+                                 cmd)
+                               env-or-mac cnt type cnt-opt))))))
+    ;; If we were inside an optional argument after a mandatory one,
+    ;; we have to find out the number of optional arguments before
+    ;; the mandatory one.
+    (when (and (eq (nth 3 result) 'optional)
+               (/= 0 (- (nth 2 result) (nth 4 result))))
+      (save-excursion
+        (save-restriction
+          (narrow-to-region (max (point-min) bound) (point-max))
+          (with-syntax-table (apply #'TeX-search-syntax-table
+                                    (LaTeX-completion-macro-delimiters))
+            (let ((forward-sexp-function nil))
+              (up-list -1))
+            (unless (= (following-char) ?\{)
+              (cl-incf cnt-distance))
+            (while (and (LaTeX-move-to-previous-arg bound)
+                        (condition-case nil
+                            (let ((forward-sexp-function nil))
+                              (backward-sexp)
+                              (/= (following-char) ?\{))
+                          (error nil)))
+              (cl-incf cnt-distance))))))
+    ;; Check if we really have a result before adding something new:
+    (when result
+      (append result (list cnt-distance)))))
+
+(defun LaTeX-completion-candidates-key-val (key-vals)
+  "Return completion candidates from KEY-VALS based on buffer position.
+KEY-VALS is an alist of key-values pairs."
+  (let ((end (point))
+        (func (lambda (kv &optional k)
+                (if k
+                    (cadr (assoc k kv))
+                  kv)))
+        beg key)
+    (save-excursion
+      (re-search-backward "[[{(<,=]" (line-beginning-position 0) t))
+    (if (string= (match-string 0) "=")
+        ;; We have to look for a value:
+        (save-excursion
+          ;; Matching the value is easy, just grab everything before the
+          ;; '=' and ...
+          (re-search-backward "=\\([^=]*\\)" (line-beginning-position) t)
+          ;; ... then move forward over any tabs and spaces:
+          (save-excursion
+            (forward-char)
+            (skip-chars-forward " \t" end)
+            (setq beg (point)))
+          ;; Matching the key is less fun: `re-search-backward'
+          ;; doesn't travel enough, so we have to use
+          ;; `skip-chars-backward' and limit the search to the
+          ;; beginning of the previous line:
+          (skip-chars-backward "^,[{" (line-beginning-position 0))
+          ;; Make sure we're not looking at a comment:
+          (when (looking-at-p (concat "[ \t]*" TeX-comment-start-regexp))
+            (forward-line))
+          ;; Now pick up the key, if available:
+          (setq key (string-trim
+                     (buffer-substring-no-properties (point)
+                                                     (match-beginning 0))
+                     "[ \t\n\r%]+" "[ \t\n\r%]+"))
+          ;; This caters also for the case where nothing is typed yet:
+          (list beg end (completion-table-dynamic
+                         (lambda (_)
+                           (funcall func key-vals key)))))
+      ;; We have to look for a key:
+      (save-excursion
+        ;; Find the beginning
+        (skip-chars-backward "^,[{" (line-beginning-position 0))
+        ;; Make sure we're not looking at a comment:
+        (when (looking-at-p (concat "[ \t]*" TeX-comment-start-regexp))
+          (forward-line))
+        ;; Now go until the first char or number which would be the
+        ;; start of the key:
+        (skip-chars-forward "^a-zA-Z0-9" end)
+        (setq beg (point))
+        ;; This caters also for the case where nothing is typed yet:
+        (list beg end (completion-table-dynamic
+                       (lambda (_)
+                         (funcall func key-vals))))))))
+
+(defun LaTeX-completion-candidates-completing-read-multiple (collection)
+  "Return completion candidates from COLLECTION based on buffer position.
+COLLECTION is an list of strings."
+  (let ((end (point))
+        beg list-beg)
+    (save-excursion
+      (with-syntax-table (apply #'TeX-search-syntax-table
+                                (LaTeX-completion-macro-delimiters))
+        (up-list -1))
+      (setq list-beg (1+ (point))))
+    (save-excursion
+      (unless (search-backward "," list-beg t)
+        (goto-char list-beg))
+      (skip-chars-forward "^a-zA-Z0-9" end)
+      (setq beg (point)))
+    (list beg end (completion-table-dynamic
+                   (lambda (_)
+                     collection)))))
+
+(defun LaTeX-completion-candidates-completing-read (collection)
+  "Return completion candidates from COLLECTION based on buffer position.
+COLLECTION is an list of strings."
+  (let ((end (point))
+        beg)
+    (save-excursion
+      (with-syntax-table (apply #'TeX-search-syntax-table
+                                (LaTeX-completion-macro-delimiters))
+        (up-list -1))
+      (forward-char)
+      (skip-chars-forward "^a-zA-Z0-9" end)
+      (setq beg (point)))
+    (list beg end (completion-table-dynamic
+                   (lambda (_)
+                     collection)))))
+
+(defun LaTeX-completion-parse-args (entry)
+  "Return the match of buffer position ENTRY with AUCTeX macro definitions.
+ENTRY is generated by the function `LaTeX-what-macro'.  This
+function matches the current buffer position (i.e., which macro
+argument) with the corresponding definition in `TeX-symbol-list'
+or `LaTeX-environment-list' and returns it."
+  (let* ((name (nth 0 entry))
+         (mac-or-env (nth 1 entry))
+         (total-num (nth 2 entry))
+         (type (nth 3 entry))
+         (opt-num (nth 4 entry))
+         (opt-dis (nth 5 entry))
+         (mand-num (- total-num opt-num))
+         (cnt 0)
+         (again t)
+         arg-list
+         arg
+         result)
+    (setq arg-list (cdr (assoc name (if (eq mac-or-env 'mac)
+                                        (TeX-symbol-list)
+                                      (LaTeX-environment-list)))))
+
+    ;; Check if there is a `LaTeX-env-*-args' in the `arg-list' and
+    ;; remove it:
+    (when (and (eq mac-or-env 'env)
+               (memq (car arg-list) '(LaTeX-env-args
+                                      LaTeX-env-item-args
+                                      LaTeX-env-label-args)))
+      (pop arg-list))
+
+    ;; Check for `TeX-arg-conditional' here and change `arg-list'
+    ;; accordingly
+    (when (assq 'TeX-arg-conditional arg-list)
+      (while (and arg-list
+                  (setq arg (car arg-list)))
+        (if (and (listp arg) (eq (car arg) 'TeX-arg-conditional))
+            (setq result (append (reverse (if (eval (nth 1 arg) t)
+                                              (nth 2 arg)
+                                            (nth 3 arg)))
+                                 result))
+          (push arg result))
+        (pop arg-list))
+      (setq arg-list (nreverse result)))
+
+    ;; Now parse the `arg-list':
+    (cond ((and (eq type 'optional)
+                (= opt-dis 0))
+           ;; Optional arg without mandatory one before: This case is
+           ;; straight and we just pick the correct one out of the
+           ;; list:
+           (setq result (nth (1- total-num) arg-list)))
+
+          ;; Mandatory arg: Loop over the arg-list and drop all
+          ;; vectors at the list beginning:
+          ((eq type 'mandatory)
+           (while (vectorp (car arg-list))
+             (pop arg-list))
+           ;; The next entry must be a mandatory arg.  If we're
+           ;; looking for the first mandatory argument, just pick the
+           ;; first element.  Otherwise loop further over the list and
+           ;; count for the correct arg:
+           (if (= mand-num 1)
+               (setq result (car arg-list))
+             (while again
+               (cond ((vectorp (car arg-list))
+                      (pop arg-list)
+                      (setq again t))
+                     ((= (cl-incf cnt) mand-num)
+                      (setq again nil)
+                      (setq result (car arg-list)))
+                     (t
+                      ;; Be a little conservative against infloops.
+                      (if arg-list
+                          (progn (setq again t)
+                                 (pop arg-list))
+                        (setq again nil)))))))
+
+          ;; Optional arg after mandatory one(s): This isn't fun :-(
+          ((and (eq type 'optional)
+                (/= opt-dis 0))
+           (setq again t)
+           (setq cnt 0)
+           ;; The idea is: Look for non-vectors and count the number
+           ;; of mandatory argument in `mand-num'.
+           (while again
+             (cond ((and (not (vectorp (car arg-list)))
+                         (/= (cl-incf cnt) mand-num))
+                    (pop arg-list)
+                    (setq again t))
+                   ((and (not (vectorp (car arg-list)))
+                         ;; Don't incf mand-num again; is done in the
+                         ;; clause above:
+                         (= cnt mand-num))
+                    (setq again nil))
+                   ;; If the clauses above fail, we can safely drop
+                   ;; vectors:
+                   ((vectorp (car arg-list))
+                    (pop arg-list)
+                    (setq again t))
+                   (t
+                    (setq again nil))))
+           (setq result (nth opt-dis arg-list)))
+          (t nil))
+    result))
+
+(defvar LaTeX-completion-function-map-alist-keyval '()
+  "Alist mapping style funcs to completion-candidates counterparts.
+Each element is a cons with the name of the function used in an
+AUCTeX style file which queries and inserts something in the
+buffer as car and a function delievering completion candidates as
+cdr.  This list contains only mapping for functions which perform
+key=val completions.  See also
+`LaTeX-completion-function-map-alist-cr'.")
+
+(defvar LaTeX-completion-function-map-alist-cr
+  `((TeX-arg-counter . LaTeX-counter-list)
+    (TeX-arg-pagestyle . LaTeX-pagestyle-list)
+    (TeX-arg-length . ,(lambda () (mapcar (lambda (x)
+                                            (concat TeX-esc (car x)))
+                                          (LaTeX-length-list)))))
+  "Alist mapping style funcs to completion-candidates counterparts.
+Each element is a cons with the name of the function used in an
+AUCTeX style file which queries and inserts something in the
+buffer as car and a function delievering completion candidates as
+cdr.  This list contains only mapping for functions which perform
+completing-read.  See also
+`LaTeX-completion-function-map-alist-keyval'.")
+
+(defun LaTeX-completion-parse-arg (arg)
+  "Parse ARG and call the correct candidates completion function.
+ARG is the entry for the current argument in buffer stored in
+`TeX-symbol-list' or `LaTeX-environment-list'."
+  (when (or (and (vectorp arg)
+                 (symbolp (elt arg 0))
+                 (fboundp (elt arg 0)))
+            (and (listp arg)
+                 (symbolp (car arg))
+                 (fboundp (car arg)))
+            (and (symbolp arg)
+                 (fboundp arg)))
+    ;; Turn a vector into a list:
+    (when (vectorp arg)
+      (setq arg (append arg nil)))
+    ;; Turn a single function symbol into a list:
+    (unless (listp arg)
+      (setq arg (list arg)))
+    (let* ((head (car arg))
+           (tail (cadr arg))
+           (fun1 (lambda (elt)
+                   (cond ((and (listp elt)
+                               (symbolp (car elt))
+                               (fboundp (car elt)))
+                          ;; It is a function call:
+                          (funcall (car elt)))
+                         ;; It is a function object
+                         ((functionp elt)
+                          (funcall elt))
+                         ;; It is a variable name
+                         ((and (symbolp elt)
+                               (boundp elt))
+                          (symbol-value elt))
+                         ;; It is a plain list of strings:
+                         (t elt)))))
+      (cond ((eq head #'TeX-arg-key-val)
+             (LaTeX-completion-candidates-key-val
+              (funcall fun1 tail)))
+
+            ((eq head #'TeX-arg-completing-read-multiple)
+             (LaTeX-completion-candidates-completing-read-multiple
+              (funcall fun1 tail)))
+
+            ((eq head #'TeX-arg-completing-read)
+             (LaTeX-completion-candidates-completing-read
+              (funcall fun1 tail)))
+
+            ((assq head LaTeX-completion-function-map-alist-keyval)
+             (LaTeX-completion-candidates-key-val
+              (funcall fun1 (cdr (assq head 
LaTeX-completion-function-map-alist-keyval)))))
+
+            ((assq head LaTeX-completion-function-map-alist-cr)
+             (LaTeX-completion-candidates-completing-read
+              (funcall fun1 (cdr (assq head 
LaTeX-completion-function-map-alist-cr)))))
+
+            (t nil)))))
+
+(defun LaTeX-completion-find-argument-boundries (&rest args)
+  "Find the boundries of the current LaTeX argument.
+ARGS are characters passed to the function
+`TeX-search-syntax-table'.  If ARGS are omitted, all characters
+defined in the variable `LaTeX-completion-macro-delimiters' are
+taken."
+  (save-restriction
+    (narrow-to-region (line-beginning-position -40)
+                      (line-beginning-position  40))
+    (let ((args (or args (LaTeX-completion-macro-delimiters))))
+      (condition-case nil
+          (with-syntax-table (apply #'TeX-search-syntax-table args)
+            (scan-lists (point) 1 1))
+        (error nil)))))
+
+(defun LaTeX--arguments-completion-at-point ()
+  "Capf for arguments of LaTeX macros and environments.
+Completion for macros starting with `\\' is provided by the
+function `TeX--completion-at-point' which should come first in
+`completion-at-point-functions'."
+  ;; Exit if not inside an argument or in a comment:
+  (when (and (LaTeX-completion-find-argument-boundries)
+             (not (nth 4 (syntax-ppss))))
+    (let ((entry (LaTeX-what-macro)))
+      (cond ((or (and entry
+                      (eq (nth 1 entry) 'mac)
+                      (assoc (car entry) (TeX-symbol-list)))
+                 (and entry
+                      (eq (nth 1 entry) 'env)
+                      (assoc (car entry) (LaTeX-environment-list))))
+             (LaTeX-completion-parse-arg
+              (LaTeX-completion-parse-args entry)))
+            ;; Any other constructs?
+            (t nil)))))
+
 ;;; Mode
 
 (defgroup LaTeX-macro nil
@@ -7419,6 +7978,11 @@ function would return non-nil and `(match-string 1)' 
would return
 
   (LaTeX-indent-commands-regexp-make)
 
+  ;; Standard Emacs completion-at-point support.  We append the entry
+  ;; in order to let `TeX--completion-at-point' be first in the list:
+  (add-hook 'completion-at-point-functions
+            #'LaTeX--arguments-completion-at-point t t)
+
   (set (make-local-variable 'LaTeX-item-list) '(("description" . 
LaTeX-item-argument)
                                                 ("thebibliography" . 
LaTeX-item-bib)
                                                 ("array" . LaTeX-item-array)
@@ -7664,10 +8228,10 @@ function would return non-nil and `(match-string 1)' 
would return
    '("includeonly" t)
    '("input" TeX-arg-input-file)
    '("addcontentsline"
-     (TeX-arg-eval completing-read "File: " '(("toc") ("lof") ("lot")))
-     (TeX-arg-eval completing-read "Numbering style: " LaTeX-section-list) t)
+     (TeX-arg-completing-read ("toc" "lof" "lot") "File")
+     (TeX-arg-completing-read LaTeX-section-list "Numbering style") t)
    '("addtocontents"
-     (TeX-arg-eval completing-read "File: " '(("toc") ("lof") ("lot"))) t)
+     (TeX-arg-completing-read ("toc" "lof" "lot") "File") t)
    '("typeout" t)
    '("typein" [ TeX-arg-define-macro ] t)
    '("verb" TeX-arg-verb)
@@ -7877,7 +8441,6 @@ function would return non-nil and `(match-string 1)' 
would return
      "texteuro"                     ; Type: Symbol -- Slot: 191
      "texttimes"                    ; Type: Symbol -- Slot: 214
      "textdiv"                      ; Type: Symbol -- Slot: 246
-     '("textcircled"          1)    ; Type: Command -- Slot: N/A
      '("capitalcedilla"       1)    ; Type: Command -- Slot: N/A
      '("capitalogonek"        1)    ; Type: Command -- Slot: N/A
 
@@ -7906,28 +8469,28 @@ function would return non-nil and `(match-string 1)' 
would return
 
      ;; Added in LaTeX 2021-11-15
      '("counterwithin"
-       [TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Format")
-                     '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")]
+       [TeX-arg-completing-read ("\\arabic" "\\roman" "\\Roman"
+                                 "\\alph" "\\Alph")
+                                "Format"]
        (TeX-arg-counter)
        (TeX-arg-counter "Within counter"))
      '("counterwithin*"
-       [TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Format")
-                     '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")]
+       [TeX-arg-completing-read ("\\arabic" "\\roman" "\\Roman"
+                                 "\\alph" "\\Alph")
+                                "Format"]
        (TeX-arg-counter)
        (TeX-arg-counter "Within counter"))
 
      '("counterwithout"
-       [TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Format")
-                     '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")]
+       [TeX-arg-completing-read ("\\arabic" "\\roman" "\\Roman"
+                                 "\\alph" "\\Alph")
+                                "Format"]
        (TeX-arg-counter)
        (TeX-arg-counter "Within counter"))
      '("counterwithout*"
-       [TeX-arg-eval completing-read
-                     (TeX-argument-prompt t nil "Format")
-                     '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")]
+       [TeX-arg-completing-read ("\\arabic" "\\roman" "\\Roman"
+                                 "\\alph" "\\Alph")
+                                "Format"]
        (TeX-arg-counter)
        (TeX-arg-counter "Within counter"))
 
@@ -8300,6 +8863,22 @@ wrapped in \\(?:...\\)? then."
    ;; We are done.  Just search until the next closing bracket
    "[^]]*\\]"))
 
+(defvar LaTeX-font-family '("normalfont" "rmfamily"
+                            "sffamily"   "ttfamily")
+  "List of LaTeX font family declarations.")
+
+(defvar LaTeX-font-series '("mdseries" "bfseries")
+  "List of LaTeX font series declarations.")
+
+(defvar LaTeX-font-shape '("itshape" "slshape"  "scshape"  "sscshape"
+                           "swshape" "ulcshape" "upshape")
+  "List of LaTeX font shape declarations.")
+
+(defvar LaTeX-font-size '("tiny" "scriptsize" "footnotesize" "small"
+                          "normalsize" "large" "Large"
+                          "LARGE" "huge" "Huge")
+  "List of LaTeX font size declarations.")
+
 (provide 'latex)
 
 ;;; latex.el ends here
diff --git a/style/MyriadPro.el b/style/MyriadPro.el
index 0f3de7d173..1014b31064 100644
--- a/style/MyriadPro.el
+++ b/style/MyriadPro.el
@@ -1,6 +1,6 @@
 ;;; MyriadPro.el --- AUCTeX style for `MyriadPro.sty' (v0.5)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -62,9 +62,9 @@
    (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-completing-read ("sans"        "sansbold"
+                                  "sanstabular" "sansboldtabular")
+                                 "Math version"))))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
diff --git a/style/XCharter.el b/style/XCharter.el
index 6f35b36933..4edb5a37ef 100644
--- a/style/XCharter.el
+++ b/style/XCharter.el
@@ -1,6 +1,6 @@
-;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.094)  -*- 
lexical-binding: t; -*-
+;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.24)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2014, 2017, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -26,12 +26,13 @@
 
 ;;; Commentary:
 
-;; This file adds support for `XCharter.sty' (v1.094) from 2017/08/08.
+;; This file adds support for `XCharter.sty' (v1.24) from 2022/04/16.
 ;; `XCharter.sty' is part of TeXLive.
 
 ;;; Code:
 
 (require 'tex)
+(require 'latex)
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
@@ -43,7 +44,9 @@
  (lambda ()
 
    ;; Run style hook for various packages loaded by XCharter
-   (TeX-run-style-hooks "textcomp" "fontaxes")
+   (if (memq TeX-engine '(xetex luatex))
+       (TeX-run-style-hooks "fontspec")
+     (TeX-run-style-hooks "textcomp" "fontaxes"))
 
    ;; New symbols
    (TeX-add-symbols
@@ -51,47 +54,112 @@
     ;; Only preamble commands
     '("useosf"  0)
     '("useosfI" 0)
+    '("useproportional" 0)
 
     ;; Text commands
-    '("textsu"     t)   ; superior figures
-    '("sustyle"   -1)   ;
-    '("textin"     t)   ; inferior figures
-    '("instyle"   -1)   ;
     '("textlf"     t)   ; lining figures
     '("lfstyle"   -1)   ;
     '("textosf"    t)   ; oldstyle figures
     '("textosfI"   t)   ; oldstyle figures alternate
     '("osfstyle"  -1)   ; whatever oldstyle option is in force
+    '("texttlf"    t)
+    '("tlfstyle"  -1)
+    '("texttosf"   t)
+    '("tosfstyle" -1)
+
+    '("liningnums"       -1)
+    '("tabularnums"      -1)
+    '("oldstylenums"     -1)
+    '("proportionalnums" -1)
+
+    '("textsu"     t)   ; superior figures
+    '("sustyle"   -1)   ;
+    '("textinf"    t)   ; inferior figures
+    '("instyle"   -1)   ;
+
     '("textnumerator"   t) ; numerators
-    '("textnu"          t) ;
+    '("textnum"         t)
     '("textdenominator" t) ; denominators
     '("textde"          t) ;
-    '("textfrac"        2))
+    '("textfrac"  ["Number"] "Numerator" "Denominator")
+    '("textsfrac" ["Number"] "Numerator" "Denominator")
+
+    '("textth"      t)
+    '("textthit"    t)
+    '("thfamily"   -1))
+
+   ;; \textnu isn't available with 'notextnu' package option
+   (unless (LaTeX-provided-package-options-member "xcharter" "notextnu")
+     (TeX-add-symbols '("textnu" t))
+     (when (and (featurep 'font-latex)
+                (eq TeX-install-font-lock 'font-latex-setup))
+       (font-latex-add-keywords '(("textnu" "{"))
+                                'type-command)))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
               (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(("textsu"    "{")
-                                ("textin"    "{")
-                                ("textlf"    "{")
+     (font-latex-add-keywords '(("textlf"    "{")
                                 ("textosf"   "{")
                                 ("textosfI"  "{")
+                                ("texttlf"   "{")
+                                ("texttosf"  "{")
+                                ("textsu"    "{")
+                                ("textinf"   "{")
                                 ("textnumerator"   "{")
-                                ("textnu"          "{")
+                                ("textnum"         "{")
                                 ("textdenominator" "{")
                                 ("textde"          "{")
-                                ("textfrac"        "{{"))
+                                ("textth"          "{")
+                                ("textthit"        "{"))
                               'type-command)
-     (font-latex-add-keywords '(("sustyle"   "")
-                                ("instyle"   "")
-                                ("lfstyle"   "")
-                                ("osfstyle"  ""))
-                              'type-declaration)))
+     (font-latex-add-keywords '(("lfstyle"           "")
+                                ("osfstyle"          "")
+                                ("tlfstyle"          "")
+                                ("tosfstyle"         "")
+                                ("liningnums"        "")
+                                ("tabularnums"       "")
+                                ("oldstylenums"      "")
+                                ("proportionalnums"  "")
+                                ("sustyle"           "")
+                                ("instyle"           "")
+                                ("thfamily"          ""))
+                              'type-declaration)
+     (font-latex-add-keywords '(("useosf"          "")
+                                ("useosfI"         "")
+                                ("useproportional" ""))
+                              'function)
+     (font-latex-add-keywords '(("textfrac"        "[{{")
+                                ("textsfrac"       "[{{"))
+                              'textual)))
  TeX-dialect)
 
-(defvar LaTeX-XCharter-package-options
-  '("lining" "lf" "oldstyle" "osf" "oldstyleI" "osfI"
-    "scaled" "sups" "scosf")
-  "Package options for the XCharter package.")
+(defun LaTeX-XCharter-package-options ()
+  "Read the XCharter package options."
+  (TeX-read-key-val t (append
+                       (when (memq TeX-engine '(xetex luatex))
+                         '(("nofontspec" ("true" "false"))
+                           ("type1text" ("true" "false"))
+                           ("type1" ("true" "false"))
+                           ("defaultfeatures")))
+                       '(("scaled")
+                         ("scale")
+                         ("lining" ("true" "false"))
+                         ("lf" ("true" "false"))
+                         ("oldstyle" ("true" "false"))
+                         ("osf" ("true" "false"))
+                         ("proportional" ("true" "false"))
+                         ("p" ("true" "false"))
+                         ("tabular" ("true" "false"))
+                         ("t" ("true" "false"))
+                         ("oldstyleI" ("true" "false"))
+                         ("osfI" ("true" "false"))
+                         ("sups")
+                         ("scosf")
+                         ("serbianc")
+                         ("theoremfont")
+                         ("thmlining")
+                         ("oldSS")
+                         ("notextnu")))))
 
 ;;; XCharter.el ends here
diff --git a/style/afterpage.el b/style/afterpage.el
index 1601885fd5..88ea2c10c7 100644
--- a/style/afterpage.el
+++ b/style/afterpage.el
@@ -1,6 +1,6 @@
 ;;; afterpage.el --- AUCTeX style for `afterpage.sty'  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2013, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2013--2022 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <mje@inducks.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -31,13 +31,25 @@
 ;;; Code:
 
 (require 'tex)
-(require 'latex)
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+                  "font-latex"
+                  (keywords class))
 
 (TeX-add-style-hook
  "afterpage"
  (lambda ()
    (TeX-add-symbols
-    '("afterpage" t)))
+    '("afterpage" t))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     ;; Don't fontify the argument since it will contain (La)TeX code
+     ;; which probably has its own fontification:
+     (font-latex-add-keywords '(("afterpage" ""))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-afterpage-package-options nil
diff --git a/style/amsthm.el b/style/amsthm.el
index 3ea817653c..64589c5bf4 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -160,9 +160,7 @@ make them available as new environments."
            (format "%s" heading)))))
 
     '("theoremstyle"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Style")
-                    (LaTeX-amsthm-newtheoremstyle-list)))
+      (TeX-arg-completing-read (LaTeX-amsthm-newtheoremstyle-list) "Style"))
     "qedhere"
     "swapnumbers"
 
diff --git a/style/arabxetex.el b/style/arabxetex.el
index 897b9cd6bb..a45b1fe092 100644
--- a/style/arabxetex.el
+++ b/style/arabxetex.el
@@ -1,6 +1,6 @@
 ;;; arabxetex.el --- AUCTeX style for `arabxetex.sty' (v1.2.1)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2017--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2017--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -65,9 +65,8 @@
            (mapcar
             (lambda (symbol)
               (list symbol
-                    [ TeX-arg-eval completing-read
-                      (TeX-argument-prompt t nil "Mode")
-                      LaTeX-arabxetex-package-options ]
+                    [TeX-arg-completing-read LaTeX-arabxetex-package-options
+                                             "Mode"]
                     t))
             (mapcar (lambda (lang) (concat "text" lang)) langs)))
      ;;
@@ -77,9 +76,8 @@
             (lambda (environment)
               (list environment
                     #'LaTeX-env-args
-                    [ TeX-arg-eval completing-read
-                      (TeX-argument-prompt t nil "Mode")
-                      LaTeX-arabxetex-package-options ]))
+                    [TeX-arg-completing-read LaTeX-arabxetex-package-options
+                                             "Mode"]))
             langs))
      ;;
      ;; Fontification
@@ -97,9 +95,7 @@
 
     ;; 3.3 Transliteration
     '("SetTranslitConvention"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Mapping")
-                    '("dmg" "loc")))
+      (TeX-arg-completing-read ("dmg" "loc") "Mapping"))
     '("SetTranslitStyle" "Style"))
 
    ;; Fontification
diff --git a/style/babel.el b/style/babel.el
index a7d67479a8..c58ea9fab6 100644
--- a/style/babel.el
+++ b/style/babel.el
@@ -286,11 +286,8 @@
     '("useshorthands"  "Character")
     '("useshorthands*" "Character")
     '("defineshorthand"
-      [TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt t nil "Language(s)")
-                     (LaTeX-babel-active-languages))
-                    ","]
+      [TeX-arg-completing-read-multiple (LaTeX-babel-active-languages)
+                                        "Language(s)"]
       t nil)
     '("languageshorthands" TeX-arg-babel-lang)
     '("babelshorthand"   "Short hand")
@@ -299,18 +296,13 @@
 
     ;; 1.12 The base option
     '("AfterBabelLanguage"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Language")
-                    LaTeX-babel-language-list)
+      (TeX-arg-completing-read LaTeX-babel-language-list "Language")
       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-arg-completing-read-multiple LaTeX-babel-language-list
+                                        "Language(s)"]
       (TeX-arg-eval let ((fontfam (completing-read
                                    (TeX-argument-prompt nil nil "font family")
                                    '("rm" "sf" "tt"))))
@@ -330,9 +322,7 @@
     ;; 1.16 Creating a language
     '("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-arg-completing-read LaTeX-babel-language-list "Language"))
 
     ;; 1.19 Accessing language info
     '("languagename" 0)
@@ -340,20 +330,13 @@
 
     ;; 1.20 Hyphenation and line breaking
     '("babelhyphen"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Type/Text")
-                    '("soft" "hard" "repeat" "nobreak" "empty")))
+      (TeX-arg-completing-read ("soft" "hard" "repeat" "nobreak" "empty") 
"Type/Text"))
     '("babelhyphen*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Type/Text")
-                    '("soft" "hard" "repeat" "nobreak" "empty")))
+      (TeX-arg-completing-read ("soft" "hard" "repeat" "nobreak" "empty") 
"Type/Text"))
 
     '("babelhyphenation"
-      [TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt nil nil "Language(s)")
-                     LaTeX-babel-language-list)
-                    ","]
+      [TeX-arg-completing-read-multiple LaTeX-babel-language-list
+                                        "Language(s)"]
       t)
 
     ;; 1.23 Selecting scripts
diff --git a/style/biblatex.el b/style/biblatex.el
index 43115becc6..3254ce8566 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -1,6 +1,6 @@
 ;;; biblatex.el --- AUCTeX style for `biblatex.sty' version 2.8a.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2012-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2022  Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli <angeli@caeruleus.net>
 ;; Maintainer: auctex-devel@gnu.org
@@ -143,7 +143,7 @@
 (defvar LaTeX-biblatex-language-list
   '("catalan" "croatian" "czech" "danish" "dutch" "american" "british"
     "canadian" "australian" "newzealand" "finnish" "french" "german" "austrian"
-    "ngernam" "naustrian" "greek" "italian" "norwegian" "polish" "brazilian"
+    "ngerman" "naustrian" "greek" "italian" "norwegian" "polish" "brazilian"
     "portuguese" "russian" "spanish" "swedish")
   "List of languages supported by biblatex packages.")
 
@@ -275,9 +275,8 @@ for citation keys."
     ;;; Global Customization
     ;; Setting Package Options
     '("ExecuteBibliographyOptions"
-      [TeX-arg-eval  mapconcat #'identity
-                     (TeX-completing-read-multiple
-                      "Entry type: " LaTeX-biblatex-entrytype) ","]
+      [TeX-arg-completing-read-multiple LaTeX-biblatex-entrytype
+                                        "Entry type"]
       (TeX-arg-key-val LaTeX-biblatex-executebibliographyoptions-options))
     ;;; Bibliography Commands
     ;; Resources
@@ -328,8 +327,7 @@ for citation keys."
     '("defbibcheck" "Name" t)
     ;; Dynamic Entry Sets
     '("defbibentryset" "Set"
-      (TeX-arg-eval mapconcat #'identity (TeX-completing-read-multiple
-                                          "Keys: " (LaTeX-bibitem-list)) ","))
+      (TeX-arg-completing-read-multiple (LaTeX-bibitem-list) "Keys"))
     ;;; Citation Commands
     '("cite" (TeX-arg-conditional TeX-arg-cite-note-p
                                   (["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
@@ -483,13 +481,13 @@ for citation keys."
     '("Rn" "Integer")
     ;; Localization Commands
     '("DefineBibliographyStrings"
-      (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) 
t)
+      (TeX-arg-completing-read LaTeX-biblatex-language-list "Language") t)
     '("DefineBibliographyExtras"
-      (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) 
t)
+      (TeX-arg-completing-read LaTeX-biblatex-language-list "Language") t)
     '("UndefineBibliographyExtras"
-      (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) 
t)
+      (TeX-arg-completing-read LaTeX-biblatex-language-list "Language") t)
     '("DefineHyphenationExceptions"
-      (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) 
t)
+      (TeX-arg-completing-read LaTeX-biblatex-language-list "Language") t)
     "NewBibliographyString")
 
    ;; § 3.8.9 natbib Compatibility Commands
diff --git a/style/bigdelim.el b/style/bigdelim.el
index cb54da72be..c3423fc2aa 100644
--- a/style/bigdelim.el
+++ b/style/bigdelim.el
@@ -1,6 +1,6 @@
 ;;; bigdelim.el --- AUCTeX style for `bigdelim.sty'  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2011--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2011--2022 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <mje@inducks.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -31,6 +31,7 @@
 ;;; Code:
 
 (require 'tex)
+(require 'latex)
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
@@ -64,27 +65,25 @@ standard one."
    (TeX-run-style-hooks "multirow")
 
    (TeX-add-symbols
-    '("ldelim"
+    `("ldelim"
       (TeX-arg-bigdelim-brace left)
       "Number of rows for multirow"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Width in multirow")
-                    (append
-                     '("*")
-                     (mapcar (lambda (x)
-                               (concat TeX-esc (car x)))
-                             (LaTeX-length-list))))
+      (TeX-arg-completing-read
+       ,(lambda () (append '("*")
+                           (mapcar (lambda (x)
+                                     (concat TeX-esc (car x)))
+                                   (LaTeX-length-list))))
+       "Width in multirow")
       [ "Text in multirow" ])
-    '("rdelim"
+    `("rdelim"
       (TeX-arg-bigdelim-brace right)
       "Number of rows for multirow"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Width in multirow")
-                    (append
-                     '("*")
-                     (mapcar (lambda (x)
-                               (concat TeX-esc (car x)))
-                             (LaTeX-length-list))))
+      (TeX-arg-completing-read
+       ,(lambda () (append '("*")
+                           (mapcar (lambda (x)
+                                     (concat TeX-esc (car x)))
+                                   (LaTeX-length-list))))
+       "Width in multirow")
       [ "Text in multirow" ]))
 
    ;; Fontification
diff --git a/style/caption.el b/style/caption.el
index 1b06fbf633..073dff4e2a 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -374,8 +374,8 @@ STAR is non-nil, do not query for a short-caption and a 
label."
     '("caption*" t)
 
     '("captionlistentry"
-      [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
-                    LaTeX-caption-supported-float-types]
+      [TeX-arg-completing-read LaTeX-caption-supported-float-types
+                               "Float type"]
       t)
 
     '("captionof" LaTeX-arg-caption-captionof)
@@ -385,32 +385,24 @@ 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]))
+                           ([TeX-arg-completing-read
+                             LaTeX-caption-supported-float-types "Float 
type"]))
       (TeX-arg-key-val (LaTeX-caption-key-val-options)))
 
     '("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]))
+                           ([TeX-arg-completing-read
+                             LaTeX-caption-supported-float-types "Float 
type"]))
       (TeX-arg-key-val (LaTeX-caption-key-val-options)))
 
     '("clearcaptionsetup"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Single key")
-                    (LaTeX-caption-key-val-options)]
-      (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
-                    LaTeX-caption-supported-float-types))
+      [TeX-arg-completing-read (LaTeX-caption-key-val-options) "Single key"]
+      (TeX-arg-completing-read LaTeX-caption-supported-float-types "Float 
type"))
 
     '("clearcaptionsetup*"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Single key")
-                    (LaTeX-caption-key-val-options)]
-      (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
-                    LaTeX-caption-supported-float-types))
+      [TeX-arg-completing-read (LaTeX-caption-key-val-options) "Single key"]
+      (TeX-arg-completing-read LaTeX-caption-supported-float-types "Float 
type"))
 
     '("captionbox"  (LaTeX-arg-caption-captionbox) t)
 
diff --git a/style/changes.el b/style/changes.el
index 9c3bff5e93..ba38bc5dc5 100644
--- a/style/changes.el
+++ b/style/changes.el
@@ -1,6 +1,6 @@
 ;;; changes.el --- AUCTeX style for `changes.sty'  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2021 Free Software Foundation, Inc.
+;; Copyright (C) 2021--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -164,13 +164,9 @@ Insert the argument in brackets if OPTIONAL is non-nil."
     '("setcommentmarkup" "Definition")
     '("setauthormarkup" "Definition")
     '("setauthormarkupposition"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt optional nil "Position")
-                    '("left" "right")))
+      (TeX-arg-completing-read ("left" "right") "Position"))
     '("setauthormarktext"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt optional nil "Markup")
-                    '("id" "name")))
+      (TeX-arg-completing-read ("id" "name") "Markup"))
     '("settruncatewidth" (TeX-arg-length "Width"))
     '("setsummarywidth" (TeX-arg-length "Width"))
     '("setsummarytowidth" "Text")
diff --git a/style/csquotes.el b/style/csquotes.el
index d5714a3530..d6d06816ea 100644
--- a/style/csquotes.el
+++ b/style/csquotes.el
@@ -124,10 +124,10 @@ PROMPT replaces the standard one \"Language\"."
 
       ;; 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-completing-read ,quote-style-variant-list
+                                 "Quote style variant"]
+        (TeX-arg-completing-read ,quote-style-name-list
+                                 "Quote style name or alias"))
       "setquotestyle*"
 
       ;; 4.1 Quoting Regular Text
@@ -199,20 +199,20 @@ 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)
+        [TeX-arg-completing-read ,quote-style-variant-list
+                                 "Quote style variant"]
+        (TeX-arg-completing-read ,quote-style-name-list
+                                 "Quote style name")
         ["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)
+        [TeX-arg-completing-read ,quote-style-variant-list
+                                 "Quote style variant"]
+        (TeX-arg-completing-read ,quote-style-name-list
+                                 "Quote style name")
         "Alias name")
       '("DeclareQuoteOption" 1)
       '("ExecuteQuoteOptions" 1)
diff --git a/style/currvita.el b/style/currvita.el
index f1f27a369b..2f290344dd 100644
--- a/style/currvita.el
+++ b/style/currvita.el
@@ -1,6 +1,6 @@
 ;;; currvita.el --- AUCTeX style for `currvita.sty' (v0.9i)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -31,49 +31,22 @@
 
 ;;; Code:
 
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+                  "font-latex"
+                  (keywords class))
+
 (require 'tex)
 (require 'latex)
 
-;; This is a modified version of `LaTeX-env-item'.
-(defun LaTeX-currvita-env-with-label (env)
-  "Insert ENV, a mandatory label and the first item."
-  (LaTeX-insert-environment
-   env
-   (let ((heading (TeX-read-string "Heading of list: ")))
-     (format "{%s}" heading)))
-  (if (TeX-active-mark)
-      (progn
-        (LaTeX-find-matching-begin)
-        (end-of-line 1))
-    (end-of-line 0))
-  (delete-char 1)
-  (when (looking-at (concat "^[ \t]+$\\|"
-                            "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
-    (delete-region (point) (line-end-position)))
-  (delete-horizontal-space)
-  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
-  ;; from swapping point and mark and the \item ending up right after
-  ;; \begin{...}.
-  (deactivate-mark)
-  (LaTeX-insert-item)
-  ;; The inserted \item may have outdented the first line to the
-  ;; right.  Fill it, if appropriate.
-  (when (and auto-fill-function
-             (not (looking-at "$"))
-             (not (assoc env LaTeX-indent-environment-list))
-             (> (- (line-end-position) (line-beginning-position))
-                (current-fill-column)))
-    (LaTeX-fill-paragraph nil)))
-
-
 (TeX-add-style-hook
  "currvita"
  (lambda ()
 
    ;; env's defined by currvita.sty
    (LaTeX-add-environments
-    '("cv"      "Heading of CV")
-    '("cvlist"  LaTeX-currvita-env-with-label))
+    '("cv"     "Heading of CV")
+    '("cvlist" LaTeX-env-item-args "Heading of list"))
 
    ;; Add "cvlist" to the list of environments which have an optional
    ;; argument for each item
@@ -88,7 +61,13 @@
     "cvbibname")
 
    ;; Add new lengths defined by currvita.sty
-   (LaTeX-add-lengths "cvlabelwidth" "cvlabelskip" "cvlabelsep"))
+   (LaTeX-add-lengths "cvlabelwidth" "cvlabelskip" "cvlabelsep")
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("cvplace" "{"))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-currvita-package-options
diff --git a/style/doc.el b/style/doc.el
index 3ab6c0c74f..d57e1e05b1 100644
--- a/style/doc.el
+++ b/style/doc.el
@@ -189,9 +189,7 @@ percent sign at the beginning of a line before
           (TeX-add-symbols
            ;; Cater for \Describe<eltname>[options]{<elements query>}
            `(,(concat "Describe" eltname)
-             [TeX-arg-eval completing-read
-                           (TeX-argument-prompt t nil "Suppress option")
-                           '("noindex" "noprint")]
+             [TeX-arg-completing-read ("noindex" "noprint") "Suppress option"]
              "Element")
 
            ;; Cater for \PrintDescribe<eltname>{<elements query>}
@@ -277,17 +275,12 @@ percent sign at the beginning of a line before
            (format "%s" file)))))
 
     ;; 2.2 Package options
-    '("SetupDoc" (TeX-arg-eval mapconcat #'identity
-                               (TeX-completing-read-multiple
-                                (TeX-argument-prompt nil nil "Options")
-                                LaTeX-doc-package-options)
-                               ","))
+    '("SetupDoc" (TeX-arg-completing-read-multiple LaTeX-doc-package-options
+                                                   "Options"))
 
     ;; 2.4 Describing the usage of macros and environments
     '("DescribeMacro"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Suppress option")
-                    '("noindex" "noprint")]
+      [TeX-arg-completing-read ("noindex" "noprint") "Suppress option"]
       (TeX-arg-eval
        (lambda ()
          (let ((name (TeX-read-string
@@ -295,9 +288,7 @@ percent sign at the beginning of a line before
                       TeX-esc)))
            (format "%s" name)))))
     '("DescribeEnv"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Suppress option")
-                    '("noindex" "noprint")]
+      [TeX-arg-completing-read ("noindex" "noprint") "Suppress option"]
       "Environment")
 
     ;; 2.5 Describing the definition of macros and environments
diff --git a/style/enumitem.el b/style/enumitem.el
index 62ad17f1c7..f8e8737beb 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -1,6 +1,6 @@
 ;;; enumitem.el --- AUCTeX style for `enumitem.sty' (v3.9)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -234,7 +234,9 @@
   (dolist (env-type (LaTeX-enumitem-newlist-list))
     (let* ((env  (car env-type))
            (type (cadr env-type)))
-      (LaTeX-add-environments (list env 'LaTeX-enumitem-env-with-opts))
+      (LaTeX-add-environments
+       `(,env LaTeX-env-item-args
+              [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
       ;; Tell AUCTeX about parsed description like environments.
       (when (or (string-equal type "description")
                 (string-equal type "description*"))
@@ -246,54 +248,21 @@
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-enumitem-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun LaTeX-enumitem-env-with-opts (env)
-  "Insert ENV provided by `enumitem' package."
-  (LaTeX-insert-environment
-   env
-   (let ((opts (TeX-read-key-val t (LaTeX-enumitem-key-val-options))))
-     (when (and opts (not (string-equal opts "")))
-       (format "[%s]" opts))))
-  (if (TeX-active-mark)
-      (progn
-        (LaTeX-find-matching-begin)
-        (end-of-line 1))
-    (end-of-line 0))
-  (delete-char 1)
-  (when (looking-at (concat "^[ \t]+$\\|"
-                            "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
-    (delete-region (point) (line-end-position)))
-  (delete-horizontal-space)
-  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
-  ;; from swapping point and mark and the \item ending up right after
-  ;; \begin{...}.
-  (deactivate-mark)
-  (LaTeX-insert-item)
-  ;; The inserted \item may have outdented the first line to the
-  ;; right.  Fill it, if appropriate.
-  (when (and auto-fill-function
-             (not (looking-at "$"))
-             (not (assoc env LaTeX-indent-environment-list))
-             (> (- (line-end-position) (line-beginning-position))
-                (current-fill-column)))
-    (LaTeX-fill-paragraph nil)))
-
 (defun LaTeX-arg-enumitem-SetLabelAlign (optional)
   "Ask and insert a new type (value) for the \"align\" key.
 Insert value in brackets if OPTIONAL is non-nil."
-  (let ((val (TeX-read-string "Alignment: ")))
-    (TeX-argument-insert val optional)
-    (LaTeX-add-enumitem-SetLabelAligns val)))
+  (let ((val (TeX-read-string
+              (TeX-argument-prompt optional nil "Alignment"))))
+    (LaTeX-add-enumitem-SetLabelAligns val)
+    (TeX-argument-insert val optional)))
 
 (defun LaTeX-arg-enumitem-SetEnumitemKey (optional)
-  "Ask and insert a new key and its replacement.
+  "Ask and insert a new enumitem key option.
 Insert key and value in brackets if OPTIONAL is non-nil."
-  (let ((key     (TeX-read-string "New Key: "))
-        (replace (TeX-read-key-val optional
-                                   (LaTeX-enumitem-key-val-options)
-                                   "Replacement")))
-    (TeX-argument-insert key     optional)
-    (TeX-argument-insert replace optional)
-    (LaTeX-add-enumitem-SetEnumitemKeys key)))
+  (let ((key (TeX-read-string
+              (TeX-argument-prompt optional nil "New Key"))))
+    (LaTeX-add-enumitem-SetEnumitemKeys key)
+    (TeX-argument-insert key optional)))
 
 ;; In `LaTeX-enumitem-SetEnumitemValue-regexp', we match (0 1 2).
 ;; When adding a new `key=val', we need something unique for `0'-match
@@ -303,52 +272,20 @@ Insert key and value in brackets if OPTIONAL is non-nil."
 ;; invocation of `C-c C-n'.
 (defun LaTeX-arg-enumitem-SetEnumitemValue (optional)
   "Ask and insert for a new value added to an existing key.
-Insert key and value in brackets if OPTIONAL is non-nil."
-  (let ((key (completing-read  "Key: " LaTeX-enumitem-key-val-options))
-        (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))))
-
-(defun LaTeX-arg-enumitem-setlist (_optional)
-  "Insert the arguments of `\\setlist' macro from `enumitem' package.
-This function inserts three arguments.  The first optional
-argument is only available when the package option `sizes' is
-provided.  OPTIONAL is ignored."
-  ;; First opt. argument:
-  (when (LaTeX-provided-package-options-member "enumitem" "sizes")
-    (let* ((TeX-arg-opening-brace "<")
-           (TeX-arg-closing-brace ">")
-           (sizes '("script" "tiny" "footnote" "small" "normal"
-                    "large" "Large" "LARGE" "huge" "Huge"))
-           (size (completing-read
-                  (TeX-argument-prompt t nil "Size")
-                  (append
-                   (mapcar (lambda (x) (concat "-" x)) sizes)
-                   (mapcar (lambda (x) (concat x "-")) sizes)
-                   sizes))))
-      (TeX-argument-insert size t)))
-  ;; Second opt. argument:
-  (let ((TeX-arg-opening-brace LaTeX-optop)
-        (TeX-arg-closing-brace LaTeX-optcl))
-    (TeX-argument-insert
-     (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"))
-                  (mapcar #'car (LaTeX-enumitem-newlist-list))
-                  '("1" "2" "3" "4")))
-                ",")
-     t))
-  ;; Mandatory argument:
-  (TeX-argument-insert
-   (TeX-read-key-val nil (LaTeX-enumitem-key-val-options))
-   nil))
+This is the second mandatory argument of \\SetEnumitemValue
+macro.  Insert the value in brackets if OPTIONAL is non-nil."
+  (let ((key (when (= (preceding-char) (string-to-char TeX-grcl))
+               (save-excursion
+                 (re-search-backward "\\\\SetEnumitemValue{\\([^}]+\\)}"
+                                     (line-beginning-position) t)
+                 (match-string-no-properties 1))))
+        (val (TeX-read-string
+              (TeX-argument-prompt optional nil "String value"))))
+    (when key
+      (LaTeX-add-enumitem-SetEnumitemValues
+       (list (concat "\\SetEnumitemValue{" key "}{" val "}")
+             key val)))
+    (TeX-argument-insert val optional)))
 
 (TeX-add-style-hook
  "enumitem"
@@ -373,16 +310,22 @@ provided.  OPTIONAL is ignored."
 
    ;; Standard env's take key-val as optional argument.
    (LaTeX-add-environments
-    '("itemize"      LaTeX-enumitem-env-with-opts)
-    '("enumerate"    LaTeX-enumitem-env-with-opts)
-    '("description"  LaTeX-enumitem-env-with-opts))
+    '("itemize"     LaTeX-env-item-args
+      [TeX-arg-key-val (LaTeX-enumitem-key-val-options)])
+    '("enumerate"    LaTeX-env-item-args
+      [TeX-arg-key-val (LaTeX-enumitem-key-val-options)])
+    '("description"  LaTeX-env-item-args
+      [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
 
    ;; Make inline env's available with package option "inline"
    (when (LaTeX-provided-package-options-member "enumitem" "inline")
      (LaTeX-add-environments
-      '("itemize*"     LaTeX-enumitem-env-with-opts)
-      '("enumerate*"   LaTeX-enumitem-env-with-opts)
-      '("description*" LaTeX-enumitem-env-with-opts))
+      '("itemize*"      LaTeX-env-item-args
+        [TeX-arg-key-val (LaTeX-enumitem-key-val-options)])
+      '("enumerate*"    LaTeX-env-item-args
+        [TeX-arg-key-val (LaTeX-enumitem-key-val-options)])
+      '("description*"  LaTeX-env-item-args
+        [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
      (add-to-list 'LaTeX-item-list '("description*" . LaTeX-item-argument)))
 
    (TeX-add-symbols
@@ -411,7 +354,9 @@ provided.  OPTIONAL is ignored."
            (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-environments
+            `(,name LaTeX-env-item-args
+                    [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
            (LaTeX-add-enumitem-newlists (list name type))
            (TeX-ispell-skip-setcdr `((,name ispell-tex-arg-end 0)))
            (TeX-argument-insert name nil)
@@ -419,28 +364,45 @@ provided.  OPTIONAL is ignored."
            (format "%s" depth)))))
 
     ;; \renewlist{<name>}{<type>}{<max-depth>}
-    '("renewlist"
-      (TeX-arg-eval completing-read "Name: "
-                    (mapcar #'car (LaTeX-enumitem-newlist-list)))
-      (TeX-arg-eval completing-read "Type: "
-                    (mapcar #'cadr (LaTeX-enumitem-newlist-list)))
+    `("renewlist"
+      (TeX-arg-completing-read (LaTeX-enumitem-newlist-list) "Name")
+      (TeX-arg-completing-read ,(lambda ()
+                                  (mapcar #'cadr 
(LaTeX-enumitem-newlist-list)))
+                               "Type")
       "Max-depth")
 
     ;; \setlist<size>[<names,levels>]{<key-vals>}
-    '("setlist" LaTeX-arg-enumitem-setlist)
+    `("setlist"
+      (TeX-arg-conditional (LaTeX-provided-package-options-member "enumitem" 
"sizes")
+          ([TeX-arg-completing-read
+            ,(lambda ()
+               (let ((sizes '("script" "tiny" "footnote" "small" "normal"
+                              "large" "Large" "LARGE" "huge" "Huge")))
+                 (append (mapcar (lambda (x) (concat "-" x)) sizes)
+                         (mapcar (lambda (x) (concat x "-")) sizes)
+                         sizes)))
+            "Size qualifier" nil nil "<" ">"])
+        ())
+      [TeX-arg-completing-read-multiple
+       ,(lambda ()
+          (append (when (LaTeX-provided-package-options-member
+                         "enumitem" "includedisplayed")
+                    '("trivlist"))
+                  (mapcar #'car (LaTeX-enumitem-newlist-list))
+                  '("1" "2" "3" "4")))
+       "Environment(s), level(s)"]
+      (TeX-arg-key-val (LaTeX-enumitem-key-val-options)))
 
     ;; \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"))
-                      (mapcar #'car (LaTeX-enumitem-newlist-list))
-                      '("1" "2" "3" "4")))
-                    ","]
+    `("setlist*"
+      [TeX-arg-completing-read-multiple
+       ,(lambda () (append
+                    (when (LaTeX-provided-package-options-member "enumitem"
+                                                                 
"includedisplayed")
+                      '("trivlist"))
+                    (mapcar #'car (LaTeX-enumitem-newlist-list))
+                    '("1" "2" "3" "4")))
+       "Environment(s), level(s)"]
       (TeX-arg-key-val (LaTeX-enumitem-key-val-options))) )
 
    ;; General commands:
@@ -457,28 +419,41 @@ provided.  OPTIONAL is ignored."
     ;; We will not extract that information and leave that to users.
     ;; For completion, extract enumerated environments from
     ;; `LaTeX-enumitem-newlist-list' and add "enumerate" to them.
-    '("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)))))
+    `("restartlist"
+      (TeX-arg-completing-read
+       ,(lambda ()
+          (let ((enums '("enumerate")))
+            (when (LaTeX-provided-package-options-member "enumitem" "inline")
+              (push "enumerate*" enums))
+            (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*"))
+                  (push env enums))))
+            enums))
+       "List name"))
 
     ;; "Align" is added as new value to "align" key in key-val list.
     '("SetLabelAlign" LaTeX-arg-enumitem-SetLabelAlign t)
 
     ;; "Key" will be parsed and added to key-val list.
-    '("SetEnumitemKey" LaTeX-arg-enumitem-SetEnumitemKey)
+    '("SetEnumitemKey"
+      LaTeX-arg-enumitem-SetEnumitemKey
+      (TeX-arg-key-val (LaTeX-enumitem-key-val-options) "Replacement"))
 
     ;; "Key" and "Value" are added to our key-val list.
-    '("SetEnumitemValue" LaTeX-arg-enumitem-SetEnumitemValue "Replacement")
+    `("SetEnumitemValue"
+      (TeX-arg-completing-read LaTeX-enumitem-key-val-options "Key")
+      LaTeX-arg-enumitem-SetEnumitemValue
+      (TeX-arg-completing-read
+       ,(lambda ()
+          (save-excursion
+            (re-search-backward "\\\\SetEnumitemValue{\\([^}]+\\)}"
+                                (line-beginning-position) t)
+            (cadr (assoc (match-string-no-properties 1)
+                         LaTeX-enumitem-key-val-options))))
+       "Replacement"))
 
     ;; v3.6 has a macro for visual debugging.
     '("DrawEnumitemLabel" 0))
@@ -487,8 +462,7 @@ provided.  OPTIONAL is ignored."
    (when (LaTeX-provided-package-options-member "enumitem" "shortlabels")
      (TeX-add-symbols
       '("SetEnumerateShortLabel"
-        (TeX-arg-eval completing-read "Key: "
-                      '("A" "a" "I" "i" "1"))
+        (TeX-arg-completing-read ("A" "a" "I" "i" "1") "Key")
         "Replacement")))
 
    ;; Add \labelindent to list of known lengths:
diff --git a/style/environ.el b/style/environ.el
index 3a17f504be..09bf23f36e 100644
--- a/style/environ.el
+++ b/style/environ.el
@@ -1,6 +1,6 @@
 ;;; environ.el --- AUCTeX style for `environ.sty' version v0.3  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015, 2016, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016, 2018, 2020, 2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -80,7 +80,7 @@ from `environ.sty'.")
              (and args (not (string-equal args ""))
                   opt  (not (string-equal opt  "")))
              (add-to-list 'LaTeX-auto-environment
-                          (list env 'LaTeX-env-args (vector "argument")
+                          (list env #'LaTeX-env-args (vector "argument")
                                 (1- (string-to-number args)))))
             (;; mandatory argument(s) only
              (and args (not (string-equal args ""))
diff --git a/style/etoolbox.el b/style/etoolbox.el
index 42af6a4832..5362be8629 100644
--- a/style/etoolbox.el
+++ b/style/etoolbox.el
@@ -186,9 +186,7 @@ user."
     '("providebool" "Name")
     '("booltrue"    "Name")
     '("boolfalse"   "Name")
-    '("setbool"     "Name" (TeX-arg-eval completing-read
-                                         (TeX-argument-prompt nil nil "Value")
-                                         '("true" "false")))
+    '("setbool"     "Name" (TeX-arg-completing-read ("true" "false") "Value"))
     '("ifbool"      "Name" 2)
     '("notbool"     "Name" 2)
 
@@ -197,9 +195,7 @@ user."
     '("providetoggle" "Name")
     '("toggletrue"    "Name")
     '("togglefalse"   "Name")
-    '("settoggle"     "Name" (TeX-arg-eval completing-read
-                                           (TeX-argument-prompt nil nil 
"Value")
-                                           '("true" "false")))
+    '("settoggle"     "Name" (TeX-arg-completing-read ("true" "false") 
"Value"))
     '("iftoggle"      "Name" 2)
     '("nottoggle"     "Name" 2)
 
@@ -234,10 +230,7 @@ user."
     '("ifcscounter" LaTeX-arg-etoolbox-csname 2)
     '("ifltxcounter" TeX-arg-counter 2)
     '("ifdeflength" TeX-arg-length 2)
-    '("ifcslength" (TeX-arg-eval completing-read
-                                 (TeX-argument-prompt nil nil "Length")
-                                 (LaTeX-length-list))
-      2)
+    '("ifcslength" (TeX-arg-completing-read (LaTeX-length-list) "Length") 2)
     '("ifdefdimen" TeX-arg-macro 2)
     '("ifcsdimen" "Control sequence" 2)
 
diff --git a/style/exam.el b/style/exam.el
index 370a923ef3..eab9300d8d 100644
--- a/style/exam.el
+++ b/style/exam.el
@@ -142,61 +142,29 @@ Arguments NAME and TYPE are the same as for the function
     '("part" [ "Points" ] (TeX-arg-literal " "))
     '("subpart" [ "Points" ] (TeX-arg-literal " "))
     '("gradetable"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Orientation")
-        '("v" "h") ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Table index")
-        '("questions" "pages") ] )
+      [TeX-arg-completing-read ("v" "h") "Orientation"]
+      [TeX-arg-completing-read ("questions" "pages") "Table index"])
     '("bonusgradetable"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Orientation")
-        '("v" "h") ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Table index")
-        '("questions" "pages") ] )
+      [TeX-arg-completing-read ("v" "h") "Orientation"]
+      [TeX-arg-completing-read ("questions" "pages") "Table index"])
     '("bonuspointtable"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Orientation")
-        '("v" "h") ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Table index")
-        '("questions" "pages") ] )
+      [TeX-arg-completing-read ("v" "h") "Orientation"]
+      [TeX-arg-completing-read ("questions" "pages") "Table index"])
     '("partialgradetable"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Orientation")
-        '("v" "h") ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Table index")
-        '("questions" "pages") ] )
+      [TeX-arg-completing-read ("v" "h") "Orientation"]
+      [TeX-arg-completing-read ("questions" "pages") "Table index"])
     '("partialbonusgradetable"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Orientation")
-        '("v" "h") ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Table index")
-        '("questions" "pages") ] )
+      [TeX-arg-completing-read ("v" "h") "Orientation"]
+      [TeX-arg-completing-read ("questions" "pages") "Table index"])
     '("partialbonuspointtable"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Orientation")
-        '("v" "h") ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Table index")
-        '("questions" "pages") ] )
+      [TeX-arg-completing-read ("v" "h") "Orientation"]
+      [TeX-arg-completing-read ("questions" "pages") "Table index"])
     '("pointtable"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Orientation")
-        '("v" "h") ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Table index")
-        '("questions" "pages") ] )
+      [TeX-arg-completing-read ("v" "h") "Orientation"]
+      [TeX-arg-completing-read ("questions" "pages") "Table index"])
     '("partialpointtable"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Orientation")
-        '("v" "h") ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Table index")
-        '("questions" "pages") ] )
+      [TeX-arg-completing-read ("v" "h") "Orientation"]
+      [TeX-arg-completing-read ("questions" "pages") "Table index"])
 
     '("subsubpart" [ "Points" ] (TeX-arg-literal " "))
     '("question"  ["Points"] (TeX-arg-literal " "))
diff --git a/style/fancyhdr.el b/style/fancyhdr.el
index eb9751a43e..5352a72452 100644
--- a/style/fancyhdr.el
+++ b/style/fancyhdr.el
@@ -37,38 +37,6 @@
                   "font-latex"
                   (keywords class))
 
-;; Because there can be many places, `TeX-completing-read-multiple' is
-;; used instead of just `completing-read', and a `collection' argument
-;; is provided as the list of places differs between the macros
-(defun TeX-arg-fancyhdr-place (optional
-                               &optional prompt collection full)
-  "Prompt for fancyhdr places with completion.
-If OPTIONAL is non-nil, insert the resulting value as an optional
-argument, otherwise as a mandatory one.  If non-nil, PROMPT is
-used as the prompt.  If non-nil, COLLECTION is used as the
-completion list for the place.
-
-If FULL is non-nil, a full list of places is offered for
-completion, otherwise a reduced one omitting place combinations
-for H(eader) or F(ooter)."
-  (let* ((places (or collection
-                     ;; Standard places with no restrictions.
-                     ;; Lower-case versions, and reverse versions
-                     ;; (e.g., OC) are left out for simplicity.
-                     (if full
-                         '("L" "LO" "LE" "LOH" "LOF" "LEH" "LEF"
-                           "C" "CO" "CE" "COH" "COF" "CEH" "CEF"
-                           "R" "RO" "RE" "ROH" "ROF" "REH" "REF")
-                       '("L" "LO" "LE" "C" "CO" "CE" "R" "RE" "RO"))))
-         (arguments (mapconcat #'identity
-                               (TeX-completing-read-multiple
-                                (TeX-argument-prompt optional
-                                                     prompt
-                                                     "Places")
-                                places)
-                               ",")))
-    (TeX-argument-insert arguments optional)))
-
 (defvar LaTeX-fancyhdr-fancypagestyle-regexp
   '("\\\\fancypagestyle{\\([^}]+\\)}"
     1 LaTeX-auto-pagestyle)
@@ -80,19 +48,31 @@ for H(eader) or F(ooter)."
    (TeX-add-symbols
 
     ;; 2 Using fancyhdr
-    '("fancyhead" [ TeX-arg-fancyhdr-place ] t)
-    '("fancyfoot" [ TeX-arg-fancyhdr-place ] t)
-    '("fancyhf"   [ (TeX-arg-fancyhdr-place nil nil t) ] t)
+    '("fancyhead" [TeX-arg-completing-read-multiple
+                   ("L" "LO" "LE" "C" "CO" "CE" "R" "RE" "RO")
+                   "Places"]
+      t)
+    '("fancyfoot" [TeX-arg-completing-read-multiple
+                   ("L" "LO" "LE" "C" "CO" "CE" "R" "RE" "RO")
+                   "Places"]
+      t)
+    '("fancyhf"   [TeX-arg-completing-read-multiple
+                   ("L" "LO" "LE" "LOH" "LOF" "LEH" "LEF"
+                    "C" "CO" "CE" "COH" "COF" "CEH" "CEF"
+                    "R" "RO" "RE" "ROH" "ROF" "REH" "REF")
+                   "Places"]
+      t)
 
     '("fancyheadoffset"
-      [ (TeX-arg-fancyhdr-place nil ("L" "LO" "LE" "R" "RO" "RE")) ]
+      [TeX-arg-completing-read-multiple ("L" "LO" "LE" "R" "RO" "RE") "Places"]
       TeX-arg-length)
     '("fancyfootoffset"
-      [ (TeX-arg-fancyhdr-place nil ("LO" "LE" "L" "RO" "RE" "R")) ]
+      [TeX-arg-completing-read-multiple ("L" "LO" "LE" "R" "RO" "RE") "Places"]
       TeX-arg-length)
     '("fancyhfoffset"
-      [ (TeX-arg-fancyhdr-place nil ("L" "LO" "LE" "LOH" "LOF" "LEH" "LEF"
-                                     "R" "RO" "RE" "ROH" "ROF" "REH" "REF")) ]
+      [TeX-arg-completing-read-multiple ("L" "LO" "LE" "LOH" "LOF" "LEH" "LEF"
+                                         "R" "RO" "RE" "ROH" "ROF" "REH" "REF")
+                                        "Places"]
       TeX-arg-length)
 
     "headrulewidth" "footrulewidth"
@@ -105,7 +85,7 @@ for H(eader) or F(ooter)."
     '("fancyhfinit"   t)
 
     '("fancycenter"
-      [ TeX-arg-length "Distance" ] [ "Stretch" ] 3)
+      [TeX-arg-length "Distance"] [ "Stretch" ] 3)
 
     '("iftopfloat"  2)
     '("ifbotfloat"  2)
@@ -117,7 +97,7 @@ for H(eader) or F(ooter)."
       ;; dupes are removed when retrieving with the function
       ;; `LaTeX-pagestyle-list':
       (TeX-arg-pagestyle nil t)
-      [ TeX-arg-pagestyle "Base pagestyle" ]
+      [TeX-arg-pagestyle "Base pagestyle"]
       t)
 
     ;; 15 The scoop on LATEX’s marks
diff --git a/style/fancyvrb.el b/style/fancyvrb.el
index a9ea0a44bf..6703a30e1b 100644
--- a/style/fancyvrb.el
+++ b/style/fancyvrb.el
@@ -322,11 +322,8 @@ RECUSTOM is non-nil, delete macros from the variable
             ;; 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))))
+              `(,mac-name (TeX-arg-completing-read
+                           (LaTeX-fancyvrb-saveverb-list) "Saved name")))
              (when (and (fboundp 'font-latex-add-keywords)
                         (eq TeX-install-font-lock 'font-latex-setup))
                (font-latex-add-keywords `((,mac-name "{"))
@@ -602,12 +599,10 @@ ENV is the name of current environment as a string."
     '("DefineVerbatimEnvironment"
       LaTeX-fancyvrb-arg-define-environment)
     '("RecustomVerbatimEnvironment"
-      (TeX-arg-eval completing-read
-                    (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-arg-completing-read LaTeX-fancyvrb-base-environments
+                               "Verbatim environment")
+      (TeX-arg-completing-read LaTeX-fancyvrb-base-environments
+                               "Based on environment")
       (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)))
 
     '("CustomVerbatimCommand"
@@ -627,24 +622,17 @@ ENV is the name of current environment as a string."
       (TeX-arg-conditional (member "fvextra" (TeX-style-list))
                            (TeX-arg-verb-delim-or-brace)
                            (TeX-arg-verb)))
-    '("UseVerb" (TeX-arg-eval
-                 completing-read
-                 (TeX-argument-prompt nil nil "Saved name")
-                 (LaTeX-fancyvrb-saveverb-list)))
+    '("UseVerb" (TeX-arg-completing-read (LaTeX-fancyvrb-saveverb-list)
+                                         "Saved name"))
     ;; \UseVerb also has a starred version
-    '("UseVerb*" (TeX-arg-eval
-                  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)))
-    '("LUseVerbatim" (TeX-arg-eval completing-read
-                                   (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)))
+    '("UseVerb*" (TeX-arg-completing-read (LaTeX-fancyvrb-saveverb-list)
+                                          "Saved name"))
+    '("UseVerbatim" (TeX-arg-completing-read (LaTeX-fancyvrb-saveverbatim-list)
+                                             "Saved name"))
+    '("LUseVerbatim" (TeX-arg-completing-read 
(LaTeX-fancyvrb-saveverbatim-list)
+                                              "Saved name"))
+    '("BUseVerbatim" (TeX-arg-completing-read 
(LaTeX-fancyvrb-saveverbatim-list)
+                                              "Saved name"))
 
     ;; Writing and reading verbatim files
     '("VerbatimInput" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
diff --git a/style/floatrow.el b/style/floatrow.el
index be8878f023..57596ee78e 100644
--- a/style/floatrow.el
+++ b/style/floatrow.el
@@ -1,6 +1,6 @@
 ;;; floatrow.el --- AUCTeX style for `floatrow.sty' (v0.3b)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2017--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2017--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -562,12 +562,10 @@ only the parsed items."
     ;; 2.1 The \floatbox Macro
     ;; \floatbox[<preamble>]{<captype>}[<width>][<height>][<vert 
pos>]{<caption>}{<object>}
     '("floatbox"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Preamble")
-                    '("\\capbeside" "\\nocapbeside" "\\captop")]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Float type")
-                    LaTeX-floatrow-supported-float-types)
+      [TeX-arg-completing-read ("\\capbeside" "\\nocapbeside" "\\captop")
+                               "Preamble"]
+      (TeX-arg-completing-read LaTeX-floatrow-supported-float-types
+                               "Float type")
       LaTeX-floatrow-arg-floatbox)
 
     ;; 2.2 Creation of Personal Commands for Float Boxes
@@ -580,21 +578,15 @@ only the parsed items."
            (TeX-add-symbols
             `(,cmd LaTeX-floatrow-arg-floatbox))
            (format "%s" cmd))))
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Float type")
-                    '("figure" "table"))
+      (TeX-arg-completing-read ("figure" "table") "Float type")
       [ 2 ])
 
     '("renewfloatcommand"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Command")
-                    (LaTeX-floatrow-newfloatcommand-list))
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Float type")
-                    '("figure" "table"))
+      (TeX-arg-completing-read (LaTeX-floatrow-newfloatcommand-list)
+                               "Command")
+      (TeX-arg-completing-read ("figure" "table") "Float type")
       [ 2 ])
 
-
     ;; 2.2.2 Predefined Float Box Commands
     '("ffigbox"
       LaTeX-floatrow-arg-floatbox)
@@ -614,9 +606,8 @@ only the parsed items."
 
     ;; 3 Float Layout Settings
     '("floatsetup"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Float type")
-                    LaTeX-floatrow-supported-float-types]
+      [TeX-arg-completing-read LaTeX-floatrow-supported-float-types
+                               "Float type"]
       (TeX-arg-key-val (LaTeX-floatrow-key-val-options)))
 
     ;; 3.2 Settings for Current Float Environment
@@ -625,9 +616,8 @@ only the parsed items."
 
     ;; 3.3 Clearing of Settings for Current Float Type
     '("clearfloatsetup"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Float type")
-                    LaTeX-floatrow-supported-float-types))
+      (TeX-arg-completing-read LaTeX-floatrow-supported-float-types
+                               "Float type"))
 
     ;; 3.4 Temporary Clearing of All Float Settings
     '("killfloatstyle" 0)
diff --git a/style/fontaxes.el b/style/fontaxes.el
index 62db15af54..aebe4c6e0a 100644
--- a/style/fontaxes.el
+++ b/style/fontaxes.el
@@ -1,6 +1,6 @@
 ;;; fontaxes.el --- AUCTeX style for `fontaxes.sty' version v1.0d  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -57,23 +57,19 @@
 
     ;; Figure versions
     '("figureversion"
-      (TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     "Style, alignment: "
-                     '(("text") ("osf")
-                       ("lining") ("lf")
-                       ("tabular") ("tab")
-                       ("proportional") ("prop"))) ","))
+      (TeX-arg-completing-read-multiple ("text"         "osf"
+                                         "lining"       "lf"
+                                         "tabular"      "tab"
+                                         "proportional" "prop")
+                                        "Style, alignment"))
     '("txfigures" -1)  ; style: text figures (osf)
     '("lnfigures" -1)  ; style: lining figures
     '("tbfigures" -1)  ; alignment: tabular figures
     '("prfigures" -1)  ; alignment: proportional figures
     '("fontfigurestyle"
-      (TeX-arg-eval completing-read "Style: "
-                    '(("text") ("lining"))))
+      (TeX-arg-completing-read ("text" "lining") "Style"))
     '("fontfigurealignment"
-      (TeX-arg-eval completing-read "Alignment: "
-                    '(("tabular") ("proportional"))))
+      (TeX-arg-completing-read ("tabular" "proportional") "Alignment"))
     '("fontbasefamily" t)
 
     ;; Math versions
@@ -82,11 +78,9 @@
     '("tabularmath"      -1)  ; math figure alignment
     '("proportionalmath" -1)  ;
     '("mathweight"
-      (TeX-arg-eval completing-read "Math weight: "
-                    '(("bold") ("normal"))))
+      (TeX-arg-completing-read ("bold" "normal") "Math weight"))
     '("mathfigurealignment"
-      (TeX-arg-eval completing-read "Math figure alignment: "
-                    '(("tabular") ("proportional"))))
+      (TeX-arg-completing-read ("tabular" "proportional") "Math figure 
alignment"))
 
     ;; Additional commands
     ;; These macros are now part of LaTeX kernel 2020-02-02
diff --git a/style/fontspec.el b/style/fontspec.el
index 6970b75b58..90018a21d4 100644
--- a/style/fontspec.el
+++ b/style/fontspec.el
@@ -1,6 +1,6 @@
 ;;; fontspec.el --- AUCTeX style for `fontspec.sty' version 2.7i.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2013--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2013--2022 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano <mose@gnu.org>
@@ -369,15 +369,13 @@ to appropriate keys which are eventually prepended to
 
     ;; 23 Defining new features
     '("newAATfeature"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Existing feature")
-                    (LaTeX-fontspec-font-features))
+      (TeX-arg-completing-read (LaTeX-fontspec-font-features)
+                               "Existing feature")
       "New option" 2)
 
     '("newopentypefeature"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Existing feature")
-                    (LaTeX-fontspec-font-features))
+      (TeX-arg-completing-read (LaTeX-fontspec-font-features)
+                               "Existing feature")
       "New option" t)
 
     '("newfontfeature" "New feature" t)
@@ -388,9 +386,8 @@ to appropriate keys which are eventually prepended to
 
     ;; 26 Renaming existing features & options
     '("aliasfontfeature"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Existing feature")
-                    (LaTeX-fontspec-font-features))
+      (TeX-arg-completing-read (LaTeX-fontspec-font-features)
+                               "Existing feature")
       "New name")
 
     '("aliasfontfeatureoption"
diff --git a/style/footmisc.el b/style/footmisc.el
index bc3b56adf9..2fb0385f9f 100644
--- a/style/footmisc.el
+++ b/style/footmisc.el
@@ -47,43 +47,34 @@
 
     ;; 1.7 The \setfnsymbol and \DefineFNsymbols commands
     '("DefineFNsymbols"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    '("bringhurst" "chicago" "wiley"
-                      "lamport" "lamport*"))
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Style (text or math)")
-                    '("text" "math")]
+      (TeX-arg-completing-read ("bringhurst" "chicago" "wiley"
+                                "lamport" "lamport*")
+                               "Name")
+      [TeX-arg-completing-read ("text" "math") "Style"]
       1)
     '("DefineFNsymbols*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    '("bringhurst" "chicago" "wiley"
-                      "lamport" "lamport*"))
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Style (text or math)")
-                    '("text" "math")]
+      (TeX-arg-completing-read ("bringhurst" "chicago" "wiley"
+                                "lamport" "lamport*")
+                               "Name")
+      [TeX-arg-completing-read ("text" "math") "Style"]
       1)
 
     ;; These two commands define both text and math variants of the
     ;; footnote symbols
     '("DefineFNsymbolsTM"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    '("bringhurst" "chicago" "wiley"
-                      "lamport" "lamport*"))
+      (TeX-arg-completing-read ("bringhurst" "chicago" "wiley"
+                                "lamport" "lamport*")
+                               "Name")
       1)
     '("DefineFNsymbolsTM*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    '("bringhurst" "chicago" "wiley"
-                      "lamport" "lamport*"))
+      (TeX-arg-completing-read ("bringhurst" "chicago" "wiley"
+                                "lamport" "lamport*")
+                               "Name")
       1)
     '("setfnsymbol"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    '("bringhurst" "chicago" "wiley"
-                      "lamport" "lamport*")))
+      (TeX-arg-completing-read ("bringhurst" "chicago" "wiley"
+                                "lamport" "lamport*")
+                               "Name"))
 
     ;; 1.11 Option hang
     "hangfootparskip"
diff --git a/style/graphicx.el b/style/graphicx.el
index 5704ecf19e..36e8dada8c 100644
--- a/style/graphicx.el
+++ b/style/graphicx.el
@@ -241,34 +241,34 @@ subdirectories and inserts the relative file name.  See
    (TeX-add-symbols
     '("reflectbox" "Argument")
 
-    '("resizebox"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Width")
-                    (append '("\\width" "!")
-                            (mapcar
-                             (lambda (x) (concat TeX-esc (car x)))
-                             (LaTeX-length-list))))
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Height")
-                    (append '("\\height" "\\totalheight" "\\depth" "!")
-                            (mapcar
-                             (lambda (x) (concat TeX-esc (car x)))
-                             (LaTeX-length-list))))
+    `("resizebox"
+      (TeX-arg-completing-read
+       ,(lambda () (append '("\\width" "!")
+                           (mapcar
+                            (lambda (x) (concat TeX-esc (car x)))
+                            (LaTeX-length-list))))
+       "Width")
+      (TeX-arg-completing-read
+       ,(lambda () (append '("\\height" "\\totalheight" "\\depth" "!")
+                           (mapcar
+                            (lambda (x) (concat TeX-esc (car x)))
+                            (LaTeX-length-list))))
+       "Height")
       "Argument")
 
-    '("resizebox*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Width")
-                    (append '("\\width" "!")
-                            (mapcar
-                             (lambda (x) (concat TeX-esc (car x)))
-                             (LaTeX-length-list))))
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Height")
-                    (append '("\\height" "\\totalheight" "\\depth" "!")
-                            (mapcar
-                             (lambda (x) (concat TeX-esc (car x)))
-                             (LaTeX-length-list))))
+    `("resizebox*"
+      (TeX-arg-completing-read
+       (lambda () (append '("\\width" "!")
+                          (mapcar
+                           (lambda (x) (concat TeX-esc (car x)))
+                           (LaTeX-length-list))))
+       "Width")
+      (TeX-arg-completing-read
+       (lambda () (append '("\\height" "\\totalheight" "\\depth" "!")
+                          (mapcar
+                           (lambda (x) (concat TeX-esc (car x)))
+                           (LaTeX-length-list))))
+       "Height")
       "Argument")
 
     '("rotatebox" (TeX-arg-conditional (member "graphics" (TeX-style-list))
diff --git a/style/harvard.el b/style/harvard.el
index 6373af36f5..b321d2400a 100644
--- a/style/harvard.el
+++ b/style/harvard.el
@@ -1,6 +1,6 @@
 ;;; harvard.el --- Support for Harvard Citation style package for AUCTeX.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 1994, 1997, 2005, 2012, 2014, 2020 Free Software Foundation, 
Inc.
+;; Copyright (C) 1994--2022 Free Software Foundation, Inc.
 
 ;; Author: Berwin Turlach <statba@nus.edu.sg>
 ;; Maintainer: auctex-devel@gnu.org
@@ -53,18 +53,15 @@
       (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) nil)
       TeX-arg-cite)
     '("citationstyle"
-      (TeX-arg-eval completing-read "Citation style: " '(("agsm") ("dcu"))))
+      (TeX-arg-completing-read ("agsm" "dcu") "Citation style"))
     '("citationmode"
-      (TeX-arg-eval completing-read "Citation mode: "
-                    '(("full") ("abbr") ("default"))))
+      (TeX-arg-completing-read ("full" "abbr" "default") "Citation mode"))
     '("harvardparenthesis"
-      (TeX-arg-eval completing-read "Harvardparenthesis: "
-                    '(("round") ("curly") ("angle") ("square"))))
+      (TeX-arg-completing-read ("round" "curly" "angle" "square") 
"Harvardparenthesis"))
     '("bibliographystyle"
-      (TeX-arg-eval
-       completing-read "Bibliography style: "
-       '(("agsm") ("apsr") ("dcu") ("jmr") ("jphysicsB") ("kluwer") 
("nederlands") ("econometrica")))
-      ignore)
+      (TeX-arg-completing-read ("agsm" "apsr" "dcu" "jmr" "jphysicsB" "kluwer"
+                                "nederlands" "econometrica")
+                               "Bibliography style"))
     '("harvarditem" [ "Short citation" ]
       "Complete citation" "Year" TeX-arg-define-cite))
 
diff --git a/style/hologo.el b/style/hologo.el
index f5030fd50f..7e4608939b 100644
--- a/style/hologo.el
+++ b/style/hologo.el
@@ -154,12 +154,12 @@
            (TeX-argument-insert logo nil)
            (format "%s" keyval)))))
 
-    '("hologoDriverSetup" (TeX-arg-eval completing-read
-                                        "Driver: "
-                                        '("pdftex"  "luatex"
-                                          "dvipdfm" "dvipdfmx"
-                                          "dvips"   "dvipsone" "xdvi"
-                                          "xetex"   "vtex"     
"driverfallback")))
+    '("hologoDriverSetup" (TeX-arg-completing-read
+                           ("pdftex"  "luatex"
+                            "dvipdfm" "dvipdfmx"
+                            "dvips"   "dvipsone" "xdvi"
+                            "xetex"   "vtex"     "driverfallback")
+                           "Driver"))
 
     '("hologoFontSetup"
       (TeX-arg-key-val (("general") ("bibsf")
diff --git a/style/ifthen.el b/style/ifthen.el
index 2f426029ef..6610f88e82 100644
--- a/style/ifthen.el
+++ b/style/ifthen.el
@@ -63,9 +63,7 @@
     "NOT"
     '("newboolean" "Name")
     '("provideboolean" "Name")
-    '("setboolean" "Name" (TeX-arg-eval completing-read
-                                        (TeX-argument-prompt nil nil "Value")
-                                        '("true" "false"))))
+    '("setboolean" "Name" (TeX-arg-completing-read ("true" "false") "Value")))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
diff --git a/style/imakeidx.el b/style/imakeidx.el
index 325631efed..ef434137b3 100644
--- a/style/imakeidx.el
+++ b/style/imakeidx.el
@@ -1,6 +1,6 @@
 ;;; imakeidx.el --- AUCTeX style for `imakeidx.sty'.  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2012-2013, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano <giordano.mose@libero.it>
@@ -29,6 +29,11 @@
 
 ;;; Code:
 
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+                  "font-latex"
+                  (keywords class))
+
 (require 'tex)
 (require 'latex)
 
@@ -65,7 +70,7 @@
                    '(("headers")))))
 
    (TeX-add-symbols
-    '("makeindex" [ (TeX-arg-key-val LaTeX-imakeidx-makeindex-options) ])
+    '("makeindex" [TeX-arg-key-val LaTeX-imakeidx-makeindex-options])
     '("indexsetup" (TeX-arg-key-val LaTeX-imakeidx-indexsetup-options))
     '("splitindexoptions" "Command line option")
     '("index" [ "Index name" ] TeX-arg-index)
@@ -92,7 +97,19 @@
           '(("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list))
           TeX-complete-list))
    (and (fboundp 'reftex-add-index-macros)
-        (reftex-add-index-macros '(default))))
+        (reftex-add-index-macros '(default)))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("makeindex"         "[")
+                                ("indexsetup"        "{")
+                                ("splitindexoptions" "{")
+                                ("indexprologue"     "[{")
+                                ("printindex"        "["))
+                              'function)
+     (font-latex-add-keywords '(("index" "[{"))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-imakeidx-package-options
diff --git a/style/l3doc.el b/style/l3doc.el
index 69ae346b39..de11ee0fa3 100644
--- a/style/l3doc.el
+++ b/style/l3doc.el
@@ -168,14 +168,10 @@ For syntax environment from l3doc class."
       TeX-arg-macro)
     '("cs"
       [TeX-arg-key-val LaTeX-l3doc-cmd-key-val-options]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Macro")
-                    (TeX-symbol-list)))
+      (TeX-arg-completing-read (TeX-symbol-list) "Macro"))
     '("tn"
       [TeX-arg-key-val LaTeX-l3doc-key-val-options]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Macro")
-                    (TeX-symbol-list)))
+      (TeX-arg-completing-read (TeX-symbol-list) "Macro"))
 
     ;; "meta" is provided by doc.el, so don't add here again
     '("Arg" "Argument")
@@ -184,9 +180,7 @@ For syntax environment from l3doc class."
     '("parg" "Picture mode argument")
 
     '("file" "File name")
-    '("env" (TeX-arg-eval completing-read
-                          (TeX-argument-prompt nil nil "Environment")
-                          (LaTeX-environment-list)))
+    '("env" (TeX-arg-completing-read (LaTeX-environment-list) "Environment"))
     '("pkg" "Package name")
     '("cls" "Class name")
 
diff --git a/style/ltugboat.el b/style/ltugboat.el
index 7511e523f3..92811ddec7 100644
--- a/style/ltugboat.el
+++ b/style/ltugboat.el
@@ -1,6 +1,6 @@
 ;;; ltugboat.el --- AUCTeX style for `ltugboat.cls' (v2.22)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2019--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2019--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -241,25 +241,15 @@
 
     ;; 10.2 Other special typesetting
     "Dash"
-    '("cs" (TeX-arg-eval let ((macro (completing-read
-                                      (TeX-argument-prompt nil nil
-                                                           "Command")
-                                      (TeX-symbol-list))))
-                         (format "%s" macro)))
-    '("env" (TeX-arg-eval let ((env (completing-read
-                                     (TeX-argument-prompt nil nil
-                                                          "Environment")
-                                     (LaTeX-environment-list))))
-                          (format "%s" env)))
+    '("cs"  (TeX-arg-completing-read (TeX-symbol-list) "Macro"))
+    '("env" (TeX-arg-completing-read (LaTeX-environment-list) "Environment"))
     '("meta"      "Text")
     '("tubbraced" "Text")
     '("nth"       "Number")
 
     ;; 12 Bibliography
     '("SetBibJustification"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Justification")
-                    '("\\raggedright"  "\\sloppy"))))
+      (TeX-arg-completing-read ("\\raggedright" "\\sloppy") "Justification")))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
diff --git a/style/ltxdoc.el b/style/ltxdoc.el
index feeb300d34..48040c4648 100644
--- a/style/ltxdoc.el
+++ b/style/ltxdoc.el
@@ -51,9 +51,7 @@
 
    (TeX-add-symbols
     '("cmd" TeX-arg-macro)
-    '("cs" (TeX-arg-eval completing-read
-                         (TeX-argument-prompt nil nil "Macro")
-                         (TeX-symbol-list)))
+    '("cs" (TeX-arg-completing-read (TeX-symbol-list) "Macro"))
     '("marg" "Mandatory argument")
     '("oarg" "Optional argument")
     '("parg" "Picture mode argument")
diff --git a/style/makeidx.el b/style/makeidx.el
index 4fe7ce464c..658094c3b1 100644
--- a/style/makeidx.el
+++ b/style/makeidx.el
@@ -1,6 +1,6 @@
 ;;; makeidx.el --- AUCTeX support for makeidx.sty  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1999, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2020, 2022 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -24,13 +24,18 @@
 
 ;;; Code:
 
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+                  "font-latex"
+                  (keywords class))
+
 (require 'tex)
 
 (TeX-add-style-hook
  "makeidx"
  (lambda ()
    (TeX-add-symbols
-    "printindex" "indexspace")
+    "printindex")
 
    ;; Parsing the default index macro is defined in latex.el
    ;; The same is true form completion in the index macro
@@ -43,7 +48,13 @@
 
    ;; RefTeX support
    (and (fboundp 'reftex-add-index-macros)
-        (reftex-add-index-macros '(default))))
+        (reftex-add-index-macros '(default)))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("printindex" ""))
+                              'function)))
  TeX-dialect)
 
 (defvar LaTeX-makeidx-package-options nil
diff --git a/style/mathtools.el b/style/mathtools.el
index d0e1f262c4..505c15718f 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -316,14 +316,10 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
            (format "%s" newtag))))
       [ "Inner format" ] "Left" "Right")
     '("renewtagform"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-mathtools-newtagform-list))
+      (TeX-arg-completing-read (LaTeX-mathtools-newtagform-list) "Name")
       [ "Inner format" ] "Left" "Right")
     '("usetagform"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-mathtools-newtagform-list)))
+      (TeX-arg-completing-read (LaTeX-mathtools-newtagform-list) "Name"))
     ;; 3.2.2 Showing only referenced tags
     '("refeq" TeX-arg-ref)
     '("noeqref" TeX-arg-ref)
@@ -388,9 +384,7 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
                      (concat "Command: " TeX-esc)
                      (mapcar #'car 
(LaTeX-mathtools-DeclarePairedDelimiter-list)))))
            (concat TeX-esc cmd))))
-      (TeX-arg-eval completing-read
-                    "star or nostar: "
-                    '("star" "nostar"))
+      (TeX-arg-completing-read ("star" "nostar") "star or nostar")
       t)
     ;; 3.7.1 Left and right parentheses
     '("lparen" TeX-arg-insert-right-brace-maybe)
@@ -421,9 +415,7 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
            (format "%s" env))))
       3)
     '("renewgathered"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-mathtools-newgathered-list))
+      (TeX-arg-completing-read (LaTeX-mathtools-newgathered-list) "Name")
       3)
     ;; 4.6 Split fractions
     '("splitfrac" 2)
diff --git a/style/mdframed.el b/style/mdframed.el
index 0e3dd9bb51..53981d6207 100644
--- a/style/mdframed.el
+++ b/style/mdframed.el
@@ -1,6 +1,6 @@
 ;;; mdframed.el --- AUCTeX style for `mdframed.sty' (v1.9b)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2016--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -290,29 +290,20 @@ and prepends them to variable 
`LaTeX-mdframed-key-val-options'."
 
     '("renewmdenv"
       [TeX-arg-key-val (LaTeX-mdframed-key-val-options)]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Environment")
-                    (LaTeX-mdframed-newmdenv-list)))
+      (TeX-arg-completing-read (LaTeX-mdframed-newmdenv-list) "Environment"))
 
     '("surroundwithmdframed"
       [TeX-arg-key-val (LaTeX-mdframed-key-val-options)]
       TeX-arg-environment)
 
     '("mdflength"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Length")
-                    '(("skipabove")
-                      ("skipbelow")
-                      ("leftmargin")
-                      ("rightmargin")
-                      ("innerleftmargin")
-                      ("innerrightmargin")
-                      ("innertopmargin")
-                      ("innerbottommargin")
-                      ("linewidth")
-                      ("innerlinewidth")
-                      ("middlelinewidth")
-                      ("outerlinewidth"))))
+      (TeX-arg-completing-read ("skipabove"       "skipbelow"
+                                "leftmargin"      "rightmargin"
+                                "innerleftmargin" "innerrightmargin"
+                                "innertopmargin"  "innerbottommargin"
+                                "linewidth"       "innerlinewidth"
+                                "middlelinewidth" "outerlinewidth")
+                               "Length"))
 
     ;; 5. Defining your own style
     '("mdfdefinestyle"
@@ -325,9 +316,7 @@ and prepends them to variable 
`LaTeX-mdframed-key-val-options'."
       (TeX-arg-key-val (LaTeX-mdframed-key-val-options)))
 
     '("mdfapptodefinestyle"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Style name")
-                    (LaTeX-mdframed-mdfdefinestyle-list))
+      (TeX-arg-completing-read (LaTeX-mdframed-mdfdefinestyle-list) "Style 
name")
       (TeX-arg-key-val (LaTeX-mdframed-key-val-options)))
 
     ;; 6.11. Title commands inside the environment
diff --git a/style/menukeys.el b/style/menukeys.el
index ac375ea4ee..72b5560deb 100644
--- a/style/menukeys.el
+++ b/style/menukeys.el
@@ -1,6 +1,6 @@
 ;;; menukeys.el --- AUCTeX style for `menukeys.sty' (v1.4)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -113,15 +113,15 @@ from the variable `TeX-symbol-list' before being 
re-added."
         (setq TeX-symbol-list
               (assq-delete-all (car (assoc macro (TeX-symbol-list))) 
TeX-symbol-list)))
       (TeX-add-symbols
-       `(,macro [ TeX-arg-eval completing-read
-                               (TeX-argument-prompt t nil
-                                                    ,(concat "Input separator "
-                                                             "(default "
-                                                             (if (and sep (not 
(string= sep "")))
-                                                                 sep
-                                                               ",")
-                                                             ")"))
-                               LaTeX-menukeys-input-separators-list ] t ))
+       `(,macro [TeX-arg-completing-read
+                 LaTeX-menukeys-input-separators-list
+                 ,(concat "Input separator "
+                          "(default "
+                          (if (and sep (not (string= sep "")))
+                              sep
+                            ",")
+                          ")")]
+                t ))
       (when (and (featurep 'font-latex)
                  (eq TeX-install-font-lock 'font-latex-setup))
         (font-latex-add-keywords `((,macro "[{"))
@@ -158,15 +158,15 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
       (setq TeX-symbol-list
             (assq-delete-all (car (assoc macro (TeX-symbol-list))) 
TeX-symbol-list)))
     (TeX-add-symbols
-     `(,macro [ TeX-arg-eval completing-read
-                             (TeX-argument-prompt t nil
-                                                  ,(concat "Input separator "
-                                                          "(default "
-                                                          (if (and sep (not 
(string= sep "")))
-                                                              sep
-                                                            ",")
-                                                          ")"))
-                             LaTeX-menukeys-input-separators-list ] t ))
+     `(,macro [TeX-arg-completing-read
+               LaTeX-menukeys-input-separators-list
+               ,(concat "Input separator "
+                        "(default "
+                        (if (and sep (not (string= sep "")))
+                            sep
+                          ",")
+                        ")")]
+              t))
     (when (and (featurep 'font-latex)
                (eq TeX-install-font-lock 'font-latex-setup))
       (font-latex-add-keywords `((,macro       "[{"))
@@ -197,33 +197,26 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
       ;; \directory [<separator>]{path}
       ;; \keys      [<separator>]{keystrokes}
       '("menu"
-        [ TeX-arg-eval completing-read
-          (TeX-argument-prompt t nil "Input separator")
-          LaTeX-menukeys-input-separators-list ]
+        [TeX-arg-completing-read LaTeX-menukeys-input-separators-list
+                                 "Input separator"]
         t)
 
       '("directory"
-        [ TeX-arg-eval completing-read
-          (TeX-argument-prompt t nil "Input separator")
-          LaTeX-menukeys-input-separators-list ]
+        [TeX-arg-completing-read LaTeX-menukeys-input-separators-list
+                                 "Input separator"]
         t)
 
       '("keys"
-        [ TeX-arg-eval completing-read
-          (TeX-argument-prompt t nil "Input separator")
-          LaTeX-menukeys-input-separators-list ]
+        [TeX-arg-completing-read LaTeX-menukeys-input-separators-list
+                                 "Input separator"]
         t)))
 
    (TeX-add-symbols
     ;; 4.2.1 Predefined styles
     ;; \drawtikzfolder[<front fill>][<draw>]
     '("drawtikzfolder"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Front color")
-        (LaTeX-xcolor-definecolor-list) ]
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Line color")
-        (LaTeX-xcolor-definecolor-list) ] )
+      [TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Front color"]
+      [TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Line color"])
 
     ;; 4.2.2 Declaring styles
     ;; \newmenustylesimple*{<name>}[<pre>]{<style>}[<sep>][<post>]{<theme>}
@@ -235,9 +228,8 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
            (LaTeX-add-menukeys-newmenustyles name)
            (format "%s" name))))
       [ t ] nil [ nil ] [ nil ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color theme")
-                    (LaTeX-menukeys-newmenucolortheme-list)))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list)
+                               "Color theme"))
 
     '("newmenustylesimple*"
       (TeX-arg-eval
@@ -247,9 +239,7 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
            (LaTeX-add-menukeys-newmenustyles name)
            (format "%s" name))))
       [ t ] nil [ nil ] [ nil ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color theme")
-                    (LaTeX-menukeys-newmenucolortheme-list)))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list) "Color 
theme"))
 
     ;; 
\newmenustyle*{<name>}[<pre>]{<first>}[<sep>]{<mid>}{<last>}{<single>}[<post>]{<theme>}
     '("newmenustyle"
@@ -260,9 +250,7 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
            (LaTeX-add-menukeys-newmenustyles name)
            (format "%s" name))))
       [ t ] nil [ nil ] nil nil nil [ nil ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color theme")
-                    (LaTeX-menukeys-newmenucolortheme-list)))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list) "Color 
theme"))
 
     '("newmenustyle*"
       (TeX-arg-eval
@@ -272,9 +260,7 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
            (LaTeX-add-menukeys-newmenustyles name)
            (format "%s" name))))
       [ t ] nil [ nil ] nil nil nil [ nil ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color theme")
-                    (LaTeX-menukeys-newmenucolortheme-list)))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list) "Color 
theme"))
 
     '("CurrentMenuElement" 0)
 
@@ -294,26 +280,19 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
     ;; 4.2.4 Changing styles
     ;; \changemenuelement*{name}{element}{definition}
     '("changemenuelement"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-menukeys-newmenustyle-list))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenustyle-list) "Name")
       2)
 
     '("changemenuelement*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-menukeys-newmenustyle-list))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenustyle-list) "Name")
       2)
 
     ;; Same arguments as \newmenustylesimple
     '("renewmenustylesimple"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-menukeys-newmenustyle-list))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenustyle-list) "Name")
       [ t ] nil [ nil ] [ nil ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color theme")
-                    (LaTeX-menukeys-newmenucolortheme-list)))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list)
+                               "Color theme"))
 
     '("providemenustylesimple"
       (TeX-arg-eval
@@ -323,19 +302,15 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
            (LaTeX-add-menukeys-newmenustyles name)
            (format "%s" name))))
       [ t ] nil [ nil ] [ nil ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color theme")
-                    (LaTeX-menukeys-newmenucolortheme-list)))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list)
+                               "Color theme"))
 
     ;; Same arguments as \newmenustyle
     '("providemenustyle"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-menukeys-newmenustyle-list))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenustyle-list) "Name")
       [ t ] nil [ nil ] nil nil nil [ nil ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color theme")
-                    (LaTeX-menukeys-newmenucolortheme-list)))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list)
+                               "Color theme"))
 
     '("renewmenustyle"
       (TeX-arg-eval
@@ -345,9 +320,8 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
            (LaTeX-add-menukeys-newmenustyles name)
            (format "%s" name))))
       [ t ] nil [ nil ] nil nil nil [ nil ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color theme")
-                    (LaTeX-menukeys-newmenucolortheme-list)))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list)
+                               "Color theme"))
 
     ;; 4.3 Color themes
     ;; 4.3.2 Create a theme
@@ -406,12 +380,8 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
 
     ;; 4.3.4 Change a theme
     '("changemenucolor"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-menukeys-newmenucolortheme-list))
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Element")
-                    '("bg" "br" "txt"))
+      (TeX-arg-completing-read (LaTeX-menukeys-newmenucolortheme-list) "Name")
+      (TeX-arg-completing-read ("bg" "br" "txt") "Element")
       (TeX-arg-eval
        (lambda ()
          (let ((model (completing-read
@@ -497,9 +467,9 @@ macro.  If RENEW is non-nil, query for an already defined 
macro."
           ((= (cdr cmd) 0)
            (push (car cmd) collector))
           ((= (cdr cmd) 1)
-           (push (list (car cmd) '(TeX-arg-eval completing-read
-                                                "Direction: "
-                                                '("^" "v" ">" "<")))
+           (push (list (car cmd) '(TeX-arg-completing-read
+                                   ("^" "v" ">" "<")
+                                   "Direction"))
                  collector))
           ((= (cdr cmd) 2)
            (push (car cmd) collector)
diff --git a/style/metalogo.el b/style/metalogo.el
index fc6233c06d..00091e27f6 100644
--- a/style/metalogo.el
+++ b/style/metalogo.el
@@ -1,6 +1,6 @@
 ;;; metalogo.el --- AUCTeX style for `metalogo.sty' version 0.12.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2013, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2013--2022 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano <giordano.mose@libero.it>
@@ -48,12 +48,12 @@
     '("LuaLaTeX")
     ;; Commands
     '("setlogokern"
-      (TeX-arg-eval completing-read "Kern parameters: "
-                    '(("Te") ("eX") ("La") ("aT") ("Xe") ("eT") ("eL") ("X2")))
+      (TeX-arg-completing-read ("Te" "eX" "La" "aT" "Xe" "eT" "eL" "X2")
+                               "Kern parameters")
       (TeX-arg-length "Dimension"))
     '("setlogodrop"
-      [TeX-arg-eval completing-read "Drop parameters: "
-                    '(("TeX") ("Xe") ("XeTeX"))]
+      [TeX-arg-completing-read ("TeX" "Xe" "XeTeX")
+                               "Drop parameters"]
       (TeX-arg-length "Dimension"))
     '("setLaTeXa" 1)
     '("setLaTeXee" 1)
diff --git a/style/multind.el b/style/multind.el
index 68a4ab6a9f..b3ced1327a 100644
--- a/style/multind.el
+++ b/style/multind.el
@@ -1,6 +1,6 @@
 ;;; multind.el --- AUCTeX support for multiple indices with multind.sty.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 1999, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 1999--2022 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -24,6 +24,11 @@
 
 ;;; Code:
 
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+                  "font-latex"
+                  (keywords class))
+
 (require 'tex)
 (require 'latex)
 
@@ -36,7 +41,7 @@
     '("makeindex" "Indextag")
     '("index" TeX-arg-index-tag TeX-arg-index)
     '("printindex" TeX-arg-index-tag "Title")
-    "printindex" "indexspace")
+    "indexspace")
 
    ;; Parsing index macros
    (setq LaTeX-auto-regexp-list
@@ -57,7 +62,16 @@
 
    ;; RefTeX support
    (and (fboundp 'reftex-add-index-macros)
-        (reftex-add-index-macros '(multind))))
+        (reftex-add-index-macros '(multind)))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("makeindex"  "{")
+                                ("printindex" "{{"))
+                              'function)
+     (font-latex-add-keywords '(("index" "{{"))
+                              'reference)))
  TeX-dialect)
 
 (defvar LaTeX-multind-package-options nil
diff --git a/style/multirow.el b/style/multirow.el
index 11ae34e6ba..87603ed928 100644
--- a/style/multirow.el
+++ b/style/multirow.el
@@ -42,19 +42,17 @@
  (lambda ()
    (TeX-add-symbols
     ;; \multirow[<vpos>]{<nrows>}[<bigstruts>]{<width>}[<vmove>]{<text>}
-    '("multirow"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Vertical position")
-                    '("c" "b" "t")]
+    `("multirow"
+      [TeX-arg-completing-read ("c" "b" "t") "Vertical position"]
       "Number of rows"
       [ "Big struts" ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Width")
-                    (append
-                     '("*" "=")
-                     (mapcar (lambda (x)
-                               (concat TeX-esc (car x)))
-                             (LaTeX-length-list))))
+      (TeX-arg-completing-read
+       ,(lambda ()
+          (append '("*" "=")
+                  (mapcar (lambda (x)
+                            (concat TeX-esc (car x)))
+                          (LaTeX-length-list))))
+       "Width")
       [TeX-arg-length "Vertical fix-up"]
       t)
     "multirowsetup"
diff --git a/style/natbib.el b/style/natbib.el
index ba6622ab56..00ea4b396c 100644
--- a/style/natbib.el
+++ b/style/natbib.el
@@ -1,6 +1,6 @@
 ;;; natbib.el --- AUCTeX style for `natbib.sty' version 8.31b  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 1997, 1998, 2004, 2007, 2014--2020 Free Software Foundation, 
Inc.
+;; Copyright (C) 1997, 1998, 2004, 2007, 2014--2022 Free Software Foundation, 
Inc.
 
 ;; Authors: Berwin Turlach <statba@nus.edu.sg>
 ;;          Carsten Dominik <dominik@strw.leidenuniv.nl>
@@ -118,10 +118,10 @@
       "Punctuation between author and year"
       "Punctuation between years for common authors")
 
-    '("citestyle" (TeX-arg-eval completing-read
-                                (TeX-argument-prompt nil nil "Style")
-                                '("plain" "plainnat" "agu" "egu"
-                                  "agms" "dcu" "kluwer" "cospar" "nature")))
+    '("citestyle" (TeX-arg-completing-read ("plain" "plainnat" "agu" "egu"
+                                            "agms" "dcu" "kluwer" "cospar"
+                                            "nature")
+                                           "Style"))
 
     ;; 2.12 Other Formatting Options
     "bibsection"
diff --git a/style/newfloat.el b/style/newfloat.el
index 77239b9798..b1947bb33d 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -166,18 +166,18 @@ If `caption.el' is loaded, add the new floating 
environment to
            (format "%s" newfloat)))))
 
     '("SetupFloatingEnvironment"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Floating environment")
-                    (mapcar #'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+      (TeX-arg-completing-read
+       (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list))
+       "Floating environment")
       (TeX-arg-key-val (LaTeX-newfloat-key-val-options)))
 
     '("ForEachFloatingEnvironment" t)
     '("ForEachFloatingEnvironment*" t)
 
     '("PrepareListOf"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Floating environment")
-                    (mapcar #'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+      (TeX-arg-completing-read
+       (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list))
+       "Floating environment")
       t)
 
     `("newfloatsetup"
diff --git a/style/ntheorem.el b/style/ntheorem.el
index cd8eff40a5..aa28c31f88 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -1,6 +1,6 @@
 ;;; ntheorem.el --- AUCTeX style for `ntheorem.sty' (v1.33)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2015-2022  Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -202,8 +202,8 @@ make them available as new environments.  Update
                         "") ])
 
     '("renewtheorem"
-      (TeX-arg-eval completing-read "Environment: "
-                    (LaTeX-ntheorem-newtheorem-list))
+      (TeX-arg-completing-read (LaTeX-ntheorem-newtheorem-list)
+                               "Environment")
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
                                         (backward-char 2)
@@ -214,8 +214,7 @@ make them available as new environments.  Update
 
     ;; 2.3 Defining the Layout of Theorem Sets
     '("theoremstyle"
-      (TeX-arg-eval completing-read "Style: "
-                    LaTeX-ntheorem-theoremstyle-list))
+      (TeX-arg-completing-read LaTeX-ntheorem-theoremstyle-list "Style"))
 
     '("theorembodyfont"
       (LaTeX-arg-ntheorem-fontdecl "Body font"))
@@ -224,10 +223,9 @@ make them available as new environments.  Update
       (LaTeX-arg-ntheorem-fontdecl "Header font"))
 
     '("theoremnumbering"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Numbering scheme")
-                    '("arabic" "roman" "Roman" "alph" "Alph"
-                      "greek" "Greek" "fnsymbol")))
+      (TeX-arg-completing-read ("arabic" "roman" "Roman" "alph" "Alph"
+                                "greek" "Greek" "fnsymbol")
+                               "Numbering scheme"))
 
     '("theoremseparator" "Separator")
 
@@ -246,10 +244,11 @@ make them available as new environments.  Update
     '("theoremprework" t)
     '("theorempostwork" t)
 
-    '("theoremclass"
-      (TeX-arg-eval completing-read "Theorem type: "
-                    (append '(("LaTeX"))
-                            (LaTeX-ntheorem-newtheorem-list))))
+    `("theoremclass"
+      (TeX-arg-completing-read ,(lambda ()
+                                  (append '(("LaTeX"))
+                                          (LaTeX-ntheorem-newtheorem-list)))
+                               "Theorem type"))
 
     ;; 2.3.6 A Standard Set of Theorems
     (when (LaTeX-provided-package-options-member "ntheorem" "standard")
@@ -325,25 +324,23 @@ make them available as new environments.  Update
 
     ;; 2.4 Generating Theoremlists
     '("listtheorems"
-      (TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     "Lists: "
-                     (LaTeX-ntheorem-newtheorem-list)) ","))
+      (TeX-arg-completing-read-multiple (LaTeX-ntheorem-newtheorem-list)
+                                        "Lists"))
 
     ;; 2.4.2 Writing Extra Stuff to the Theorem File
     '("addtheoremline"
-      (TeX-arg-eval completing-read "Environment: "
-                    (LaTeX-ntheorem-newtheorem-list))
+      (TeX-arg-completing-read (LaTeX-ntheorem-newtheorem-list)
+                               "Environment")
       t)
 
     '("addtheoremline*"
-      (TeX-arg-eval completing-read "Environment: "
-                    (LaTeX-ntheorem-newtheorem-list))
+      (TeX-arg-completing-read (LaTeX-ntheorem-newtheorem-list)
+                               "Environment")
       t)
 
     '("addtotheoremfile"
-      [ TeX-arg-eval completing-read "Environment: "
-        (LaTeX-ntheorem-newtheorem-list) ]
+      [TeX-arg-completing-read (LaTeX-ntheorem-newtheorem-list)
+                               "Environment"]
       t)
 
     ;; 2.5.1 Defining New Theorem Layouts
@@ -359,8 +356,8 @@ make them available as new environments.  Update
       2)
 
     '("renewtheoremstyle"
-      (TeX-arg-eval completing-read "Style name: "
-                    LaTeX-ntheorem-theoremstyle-list)
+      (TeX-arg-completing-read LaTeX-ntheorem-theoremstyle-list
+                               "Style name")
       2)
 
     ;; 2.5.2 Defining New Theorem List Layouts
@@ -376,8 +373,8 @@ make them available as new environments.  Update
       3)
 
     '("renewtheoremlisttype"
-      (TeX-arg-eval completing-read "Style name: "
-                    LaTeX-ntheorem-listtype-list)
+      (TeX-arg-completing-read LaTeX-ntheorem-listtype-list
+                               "Style name")
       3)
 
     ;; 2.6 Setting End Marks
diff --git a/style/paracol.el b/style/paracol.el
index 3ed74b72f8..86a47a267b 100644
--- a/style/paracol.el
+++ b/style/paracol.el
@@ -1,6 +1,6 @@
 ;;; paracol.el --- AUCTeX style for `paracol.sty' (v1.35)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2016--2020 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -157,9 +157,7 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
 
     ;; 7.6 Page-Wise Footnotes
     '("footnotelayout"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Layout")
-                    '("c" "m" "p")))
+      (TeX-arg-completing-read ("c" "m" "p") "Layout"))
 
     ;; \footnote*[num]{text}
     ;; \footnotemark*[num]
@@ -206,20 +204,18 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
     ;; \backgroundcolor{region(x0,y0)}[mode]{color}
     ;; \backgroundcolor{region(x0,y0)(x1,y1)}[mode]{color}
     '("backgroundcolor"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Region")
-                    '("c" "g" "s" "f" "n" "p" "t" "b" "l" "r"
-                      "C" "G" "S" "F" "N" "P" "T" "B" "L" "R"))
+      (TeX-arg-completing-read ("c" "g" "s" "f" "n" "p" "t" "b" "l" "r"
+                                "C" "G" "S" "F" "N" "P" "T" "B" "L" "R")
+                               "Region")
       (TeX-arg-conditional (member "xcolor" (TeX-style-list))
                            (TeX-arg-xcolor)
                            (TeX-arg-color)))
 
     ;; \nobackgroundcolor{region}
     '("nobackgroundcolor"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Region")
-                    '("c" "g" "s" "f" "n" "p" "t" "b" "l" "r"
-                      "C" "G" "S" "F" "N" "P" "T" "B" "L" "R")))
+      (TeX-arg-completing-read ("c" "g" "s" "f" "n" "p" "t" "b" "l" "r"
+                                "C" "G" "S" "F" "N" "P" "T" "B" "L" "R")
+                               "Region"))
 
     ;; \resetbackgroundcolor
     '("resetbackgroundcolor" 0)
@@ -227,9 +223,7 @@ If OPTIONAL is non-nil, insert the result in square 
brackets."
     ;; 7.9 Control of Contents Output
     ;; \addcontentsonly{file}{col}
     '("addcontentsonly"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Content file")
-                    '("toc" "lof" "lot"))
+      (TeX-arg-completing-read ("toc" "lof" "lot") "Content file")
       "Column")
 
     ;; 7.10 Page Flushing Commands
diff --git a/style/polyglossia.el b/style/polyglossia.el
index cdfb03e093..9a2f40e0ba 100644
--- a/style/polyglossia.el
+++ b/style/polyglossia.el
@@ -1,6 +1,6 @@
 ;;; polyglossia.el --- AUCTeX style for `polyglossia.sty' version 1.42.0.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2015-2022  Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano <mose@gnu.org>
@@ -249,8 +249,9 @@ argument, otherwise as a mandatory one."
     '("setotherlanguage"   (LaTeX-arg-polyglossia-lang nil nil nil))
     '("setotherlanguages"  (LaTeX-arg-polyglossia-lang nil  t  nil))
     '("setkeys"            (LaTeX-arg-polyglossia-lang nil nil  t ))
-    '("PolyglossiaSetup"   (TeX-arg-eval completing-read "Language: "
-                                         (LaTeX-polyglossia-active-languages))
+    '("PolyglossiaSetup"   (TeX-arg-completing-read
+                            (LaTeX-polyglossia-active-languages)
+                            "Language")
       LaTeX-arg-polyglossiasetup-options)
     "selectbackgroundlanguage"
     '("resetdefaultlanguage" ["argument"] 1)
diff --git a/style/pythontex.el b/style/pythontex.el
index 01c6ed9e7d..610a6341ec 100644
--- a/style/pythontex.el
+++ b/style/pythontex.el
@@ -1,6 +1,6 @@
 ;;; pythontex.el --- AUCTeX style for `pythontex.sty' (v0.16)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2018--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2018--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -294,62 +294,43 @@ a list of strings."
     ;; 4.2.5 Custom code
     ;; pythontexcustomc[<position>]{<family>}{<code>}
     '("pythontexcustomc"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Position")
-        '("begin" "end") ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Family")
-                    LaTeX-pythontex-family-list)
+      [TeX-arg-completing-read ("begin" "end") "Position"]
+      (TeX-arg-completing-read LaTeX-pythontex-family-list "Family")
       t)
 
     ;; 4.2.7 Formatting of typeset code
     ;; \setpythontexfv[<family>]{<fancyvrb settings>}
     '("setpythontexfv"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Family")
-        LaTeX-pythontex-family-list ]
+      [TeX-arg-completing-read LaTeX-pythontex-family-list "Family"]
       (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)))
 
     ;; \setpythontexprettyprinter[<family>]{<printer>}
-    '("setpythontexprettyprinter"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Family")
-        (cons "auto" LaTeX-pythontex-family-list) ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Printer")
-                    '("text" "bw" "fancyvrb" "pygments")))
+    `("setpythontexprettyprinter"
+      [TeX-arg-completing-read ,(lambda ()
+                                  (cons "auto" LaTeX-pythontex-family-list))
+                               "Family"]
+      (TeX-arg-completing-read ("text" "bw" "fancyvrb" "pygments") "Printer"))
 
     ;; \setpythontexpyglexer[<family>]{<pygments lexer>}
     '("setpythontexpyglexer"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Family")
-        LaTeX-pythontex-family-list ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Pygments lexer")
-                    (LaTeX-pythontex-language-list)))
+      [TeX-arg-completing-read LaTeX-pythontex-family-list "Family"]
+      (TeX-arg-completing-read (LaTeX-pythontex-language-list) "Pygments 
lexer"))
 
     ;; \setpythontexpygopt[<family>]{<pygments options>}
     '("setpythontexpygopt"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Family")
-        LaTeX-pythontex-family-list ]
-      (TeX-arg-key-val
-       (("style") ("texcomments") ("mathescape"))))
+      [TeX-arg-completing-read LaTeX-pythontex-family-list "Family"]
+      (TeX-arg-key-val (("style") ("texcomments") ("mathescape"))))
 
     ;; 4.2.8 Access to printed content (stdout)
     ;; \printpythontex[<mode>][<options>]
     '("printpythontex"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Mode")
-        '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] )
+      [TeX-arg-completing-read ("raw" "verb" "verbatim") "Mode"]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)])
 
     ;; \stdoutpythontex[<mode>][<options>]
     '("stdoutpythontex"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Mode")
-        '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] )
+      [TeX-arg-completing-read ("raw" "verb" "verbatim") "Mode"]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)])
 
     ;;\saveprintpythontex{<name>}
     '("saveprintpythontex"
@@ -370,32 +351,21 @@ a list of strings."
     ;; \useprintpythontex[<verbatim options>][<fancyvrb options>]{<name>}
     ;; I assume <verbatim options> is meant to be <mode>
     '("useprintpythontex"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Mode")
-        '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-pythontex-savecontent-list)))
+      [TeX-arg-completing-read ("raw" "verb" "verbatim") "Mode"]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
+      (TeX-arg-completing-read (LaTeX-pythontex-savecontent-list) "Name"))
 
     ;; \usestdoutpythontex[<verbatim options>][<fancyvrb options>]{<name>}
     ;; I assume <verbatim options> is meant to be <mode>
     '("usestdoutpythontex"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Mode")
-        '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-pythontex-savecontent-list)))
+      [TeX-arg-completing-read ("raw" "verb" "verbatim") "Mode"]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
+      (TeX-arg-completing-read (LaTeX-pythontex-savecontent-list) "Name"))
 
     ;; \stderrpythontex[<mode>][<fancyvrb options>]
     '("stderrpythontex"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Mode")
-        '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] )
-
+      [TeX-arg-completing-read ("raw" "verb" "verbatim") "Mode"]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)])
 
     ;;\savestderrpythontex{<name>}
     '("savestderrpythontex"
@@ -407,62 +377,43 @@ a list of strings."
 
     ;; \usestderrpythontex[<mode>][<fancyvrb options>]{<name>}
     '("usestderrpythontex"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Mode")
-        '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Name")
-                    (LaTeX-pythontex-savecontent-list)))
+      [TeX-arg-completing-read ("raw" "verb" "verbatim") "Mode"]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
+      (TeX-arg-completing-read (LaTeX-pythontex-savecontent-list) "Name"))
 
     ;;\setpythontexautoprint{<boolean>}
     '("setpythontexautoprint"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Boolean value")
-                    '("true" "false")))
+      (TeX-arg-completing-read ("true" "false") "Boolean value"))
 
     ;; \setpythontexautostdout{<boolean>}
     '("setpythontexautostdout"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Boolean value")
-                    '("true" "false")))
+      (TeX-arg-completing-read ("true" "false") "Boolean value"))
 
     ;; 4.3 Pygments commands and environments
     ;; \pygment{<lexer>}<opening delim><code><closing delim>
     '("pygment"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Lexer")
-                    (LaTeX-pythontex-language-list))
+      (TeX-arg-completing-read (LaTeX-pythontex-language-list) "Lexer")
       TeX-arg-verb-delim-or-brace)
 
     ;; \inputpygments[<fancyvrb settings>]{<lexer>}{<external file>}
     '("inputpygments"
-      [ TeX-arg-eval (LaTeX-fancyvrb-key-val-options) ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Lexer")
-                    (LaTeX-pythontex-language-list))
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
+      (TeX-arg-completing-read (LaTeX-pythontex-language-list) "Lexer")
       TeX-arg-file-name)
 
     ;; \setpygmentsfv[<lexer>]{<fancyvrb settings>}
     '("setpygmentsfv"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Lexer")
-        (LaTeX-pythontex-language-list) ]
-      (TeX-arg-eval (LaTeX-fancyvrb-key-val-options)))
+      [TeX-arg-completing-read (LaTeX-pythontex-language-list) "Lexer"]
+      (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)))
 
     ;; \setpygmentspygopt[<lexer>]{<pygments options>}
     '("setpygmentspygopt"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Lexer")
-        (LaTeX-pythontex-language-list) ]
-      (TeX-arg-key-val
-       (("style") ("texcomments") ("mathescape"))))
+      [TeX-arg-completing-read (LaTeX-pythontex-language-list) "Lexer"]
+      (TeX-arg-key-val (("style") ("texcomments") ("mathescape"))))
 
     ;; \setpygmentsprettyprinter{<printer>}
     '("setpygmentsprettyprinter"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Printer")
-                    '("text" "bw" "fancyvrb" "pygments")))
+      (TeX-arg-completing-read ("text" "bw" "fancyvrb" "pygments") "Printer"))
 
     ;; 4.5  Advanced PythonTeX usage
     ;; \setpythontexcontext{<key-value pairs>}
@@ -503,19 +454,13 @@ a list of strings."
    (LaTeX-add-environments
     ;; 4.2.5 Custom code
     '("pythontexcustomcode" LaTeX-env-args
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Position")
-        '("begin" "end") ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Family")
-                    LaTeX-pythontex-family-list))
+      [TeX-arg-completing-read ("begin" "end") "Position"]
+      (TeX-arg-completing-read LaTeX-pythontex-family-list "Family"))
 
     ;; \begin{pygments}[<fancyvrb settings>]{<lexer>}
     '("pygments" LaTeX-env-args
-      [TeX-arg-eval (LaTeX-fancyvrb-key-val-options)]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Lexer")
-                    (LaTeX-pythontex-language-list))) )
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
+      (TeX-arg-completing-read (LaTeX-pythontex-language-list) "Lexer")))
 
    ;; Filling
    (add-to-list 'LaTeX-indent-environment-list
diff --git a/style/siunitx.el b/style/siunitx.el
index b1164a1f68..da09a7e390 100644
--- a/style/siunitx.el
+++ b/style/siunitx.el
@@ -1,6 +1,6 @@
 ;;; siunitx.el --- AUCTeX style for `siunitx.sty' version 3.3.36.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2012-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2022  Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano <mose@gnu.org>
@@ -260,8 +260,8 @@ string."
 (defun LaTeX-siunitx-key-val-options ()
   "Return an updated list of key=vals from siunitx package."
   (append
-   (when (and (or (member "xcolor" (TeX-style-list))
-                  (member "color" TeX-active-styles)))
+   (when (or (member "xcolor" (TeX-style-list))
+             (member "color" TeX-active-styles))
      (let* ((colorcmd (if (member "xcolor" TeX-active-styles)
                           #'LaTeX-xcolor-definecolor-list
                         #'LaTeX-color-definecolor-list))
@@ -331,12 +331,12 @@ string."
     ;; but are not recommended for use in new documents.  We provide
     ;; them in this file anyway since they are also needed when other
     ;; packages like physics or units are loaded:
-    '("si" [TeX-arg-key-val (LaTeX-siunitx-package-options)] 
LaTeX-arg-siunitx-unit)
-    '("SI" [TeX-arg-key-val (LaTeX-siunitx-package-options)]
+    '("si" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] 
LaTeX-arg-siunitx-unit)
+    '("SI" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)]
       "Value" ["Pre-unit"] LaTeX-arg-siunitx-unit)
-    '("SIlist" [TeX-arg-key-val (LaTeX-siunitx-package-options)]
+    '("SIlist" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)]
       "Values" LaTeX-arg-siunitx-unit)
-    '("SIrange" [TeX-arg-key-val (LaTeX-siunitx-package-options)]
+    '("SIrange" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)]
       "Value 1" "Value 2" LaTeX-arg-siunitx-unit))
 
    ;; 8 Compatibility with other packages
diff --git a/style/splitidx.el b/style/splitidx.el
index edf52c2847..37d36be686 100644
--- a/style/splitidx.el
+++ b/style/splitidx.el
@@ -1,6 +1,6 @@
 ;;; splitidx.el --- AUCTeX style for `splitidx.sty' (v1.2a)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -160,22 +160,16 @@
     ;; 3.2 Marking up index entries
     '("sindex"
       ;; I don't use `[ TeX-arg-index-tag ]' here
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Short cut")
-        (LaTeX-splitidx-newindex-list) ]
+      [TeX-arg-completing-read (LaTeX-splitidx-newindex-list) "Short cut"]
       TeX-arg-index)
 
     ;; 3.4 Customizing index entries
     '("AtWriteToIndex"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Short cut")
-                    (LaTeX-splitidx-newindex-list))
+      (TeX-arg-completing-read (LaTeX-splitidx-newindex-list) "Short cut")
       t)
 
     '("AtNextWriteToIndex"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Short cut")
-                    (LaTeX-splitidx-newindex-list))
+      (TeX-arg-completing-read (LaTeX-splitidx-newindex-list) "Short cut")
       t)
 
     ;; 3.6 Preventing premature expansion of index entries
@@ -190,25 +184,19 @@
 
     ;; 3.7 Including the generated indices in your document
     '("printindex"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Short cut")
-        (LaTeX-splitidx-newindex-list) ]
+      [TeX-arg-completing-read (LaTeX-splitidx-newindex-list) "Short cut"]
       [ "Index name" ])
 
     '("printindex*" 0)
 
     '("printsubindex"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Short cut")
-        (LaTeX-splitidx-newindex-list) ]
+      [TeX-arg-completing-read (LaTeX-splitidx-newindex-list) "Short cut"]
       [ "Index name" ])
 
     '("printsubindex*" 0)
 
     '("setindexpreamble"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Short cut")
-        (LaTeX-splitidx-newindex-list) ]
+      [TeX-arg-completing-read (LaTeX-splitidx-newindex-list) "Short cut"]
       t)
 
     '("useindexpreamble" [ TeX-arg-macro ])
@@ -246,9 +234,7 @@
    (when (LaTeX-provided-package-options-member "splitidx" "useindex")
      (TeX-add-symbols
       '("index"
-        [TeX-arg-eval completing-read
-                      (TeX-argument-prompt t nil "Short cut")
-                      (LaTeX-splitidx-newindex-list) ]
+        [TeX-arg-completing-read (LaTeX-splitidx-newindex-list) "Short cut"]
         (TeX-arg-index)))
      ;; Tell RefTeX to look in the optional arg. for the index short cut
      (when (fboundp 'reftex-add-index-macros)
@@ -295,6 +281,8 @@
                                 ("AtWriteToIndex"     "{{")
                                 ("AtNextWriteToIndex" "{{")
                                 ("newprotectedindex"  "[{")
+                                ("printindex"         "*[[")
+                                ("printsubindex"      "*[[")
                                 ("setindexpreamble"   "[{")
                                 ("useindexpreamble"   "[")
                                 ("extendtheindex"     "{{{{"))
diff --git a/style/subcaption.el b/style/subcaption.el
index cd3312d3eb..c98596a594 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -136,31 +136,31 @@ caption, insert only a caption."
    ;; The next 2 macros are part of the kernel of caption.sty, but we
    ;; load them within subcaption.el.
    (TeX-add-symbols
-    '("DeclareCaptionSubType"
-      [TeX-arg-eval
-       completing-read (TeX-argument-prompt t nil "Numbering scheme")
-       '("arabic" "roman" "Roman" "alph" "Alph" "fnsymbol")]
-      (TeX-arg-eval
-       completing-read
-       (TeX-argument-prompt nil nil "Type")
-       (append
-        (when (and (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list)
-                   (LaTeX-newfloat-DeclareFloatingEnvironment-list))
-          (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list)))
-        '("figure" "table"))))
-
-    '("DeclareCaptionSubType*"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Numbering scheme")
-                    '("arabic" "roman" "Roman" "alph" "Alph" "fnsymbol")]
-      (TeX-arg-eval
-       completing-read
-       (TeX-argument-prompt nil nil "Type")
-       (append
-        (when (and (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list)
-                   (LaTeX-newfloat-DeclareFloatingEnvironment-list))
-          (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list)))
-        '("figure" "table")))))
+    `("DeclareCaptionSubType"
+      [TeX-arg-completing-read ("arabic" "roman" "Roman"
+                                "alph" "Alph" "fnsymbol")
+                               "Numbering scheme"]
+      (TeX-arg-completing-read
+       ,(lambda ()
+          (append
+           (when (and (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list)
+                      (LaTeX-newfloat-DeclareFloatingEnvironment-list))
+             (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+           '("figure" "table")))
+       "Type"))
+
+    `("DeclareCaptionSubType*"
+      [TeX-arg-completing-read ("arabic" "roman" "Roman"
+                                "alph" "Alph" "fnsymbol")
+                               "Numbering scheme"]
+      (TeX-arg-completing-read
+       ,(lambda ()
+          (append
+           (when (and (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list)
+                      (LaTeX-newfloat-DeclareFloatingEnvironment-list))
+             (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+           '("figure" "table")))
+       "Type")))
 
    ;; \subcaption(box)? and \subfloat macros should get their own lines
    (LaTeX-paragraph-commands-add-locally
diff --git a/style/tcolorbox.el b/style/tcolorbox.el
index 5ba44bb75a..03ce96699a 100644
--- a/style/tcolorbox.el
+++ b/style/tcolorbox.el
@@ -1,6 +1,6 @@
 ;;; tcolorbox.el --- AUCTeX style for `tcolorbox.sty' (v4.00)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
 
 ;; Author: Tassilo Horn <tsdh@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -586,17 +586,16 @@ for example \"tcolorboxlib-raster.el\"."
    (TeX-add-symbols
 
     ;; 1.3 Libraries
-    '("tcbuselibrary"
-      (TeX-arg-eval
-       (lambda ()
-         (let ((libs (mapconcat #'identity
-                                (TeX-completing-read-multiple
-                                 (TeX-argument-prompt nil nil "Libraries")
-                                 LaTeX-tcolorbox-library-list)
-                                ",")))
-           (LaTeX-add-tcolorbox-tcbuselibraries libs)
-           (LaTeX-tcolorbox-load-used-libraries)
-           (format "%s" libs)))))
+    `("tcbuselibrary"
+      (TeX-arg-completing-read-multiple LaTeX-tcolorbox-library-list
+                                        "Libraries")
+      ,(lambda (_)
+         (when (= (preceding-char) (string-to-char TeX-grcl))
+           (save-excursion
+             (re-search-backward "\\\\tcbuselibrary{\\([^}]+\\)}"
+                                 (line-beginning-position) t)
+             (LaTeX-add-tcolorbox-tcbuselibraries (match-string-no-properties 
1))
+             (LaTeX-tcolorbox-load-used-libraries)))))
 
     ;; 3 Macros for Box Creation
     '("tcblower" 0)
@@ -607,42 +606,35 @@ for example \"tcolorboxlib-raster.el\"."
     '("tcbsetforeverylayer"
       (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)))
 
-    '("tcbox"
-      [TeX-arg-eval TeX-read-key-val t
-                    (append
-                     LaTeX-tcolorbox-tcbox-options
-                     (LaTeX-tcolorbox-keyval-options))]
+    `("tcbox"
+      [TeX-arg-key-val ,(lambda () (append LaTeX-tcolorbox-tcbox-options
+                                           (LaTeX-tcolorbox-keyval-options)))]
       t)
 
     '("newtcolorbox"
-      [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
+      [TeX-arg-key-val LaTeX-tcolorbox-init-options]
       "Name"
-      [ TeX-arg-define-macro-arguments ]
+      [TeX-arg-define-macro-arguments]
       (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)))
 
     '("renewtcolorbox"
-      [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color box")
-                    (LaTeX-tcolorbox-newtcolorbox-list))
-      [ TeX-arg-define-macro-arguments ]
+      [TeX-arg-key-val LaTeX-tcolorbox-init-options]
+      (TeX-arg-completing-read (LaTeX-tcolorbox-newtcolorbox-list) "Color box")
+      [TeX-arg-define-macro-arguments]
       (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)))
 
     '("newtcbox"
-      [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
+      [TeX-arg-key-val LaTeX-tcolorbox-init-options]
       TeX-arg-macro
-      [ TeX-arg-define-macro-arguments ]
+      [TeX-arg-define-macro-arguments]
       (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)))
 
-    '("renewtcbox"
-      [ TeX-arg-key-val LaTeX-tcolorbox-init-options ]
-      (TeX-arg-eval
-       (lambda ()
-         (let ((macro (completing-read
-                       (TeX-argument-prompt nil nil "Macro: \\" t)
-                       (LaTeX-tcolorbox-newtcbox-list))))
-           (concat TeX-esc macro))))
-      [ TeX-arg-define-macro-arguments ]
+    `("renewtcbox"
+      [TeX-arg-key-val LaTeX-tcolorbox-init-options ]
+
+      (TeX-arg-completing-read (LaTeX-tcolorbox-newtcbox-list)
+                               "Macro (cr): \\" t ,TeX-esc)
+      [TeX-arg-define-macro-arguments]
       (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)))
 
     '("tcolorboxenvironment"
@@ -659,12 +651,13 @@ for example \"tcolorboxlib-raster.el\"."
     '("thetcolorboxpage" 0)
 
     ;; 5.2 Lists of tcolorboxes
-    '("tcblistof"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Macro")
-        (if (< (LaTeX-largest-level) 2)
-            '("\\chapter" "\\section" "\\subsection" "\\subsubsection")
-          '("\\section" "\\subsection" "\\subsubsection")) ]
+    `("tcblistof"
+      [TeX-arg-completing-read
+       ,(lambda ()
+          (if (< (LaTeX-largest-level) 2)
+              '("\\chapter" "\\section" "\\subsection" "\\subsubsection")
+            '("\\section" "\\subsection" "\\subsubsection")))
+       "Macro"]
       2)
 
     ;; 7 Saving and Loading of Verbatim Texts
@@ -679,7 +672,7 @@ for example \"tcolorboxlib-raster.el\"."
    (LaTeX-add-environments
     ;; 3 Macros for Box Creation: Main env
     '("tcolorbox" LaTeX-env-args
-      [ TeX-arg-key-val (LaTeX-tcolorbox-keyval-options) ])
+      [TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)])
 
     ;; 7 Saving and Loading of Verbatim Texts
     '("tcbverbatimwrite" "File name")
diff --git a/style/tcolorboxlib-raster.el b/style/tcolorboxlib-raster.el
index db61a03491..1d67761bc1 100644
--- a/style/tcolorboxlib-raster.el
+++ b/style/tcolorboxlib-raster.el
@@ -1,6 +1,6 @@
 ;;; tcolorboxlib-raster.el --- AUCTeX style for `raster' library from 
tcolorbox  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2016--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -84,47 +84,6 @@
     ("raster multirow"))
   "Key=value options for raster library from tcolorbox.")
 
-(defun LaTeX-tcolorbox-lib-raster-env-item (environment)
-  "Insert ENVIRONMENT, ask for arguments and the first item."
-  (LaTeX-insert-environment
-   environment
-   (let ((opts (TeX-read-key-val t (append
-                                    LaTeX-tcolorbox-lib-raster-keyval-options
-                                    (LaTeX-tcolorbox-keyval-options))
-                                 (when (string= environment "tcboxeditemize")
-                                   "Raster options (k=v)")))
-         (box-opts (when (string= environment "tcboxeditemize")
-                     (TeX-read-key-val nil (LaTeX-tcolorbox-keyval-options)
-                                       "Box options (k=v)"))))
-     (concat
-      (when (and opts (not (string= opts "")))
-        (format "[%s]" opts))
-      (when (string= environment "tcboxeditemize")
-        (format "{%s}" box-opts)))))
-  (if (TeX-active-mark)
-      (progn
-        (LaTeX-find-matching-begin)
-        (end-of-line 1))
-    (end-of-line 0))
-  (delete-char 1)
-  (when (looking-at (concat "^[ \t]+$\\|"
-                            "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
-    (delete-region (point) (line-end-position)))
-  (delete-horizontal-space)
-  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
-  ;; from swapping point and mark and the \item ending up right after
-  ;; \begin{...}.
-  (deactivate-mark)
-  (LaTeX-insert-item)
-  ;; The inserted \item may have outdented the first line to the
-  ;; right.  Fill it, if appropriate.
-  (when (and auto-fill-function
-             (not (looking-at "$"))
-             (not (assoc environment LaTeX-indent-environment-list))
-             (> (- (line-end-position) (line-beginning-position))
-                (current-fill-column)))
-    (LaTeX-fill-paragraph nil)))
-
 (defun LaTeX-tcolorbox-lib-raster-insert-item ()
   "Insert \"tcbitem\" and query for optional argument."
   (TeX-insert-macro "tcbitem"))
@@ -140,42 +99,36 @@
    (TeX-add-symbols
     ;; 14.2 Macros of the Library
     '("tcbitem"
-      [TeX-arg-key-val (LaTeX-tcolorbox-keyval-options) "Item options (k=v)" ]
+      [TeX-arg-key-val (LaTeX-tcolorbox-keyval-options) "Item options"]
       (TeX-arg-literal " ")))
 
    (LaTeX-add-environments
     ;; 14.2 Macros of the Library
-    '("tcbraster"
-      (lambda (env)
-        (LaTeX-insert-environment
-         env
-         (let ((raster-opts
-                (TeX-read-key-val t (append
-                                     LaTeX-tcolorbox-lib-raster-keyval-options
-                                     (LaTeX-tcolorbox-keyval-options)))))
-           (when (and raster-opts (not (string= raster-opts "")))
-             (concat LaTeX-optop raster-opts LaTeX-optcl))))))
-
-    '("tcbitemize" LaTeX-tcolorbox-lib-raster-env-item)
-
-    '("tcboxedraster"
-      (lambda (env)
-        (LaTeX-insert-environment
-         env
-         (let ((raster-opts
-                (TeX-read-key-val t (append
-                                     LaTeX-tcolorbox-lib-raster-keyval-options
-                                     (LaTeX-tcolorbox-keyval-options))
-                                  "Raster options (k=v)"))
-               (box-opts
-                (TeX-read-key-val nil (LaTeX-tcolorbox-keyval-options)
-                                  "Box options (k=v)")))
-           (concat
-            (when (and raster-opts (not (string= raster-opts "")))
-              (concat LaTeX-optop raster-opts LaTeX-optcl))
-            TeX-grop box-opts TeX-grcl)))))
-
-    '("tcboxeditemize" LaTeX-tcolorbox-lib-raster-env-item))
+    `("tcbraster" LaTeX-env-args
+      [TeX-arg-key-val ,(lambda ()
+                          (append LaTeX-tcolorbox-lib-raster-keyval-options
+                                  (LaTeX-tcolorbox-keyval-options)))])
+
+    `("tcbitemize" LaTeX-env-item-args
+      [TeX-arg-key-val ,(lambda ()
+                          (append LaTeX-tcolorbox-lib-raster-keyval-options
+                                  (LaTeX-tcolorbox-keyval-options)))])
+
+    `("tcboxedraster" LaTeX-env-args
+      [TeX-arg-key-val ,(lambda ()
+                          (append LaTeX-tcolorbox-lib-raster-keyval-options
+                                  (LaTeX-tcolorbox-keyval-options)))
+                       "Raster options"]
+      (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)
+                       "Box options"))
+
+    `("tcboxeditemize" LaTeX-env-item-args
+      [TeX-arg-key-val ,(lambda ()
+                          (append LaTeX-tcolorbox-lib-raster-keyval-options
+                                  (LaTeX-tcolorbox-keyval-options)))
+                       "Raster options"]
+      (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)
+                       "Box options")))
 
    ;; Append tcb(oxed)?itemize to `LaTeX-item-list':
    (add-to-list 'LaTeX-item-list
diff --git a/style/tcolorboxlib-theorems.el b/style/tcolorboxlib-theorems.el
index 20aa710d47..7205ed4c37 100644
--- a/style/tcolorboxlib-theorems.el
+++ b/style/tcolorboxlib-theorems.el
@@ -187,8 +187,14 @@
     (let ((env (car elt)))
       ;; Add newly defined env's to AUCTeX:
       (LaTeX-add-environments
-       `(,env LaTeX-env-tcolorbox-lib-theorems)
-       `(,(concat env "*") LaTeX-env-tcolorbox-lib-theorems))
+       `(,env LaTeX-env-args
+              [TeX-arg-key-val (LaTeX-tcolorbox-lib--theorems-keyval-options)]
+              "Title"
+              (TeX-arg-literal ,TeX-grop ,TeX-grcl)
+              (LaTeX-env-label-as-keyval nil nil ,env))
+       `(,(concat env "*") LaTeX-env-args
+         [TeX-arg-key-val (LaTeX-tcolorbox-lib--theorems-keyval-options)]
+         "Title"))
       ;; RefTeX: Make `reftex-label-regexps' buffer local and add env
       ;; to it:
       (when (boundp 'reftex-label-regexps)
@@ -210,40 +216,15 @@
           #'LaTeX-tcolorbox-lib-theorems-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun LaTeX-env-tcolorbox-lib-theorems (environment)
-  "Insert theorems ENVIRONMENT, ask for arguments and insert a label."
-  (LaTeX-insert-environment
-   environment
-   (let ((opts (TeX-read-key-val t 
(LaTeX-tcolorbox-lib--theorems-keyval-options)))
-         (title (TeX-read-string
-                 (TeX-argument-prompt nil nil "Title"))))
-     (concat
-      (when (and opts (not (string= opts "")))
-        (format "[%s]" opts))
-      (concat TeX-grop title TeX-grcl)
-      (unless (string= (substring-no-properties environment -1) "*")
-        (concat TeX-grop TeX-grcl)))))
-  (unless (string= (substring-no-properties environment -1) "*")
-    (LaTeX-env-label-as-keyval nil nil nil environment)))
-
 (defun LaTeX-arg-tcolorbox-lib-theorems-newtcbtheorem (optional)
-  "Query and insert arguments of \\newtcbtheorem macro.
-If OPTIONAL is non-nil, insert the argument in brackets in not
+  "Query and insert the first argument of \\newtcbtheorem macro.
+If OPTIONAL is non-nil, insert the argument in brackets if not
 empty."
   (let ((env (TeX-read-string
-              (TeX-argument-prompt optional nil "Name")))
-        (disp-name (TeX-read-string
-                    (TeX-argument-prompt optional nil "Display Name")))
-        (opts (TeX-read-key-val optional
-                                
(LaTeX-tcolorbox-lib--theorems-keyval-options))))
+              (TeX-argument-prompt optional nil "Name"))))
     (LaTeX-add-tcolorbox-lib-theorems-newtcbtheorems env)
     (LaTeX-tcolorbox-lib-theorems-auto-cleanup)
-    (TeX-argument-insert env optional)
-    (TeX-argument-insert disp-name optional)
-    (TeX-argument-insert opts optional)
-    ;; Our 'prefix' argument is always empty as we insert the 'label'
-    ;; key with a full label value:
-    (insert TeX-grop TeX-grcl)))
+    (TeX-argument-insert env optional)))
 
 (defun LaTeX-tcolorbox-lib-theorems-reftex-label-context-function (env)
   "Return a context string for RefTeX in ENV."
@@ -287,9 +268,12 @@ empty."
 
    (TeX-add-symbols
     ;; 18.1 Macros of the Library
-    '("newtcbtheorem"
+    `("newtcbtheorem"
       [TeX-arg-key-val LaTeX-tcolorbox-init-options]
-      LaTeX-arg-tcolorbox-lib-theorems-newtcbtheorem)
+      LaTeX-arg-tcolorbox-lib-theorems-newtcbtheorem
+      "Display Name"
+      (TeX-arg-key-val (LaTeX-tcolorbox-lib--theorems-keyval-options))
+      (TeX-arg-literal ,TeX-grop ,TeX-grcl))
 
     `("renewtcbtheorem"
       [TeX-arg-key-val LaTeX-tcolorbox-init-options]
diff --git a/style/tex-live.el b/style/tex-live.el
index b74890d675..5fdb4eeb87 100644
--- a/style/tex-live.el
+++ b/style/tex-live.el
@@ -1,6 +1,6 @@
 ;;; tex-live.el --- AUCTeX style for `tex-live.sty'  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2020--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2020--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -82,10 +82,11 @@
    (TeX-add-symbols
     '("verbatiminput" LaTeX-fancyvrb-arg-file-relative)
     '("boxedverbatiminput" LaTeX-fancyvrb-arg-file-relative)
-    '("listinginput"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Value of firstnumber key")
-                    (cadr (assoc "firstnumber" 
(LaTeX-fancyvrb-key-val-options))))
+    `("listinginput"
+      (TeX-arg-completing-read
+       ,(lambda () (cadr (assoc "firstnumber"
+                                (LaTeX-fancyvrb-key-val-options))))
+       "Value of firstnumber key")
       LaTeX-fancyvrb-arg-file-relative)
 
     ;; Various sorts of names:
@@ -95,24 +96,22 @@
     '("colname" "Collection")
     '("dirname" "Directory")
     '("filename" "Directory")
-    '("envname"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Environment")
-                    '("TEXMFCACHE"
-                      "TEXMFCNF"
-                      "TEXMFCONFIG"
-                      "TEXMFDIST"
-                      "TEXMFHOME"
-                      "TEXMFLOCAL"
-                      "TEXMFMAIN"
-                      "TEXMFOUTPUT"
-                      "TEXMFSYSCONFIG"
-                      "TEXMFSYSVAR"
-                      "TEXMFVAR"
-                      "TEXINPUTS"
-                      "TEXFONTMAPS"
-                      "ENCFONTS"
-                      "PATH" "MANPATH" "INFOPATH" "DISPLAY")))
+    '("envname" (TeX-arg-completing-read ("TEXMFCACHE"
+                                          "TEXMFCNF"
+                                          "TEXMFCONFIG"
+                                          "TEXMFDIST"
+                                          "TEXMFHOME"
+                                          "TEXMFLOCAL"
+                                          "TEXMFMAIN"
+                                          "TEXMFOUTPUT"
+                                          "TEXMFSYSCONFIG"
+                                          "TEXMFSYSVAR"
+                                          "TEXMFVAR"
+                                          "TEXINPUTS"
+                                          "TEXFONTMAPS"
+                                          "ENCFONTS"
+                                          "PATH" "MANPATH" "INFOPATH" 
"DISPLAY")
+                                         "Environment"))
     '("code" "Code")
     '("file" "File")
     '("prog" "Program")
diff --git a/style/textpos.el b/style/textpos.el
index 0f02efb35f..c3ee081a84 100644
--- a/style/textpos.el
+++ b/style/textpos.el
@@ -1,6 +1,6 @@
 ;;; textpos.el --- AUCTeX style for `textpos.sty' version v1.7j  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015, 2016, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -87,27 +87,25 @@ them."
     '("TPMargin*" (TeX-arg-length "Margin around textblock"))
 
     ;; We ignore the `\textblock...color' (i.e. without `u') versions
-    '("textblockcolour"
-      (TeX-arg-eval
-       (lambda ()
-         (let ((color (cond ((member "xcolor" (TeX-style-list))
-                             (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
-                            ((member "color" (TeX-style-list))
-                             (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
-                            (t
-                             (TeX-read-string "Color name: ")))))
-           (format "%s" color)))))
-
-    '("textblockrulecolour"
-      (TeX-arg-eval
-       (lambda ()
-         (let ((color (cond ((member "xcolor" (TeX-style-list))
-                             (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
-                            ((member "color" (TeX-style-list))
-                             (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
-                            (t
-                             (TeX-read-string "Color name: ")))))
-           (format "%s" color)))))
+    `("textblockcolour"
+      (TeX-arg-conditional (TeX-member "\\`x?color\\'" (TeX-style-list) 
#'string-match)
+          ((TeX-arg-completing-read ,(lambda ()
+                                       (or (and (fboundp 
'LaTeX-xcolor-definecolor-list)
+                                                
(LaTeX-xcolor-definecolor-list))
+                                           (and (fboundp 
'LaTeX-color-definecolor-list)
+                                                
(LaTeX-color-definecolor-list))))
+                                    "Color name"))
+        ("Color name")))
+
+    `("textblockrulecolour"
+      (TeX-arg-conditional (TeX-member "\\`x?color\\'" (TeX-style-list) 
#'string-match)
+          ((TeX-arg-completing-read ,(lambda ()
+                                       (or (and (fboundp 
'LaTeX-xcolor-definecolor-list)
+                                                
(LaTeX-xcolor-definecolor-list))
+                                           (and (fboundp 
'LaTeX-color-definecolor-list)
+                                                
(LaTeX-color-definecolor-list))))
+                                    "Color name"))
+        ("Color name")))
 
     '("TPshowboxestrue")
     '("TPshowboxesfalse")
diff --git a/style/theorem.el b/style/theorem.el
index 219e86475c..6657c3c05f 100644
--- a/style/theorem.el
+++ b/style/theorem.el
@@ -1,6 +1,6 @@
 ;;; theorem.el --- AUCTeX style for `theorem.sty' (v2.2c)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2015-2022  Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -29,10 +29,20 @@
 ;; This file adds support for `theorem.sty' (v2.2c) from 2014/10/28.
 ;; `theorem.sty' is a standard LaTeX package and part of TeXLive.
 
-;; The style provides the function `LaTeX-theorem-env-label' which
-;; enables new defined environments with "\newtheoreom" to interact
-;; with AUCTeX and RefTeX mechanisms for inserting labels.  Check
-;; docstring of `LaTeX-theorem-env-label' for instructions.
+;; This style interacts with AUCTeX and RefTeX mechanisms for
+;; inserting labels into new defined environments with "\newtheoreom".
+;; AUCTeX users need to add the new environment to `LaTeX-label-alist'
+;; via customize or in init-file like this:
+;;
+;;   (add-to-list 'LaTeX-label-alist '("lemma" . "lem:"))
+;;
+;; RefTeX users have to add the value to both `LaTeX-label-alist' and
+;; `reftex-label-alist' like this:
+;;
+;;   (add-to-list 'LaTeX-label-alist '("lemma" . "lem:"))
+;;   (add-to-list 'reftex-label-alist
+;;                '("lemma" ?m "lem:" "~ref{%s}"
+;;                  nil ("Lemma" "lemma") nil))
 
 ;;; Code:
 
@@ -46,63 +56,9 @@
                   (keywords class))
 
 (defvar LaTeX-theorem-theoremstyle-list
-  '(("plain") ("break") ("margin") ("change")
-    ("marginbreak") ("changebreak"))
+  '("plain" "break" "margin" "change" "marginbreak" "changebreak")
   "List of theorem styles provided by `theorem.sty'.")
 
-(defvar LaTeX-theorem-fontdecl
-  '(;; 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")
-  "List of font declaration commands for \"\\theorem(body|header)font\".")
-
-(defun LaTeX-arg-theorem-fontdecl (optional &optional prompt)
-  "Prompt for font declaration commands in \"\\theorem(body|header)font\".
-If OPTIONAL is non-nil, insert the resulting value as an optional
-argument.  Use PROMPT as the prompt string."
-  ;; `INITIAL-INPUT' (5th argument to `TeX-completing-read-multiple')
-  ;; is hard-coded to `TeX-esc'.
-  (let* ((crm-separator (regexp-quote TeX-esc))
-         (fontdecl (mapconcat #'identity
-                              (TeX-completing-read-multiple
-                               (TeX-argument-prompt optional prompt "Font")
-                               LaTeX-theorem-fontdecl nil nil TeX-esc)
-                              TeX-esc)))
-    (TeX-argument-insert fontdecl optional)))
-
-(defun LaTeX-theorem-env-label (environment)
-  "Insert ENVIRONMENT, query for an optional argument and prompt
-for label.  AUCTeX users should add ENVIRONMENT to
-`LaTeX-label-alist' via customize or in init-file with:
-
-  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
-
-RefTeX users should customize or add ENVIRONMENT to
-`LaTeX-label-alist' and `reftex-label-alist', for example
-
-  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
-  (add-to-list \\='reftex-label-alist
-               \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
-                 nil (\"Lemma\" \"lemma\") nil))"
-  (let ((opthead (TeX-read-string
-                  (TeX-argument-prompt t nil "Heading"))))
-    (LaTeX-insert-environment environment
-                              (when (and opthead
-                                         (not (string= opthead "")))
-                                (format "[%s]" opthead))))
-  (when (LaTeX-label environment 'environment)
-    (LaTeX-newline)
-    (indent-according-to-mode)))
-
 ;; Setup parsing for \newtheorem
 (TeX-auto-add-type "theorem-newtheorem" "LaTeX")
 
@@ -114,7 +70,7 @@ RefTeX users should customize or add ENVIRONMENT to
   "Move parsed results from `LaTeX-auto-theorem-newtheorem' and
 make them available as new environments."
   (dolist (newthm (mapcar #'car (LaTeX-theorem-newtheorem-list)))
-    (LaTeX-add-environments (list newthm #'LaTeX-theorem-env-label))))
+    (LaTeX-add-environments (list newthm #'LaTeX-env-label-args ["Heading"]))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-theorem-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-theorem-auto-cleanup t)
@@ -130,14 +86,13 @@ make them available as new environments."
 
    (TeX-add-symbols
     ;; Overrule the defintion in `latex.el':
-    '("newtheorem"
-      (TeX-arg-eval
-       (lambda ()
+    `("newtheorem"
+      ,(lambda (optional)
          (let ((nthm (TeX-read-string
-                      (TeX-argument-prompt nil nil "Environment"))))
+                      (TeX-argument-prompt optional nil "Environment"))))
            (LaTeX-add-theorem-newtheorems nthm)
-           (LaTeX-add-environments (list nthm #'LaTeX-theorem-env-label))
-           (format "%s" nthm))))
+           (LaTeX-add-environments (list nthm #'LaTeX-env-label-args 
["Heading"]))
+           (TeX-argument-insert nthm optional)))
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
                                         (backward-char 2)
@@ -147,15 +102,25 @@ make them available as new environments."
                         "") ])
 
     '("theoremstyle"
-      (TeX-arg-eval completing-read
-                    "Style: "
-                    LaTeX-theorem-theoremstyle-list))
-
-    '("theorembodyfont"
-      (LaTeX-arg-theorem-fontdecl "Body font"))
-
-    '("theoremheaderfont"
-      (LaTeX-arg-theorem-fontdecl "Header font"))
+      (TeX-arg-completing-read LaTeX-theorem-theoremstyle-list "Style"))
+
+    `("theorembodyfont"
+      (TeX-arg-completing-read-multiple
+       ,(lambda () (append LaTeX-font-family
+                           LaTeX-font-shape
+                           LaTeX-font-shape
+                           LaTeX-font-size))
+       "Body font" nil nil ,(regexp-quote TeX-esc) ,TeX-esc
+       nil nil nil nil ,TeX-esc))
+
+    `("theoremheaderfont"
+      (TeX-arg-completing-read-multiple
+       ,(lambda () (append LaTeX-font-family
+                           LaTeX-font-shape
+                           LaTeX-font-shape
+                           LaTeX-font-size))
+       "Header font" nil nil ,(regexp-quote TeX-esc) ,TeX-esc
+       nil nil nil nil ,TeX-esc))
 
     '("theorempreskipamount"
       (TeX-arg-length "Skip before theorem"))
diff --git a/style/thm-restate.el b/style/thm-restate.el
index 15d33a9cda..0fcd6ecea8 100644
--- a/style/thm-restate.el
+++ b/style/thm-restate.el
@@ -1,6 +1,6 @@
 ;;; thm-restate.el --- AUCTeX style for `thm-restate.sty' (v66)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2018--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -39,14 +39,17 @@
 ;; Silence the parser:
 (declare-function LaTeX-thmtools-declaretheorem-list
                   "thmtools" ())
+(declare-function font-latex-add-keywords
+                  "font-latex"
+                  (keywords class))
 
 ;; Setup for macro names defined with
-;; \begin{restatable}[<Heading>]{<env-name>}{<macro name>}:
+;; \begin{restatable*?}[<Heading>]{<env-name>}{<macro name>}:
 
 (TeX-auto-add-type "thmrestate-restatable-macro" "LaTeX")
 
 (defvar LaTeX-thmrestate-restatable-marco-regexp
-  `(,(concat "\\\\begin{restatable}"
+  `(,(concat "\\\\begin{restatable\\*?}"
              "[ \t\n\r%]*"
              "\\(?:\\[[^]]*\\]\\)?"
              "[ \t\n\r%]*"
@@ -62,43 +65,25 @@
 (defun LaTeX-thmrestate-auto-cleanup ()
   "Process parsed elements from thm-restate package."
   (dolist (newmac (mapcar #'car (LaTeX-thmrestate-restatable-macro-list)))
-    (TeX-add-symbols `(,newmac 0)
-                     `(,(concat newmac "*") 0))))
+    (TeX-add-symbols newmac (concat newmac "*"))
+    (when (and (featurep 'font-latex)
+               (eq TeX-install-font-lock 'font-latex-setup))
+      (font-latex-add-keywords `((,newmac "*"))
+                               'function))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-thmrestate-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-thmrestate-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (defun LaTeX-env-thmrestate-restatable (optional)
-  "Insert arguments for restatable environment from thm-restate package."
-  ;; The optional heading argument:
-  (let ((TeX-arg-opening-brace LaTeX-optop)
-        (TeX-arg-closing-brace LaTeX-optcl))
-    (TeX-argument-insert
-     (TeX-read-string
-      (TeX-argument-prompt t nil "Heading"))
-     t))
-  ;; Name of the environment we are referring to; this can be defined
-  ;; via amsthm.sty, ntheorem.sty or thmtools.sty:
-  (TeX-argument-insert
-   (completing-read
-    (TeX-argument-prompt optional nil "Environment")
-    (append
-     ;; Cater for environments defined with amsthm's \newtheorem
-     (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
-                (LaTeX-amsthm-newtheorem-list))
-       (LaTeX-amsthm-newtheorem-list))
-     ;; Cater for environments defined with ntheorem's \newtheorem
-     (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
-                (LaTeX-ntheorem-newtheorem-list))
-       (LaTeX-ntheorem-newtheorem-list))
-     ;; Environments defined with \declaretheorem
-     (LaTeX-thmtools-declaretheorem-list)))
-   optional)
+  "Insert last argument of restatable environment from thm-restate package."
   (let ((mac (TeX-read-string
               (TeX-argument-prompt optional nil "Macro"))))
-    (TeX-add-symbols `(,mac 0)
-                     `(,(concat mac "*") 0))
+    (when (and (featurep 'font-latex)
+               (eq TeX-install-font-lock 'font-latex-setup))
+      (font-latex-add-keywords `((,mac "*"))
+                               'function))
+    (TeX-add-symbols mac (concat mac "*"))
     (TeX-argument-insert mac optional)))
 
 (TeX-add-style-hook
@@ -113,8 +98,48 @@
 
    ;; Provide restatable\\*? environment
    (LaTeX-add-environments
-    '("restatable"  LaTeX-env-args LaTeX-env-thmrestate-restatable)
-    '("restatable*" LaTeX-env-args LaTeX-env-thmrestate-restatable)))
+    `("restatable"  LaTeX-env-args
+      ["Heading"]
+      (TeX-arg-completing-read
+       ;; Name of the environment we are referring to; this can be
+       ;; defined via amsthm.sty, ntheorem.sty or thmtools.sty:
+       ,(lambda ()
+          (append
+           ;; Cater for environments defined with amsthm's \newtheorem
+           (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
+                      (LaTeX-amsthm-newtheorem-list))
+             (LaTeX-amsthm-newtheorem-list))
+           ;; Cater for environments defined with ntheorem's \newtheorem
+           (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
+                      (LaTeX-ntheorem-newtheorem-list))
+             (LaTeX-ntheorem-newtheorem-list))
+           ;; Environments defined with \declaretheorem
+           (LaTeX-thmtools-declaretheorem-list)))
+       "Environment")
+      LaTeX-env-thmrestate-restatable)
+
+    `("restatable*" LaTeX-env-args
+      ["Heading"]
+      (TeX-arg-completing-read
+       ;; Name of the environment we are referring to; this can be
+       ;; defined via amsthm.sty, ntheorem.sty or thmtools.sty:
+       ,(lambda ()
+          (append
+           ;; Cater for environments defined with amsthm's \newtheorem
+           (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
+                      (LaTeX-amsthm-newtheorem-list))
+             (LaTeX-amsthm-newtheorem-list))
+           ;; Cater for environments defined with ntheorem's \newtheorem
+           (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
+                      (LaTeX-ntheorem-newtheorem-list))
+             (LaTeX-ntheorem-newtheorem-list))
+           ;; Environments defined with \declaretheorem
+           (LaTeX-thmtools-declaretheorem-list)))
+       "Environment")
+      LaTeX-env-thmrestate-restatable)))
  TeX-dialect)
 
+(defvar LaTeX-thm-restate-package-options nil
+  "Package options for the thm-restate package.")
+
 ;;; thm-restate.el ends here
diff --git a/style/thmtools.el b/style/thmtools.el
index d17b30eef2..dcf02db8d5 100644
--- a/style/thmtools.el
+++ b/style/thmtools.el
@@ -1,6 +1,6 @@
 ;;; thmtools.el --- AUCTeX style for `thmtools.sty' (v0.72)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2018--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2018--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -82,10 +82,8 @@
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-thmtools-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun LaTeX-thmtools-declaretheoremstyle-key-val (optional &optional prompt)
-  "Query and return a key=val string for \\declaretheoremstyle macro.
-If OPTIONAL is non-nil, indicate an optional argument in
-minibuffer.  PROMPT replaces the standard one."
+(defun LaTeX-thmtools-declaretheoremstyle-key-val-options ()
+  "Return key=val list for \\declaretheoremstyle macro."
   (let ((lengths (mapcar (lambda (x)
                            (concat TeX-esc x))
                          (mapcar #'car (LaTeX-length-list))))
@@ -96,93 +94,73 @@ minibuffer.  PROMPT replaces the standard one."
                          "tiny"  "scriptsize" "footnotesize"
                          "small" "normalsize" "large"
                          "Large" "LARGE" "huge" "Huge" "normalfont"))))
-    (TeX-read-key-val
-     optional
-     `(("spaceabove" ,lengths)
-       ("spacebelow" ,lengths)
-       ("headfont" ,fonts)
-       ("notefont" ,fonts)
-       ("bodyfont" ,fonts)
-       ("headpunct")
-       ("notebraces")
-       ("postheadspace" ,lengths)
-       ("headformat" ("margin" "swapnumber" "\\NUMBER" "\\NAME" "\\NOTE"))
-       ("headindent" ,lengths))
-     prompt)))
+    `(("spaceabove" ,lengths)
+      ("spacebelow" ,lengths)
+      ("headfont" ,fonts)
+      ("notefont" ,fonts)
+      ("bodyfont" ,fonts)
+      ("headpunct")
+      ("notebraces")
+      ("postheadspace" ,lengths)
+      ("headformat" ("margin" "swapnumber" "\\NUMBER" "\\NAME" "\\NOTE"))
+      ("headindent" ,lengths))))
 
 (defun LaTeX-arg-thmtools-declaretheoremstyle (optional &optional prompt)
-  "Insert the key=val and style name defined by \\declaretheoremstyle.
+  "Insert the style name defined by \\declaretheoremstyle.
 If OPTIONAL is non-nil, also insert the second argument in square
 brackets.  PROMPT replaces the standard one for the second
 argument."
-  (let ((TeX-arg-opening-brace "[")
-        (TeX-arg-closing-brace "]"))
-    (TeX-argument-insert
-     (LaTeX-thmtools-declaretheoremstyle-key-val t)
-     t))
   (let ((style (TeX-read-string
                 (TeX-argument-prompt optional prompt "Style"))))
     (LaTeX-add-thmtools-declaretheoremstyles style)
     (TeX-argument-insert style optional)))
 
-(defun LaTeX-thmtools-declaretheorem-key-val (optional &optional prompt)
-  "Query and return a key=val string for \\declaretheorem macro.
-If OPTIONAL is non-nil, indicate an optional argument in
-minibuffer.  PROMPT replaces the standard one."
+(defun LaTeX-thmtools-declaretheorem-key-val-options ()
+  "Return key=val list for \\declaretheorem macro."
   (let ((counters (mapcar #'car (LaTeX-counter-list))))
-    (TeX-read-key-val
-     optional
-     `(("parent" ,counters)
-       ("numberwithin" ,counters)
-       ("within" ,counters)
-       ("sibling" ,counters)
-       ("numberlike" ,counters)
-       ("sharenumber" ,counters)
-       ("title")
-       ("name")
-       ("heading")
-       ("numbered" ("yes" "no" "unless unique"))
-       ("style"
-        ,(append
-          ;; check for \newtheoremstyle from amsthm.sty:
-          (when (and (fboundp 'LaTeX-amsthm-newtheoremstyle-list)
-                     (LaTeX-amsthm-newtheoremstyle-list))
-            (mapcar #'car (LaTeX-amsthm-newtheoremstyle-list)))
-          ;; check for \newtheoremstyle from ntheorem.sty:
-          (when (and (fboundp 'LaTeX-ntheorem-newtheoremstyle-list)
-                     (LaTeX-ntheorem-newtheoremstyle-list))
-            (mapcar #'car (LaTeX-ntheorem-newtheoremstyle-list)))
-          ;; thmtools version is called \declaretheoremstyle:
-          (mapcar #'car (LaTeX-thmtools-declaretheoremstyle-list))))
-       ("preheadhook")
-       ("postheadhook")
-       ("prefoothook")
-       ("postfoothook")
-       ("refname")
-       ("Refname")
-       ("shaded" ("textwidth" "bgcolor" "rulecolor" "rulewidth" "margin"))
-       ("thmbox" ("L" "M" "S")))
-     prompt)))
+    `(("parent" ,counters)
+      ("numberwithin" ,counters)
+      ("within" ,counters)
+      ("sibling" ,counters)
+      ("numberlike" ,counters)
+      ("sharenumber" ,counters)
+      ("title")
+      ("name")
+      ("heading")
+      ("numbered" ("yes" "no" "unless unique"))
+      ("style"
+       ,(append
+         ;; check for \newtheoremstyle from amsthm.sty:
+         (when (and (fboundp 'LaTeX-amsthm-newtheoremstyle-list)
+                    (LaTeX-amsthm-newtheoremstyle-list))
+           (mapcar #'car (LaTeX-amsthm-newtheoremstyle-list)))
+         ;; check for \newtheoremstyle from ntheorem.sty:
+         (when (and (fboundp 'LaTeX-ntheorem-newtheoremstyle-list)
+                    (LaTeX-ntheorem-newtheoremstyle-list))
+           (mapcar #'car (LaTeX-ntheorem-newtheoremstyle-list)))
+         ;; thmtools version is called \declaretheoremstyle:
+         (mapcar #'car (LaTeX-thmtools-declaretheoremstyle-list))))
+      ("preheadhook")
+      ("postheadhook")
+      ("prefoothook")
+      ("postfoothook")
+      ("refname")
+      ("Refname")
+      ("shaded" ("textwidth" "bgcolor" "rulecolor" "rulewidth" "margin"))
+      ("thmbox" ("L" "M" "S")))))
 
 (defun LaTeX-arg-thmtools-declaretheorem (optional &optional prompt)
-  "Insert the key=val and environment name defined by \\declaretheorem.
+  "Insert the environment name defined by \\declaretheorem.
 If OPTIONAL is non-nil, also insert the second argument in square
 brackets.  PROMPT replaces the standard one for the second
 argument."
   (let ((env (TeX-read-string
               (TeX-argument-prompt optional prompt "Environment"))))
     (LaTeX-add-environments `(,env LaTeX-thmtools-env-label))
-    (TeX-argument-insert env optional))
-  (let ((TeX-arg-opening-brace "[")
-        (TeX-arg-closing-brace "]"))
-    (TeX-argument-insert
-     (LaTeX-thmtools-declaretheorem-key-val t)
-     t)))
-
-(defun LaTeX-thmtools-listoftheorems-key-val (optional &optional prompt)
-  "Query and return a key=val string for \\listoftheorems macro.
-If OPTIONAL is non-nil, indicate an optional argument in
-minibuffer.  PROMPT replaces the standard one."
+    (TeX-argument-insert env optional)))
+
+(defun LaTeX-thmtools-listoftheorems-key-val-options ()
+  "Return key=val list for \\listoftheorems macro."
   (let ((lengths (mapcar (lambda (x)
                            (concat TeX-esc x))
                          (mapcar #'car (LaTeX-length-list))))
@@ -197,25 +175,14 @@ minibuffer.  PROMPT replaces the standard one."
                  (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
                ;; thmtools version is called \declaretheorem:
                (mapcar #'car (LaTeX-thmtools-declaretheorem-list)))))
-    (TeX-read-key-val
-     optional
-     `(("title")
-       ("ignore" ,thms)
-       ("ignoreall" ("true" "false"))
-       ("show" ,thms)
-       ("showall" ("true" "false"))
-       ("onlynamed" ,thms)
-       ("swapnumber" ("true" "false"))
-       ("numwidth" ,lengths))
-     prompt)))
-
-(defun LaTeX-arg-thmtools-listoftheorems (optional &optional prompt)
-  "Insert the key=val to \\listoftheorems macro.
-If OPTIONAL is non-nil, insert the result square brackets.
-OPTIONAL and PROMPT are passed to `LaTeX-thmtools-listoftheorems-key-val'."
-  (TeX-argument-insert
-   (LaTeX-thmtools-listoftheorems-key-val optional prompt)
-   optional))
+    `(("title")
+      ("ignore" ,thms)
+      ("ignoreall" ("true" "false"))
+      ("show" ,thms)
+      ("showall" ("true" "false"))
+      ("onlynamed" ,thms)
+      ("swapnumber" ("true" "false"))
+      ("numwidth" ,lengths))))
 
 (defun LaTeX-thmtools-env-label (environment)
   "Insert thmtools ENVIRONMENT, query for an optional argument and label.
@@ -273,26 +240,31 @@ RET in order to leave it empty.")
    (TeX-auto-add-regexp LaTeX-thmtools-declaretheorem-regexp)
 
    (TeX-add-symbols
-    '("declaretheoremstyle" LaTeX-arg-thmtools-declaretheoremstyle)
-    '("declaretheorem" LaTeX-arg-thmtools-declaretheorem)
-
-    '("listoftheorems"  [ LaTeX-arg-thmtools-listoftheorems ])
-    '("ignoretheorems"
-      (TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt nil nil "Environment(s)")
-                     (append
-                      ;; check for \newtheorem from amsthm.sty:
-                      (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
-                                 (LaTeX-amsthm-newtheorem-list))
-                        (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
-                      ;; check for \newtheorem from ntheorem.sty:
-                      (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
-                                 (LaTeX-ntheorem-newtheorem-list))
-                        (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
-                      ;; thmtools version is called \declaretheorem:
-                      (mapcar #'car (LaTeX-thmtools-declaretheorem-list))))
-                    ","))
+    '("declaretheoremstyle"
+      [TeX-arg-key-val (LaTeX-thmtools-declaretheoremstyle-key-val-options)]
+      LaTeX-arg-thmtools-declaretheoremstyle)
+
+    '("declaretheorem"
+      LaTeX-arg-thmtools-declaretheorem
+      [TeX-arg-key-val (LaTeX-thmtools-declaretheorem-key-val-options)])
+
+    '("listoftheorems"
+      [TeX-arg-key-val (LaTeX-thmtools-listoftheorems-key-val-options)])
+
+    `("ignoretheorems"
+      (TeX-arg-completing-read-multiple
+       ,(lambda () (append
+                    ;; check for \newtheorem from amsthm.sty:
+                    (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
+                               (LaTeX-amsthm-newtheorem-list))
+                      (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
+                    ;; check for \newtheorem from ntheorem.sty:
+                    (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
+                               (LaTeX-ntheorem-newtheorem-list))
+                      (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
+                    ;; thmtools version is called \declaretheorem:
+                    (mapcar #'car (LaTeX-thmtools-declaretheorem-list))))
+       "Environment(s)"))
     '("listtheoremname" 0))
 
    ;; Fontification
diff --git a/style/tikz.el b/style/tikz.el
index 565e6b0aa4..a0edfd4650 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -33,11 +33,19 @@
 (require 'tex)
 (require 'latex)
 
+;; Silence compiler
+(declare-function ConTeXt-add-environments "context"
+                  (&rest environments))
+
+(defgroup AUCTeX-TikZ nil
+  "AUCTeX TikZ support"
+  :group 'AUCTeX)
+
 (defcustom TeX-TikZ-point-name-regexp
   "(\\([A-Za-z0-9]+\\))"
   "A regexp that matches TikZ names."
   :type 'regexp
-  :group 'auctex-tikz)
+  :group 'AUCTeX-TikZ)
 
 (defconst TeX-TikZ-point-function-map
   '(("Rect Point" TeX-TikZ-arg-rect-point)
@@ -104,7 +112,7 @@ Ask the user for r and theta values, and return the string
 
 (defun TeX-TikZ-arg-options (optional)
   "Prompt the user for options to a TikZ macro.
-If OPTIONAL is non-nil, always return `LaTeX-optop' and
+If OPTIONAL is nil, always return `LaTeX-optop' and
 `LaTeX-optcl', even if the user doesn't provide any input."
   (let ((options (TeX-read-string (TeX-argument-prompt optional nil "Options" 
))))
     (if optional
@@ -113,7 +121,7 @@ If OPTIONAL is non-nil, always return `LaTeX-optop' and
 
 (defun TeX-TikZ-arg-name (optional)
   "Prompt the user for a TikZ name.
-If OPTIONAL is non-nil, always return \"()\", even if the user
+If OPTIONAL is nil, always return \"()\", even if the user
 doesn't provide any input."
   (let ((name (TeX-read-string (TeX-argument-prompt optional nil "Name" ))))
     (if optional
@@ -122,8 +130,8 @@ doesn't provide any input."
 
 (defun TeX-TikZ-arg-label (optional)
   "Prompt the user for TikZ label.
-If OPTIONAL is non-nil always return `TeX-grop' and `TeX-grcl',
-even if the user doesn't provide any input."
+If OPTIONAL is nil always return `TeX-grop' and `TeX-grcl', even
+if the user doesn't provide any input."
   (let ((label (TeX-read-string (TeX-argument-prompt optional nil "Label" ))))
     (if optional
         (TeX-TikZ-get-opt-arg-string label TeX-grop TeX-grcl)
@@ -199,6 +207,10 @@ is finished."
 Begin by finding the span of the current TikZ enviroment and then
 searching within that span to find all named-points and return
 them as a list of strings, dropping the \\='()\\='."
+  ;; FIXME: This function depends on `LaTeX-find-matching-begin' and
+  ;; `LaTeX-find-matching-end', so it doesn't work for ConTeXt and
+  ;; plain TeX.  In addition, it isn't compatible with the TikZ code
+  ;; following \tikz.
   (let* ((env-end (save-excursion
                     (LaTeX-find-matching-end)
                      (point)))
@@ -266,7 +278,7 @@ return \"\"."
 (defun TeX-TikZ-node-arg (_ignored)
   "Prompt the user for the arguments to a TikZ node macro."
   (let ((options (TeX-TikZ-arg-options t))
-        (name (TeX-TikZ-arg-name nil))
+        (name (TeX-TikZ-arg-name t))
         (point (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map
                                           "Node point type: "))
         (label (TeX-TikZ-arg-label nil)))
@@ -278,8 +290,51 @@ return \"\"."
    (TeX-add-symbols
     '("draw" (TeX-TikZ-draw-arg))
     '("coordinate" (TeX-TikZ-coordinate-arg))
-    '("node" (TeX-TikZ-node-arg)))
+    '("node" (TeX-TikZ-node-arg))
+    '("tikz" ["TikZ option"])
+    '("tikzset" "TikZ option")
+    ;; FIXME:
+    ;; 1. usetikzlibrary isn't much useful without completion support
+    ;;    for available libraries.
+    ;; 2. ConTeXt users may prefer [...] over {...} as the argument.
+    '("usetikzlibrary" t)
+    ;; XXX: Maybe we should create pgffor.el and factor out this entry
+    ;; into it.
+    '("foreach" (TeX-arg-literal " ") (TeX-arg-free "Variable(s)")
+      (TeX-arg-literal " ") ["Foreach option"]
+      (TeX-arg-literal " in ") "Value list (Use \"...\" for range)"
+      (TeX-arg-literal " ") t))))
+
+;; LaTeX/docTeX specific stuff
+(TeX-add-style-hook
+ "tikz"
+ (lambda ()
    (LaTeX-add-environments
-    '("tikzpicture"))))
+    '("tikzpicture" ["TikZ option"])
+    '("scope" ["TikZ option"]))
+   ;; tikz.sty loads pgfcore.sty, which loads packages graphicx,
+   ;; keyval and xcolor, too.
+   (TeX-run-style-hooks "pgf" "graphicx" "keyval" "xcolor"))
+ :latex)
+
+;; ConTeXt specific stuff
+(TeX-add-style-hook
+ "tikz"
+ (lambda ()
+   (ConTeXt-add-environments
+    '("tikzpicture" ["TikZ option"])
+    '("scope" ["TikZ option"])))
+ :context)
+
+;; plain TeX specific stuff
+(TeX-add-style-hook
+ "tikz"
+ (lambda ()
+   (TeX-add-symbols
+    '("tikzpicture" ["TikZ option"])
+    "endtikzpicture"
+    '("scope" ["TikZ option"])
+    "endscope"))
+ :plain-tex)
 
 ;;; tikz.el ends here
diff --git a/style/titleps.el b/style/titleps.el
index 8de8b1d3d7..67891035ce 100644
--- a/style/titleps.el
+++ b/style/titleps.el
@@ -107,18 +107,12 @@ Removal is based on the return value of function
     '("setfoot*" 3)
 
     '("settitlemarks"
-      (TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt nil nil "Level names")
-                     (LaTeX-titleps-section-command-list))
-                    ","))
+      (TeX-arg-completing-read-multiple (LaTeX-titleps-section-command-list)
+                                        "Level names"))
 
     '("settitlemarks"
-      (TeX-arg-eval mapconcat #'identity
-                    (TeX-completing-read-multiple
-                     (TeX-argument-prompt nil nil "Level names")
-                     (LaTeX-titleps-section-command-list))
-                    ","))
+      (TeX-arg-completing-read-multiple (LaTeX-titleps-section-command-list)
+                                        "Level names"))
 
     '("headrule" 0)
     '("setheadrule" "Thickness")
@@ -142,14 +136,12 @@ Removal is based on the return value of function
     '("widenhead*" 2)
 
     '("TitlepsPatchSection"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titleps-section-command-list)))
+      (TeX-arg-completing-read (LaTeX-titleps-section-command-list)
+                               "Sectioning command"))
 
     '("TitlepsPatchSection*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titleps-section-command-list)))
+      (TeX-arg-completing-read (LaTeX-titleps-section-command-list)
+                               "Sectioning command"))
 
     ;; 5. Marks
     '("bottitlemarks"     0)
@@ -163,15 +155,13 @@ Removal is based on the return value of function
     '("newtitlemark*" (TeX-arg-counter "Variable name"))
 
     '("pretitlemark"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titleps-section-command-list))
+      (TeX-arg-completing-read (LaTeX-titleps-section-command-list)
+                               "Sectioning command")
       "Text")
 
     '("pretitlemark*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titleps-section-command-list))
+      (TeX-arg-completing-read (LaTeX-titleps-section-command-list)
+                               "Sectioning command")
       "Text")
 
     '("ifsamemark"
diff --git a/style/titlesec.el b/style/titlesec.el
index c3af038228..bc1faf13d8 100644
--- a/style/titlesec.el
+++ b/style/titlesec.el
@@ -75,34 +75,29 @@ Removal is based on the return value of function
 `TeX-esc'."
   (mapcar (lambda (elt) (concat TeX-esc elt))
           (if (< (LaTeX-largest-level) 2)
-              (symbol-value 'LaTeX-titlesec-section-command-list)
+              LaTeX-titlesec-section-command-list
             (remove "chapter" LaTeX-titlesec-section-command-list))))
 
-(defun LaTeX-arg-titlesec-titlespec (optional)
-  "Insert the first argument of \"\\titleformat\" and \"\\titlespacing\".
-Depending on returned value of function `LaTeX-largest-level',
-append a \"name\" key with corresponding values to
-`LaTeX-titlesec-key-val-options'.  The values are retrieved from
-`LaTeX-titlesec-section-command-list'.  The values of this list
-are also added stand-alone as keys.  If OPTIONAL is non-nil,
-insert the argument in brackets."
-  (let ((keyvals
-         (TeX-read-key-val
-          optional
-          (append
-           `(("name"
-              ,(mapcar (lambda (elt) (concat TeX-esc elt))
-                       (if (< (LaTeX-largest-level) 2)
-                           (symbol-value 'LaTeX-titlesec-section-command-list)
-                         (remove "chapter" 
LaTeX-titlesec-section-command-list)))))
-           (mapcar #'list
-                   (mapcar (lambda (elt) (concat TeX-esc elt))
-                           (if (< (LaTeX-largest-level) 2)
-                               (symbol-value 
'LaTeX-titlesec-section-command-list)
-                             (remove "chapter" 
LaTeX-titlesec-section-command-list))))
-           LaTeX-titlesec-key-val-options)
-          "Sectioning command")))
-    (TeX-argument-insert keyvals optional)))
+(defun LaTeX-titlesec-titlespec-key-val-options ()
+  "Return key=val's for the 1st arg of \"\\titleformat\" and 
\"\\titlespacing\".
+Depending on the returned value of the function
+`LaTeX-largest-level', append a \"name\" key with corresponding
+values to `LaTeX-titlesec-key-val-options'.  The values are
+retrieved from `LaTeX-titlesec-section-command-list'.  The values
+of this list are also added stand-alone as keys."
+  (append
+   `(("name"
+      ,(mapcar (lambda (elt) (concat TeX-esc elt))
+               (if (< (LaTeX-largest-level) 2)
+                   LaTeX-titlesec-section-command-list
+                 (remove "chapter" LaTeX-titlesec-section-command-list)))))
+   (mapcar #'list
+           (mapcar (lambda (elt) (concat TeX-esc elt))
+                   (if (< (LaTeX-largest-level) 2)
+                       LaTeX-titlesec-section-command-list
+                     (remove "chapter" LaTeX-titlesec-section-command-list))))
+   LaTeX-titlesec-key-val-options))
+
 
 (TeX-add-style-hook
  "titlesec"
@@ -117,32 +112,30 @@ insert the argument in brackets."
     '("titlelabel" t)
 
     ;; \titleformat*{<command>}{<format>}
-    '("titleformat*" (LaTeX-arg-titlesec-titlespec) t)
+    '("titleformat*" (TeX-arg-key-val 
(LaTeX-titlesec-titlespec-key-val-options)) t)
 
     ;; 3. Advanced Interface
     ;; 
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
     '("titleformat"
-      (LaTeX-arg-titlesec-titlespec)
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Shape")
-                    LaTeX-titlesec-section-shape-list]
+      (TeX-arg-key-val (LaTeX-titlesec-titlespec-key-val-options))
+      [TeX-arg-completing-read LaTeX-titlesec-section-shape-list "Shape"]
       (TeX-arg-conditional (y-or-n-p "With optional after-code? ")
-                           (4 [nil])
-                           (4)))
+          (4 [nil])
+        (4)))
 
     '("chaptertitlename" 0)
 
     ;; 3.2. Spacing
     ;; \titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}[<right-sep>]
     '("titlespacing"
-      (LaTeX-arg-titlesec-titlespec)
+      (TeX-arg-key-val (LaTeX-titlesec-titlespec-key-val-options))
       (TeX-arg-length "Left margin")
       (TeX-arg-length "Before vertical space")
       (TeX-arg-length "Space between title and text")
       [TeX-arg-length "Right margin"])
 
     '("titlespacing*"
-      (LaTeX-arg-titlesec-titlespec)
+      (TeX-arg-key-val (LaTeX-titlesec-titlespec-key-val-options))
       (TeX-arg-length "Left margin")
       (TeX-arg-length "Before vertical space")
       (TeX-arg-length "Space between title and text")
@@ -160,9 +153,7 @@ insert the argument in brackets."
 
     ;; 3.4. Rules
     '("titleline"
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Alignment")
-                    '("l" "r" "c")]
+      [TeX-arg-completing-read ("l" "r" "c") "Alignment"]
       t)
 
     '("titlerule" [TeX-arg-length "Rule height"])
@@ -173,22 +164,18 @@ insert the argument in brackets."
 
     ;; 3.5. Page styles
     '("assignpagestyle"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titlesec-section-command-list))
+      (TeX-arg-completing-read (LaTeX-titlesec-section-command-list)
+                               "Sectioning command")
       (TeX-arg-pagestyle))
 
     ;; 3.9. Creating new levels and changing the class
     '("titleclass"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titlesec-section-command-list))
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Class")
-                    '("page" "top" "straight"))
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Super level command")
-                    (LaTeX-titlesec-section-command-list)]) )
+      (TeX-arg-completing-read (LaTeX-titlesec-section-command-list)
+                               "Sectioning command")
+      (TeX-arg-completing-read ("page" "top" "straight")
+                               "Class")
+      [TeX-arg-completing-read (LaTeX-titlesec-section-command-list)
+                               "Super level command"]))
 
    ;; Don't increase indent at \iftitlemeasuring:
    (add-to-list 'LaTeX-indent-begin-exceptions-list "iftitlemeasuring" t)
@@ -198,9 +185,7 @@ insert the argument in brackets."
    (when (LaTeX-provided-package-options-member "titlesec" "calcwidth")
      (TeX-add-symbols
       '("titleline*"
-        (TeX-arg-eval completing-read
-                      (TeX-argument-prompt nil nil "Alignment")
-                      '("l" "r" "c"))
+        (TeX-arg-completing-read ("l" "r" "c") "Alignment")
         t)))
 
    ;; The length of the longest line is returned in \titlewidth
diff --git a/style/titletoc.el b/style/titletoc.el
index c0ac512198..5031f1e5e9 100644
--- a/style/titletoc.el
+++ b/style/titletoc.el
@@ -1,6 +1,6 @@
 ;;; titletoc.el --- AUCTeX style for `titletoc.sty' (v1.6)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -98,19 +98,18 @@ Removal is based on the return value of function
     ;; \dottedcontents{<section>}[<left>]{<above-code>}
     ;;                {<label width>}{<leader width>}
     '("dottedcontents"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titletoc-section-command-list))
-      [ TeX-arg-length "Left margin" ] 3)
+      (TeX-arg-completing-read (LaTeX-titletoc-section-command-list)
+                               "Sectioning command")
+      [TeX-arg-length "Left margin"]
+      3)
 
     ;; \titlecontents{<section>}[<left>]{<above-code>}
     ;;               {<numbered-entry-format>}{<numberless-entry-format>}
     ;;               {<filler-page-format>}[<below-code>]
     '("titlecontents"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titletoc-section-command-list))
-      [ TeX-arg-length "Left margin" ]
+      (TeX-arg-completing-read (LaTeX-titletoc-section-command-list)
+                               "Sectioning command")
+      [TeX-arg-length "Left margin"]
       (TeX-arg-conditional (y-or-n-p "With optional below code argument? ")
                            (4 [nil])
                            (4)))
@@ -119,10 +118,9 @@ Removal is based on the return value of function
     ;;                {<numbered-entry-format>}{<numberless-entry-format>}
     ;;                {<filler-page-format>}[<separator>]
     '("titlecontents*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Sectioning command")
-                    (LaTeX-titletoc-section-command-list))
-      [ TeX-arg-length "Left margin" ]
+      (TeX-arg-completing-read (LaTeX-titletoc-section-command-list)
+                               "Sectioning command")
+      [TeX-arg-length "Left margin"]
       (TeX-arg-conditional (y-or-n-p "With optional separator argument? ")
                            (4 [nil])
                            (4)))
diff --git a/style/ulem.el b/style/ulem.el
index fa9cefb066..f2383e2024 100644
--- a/style/ulem.el
+++ b/style/ulem.el
@@ -57,8 +57,18 @@
     ;; \useunder {underline_command}{font_declaration}{font_command}
     ;; replaces occurences of font_declaration and font_command with the
     ;; underline_command
-    '("useunder" TeX-arg-ulem-useunder
-      TeX-arg-ulem-fontdecl TeX-arg-ulem-fontcmd))
+    '("useunder"
+      (TeX-arg-completing-read ("\\uline" "\\uuline" "\\uwave" "\\sout"
+                                "\\xout"  "\\dashuline" "\\dotuline")
+                               "Underline command")
+      (TeX-arg-completing-read ("\\itshape"  "\\bfseries" "\\scshape"
+                                "\\ttfamily" "\\upshape"  "\\mdseries"
+                                "\\rmfamily" "\\sffamily" "\\slshape")
+                               "Font declaration")
+      (TeX-arg-completing-read ("\\textit" "\\textbf" "\\textsc"
+                                "\\texttt" "\\textup" "\\textmd"
+                                "\\textrm" "\\textsf" "\\textsl")
+                               "Font command")))
 
    ;; \ULdepth can be changed with \setlength
    (LaTeX-add-lengths "ULdepth")
@@ -80,48 +90,6 @@
                               'underline-command)))
  TeX-dialect)
 
-(defvar LaTeX-ulem-fontdecl
-  (mapcar (lambda (str) (concat "\\" str))
-          '("itshape" "bfseries" "scshape"
-            "ttfamily" "upshape" "mdseries"
-            "rmfamily" "sffamily" "slshape"))
-  "List of font declaration commands in LaTeX.")
-
-(defvar LaTeX-ulem-fontcmd
-  (mapcar (lambda (str) (concat "\\" str))
-          '("textit" "textbf" "textsc"
-            "texttt" "textup" "textmd"
-            "textrm" "textsf" "textsl"))
-  "List of font commands in LaTeX")
-
-(defun TeX-arg-ulem-fontdecl (optional &optional prompt)
-  "Prompt for the font-declaration un \\useunder."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt
-                     optional prompt "Font declaration")
-                    LaTeX-ulem-fontdecl nil t)
-   optional))
-
-(defun TeX-arg-ulem-fontcmd (optional &optional prompt)
-  "Prompt for the font-declaration un \\useunder."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt
-                     optional prompt "Font command")
-                    LaTeX-ulem-fontcmd nil t)
-   optional))
-
-;; adapted from url.el: TeX-arg-urlstyle
-(defun TeX-arg-ulem-useunder (optional &optional prompt)
-  "Prompt for underline command used in \\useunder."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt optional prompt "Underline command")
-                    (mapcar (lambda (str) (concat "\\" str))
-                            '("uline" "uuline"
-                              "uwave" "sout" "xout"
-                              "dashuline" "dotuline"))
-                    nil t)
-   optional))
-
 (defvar LaTeX-ulem-package-options
   '("UWforbf" "ULforem" "normalbf" "normalem")
   "Package options for the ulem package.")
diff --git a/style/url.el b/style/url.el
index af524bf6f6..e1bac616c7 100644
--- a/style/url.el
+++ b/style/url.el
@@ -1,6 +1,6 @@
 ;;; url.el --- AUCTeX style for `url.sty'  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2004-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2004-2022  Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
 ;; Maintainer: auctex-devel@gnu.org
@@ -115,16 +115,6 @@
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-url-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun TeX-arg-url-urlstyle (optional &optional prompt)
-  "Prompt for style used in \\urlstyle with completion.
-If OPTIONAL is non-nil, indicate it in the minibuffer during the
-query and insert the result in brackets.  PROMPT replaces the
-standard one."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt optional prompt "Style")
-                    '("rm" "same" "sf" "tt"))
-   optional))
-
 (defun TeX-arg-url-DeclareUrlCommand (optional &optional prompt)
   "Prompt for arguments of \\DeclareUrlCommand with completion.
 If OPTIONAL is non-nil, indicate it in the minibuffer during the
@@ -181,12 +171,13 @@ standard one."
     ;; "hyperref" redefines \url so that the argument is only in
     ;; braces.  We check here if hyperref is loaded:
     '("url" (TeX-arg-conditional (member "hyperref" (TeX-style-list))
-                                 ("Url")
-                                 ((TeX-arg-verb-delim-or-brace "Url"))))
+                ("Url")
+              ((TeX-arg-verb-delim-or-brace "Url"))))
 
     '("urldef" TeX-arg-url-urldef)
 
-    '("urlstyle" TeX-arg-url-urlstyle))
+    '("urlstyle" (TeX-arg-completing-read ("rm" "same" "sf" "tt")
+                                          "Style")))
 
    ;; For '\path', use the facilities provided by this style.  Also
    ;; don't add "path" for fontification below since
diff --git a/style/wrapfig.el b/style/wrapfig.el
index 35d8a0572e..f56f40412d 100644
--- a/style/wrapfig.el
+++ b/style/wrapfig.el
@@ -1,6 +1,6 @@
 ;;; wrapfig.el --- AUCTeX style for `wrapfig.sty' version v3.6  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -31,6 +31,9 @@
 
 ;;; Code:
 
+(declare-function LaTeX-newfloat-DeclareFloatingEnvironment-list
+                  "newfloat" ())
+
 (require 'tex)
 (require 'latex)
 
@@ -39,47 +42,21 @@
  (lambda ()
    (LaTeX-add-environments
     ;; \begin{wrapfigure}[No.lines]{Placement}[Overhang]{Width} ... 
\end{wrapfigure}
-    '("wrapfigure"
-      (lambda (env &rest ignore)
-        (LaTeX-insert-environment
-         env
-         (let ((narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
-               (placement (completing-read
-                           "Placement: " '(("r") ("R")
-                                           ("l") ("L")
-                                           ("i") ("I")
-                                           ("o") ("O"))))
-               (overhang  (TeX-read-string "(Optional) Overhang: "))
-               (width     (TeX-read-string "Width: ")))
-           (concat
-            (unless (string= narrow "")
-              (format "[%s]" narrow))
-            (format "{%s}" placement)
-            (unless (string= overhang "")
-              (format "[%s]" overhang))
-            (format "{%s}" width))))))
-    ;;
+    '("wrapfigure" LaTeX-env-args
+      ["Number of narrow lines"]
+      (TeX-arg-completing-read ("r" "R" "l" "L" "i" "I" "o" "O")
+                               "Placement")
+      [TeX-arg-length "Overhang"]
+      (TeX-arg-length "Width"))
+
     ;; \begin{wraptable}[No.lines]{Placement}[Overhang]{Width} ... 
\end{wraptable}
-    '("wraptable"
-      (lambda (env &rest ignore)
-        (LaTeX-insert-environment
-         env
-         (let ((narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
-               (placement (completing-read
-                           "Placement: " '(("r") ("R")
-                                           ("l") ("L")
-                                           ("i") ("I")
-                                           ("o") ("O"))))
-               (overhang  (TeX-read-string "(Optional) Overhang: "))
-               (width     (TeX-read-string "Width: ")))
-           (concat
-            (unless (string= narrow "")
-              (format "[%s]" narrow))
-            (format "{%s}" placement)
-            (unless (string= overhang "")
-              (format "[%s]" overhang))
-            (format "{%s}" width))))))
-    ;;
+    '("wraptable" LaTeX-env-args
+      ["Number of narrow lines"]
+      (TeX-arg-completing-read ("r" "R" "l" "L" "i" "I" "o" "O")
+                               "Placement")
+      [TeX-arg-length "Overhang"]
+      (TeX-arg-length "Width"))
+
     ;; \begin{wrapfloat}{<Type>}[No.lines]{Placement}[Overhang]{Width} ... 
\end{wrapfloat}
     ;;
     ;; <Type> can be a new floating environment defined with
@@ -87,32 +64,19 @@
     ;; the function `LaTeX-newfloat-DeclareFloatingEnvironment-list'
     ;; is bound and returns non-nil before offering environment for
     ;; completion.  Otherwise, just ask user without completion.
-    '("wrapfloat"
-      (lambda (env &rest ignore)
-        (LaTeX-insert-environment
-         env
-         (let ((floattype (if (and (fboundp 
'LaTeX-newfloat-DeclareFloatingEnvironment-list)
-                                   
(LaTeX-newfloat-DeclareFloatingEnvironment-list))
-                              (completing-read
-                               "Float type: "
-                               (mapcar #'car 
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
-                            (TeX-read-string "Float type: ")))
-               (narrow    (TeX-read-string "(Optional) Number of narrow lines: 
"))
-               (placement (completing-read
-                           "Placement: " '(("r") ("R")
-                                           ("l") ("L")
-                                           ("i") ("I")
-                                           ("o") ("O"))))
-               (overhang  (TeX-read-string "(Optional) Overhang: "))
-               (width     (TeX-read-string "Width: ")))
-           (concat
-            (format "{%s}" floattype)
-            (unless (string= narrow "")
-              (format "[%s]" narrow))
-            (format "{%s}" placement)
-            (unless (string= overhang "")
-              (format "[%s]" overhang))
-            (format "{%s}" width))))))))
+    `("wrapfloat" LaTeX-env-args
+      (TeX-arg-conditional (and (fboundp 
'LaTeX-newfloat-DeclareFloatingEnvironment-list)
+                                
(LaTeX-newfloat-DeclareFloatingEnvironment-list))
+          ((TeX-arg-completing-read
+            ,(lambda ()
+               (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+            "Float type"))
+        ("Float type"))
+      ["Number of narrow lines"]
+      (TeX-arg-completing-read ("r" "R" "l" "L" "i" "I" "o" "O")
+                               "Placement")
+      [TeX-arg-length "Overhang"]
+      (TeX-arg-length "Width"))))
  TeX-dialect)
 
 (defvar LaTeX-wrapfig-package-options '("verbose")
diff --git a/style/xcolor.el b/style/xcolor.el
index 06bd28f73b..001f40866e 100644
--- a/style/xcolor.el
+++ b/style/xcolor.el
@@ -417,21 +417,15 @@ xcolor package.")
 
     ;; \colorlet[<type>]{<name>}[<num model>]{<color>}
     '("colorlet"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Type")
-        LaTeX-xcolor-type-color-models ]
+      [TeX-arg-completing-read LaTeX-xcolor-type-color-models "Type"]
       (TeX-arg-eval
        (lambda ()
          (let ((xcolor (TeX-read-string
                         (TeX-argument-prompt nil nil "Color"))))
            (LaTeX-add-xcolor-definecolors xcolor)
            (format "%s" xcolor))))
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Model")
-        (LaTeX-xcolor-color-models t) ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color")
-                    (LaTeX-xcolor-definecolor-list)))
+      [TeX-arg-completing-read (LaTeX-xcolor-color-models t) "Model"]
+      (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Color"))
 
     ;; 2.5.3 Defining sets of colors
     ;; \definecolorset[<type>]{<model-list>}{<head>}{<tail>}{<set spec>}
@@ -491,32 +485,20 @@ xcolor package.")
 
     ;; 2.7 Color blending
     '("blendcolors"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Mix expr")
-                    (LaTeX-xcolor-definecolor-list)))
+      (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Mix expr"))
     '("blendcolors*"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Mix expr")
-                    (LaTeX-xcolor-definecolor-list)))
+      (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Mix expr"))
 
     ;; 2.8 Color masks and separation
-    '("maskcolors"
-      [ TeX-arg-eval completing-read
-        (TeX-argument-prompt t nil "Model")
-        (LaTeX-xcolor-color-models t) ]
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color")
-                    (LaTeX-xcolor-definecolor-list)))
+    `("maskcolors"
+      [TeX-arg-completing-read ,(lambda () (LaTeX-xcolor-color-models t)) 
"Model"]
+      (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Color"))
 
     ;; 2.9 Color series
     '("definecolorseries"
       "Name"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Core model")
-                    LaTeX-xcolor-core-color-models)
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Method")
-                    '("step" "grad" "last"))
+      (TeX-arg-completing-read LaTeX-xcolor-core-color-models "Core model")
+      (TeX-arg-completing-read ("step" "grad" "last") "Method")
       [ t ] nil [ nil ] nil)
 
     '("resetcolorseries" [ "Div." ] "Name")
@@ -524,16 +506,12 @@ xcolor package.")
     ;; 2.13 Color information
     ;; \extractcolorspec{<color>}{<cmd>}
     '("extractcolorspec"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color")
-                    (LaTeX-xcolor-definecolor-list))
+      (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Color")
       (TeX-arg-define-macro "Command: \\"))
 
     ;; \extractcolorspecs{<color>}{<model-cmd>}{<color-cmd>}
     '("extractcolorspecs"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Color")
-                    (LaTeX-xcolor-definecolor-list))
+      (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Color")
       (TeX-arg-define-macro "Model command: \\")
       (TeX-arg-define-macro "Color command: \\"))
 
@@ -543,15 +521,11 @@ xcolor package.")
 
     ;; 2.14 Color conversion
     ;; \convertcolorspec{<model>}{<spec>}{<target model>}{cmd>}
-    '("convertcolorspec"
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Model")
-                    (LaTeX-xcolor-color-models))
-      (TeX-arg-eval TeX-read-string
-                    (TeX-argument-prompt nil nil "Spec"))
-      (TeX-arg-eval completing-read
-                    (TeX-argument-prompt nil nil "Model")
-                    (LaTeX-xcolor-color-models t))
+    `("convertcolorspec"
+      (TeX-arg-completing-read (LaTeX-xcolor-color-models) "Model")
+      (TeX-arg-string "Spec")
+      (TeX-arg-completing-read ,(lambda () (LaTeX-xcolor-color-models t))
+                               "Target model")
       (TeX-arg-define-macro "Macro: \\")) ) ; close TeX-add-symbols
 
    ;; 2.12 Color in tables
@@ -568,35 +542,25 @@ xcolor package.")
                              ( [ t ] )
                              (ignore))
         "Row"
-        (TeX-arg-eval completing-read
-                      (TeX-argument-prompt nil nil "Odd-row color")
-                      (LaTeX-xcolor-definecolor-list))
-        (TeX-arg-eval completing-read
-                      (TeX-argument-prompt nil nil "Even-row color")
-                      (LaTeX-xcolor-definecolor-list)))
+        (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Odd-row 
color")
+        (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Even-row 
color"))
       '("rowcolors*"
         (TeX-arg-conditional (y-or-n-p "With optional commands? ")
                              ( [ t ] )
                              (ignore))
         "Row"
-        (TeX-arg-eval completing-read
-                      (TeX-argument-prompt nil nil "Odd-row color")
-                      (LaTeX-xcolor-definecolor-list))
-        (TeX-arg-eval completing-read
-                      (TeX-argument-prompt nil nil "Even-row color")
-                      (LaTeX-xcolor-definecolor-list)))
+        (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Odd-row 
color")
+        (TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) "Even-row 
color"))
       '("showrowcolors" 0)
       '("hiderowcolors" 0))
      (LaTeX-add-counters "rownum"))
 
    ;; 2.6.4 Color testing
    (LaTeX-add-environments
-    '("testcolors" LaTeX-env-args
-      [ TeX-arg-eval mapconcat #'identity
-        (TeX-completing-read-multiple
-         (TeX-argument-prompt t nil "Color models")
-         (LaTeX-xcolor-color-models t))
-        "," ] ))
+    `("testcolors" LaTeX-env-args
+      [TeX-arg-completing-read-multiple ,(lambda ()
+                                           (LaTeX-xcolor-color-models t))
+                                        "Color models"] ))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
diff --git a/style/xr-hyper.el b/style/xr-hyper.el
index 472d028a74..306e28ce0e 100644
--- a/style/xr-hyper.el
+++ b/style/xr-hyper.el
@@ -1,6 +1,6 @@
 ;;; xr-hyper.el --- AUCTeX style for `xr-hyper.sty'  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2021 Free Software Foundation, Inc.
+;; Copyright (C) 2021--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -46,9 +46,7 @@
    (TeX-add-symbols
     '("externaldocument"
       ["Prefix"]
-      [TeX-arg-eval completing-read
-                    (TeX-argument-prompt t nil "Cite option")
-                    '("nocite")]
+      [TeX-arg-completing-read ("nocite") "Cite option"]
       ;; Act like \include and not like \input:
       (TeX-arg-input-file "File" t)
       ["Final file"])
diff --git a/style/xspace.el b/style/xspace.el
index 5f04c5be88..889d17d3a3 100644
--- a/style/xspace.el
+++ b/style/xspace.el
@@ -1,6 +1,6 @@
 ;;; xspace.el --- AUCTeX style for `xspace.sty'  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2011, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2011--2022 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <mje@inducks.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -42,14 +42,13 @@
  (lambda ()
    (TeX-add-symbols
     '("xspace" 0)
-    "xspaceaddexception"
-    "xspaceremoveexception")
+    '("xspaceaddexceptions" t)
+    '("xspaceremoveexception" "Token"))
 
    ;; Fontification
    (when (and (featurep 'font-latex)
               (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(("xspace" "")
-                                ("xspaceaddexception" "{")
+     (font-latex-add-keywords '(("xspaceaddexceptions"   "{")
                                 ("xspaceremoveexception" "{"))
                               'function)))
  TeX-dialect)
diff --git a/tex-bar.el b/tex-bar.el
index 5c36f24b4f..a6804e1862 100644
--- a/tex-bar.el
+++ b/tex-bar.el
@@ -273,13 +273,13 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
            :command (progn
                       (TeX-save-document #'TeX-master-file)
                       (TeX-command "LaTeX" #'TeX-master-file -1))
-           :help ,(lambda (&rest ignored)
+           :help ,(lambda (&rest _ignored)
                     (TeX-bar-help-from-command-list "LaTeX")))
     (pdflatex :image "pdftex"
               :command (progn
                          (TeX-save-document #'TeX-master-file)
                          (TeX-command "PDFLaTeX" #'TeX-master-file -1))
-              :help ,(lambda (&rest ignored)
+              :help ,(lambda (&rest _ignored)
                        (TeX-bar-help-from-command-list "PDFLaTeX")))
     (next-error :image "error"
                 :command TeX-next-error
@@ -287,30 +287,30 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
                 :visible (TeX-error-report-has-errors-p))
     (view :image ,(lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
           :command (TeX-command "View" #'TeX-master-file -1)
-          :help ,(lambda (&rest ignored)
+          :help ,(lambda (&rest _ignored)
                    (TeX-bar-help-from-command-list "View")))
     (file :image "dvips"
           :command (TeX-command "File" #'TeX-master-file -1)
           :visible (not TeX-PDF-mode)
-          :help ,(lambda (&rest ignored)
+          :help ,(lambda (&rest _ignored)
                    (TeX-bar-help-from-command-list "File")))
     (bibtex :image "bibtex"
             :command (TeX-command (if LaTeX-using-Biber "Biber" "BibTeX")
                                   #'TeX-master-file -1)
-            :help ,(lambda (&rest ignored)
+            :help ,(lambda (&rest _ignored)
                      (TeX-bar-help-from-command-list
                       (if LaTeX-using-Biber "Biber" "BibTeX"))))
     (clean  :image "delete"
             :command (TeX-command "Clean" #'TeX-master-file -1)
-            :help ,(lambda (&rest ignored)
+            :help ,(lambda (&rest _ignored)
                      (TeX-bar-help-from-command-list "Clean")))
     (spell  :image "spell"
             :command (TeX-command "Spell" #'TeX-master-file -1)
-            :help ,(lambda (&rest ignored)
+            :help ,(lambda (&rest _ignored)
                      (TeX-bar-help-from-command-list "Spell")))
     (latex-symbols-experimental . (:alias :eval-group
-                                   LaTeX-symbols-toolbar-switch-contents
-                                   LaTeX-symbols-toolbar-contents)))
+                                          LaTeX-symbols-toolbar-switch-contents
+                                          LaTeX-symbols-toolbar-contents)))
   "Alist for button definitions in TeX bar.
 Value should le a list where each element is of format (KEY .
 PROPS), where KEY is a symbol that labels the button and PROPS is
diff --git a/tex.el b/tex.el
index e9690b9c4d..d74d10d0df 100644
--- a/tex.el
+++ b/tex.el
@@ -92,7 +92,6 @@
 (defvar LaTeX-optop)
 (defvar LaTeX-largest-level)
 (defvar LaTeX-section-list)
-(defvar TeX-output-dir)
 ;; tex-ispell.el
 (defvar TeX-ispell-verb-delimiters)
 ;; Others:
@@ -3368,7 +3367,7 @@ Space will complete and exit."
            (call-interactively #'TeX-insert-macro)))))
 
 (defvar TeX-exit-mark nil
-  "Dynamically bound by `TeX-parse-macro' and `LaTeX-env-args'.")
+  "Dynamically bound by `TeX-parse-macro' and `LaTeX--env-parse-args'.")
 
 (defun TeX-parse-macro (symbol args)
   "How to parse TeX macros which takes one or more arguments.
@@ -3452,18 +3451,29 @@ TeX macro.  What is done depend on the type of the 
element:
                  (insert TeX-grcl)
                  (backward-char))))))))
 
-(defun TeX-arg-string (optional &optional prompt initial-input)
+(defun TeX-arg-string (optional &optional prompt initial-input
+                                history default-value
+                                leftbrace rightbrace)
   "Prompt for a string.
 
 If OPTIONAL is not nil then the PROMPT will start with ``(Optional) ''.
-INITIAL-INPUT is a string to insert before reading input."
-  (TeX-argument-insert
-   (if (and (not optional) (TeX-active-mark))
-       (let ((TeX-argument (buffer-substring (point) (mark))))
-         (delete-region (point) (mark))
-         TeX-argument)
-     (TeX-read-string (TeX-argument-prompt optional prompt "Text") 
initial-input))
-   optional))
+INITIAL-INPUT is a string to insert before reading input.
+
+HISTORY and DEFAULT-VALUE are ultimately passed to `read-string',
+which see.
+
+The brackets used are controlled by the string values of
+LEFTBRACE and RIGHTBRACE."
+  (let ((TeX-arg-opening-brace (or leftbrace TeX-arg-opening-brace))
+        (TeX-arg-closing-brace (or rightbrace TeX-arg-closing-brace)))
+    (TeX-argument-insert
+     (if (and (not optional) (TeX-active-mark))
+         (let ((TeX-argument (buffer-substring (point) (mark))))
+           (delete-region (point) (mark))
+           TeX-argument)
+       (TeX-read-string (TeX-argument-prompt optional prompt "Text")
+                        initial-input history default-value))
+     optional)))
 
 (defvar TeX-last-optional-rejected nil
   "Dynamically bound by `TeX-parse-arguments'.")
@@ -3544,7 +3554,7 @@ See `TeX-parse-macro' for details."
              (set-marker TeX-exit-mark (point)))
            (insert TeX-arg-closing-brace)
            (setq insert-flag t))
-          ((symbolp arg)
+          ((functionp arg)
            (funcall arg optional))
           ((listp arg)
            (let ((head (car arg))
@@ -3919,7 +3929,10 @@ separate type of information in the parser."
          (change (intern (concat prefix "-" name "-changed")))
          (vardoc (concat "Information about " names
                           " in the current buffer.
-Generated by `TeX-auto-add-type'.")))
+Generated by `TeX-auto-add-type'."))
+         ;; Avoid clash between LaTeX environments and ConTeXt
+         ;; environments in keys of `TeX-auto-parser'.
+         (unique-key (concat prefix "-" name)))
     `(progn
        (defvar ,tmp nil ,vardoc)
        (defvar ,local nil ,vardoc)
@@ -3930,15 +3943,16 @@ Generated by `TeX-auto-add-type'.")))
          ,(concat "Add information about " (upcase names)
                   " to the current buffer.
 Generated by `TeX-auto-add-type'.")
-         (TeX-auto-add-information ,name ,(intern names)))
+         (TeX-auto-add-information ,unique-key ,(intern names)))
        (defun ,local ()
          ,(concat "List of " names
                   " active in the current buffer.
 Generated by `TeX-auto-add-type'.")
-         (TeX-auto-list-information ,name))
+         (TeX-auto-list-information ,unique-key))
        ;; Append new type to `TeX-auto-parser' in order to make `style' type
        ;; always the first.
-       (add-to-list 'TeX-auto-parser ',(list name tmp add local change) t)
+       (add-to-list 'TeX-auto-parser
+                    ',(list unique-key tmp add local change) t)
        (add-hook 'TeX-remove-style-hook
                  (lambda ()
                    (setq ,local nil))))))
@@ -5891,18 +5905,20 @@ See also `TeX-font-replace' and 
`TeX-font-replace-function'."
 ;; Rewritten from scratch with use of `texmathp' by
 ;; Carsten Dominik <dominik@strw.leidenuniv.nl>
 
+;; The following variables are no longer used, but kept in case some
+;; foreign code uses any of them.
 (defvar TeX-symbol-marker nil)
-
 (defvar TeX-symbol-marker-pos 0)
-
-;; The following constants are no longer used, but kept in case some
-;; foreign code uses any of them.
-(defvar TeX-dollar-sign ?$
-  "Character used to enter and leave math mode in TeX.")
+(defvar TeX-dollar-sign ?$)
 (defconst TeX-dollar-string (char-to-string TeX-dollar-sign))
 (defconst TeX-dollar-regexp
   (concat "^" (regexp-quote TeX-dollar-string) "\\|[^" TeX-esc "]"
           (regexp-quote TeX-dollar-string)))
+(make-obsolete-variable 'TeX-symbol-marker nil "AUCTeX 9.9d++")
+(make-obsolete-variable 'TeX-symbol-marker-pos nil "AUCTeX 9.9d++")
+(make-obsolete-variable 'TeX-dollar-sign nil "AUCTeX 9.9d++")
+(make-obsolete-variable 'TeX-dollar-string nil "AUCTeX 9.9d++")
+(make-obsolete-variable 'TeX-dollar-regexp nil "AUCTeX 9.9d++")
 
 (defcustom TeX-math-toggle-off-input-method t
   "If non-nil, auto turn off some input methods when entering math mode.
@@ -5937,29 +5953,43 @@ point.  You can choose between \"$...$\" and 
\"\\(...\\)\"."
                        (string :tag "Insert before point")
                        (string :tag "Insert after point"))))
 
+(defcustom TeX-refuse-unmatched-dollar nil
+  "When non-nil, don't insert unmatched dollar sign.
+That is, `TeX-insert-dollar' refuses to insert \"$\" when
+`texmathp' tells that the current position is in math mode which
+didn't start with dollar(s).
+
+When nil, `TeX-insert-dollar' assumes the user knows that the
+current position is not in math mode actually and behaves in the
+same way as non-math mode."
+  :group 'TeX-macro
+  :type 'boolean)
+
 (defun TeX-insert-dollar (&optional arg)
   "Insert dollar sign.
 
 If current math mode was not entered with a dollar, refuse to
-insert one.  Show matching dollar sign if this dollar sign ends
-the TeX math mode and `blink-matching-paren' is non-nil.
+insert one when `TeX-refuse-unmatched-dollar' is non-nil.
+
+Show matching dollar sign if this dollar sign ends the TeX math
+mode and `blink-matching-paren' is non-nil.
 
 When outside math mode, the behavior is controlled by the variable
 `TeX-electric-math'.
 
-With raw \\[universal-argument] prefix, insert exactly one dollar
-sign.  With optional ARG, insert that many dollar signs."
-  (interactive "P")
+With raw \\[universal-argument] prefix, insert exactly one dollar sign.
+With optional ARG, insert that many dollar signs."
+  (interactive "*P")
   (cond
    ((and arg (listp arg))
     ;; C-u always inserts one
     (insert "$"))
    (arg
     ;; Numerical arg inserts that many
-    (insert (make-string (prefix-numeric-value arg) ?\$)))
+    (insert-char ?\$ (prefix-numeric-value arg)))
    ((or (TeX-escaped-p) (TeX-verbatim-p))
-    ;; Point is escaped with `\' or is in a verbatim-like construct, so just
-    ;; insert one $.
+    ;; Point is escaped with `\' or is in a verbatim-like construct,
+    ;; so just insert one $.
     (insert "$"))
    ((texmathp)
     ;; We are inside math mode
@@ -5967,16 +5997,17 @@ sign.  With optional ARG, insert that many dollar 
signs."
      ((and TeX-electric-math
            (eq (preceding-char) ?\$)
            (eq (following-char) ?\$))
-      ;; Point is between "$$" and `TeX-electric-math' is non-nil - insert
-      ;; another pair of dollar signs and leave point between them.
+      ;; Point is between "$$" and `TeX-electric-math' is non-nil -
+      ;; insert another pair of dollar signs and leave point between
+      ;; them.
       (insert "$$")
       (backward-char))
      ((and (stringp (car texmathp-why))
            (string-equal (substring (car texmathp-why) 0 1) "\$"))
       ;; Math mode was turned on with $ or $$ - insert a single $.
       (insert "$")
-      ;; Compatibility, `TeX-math-close-double-dollar' has been removed
-      ;; after AUCTeX 11.87.
+      ;; Compatibility, `TeX-math-close-double-dollar' has been
+      ;; removed after AUCTeX 11.87.
       (if (boundp 'TeX-math-close-double-dollar)
           (message
            (concat "`TeX-math-close-double-dollar' has been removed,"
@@ -5992,51 +6023,60 @@ sign.  With optional ARG, insert that many dollar 
signs."
             (message "Matches %s"
                      (buffer-substring
                       (point) (progn (end-of-line) (point))))))))
-     (t
-      ;; Math mode was not entered with dollar - we cannot finish it with one.
+
+     ;; Math mode was not entered with dollar according to `texmathp'.
+     (TeX-refuse-unmatched-dollar
+      ;; We trust `texmathp' and refuse to finish it with one.
       (message "Math mode started with `%s' cannot be closed with dollar"
-               (car texmathp-why)))))
+               (car texmathp-why)))
+     (t
+      ;; We assume that `texmathp' was wrong and behave as if not in
+      ;; math mode. (bug#57626)
+      (TeX--insert-dollar-1))))
    (t
     ;; Just somewhere in the text.
+    (TeX--insert-dollar-1))))
+
+(defun TeX--insert-dollar-1 ()
+  "Do the job of `TeX-insert-dollar' in non-math mode."
+  (cond
+   ((and TeX-electric-math (TeX-active-mark)
+         (/= (point) (mark)))
+    (if (> (point) (mark))
+        (exchange-point-and-mark))
     (cond
-     ((and TeX-electric-math (TeX-active-mark))
-      (if (> (point) (mark))
-          (exchange-point-and-mark))
-      (cond
-       ;; $...$ to $$...$$
-       ((and (eq last-command #'TeX-insert-dollar)
-             (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
-        (replace-match "$$\\1$$")
-        (set-mark (match-beginning 0)))
-       ;; \(...\) to \[...\]
-       ((and (eq last-command #'TeX-insert-dollar)
-             (re-search-forward "\\=\\\\(\\([^z-a]*\\)\\\\)" (mark) t))
-        (replace-match "\\\\[\\1\\\\]")
-        (set-mark (match-beginning 0)))
-       ;; Strip \[...\] or $$...$$
-       ((and (eq last-command #'TeX-insert-dollar)
-             (or (re-search-forward "\\=\\\\\\[\\([^z-a]*\\)\\\\\\]" (mark) t)
-                 (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
-        (replace-match "\\1")
-        (set-mark (match-beginning 0)))
-       (t
-        ;; We use `save-excursion' because point must be situated before 
opening
-        ;; symbol.
-        (save-excursion (insert (car TeX-electric-math)))
-        (exchange-point-and-mark)
-        (insert (cdr TeX-electric-math))))
-      ;; Keep the region active.
-      (TeX-activate-region))
-     (TeX-electric-math
-      (insert (car TeX-electric-math))
-      (save-excursion (insert (cdr TeX-electric-math)))
-      (if blink-matching-paren
-          (progn
-            (backward-char)
-            (sit-for blink-matching-delay)
-            (forward-char))))
-     ;; In any other case just insert a single $.
-     ((insert "$")))))
+     ;; $...$ to $$...$$
+     ((and (eq last-command #'TeX-insert-dollar)
+           (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
+      (replace-match "$$\\1$$" t)
+      (set-mark (match-beginning 0)))
+     ;; \(...\) to \[...\]
+     ((and (eq last-command #'TeX-insert-dollar)
+           (re-search-forward "\\=\\\\(\\([^z-a]*\\)\\\\)" (mark) t))
+      (replace-match "\\\\[\\1\\\\]" t)
+      (set-mark (match-beginning 0)))
+     ;; Strip \[...\] or $$...$$
+     ((and (eq last-command #'TeX-insert-dollar)
+           (or (re-search-forward "\\=\\\\\\[\\([^z-a]*\\)\\\\\\]" (mark) t)
+               (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
+      (replace-match "\\1" t)
+      (set-mark (match-beginning 0)))
+     (t
+      ;; We use `save-excursion' because point must be situated
+      ;; before opening symbol.
+      (save-excursion (insert (car TeX-electric-math)))
+      (exchange-point-and-mark)
+      (insert (cdr TeX-electric-math))))
+    (TeX-activate-region))
+   (TeX-electric-math
+    (insert (car TeX-electric-math))
+    (save-excursion (insert (cdr TeX-electric-math)))
+    (if blink-matching-paren
+        (save-excursion
+          (backward-char)
+          (sit-for blink-matching-delay))))
+   ;; In any other case just insert a single $.
+   ((insert "$")))
   (TeX-math-input-method-off))
 
 (defcustom TeX-math-input-method-off-regexp
@@ -6860,8 +6900,7 @@ depend on it being positive instead of the entry in 
`TeX-command-list'."
   (save-restriction
     (widen)
     (save-excursion
-      (let ((inhibit-point-motion-hooks t)
-            (inhibit-field-text-motion t))
+      (let ((inhibit-field-text-motion t))
         (if pos (goto-char pos))
         (+ (count-lines (point-min) (point))
            (if (bolp) 0 -1))))))
diff --git a/texmathp.el b/texmathp.el
index f02824cec1..ad0089863a 100644
--- a/texmathp.el
+++ b/texmathp.el
@@ -1,6 +1,6 @@
 ;;; texmathp.el -- Code to check if point is inside LaTeX math environment  
-*- lexical-binding: t; -*-
 
-;; Copyright (C) 1998-2021  Free Software Foundation, Inc.
+;; Copyright (C) 1998-2022  Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@strw.LeidenUniv.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -85,14 +85,19 @@
 ;;
 ;;  BUGS:
 ;;
-;;  If any of the the special macros like \mbox or \ensuremath has optional
-;;  arguments, math mode inside these optional arguments is *not* influenced
-;;  by the macro.
+;;  o If any of the the special macros like \mbox or \ensuremath has
+;;    optional arguments, math mode inside these optional arguments is
+;;    *not* influenced by the macro.
 ;;
-;;  Nested \(\) and \[\] can confuse texmathp.  It returns nil at AAA
-;;  in the following examples:
+;;  o Nested \(\) and \[\] can confuse texmathp.  It returns nil at AAA
+;;    in the following examples:
 ;;  \[ x=y \mbox{abc \(\alpha\) cba} AAA \]
 ;;  \[ x=y \begin{minipage}{3cm} abc \[\alpha\] cba \end{minipage} AAA \]
+;;
+;;  o In the "text column" of cases* environment, texmathp doesn't
+;;    consider it's non-math mode.  The same applies for variants of
+;;    cases* environents, both provided by mathtools package.
+;;
 ;;--------------------------------------------------------------------------
 
 ;;; Code:




reply via email to

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