auctex-devel
[Top][All Lists]
Advanced

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

Re: Value of `TeX-global-input-files'


From: Ikumi Keita
Subject: Re: Value of `TeX-global-input-files'
Date: Sat, 08 May 2021 14:43:40 +0900

Hi Arash,

>>>>> Arash Esbati <arash@gnu.org> writes:
> Am I missing something here?  My suggestion would be to introduce a
> variable `LaTeX-global-package-files' (like LaTeX-global-class-files)
> and set that in `LaTeX-arg-usepackage-read-packages-with-options' once
> there.

Hmm, it seems reasonable to me.

Here is a related topic. Your proposed resolution adds a new element to
the list of global variables which should be initialized when C-u C-c
C-n and we need another defvar without value to suppress byte compiler
warnings in the current implementation of `TeX-normal-mode'.

How about introducing a new variable to hold the list of such global
variables and make `TeX-normal-mode' to use that variable, instead of
hard coding the names of global variables to be initialized?

(defvar TeX-XXX-YYY '(TeX-style-hook-list
;            BibTeX-global-style-files
;            BibTeX-global-files
;            BibLaTeX-global-style-files
;            TeX-Biber-global-files
            TeX-global-input-files
;            LaTeX-global-class-files
;            LaTeX-includegraphics-global-files
;            LaTeX-global-package-files
)

(defun TeX-normal-mode (&optional arg)
  [...]
  (if arg
     (dolist (var TeX-XXX-YYY)
        (set var nil)))
  [...]

(And latex.el and relevant style files such as graphicx.el should add
their own variables to be initialized into TeX-XXX-YYY by `add-to-list'
or `cl-pushnew'.)

Regards,
Ikumi Keita

P.S.
> I found that `TeX-global-input-files' can have different values based on
> which macro is used first in a document.  If I do

>     C-m C-c usepackage RET

> first, the variable holds all available .sty files.  If I reset the
> variable with `C-u C-c C-n' and do

>     C-m C-c input RET

> it holds all available input files.

They should be "C-c C-m", not "C-m C-c" :-)



reply via email to

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