[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Value of `TeX-global-input-files'
From: |
Arash Esbati |
Subject: |
Re: Value of `TeX-global-input-files' |
Date: |
Tue, 11 May 2021 09:48:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 |
Hi Keita,
Ikumi Keita <ikumi@ikumi.que.jp> writes:
>>>>>> 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.
Thanks.
> 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'.
Yes, that would happen. But besides your proposal below, we could also
add
(eval-when-compile (require 'latex))
to tex.el and delete the byte compiler silencing defvar's for latex.el.
> 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'.)
I like the idea. What do think about `TeX-normal-mode-reset-list' as a
name for TeX-XXX-YYY?
>> 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" :-)
That was of course an exercise for the careful readers ;-) Sorry for the
confusion.
Best, Arash