auctex-devel
[Top][All Lists]
Advanced

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

Possible defect in TeX-complete-make-expert-command-functions


From: Ikumi Keita
Subject: Possible defect in TeX-complete-make-expert-command-functions
Date: Mon, 20 Dec 2021 23:56:09 +0900

Hi all,

I think that `TeX-complete-make-expert-command-functions' has some
inconsistencies in its implementation.

We have currently the following code in tex.el:
----------------------------------------------------------------------
(defmacro TeX-complete-make-expert-command-functions (thing list-var prefix)
[...]
           (if (null style)
               (remhash x TeX-expert-macro-table)
                          ^^^^^^^^^^^^^^^^^^^^^^
             (puthash x style TeX-expert-macro-table))))
                              ^^^^^^^^^^^^^^^^^^^^^^
[...]
                    (let* ((cmd (car entry))
                           (style (gethash cmd TeX-expert-macro-table)))
                                               ^^^^^^^^^^^^^^^^^^^^^^
[...]

(TeX-complete-make-expert-command-functions "macro" TeX-symbol-list "TeX")
(TeX-complete-make-expert-command-functions "environment" 
LaTeX-environment-list "LaTeX")
----------------------------------------------------------------------
This code registers both expert macros and expert environments in a
common variable `TeX-expert-macro-table'. And
`LaTeX-expert-environment-filtered' refers to that variable to determine
whether the given environment is expert or not. The variable
`LaTeX-expert-environment-table', of which defvar is generated by
omitted portion of this elisp macro, is never used.

Tassilo, is this the intended behavior? Am I missing something?

Regards,
Ikumi Keita



reply via email to

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