Ikumi Keita <[email protected]> writes: > 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?
No, I guess that's not how it is supposed to be but a leftover when I turned the hard-coded macro version to macros & environments. The functions the macro generates must refer to the *-table variable they defined with this macro call and nothing else, so all TeX-expert-macro-table occurrences there should actually be ,(intern (format "%s-expert-%s-table" prefix thing)). I'm also not sure if we might not want to remove that feature. AFAIK, there has never been any serious attempt to classify the macros & environments provided by our styles. There are just 6 styles using `TeX-declare-expert-macros' and one single style using `LaTeX-declare-expert-environments'. Bye, Tassilo
