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

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

[elpa] externals/auctex b9545c8 45/71: Improve handling of key=vals in s


From: Tassilo Horn
Subject: [elpa] externals/auctex b9545c8 45/71: Improve handling of key=vals in style/fancyvrb.el
Date: Fri, 17 Dec 2021 15:00:34 -0500 (EST)

branch: externals/auctex
commit b9545c896631c5185dbc553728047aea7385e914
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Improve handling of key=vals in style/fancyvrb.el
    
    * style/fancyvrb.el (LaTeX-fancyvrb-key-val-options-local): Remove
    now unused variable.
    (LaTeX-fancyvrb-key-val-options): New New function returning
    key=vals.  Replace all occurrences of
    `LaTeX-fancyvrb-key-val-options-local' with a call to the new
    function.
    
    * style/fvextra.el (LaTeX-fvextra-key-val-options): Uncomment the
    "numbers" key=val.
    (LaTeX-fvextra-update-key-val): Remove the unused function and its
    addition to `TeX-auto-cleanup-hook'.
    ("fvextra"): Replace all occurrences of
    `LaTeX-fancyvrb-key-val-options-local' with a call to the function
    `LaTeX-fancyvrb-key-val-options'.
    
    * style/pythontex.el: Declare the function
    `LaTeX-fancyvrb-key-val-options'.
    (LaTeX-env-pythontex, "pythontex"): Replace all occurrences of
    `LaTeX-fancyvrb-key-val-options-local' with a call to the function
    `LaTeX-fancyvrb-key-val-options'.
    
    * style/tex-live.el ("tex-live"): Call the function
    `LaTeX-fancyvrb-key-val-options' instead of the variable
    `LaTeX-fancyvrb-key-val-options-local'.
---
 style/fancyvrb.el  | 112 ++++++++++++++++++++++++++++++++++++-----------------
 style/fvextra.el   |  51 +++---------------------
 style/pythontex.el |  29 +++++++-------
 style/tex-live.el  |   5 ++-
 4 files changed, 100 insertions(+), 97 deletions(-)

diff --git a/style/fancyvrb.el b/style/fancyvrb.el
index 37dc3c7..22e52c2 100644
--- a/style/fancyvrb.el
+++ b/style/fancyvrb.el
@@ -1,6 +1,6 @@
 ;;; fancyvrb.el --- AUCTeX style for `fancyvrb.sty' version 3.6.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2013, 2014, 2016-2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2014, 2016-2021 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano <mose@gnu.org>
@@ -67,6 +67,10 @@
 (declare-function font-latex-set-syntactic-keywords
                   "font-latex")
 
