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

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

[elpa] externals/auctex f999caa1a0 5/8: Fix TeX-complete-make-expert-com


From: Tassilo Horn
Subject: [elpa] externals/auctex f999caa1a0 5/8: Fix TeX-complete-make-expert-command-functions
Date: Tue, 28 Dec 2021 04:06:02 -0500 (EST)

branch: externals/auctex
commit f999caa1a01ede97195d2367ed25ab02483dfb82
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>

    Fix TeX-complete-make-expert-command-functions
    
    * tex.el (TeX-complete-make-expert-command-functions): Use dynamically
    generated, dedicated variable to register expert entities.
---
 tex.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tex.el b/tex.el
index e686894811..3cf8f65ec2 100644
--- a/tex.el
+++ b/tex.el
@@ -3133,9 +3133,10 @@ Possible values are nil, t, or a list of style names.
 
 (defmacro TeX-complete-make-expert-command-functions (thing list-var prefix)
   (let* ((plural (concat thing "s"))
-         (upcase-plural (upcase plural)))
+         (upcase-plural (upcase plural))
+         (table-var (intern (format "%s-expert-%s-table" prefix thing))))
     `(progn
-       (defvar ,(intern (format "%s-expert-%s-table" prefix thing))
+       (defvar ,table-var
          (make-hash-table :test #'equal)
          ,(format "A hash-table mapping %s names to the style name providing 
it.
 
@@ -3149,8 +3150,8 @@ Expert %s are completed depending on 
`TeX-complete-expert-commands'."
                   upcase-plural plural plural)
          (dolist (x ,(intern plural))
            (if (null style)
-               (remhash x TeX-expert-macro-table)
-             (puthash x style TeX-expert-macro-table))))
+               (remhash x ,table-var)
+             (puthash x style ,table-var))))
 
        (defun ,(intern (format "%s-filtered" list-var)) ()
          ,(format "Filter (%s) depending on `TeX-complete-expert-commands'."
@@ -3161,7 +3162,7 @@ Expert %s are completed depending on 
`TeX-complete-expert-commands'."
                   (if (eq t TeX-complete-expert-commands)
                       entry
                     (let* ((cmd (car entry))
-                           (style (gethash cmd TeX-expert-macro-table)))
+                           (style (gethash cmd ,table-var)))
                       (when (or (null style)
                                 (member style TeX-complete-expert-commands))
                         entry))))



reply via email to

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