+(declare-function LaTeX-color-definecolor-list "color" ())
+(declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
+(defvar LaTeX-fvextra-key-val-options)
+
 (defvar LaTeX-fancyvrb-key-val-options
   `(("commentchar" ("none"))
     ("gobble")
@@ -120,12 +124,52 @@
     ("aftersave"))
   "Key=value options for fancyvrb macros and environments.")
 
-(defvar LaTeX-fancyvrb-key-val-options-local nil
-  "Buffer-local key=value options for fancyvrb macros and environments.
-This variable is intended for packages like \"fvextra\" which
-provide new key=values for fancyvrb environments.  New key=values
-should be appended to this variable.")
-(make-variable-buffer-local 'LaTeX-fancyvrb-key-val-options-local)
+(defun LaTeX-fancyvrb-key-val-options ()
+  "Return an updated list of key=vals from fancyvrb package.
+This function also checks if the package fvextra is used and
+takes its key=vals into account."
+  (append
+   ;; Check if fvextra is loaded in combination with x?color:
+   (when (and (member "fvextra" (TeX-style-list))
+              (or (member "xcolor" TeX-active-styles)
+                  (member "color" TeX-active-styles)))
+     (let* ((colorcmd (if (member "xcolor" TeX-active-styles)
+                          #'LaTeX-xcolor-definecolor-list
+                        #'LaTeX-color-definecolor-list))
+            (keys '("highlightcolor"
+                    "rulecolor"
+                    "fillcolor"
+                    "tabcolor"
+                    "spacecolor"))
+            (colors (mapcar #'car (funcall colorcmd)))
+            result)
+       (dolist (key keys result)
+         (if (string= key "highlightcolor")
+             (push (list key colors) result)
+           (push (list key (cons "none" colors)) result)))))
+
+   ;; Check if fvextra is loaded:
+   (when (member "fvextra" TeX-active-styles)
+     LaTeX-fvextra-key-val-options)
+
+   ;; Check if fancyvrb is loaded in combination with x?color:
+   (when (and (not (member "fvextra" TeX-active-styles))
+              (or (member "xcolor" TeX-active-styles)
+                  (member "color" TeX-active-styles)))
+     (let* ((colorcmd (if (member "xcolor" TeX-active-styles)
+                          #'LaTeX-xcolor-definecolor-list
+                        #'LaTeX-color-definecolor-list))
+            (colors (mapcar (lambda (x)
+                              (concat TeX-esc "color" TeX-grop x TeX-grcl))
+                            (mapcar #'car (funcall colorcmd))))
+            (keys '("rulecolor" "fillcolor"))
+            val result)
+       (dolist (key keys result)
+         (setq val (cadr (assoc key LaTeX-fancyvrb-key-val-options)))
+         (push (list key (append val colors)) result))))
+
+   ;; Plain fancyvrb:
+   LaTeX-fancyvrb-key-val-options))
 
 (defvar LaTeX-fancyvrb-base-macros
   '("VerbatimInput" "BVerbatimInput" "LVerbatimInput"
@@ -232,7 +276,7 @@ RECUSTOM is non-nil, delete macros from the variable
         (TeX-argument-insert new-mac optional TeX-esc))
       (TeX-argument-insert base-mac optional)
       (TeX-argument-insert
-       (TeX-read-key-val optional LaTeX-fancyvrb-key-val-options-local) 
optional)
+       (TeX-read-key-val optional (LaTeX-fancyvrb-key-val-options)) optional)
       (LaTeX-add-fancyvrb-macros `(,new-mac ,base-mac ,rec-flag))))
   ;;
   ;; Now run the procdure: Do not use the function
@@ -253,7 +297,7 @@ RECUSTOM is non-nil, delete macros from the variable
       (cond ((member base-mac '("VerbatimInput" "BVerbatimInput" 
"LVerbatimInput"))
              (TeX-add-symbols
               `(,mac-name
-                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
                 LaTeX-fancyvrb-arg-file-relative))
              (when (and (fboundp 'font-latex-add-keywords)
                         (eq TeX-install-font-lock 'font-latex-setup))
@@ -263,7 +307,7 @@ RECUSTOM is non-nil, delete macros from the variable
             ((string= base-mac "SaveVerb")
              (TeX-add-symbols
               `(,mac-name
-                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
                 (TeX-arg-eval
                  (lambda ()
                    (let ((name (TeX-read-string
@@ -291,12 +335,12 @@ RECUSTOM is non-nil, delete macros from the variable
             (t
              (TeX-add-symbols
               `(,mac-name
-                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
                 TeX-arg-verb)
               ;; Defined macros have a starred version where the
               ;; `showspaces' key is set to true
               `(,(concat mac-name "*")
-                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
                 TeX-arg-verb))
              (add-to-list 'LaTeX-verbatim-macros-with-delims-local
                           mac-name t)
@@ -329,7 +373,7 @@ update only various AUCTeX variables for verbatim 
environments."
       (TeX-argument-insert new-env optional)
       (TeX-argument-insert base-env optional)
       (TeX-argument-insert
-       (TeX-read-key-val optional LaTeX-fancyvrb-key-val-options-local) 
optional)
+       (TeX-read-key-val optional (LaTeX-fancyvrb-key-val-options)) optional)
       (LaTeX-add-fancyvrb-environments `(,new-env ,base-env))
       (when (string= base-env "SaveVerbatim")
         (LaTeX-add-fancyvrb-saveverbatims new-env))))
@@ -342,7 +386,7 @@ update only various AUCTeX variables for verbatim 
environments."
              (LaTeX-add-environments
               `(,env (lambda (env)
                        (let ((options (TeX-read-key-val
-                                       t LaTeX-fancyvrb-key-val-options-local))
+                                       t (LaTeX-fancyvrb-key-val-options)))
                              (file (TeX-read-string "Output file: ")))
                          (LaTeX-insert-environment
                           env
@@ -365,11 +409,11 @@ update only various AUCTeX variables for verbatim 
environments."
              ;; (cond ...):
              (LaTeX-add-environments
               `(,env LaTeX-env-args
-                     [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                     [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
                      LaTeX-fancyvrb-env-reflabel-key-val))
              (LaTeX-add-environments
               `(,(concat env "*") LaTeX-env-args
-                [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+                [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
                 LaTeX-fancyvrb-env-reflabel-key-val))
              (add-to-list 'LaTeX-verbatim-environments-local (concat env "*"))
              (add-to-list 'LaTeX-indent-environment-list
@@ -523,17 +567,13 @@ ENV is the name of current environment as a string."
    (TeX-run-style-hooks
     "keyval")
 
-   ;; Activate the buffer-local version of key-vals.
-   (setq LaTeX-fancyvrb-key-val-options-local
-         (copy-alist LaTeX-fancyvrb-key-val-options))
-
    (TeX-add-symbols
     ;; Verbatim material in footnotes
     "VerbatimFootnotes"
     ;; Improved verbatim commands
-    '("Verb" [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local] 
TeX-arg-verb)
+    '("Verb" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] TeX-arg-verb)
     ;; \Verb also has a starred version:
-    '("Verb*" [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local] 
TeX-arg-verb)
+    '("Verb*" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] TeX-arg-verb)
     '("DefineShortVerb" (TeX-arg-eval
                          TeX-read-string
                          (TeX-argument-prompt nil nil "Character")
@@ -543,7 +583,7 @@ ENV is the name of current environment as a string."
                            (TeX-argument-prompt nil nil "Character")
                            TeX-esc))
     ;; Verbatim environments
-    '("fvset" (TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local))
+    '("fvset" (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)))
     ;; Changing individual line formatting
     "FancyVerbFormatLine"
     ;; Line numbering
@@ -562,7 +602,7 @@ ENV is the name of current environment as a string."
       (TeX-arg-eval completing-read
                     (TeX-argument-prompt nil nil "Based on environment")
                     LaTeX-fancyvrb-base-environments)
-      (TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local))
+      (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)))
 
     '("CustomVerbatimCommand"
       LaTeX-fancyvrb-arg-define-macro)
@@ -571,7 +611,7 @@ ENV is the name of current environment as a string."
 
     ;; Saving and restoring verbatim text and environments
     '("SaveVerb"
-      [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       (TeX-arg-eval
        (lambda ()
          (let ((name (TeX-read-string
@@ -594,35 +634,35 @@ ENV is the name of current environment as a string."
                                    (LaTeX-fancyvrb-saveverbatim-list)))
 
     ;; Writing and reading verbatim files
-    '("VerbatimInput" [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+    '("VerbatimInput" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-arg-file-relative)
-    '("BVerbatimInput" [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+    '("BVerbatimInput" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-arg-file-relative)
-    '("LVerbatimInput" [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+    '("LVerbatimInput" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-arg-file-relative))
 
    (LaTeX-add-environments
     '("Verbatim" LaTeX-env-args
-      [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-env-reflabel-key-val)
     '("Verbatim*" LaTeX-env-args
-      [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-env-reflabel-key-val)
     '("BVerbatim" LaTeX-env-args
-      [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-env-reflabel-key-val)
     '("BVerbatim*" LaTeX-env-args
-      [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-env-reflabel-key-val)
     '("LVerbatim" LaTeX-env-args
-      [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-env-reflabel-key-val)
     '("LVerbatim*" LaTeX-env-args
-      [TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local]
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
       LaTeX-fancyvrb-env-reflabel-key-val)
     '("SaveVerbatim"
       (lambda (env)
-        (let ((options (TeX-read-key-val t 
LaTeX-fancyvrb-key-val-options-local))
+        (let ((options (TeX-read-key-val t (LaTeX-fancyvrb-key-val-options)))
               (name (TeX-read-string "Save name: ")))
           (LaTeX-insert-environment
            env
@@ -633,7 +673,7 @@ ENV is the name of current environment as a string."
           (LaTeX-add-fancyvrb-saveverbatims name))))
     '("VerbatimOut"
       (lambda (env)
-        (let ((options (TeX-read-key-val t 
LaTeX-fancyvrb-key-val-options-local))
+        (let ((options (TeX-read-key-val t (LaTeX-fancyvrb-key-val-options)))
               (file (TeX-read-string "Output file: ")))
           (LaTeX-insert-environment
            env
diff --git a/style/fvextra.el b/style/fvextra.el
index b966f70..3109216 100644
--- a/style/fvextra.el
+++ b/style/fvextra.el
@@ -1,6 +1,6 @@
 ;;; fvextra.el --- AUCTeX style for `fvextra.sty' (v1.4)  -*- lexical-binding: 
t; -*-
 
-;; Copyright (C) 2017--2020 Free Software Foundation, Inc.
+;; Copyright (C) 2017--2021 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -45,9 +45,7 @@
 
 (declare-function LaTeX-color-definecolor-list "color" ())
 (declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
-
-;; Defined in fancyvrb.el:
-(defvar LaTeX-fancyvrb-key-val-options-local)
+(declare-function LaTeX-fancyvrb-key-val-options "fancyvrb" ())
 
 (defvar LaTeX-fvextra-key-val-options
   '(;; 3 General options
@@ -69,7 +67,7 @@
     ("linenos" ("true" "false"))
     ("mathescape" ("true" "false"))
     ("numberfirstline" ("true" "false"))
-    ;; ("numbers" ("none" "left" "right" "both"))
+    ("numbers" ("none" "left" "right" "both"))
     ("retokenize" ("true" "false"))
     ("space" ("\\textvisiblespace"))
     ("spacecolor" ("none"))
@@ -110,38 +108,6 @@
     ("breaksymbolseprightnchars"))
   "Key=value options for fvextra macros and environments.")
 
-(defun LaTeX-fvextra-update-key-val ()
-  "Update `LaTeX-fancyvrb-key-val-options-local' with key=vals from 
\"fvextra.sty\"."
-  ;; Delete the key "numbers" from `LaTeX-fancyvrb-key-val-options-local':
-  (setq LaTeX-fancyvrb-key-val-options-local
-        (assq-delete-all (car (assoc "numbers" 
LaTeX-fancyvrb-key-val-options-local))
-                         LaTeX-fancyvrb-key-val-options-local))
-  ;; Add the key with "both" value:
-  (add-to-list 'LaTeX-fancyvrb-key-val-options-local
-               '("numbers" ("none" "left" "right" "both")))
-  ;; Add color values to resp. keys:
-  (when (or (member "xcolor" (TeX-style-list))
-            (member "color" (TeX-style-list)))
-    (let* ((colorcmd (if (member "xcolor" (TeX-style-list))
-                         #'LaTeX-xcolor-definecolor-list
-                       #'LaTeX-color-definecolor-list))
-           (keys '("highlightcolor"
-                   "rulecolor"
-                   "fillcolor"
-                   "tabcolor"
-                   "spacecolor"))
-           (tmp (copy-alist LaTeX-fancyvrb-key-val-options-local)))
-      (dolist (x keys)
-        (setq tmp (assq-delete-all (car (assoc x tmp)) tmp))
-        (if (string= x "highlightcolor")
-            (cl-pushnew (list x (mapcar #'car (funcall colorcmd))) tmp :test 
#'equal)
-          (cl-pushnew (list x (append '("none") (mapcar #'car (funcall 
colorcmd)))) tmp :test #'equal)))
-      (setq LaTeX-fancyvrb-key-val-options-local
-            (copy-alist tmp)))))
-
-(add-hook 'TeX-auto-cleanup-hook #'LaTeX-fvextra-update-key-val t)
-(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
-
 (TeX-add-style-hook
  "fvextra"
  (lambda ()
@@ -149,14 +115,9 @@
    ;; Run the style hook for "fancyvrb"
    (TeX-run-style-hooks "fancyvrb")
 
-   ;; Append `LaTeX-fvextra-key-val' to `LaTeX-fancyvrb-key-val-options-local':
-   (setq LaTeX-fancyvrb-key-val-options-local
-         (append LaTeX-fvextra-key-val-options
-                 LaTeX-fancyvrb-key-val-options-local))
-
    (TeX-add-symbols
     ;; 4.1 Inline formatting with \fvinlineset
-    '("fvinlineset" (TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local))
+    '("fvinlineset" (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)))
 
     ;; 4.2 Line and text formatting
     "FancyVerbFormatText"
@@ -164,9 +125,9 @@
     ;; 6 New commands and environments
     ;; 6.1 \EscVerb
     '("EscVerb"
-      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] "Text")
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] "Text")
     '("EscVerb*"
-      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] "Text")
+      [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] "Text")
 
     ;; 7.3.2 Breaks within macro arguments
     "FancyVerbBreakStart"
diff --git a/style/pythontex.el b/style/pythontex.el
index 08c0033..01c6ed9 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, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2018--2021 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -35,9 +35,10 @@
 (require 'latex)
 
 ;; Silence the compiler:
-;; `LaTeX-fancyvrb-key-val-options-local' will be defined after
+
+;; The function `LaTeX-fancyvrb-key-val-options' will be defined after
 ;; loading `fvextra.el' which loads `fancyvrb.el' in return:
-(defvar LaTeX-fancyvrb-key-val-options-local)
+(declare-function LaTeX-fancyvrb-key-val-options "fancyvrb" ())
 
 ;; These are provided by `font-latex.el':
 (defvar font-latex-syntactic-keywords-extra)
@@ -116,7 +117,7 @@ Update the variable `LaTeX-pythontex-language-list' if 
still nil."
   "Insert ENVIRONMENT provided by pythontex package."
   (let ((session (TeX-read-string
                   (TeX-argument-prompt t nil "Session")))
-        (fvkeyval (TeX-read-key-val t LaTeX-fancyvrb-key-val-options-local)))
+        (fvkeyval (TeX-read-key-val t (LaTeX-fancyvrb-key-val-options))))
     (LaTeX-insert-environment environment
                               (concat
                                (when (and session (not (string= session "")))
@@ -307,7 +308,7 @@ a list of strings."
       [ TeX-arg-eval completing-read
         (TeX-argument-prompt t nil "Family")
         LaTeX-pythontex-family-list ]
-      (TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local))
+      (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)))
 
     ;; \setpythontexprettyprinter[<family>]{<printer>}
     '("setpythontexprettyprinter"
@@ -341,14 +342,14 @@ a list of strings."
       [ TeX-arg-eval completing-read
         (TeX-argument-prompt t nil "Mode")
         '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] )
+      [ 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-local ] )
+      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] )
 
     ;;\saveprintpythontex{<name>}
     '("saveprintpythontex"
@@ -372,7 +373,7 @@ a list of strings."
       [ TeX-arg-eval completing-read
         (TeX-argument-prompt t nil "Mode")
         '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ]
       (TeX-arg-eval completing-read
                     (TeX-argument-prompt nil nil "Name")
                     (LaTeX-pythontex-savecontent-list)))
@@ -383,7 +384,7 @@ a list of strings."
       [ TeX-arg-eval completing-read
         (TeX-argument-prompt t nil "Mode")
         '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ]
       (TeX-arg-eval completing-read
                     (TeX-argument-prompt nil nil "Name")
                     (LaTeX-pythontex-savecontent-list)))
@@ -393,7 +394,7 @@ a list of strings."
       [ TeX-arg-eval completing-read
         (TeX-argument-prompt t nil "Mode")
         '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ] )
+      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] )
 
 
     ;;\savestderrpythontex{<name>}
@@ -409,7 +410,7 @@ a list of strings."
       [ TeX-arg-eval completing-read
         (TeX-argument-prompt t nil "Mode")
         '("raw" "verb" "verbatim") ]
-      [ TeX-arg-key-val LaTeX-fancyvrb-key-val-options-local ]
+      [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ]
       (TeX-arg-eval completing-read
                     (TeX-argument-prompt nil nil "Name")
                     (LaTeX-pythontex-savecontent-list)))
@@ -436,7 +437,7 @@ a list of strings."
 
     ;; \inputpygments[<fancyvrb settings>]{<lexer>}{<external file>}
     '("inputpygments"
-      [ TeX-arg-eval LaTeX-fancyvrb-key-val-options-local ]
+      [ TeX-arg-eval (LaTeX-fancyvrb-key-val-options) ]
       (TeX-arg-eval completing-read
                     (TeX-argument-prompt nil nil "Lexer")
                     (LaTeX-pythontex-language-list))
@@ -447,7 +448,7 @@ a list of strings."
       [ TeX-arg-eval completing-read
         (TeX-argument-prompt t nil "Lexer")
         (LaTeX-pythontex-language-list) ]
-      (TeX-arg-eval LaTeX-fancyvrb-key-val-options-local))
+      (TeX-arg-eval (LaTeX-fancyvrb-key-val-options)))
 
     ;; \setpygmentspygopt[<lexer>]{<pygments options>}
     '("setpygmentspygopt"
@@ -511,7 +512,7 @@ a list of strings."
 
     ;; \begin{pygments}[<fancyvrb settings>]{<lexer>}
     '("pygments" LaTeX-env-args
-      [ TeX-arg-eval LaTeX-fancyvrb-key-val-options-local ]
+      [TeX-arg-eval (LaTeX-fancyvrb-key-val-options)]
       (TeX-arg-eval completing-read
                     (TeX-argument-prompt nil nil "Lexer")
                     (LaTeX-pythontex-language-list))) )
diff --git a/style/tex-live.el b/style/tex-live.el
index abddbe8..b74890d 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 Free Software Foundation, Inc.
+;; Copyright (C) 2020--2021 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -42,6 +42,7 @@
 (declare-function LaTeX-add-fancyvrb-environments
                   "fancyvrb"
                   (&rest fancyvrb-environments))
+(declare-function LaTeX-fancyvrb-key-val-options "fancyvrb" ())
 
 (declare-function font-latex-add-keywords
                   "font-latex"
@@ -84,7 +85,7 @@
     '("listinginput"
       (TeX-arg-eval completing-read
                     (TeX-argument-prompt nil nil "Value of firstnumber key")
-                    (cadr (assoc "firstnumber" 
LaTeX-fancyvrb-key-val-options-local)))
+                    (cadr (assoc "firstnumber" 
(LaTeX-fancyvrb-key-val-options))))
       LaTeX-fancyvrb-arg-file-relative)
 
     ;; Various sorts of names:



reply via email to

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