Hi Tassilo, >>>>> Tassilo Horn <t...@gnu.org> writes: >> [2. patch 1 --- application/gzip; >> 0001-Make-tex-buf.el-compile-without-require-latex.patch.gz]...
> I guess you could use `bound-and-true-p' for `LaTeX-using-Biber' here. Thanks, I incorporated your suggestion. I also added a slight modification to tests/command-expanstion.el to make regression tests pass for this particular revision. (I added the due change in the second patch also, which isn't attached because the whole patch is large.) Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine
>From 6f630128df0ae32d585d1a62a42acbe7f26d8855 Mon Sep 17 00:00:00 2001 From: Ikumi Keita <ik...@ikumi.que.jp> Date: Sat, 19 Mar 2022 23:07:53 +0900 Subject: [PATCH 1/3] Make tex-buf.el compile without (require 'latex) * tex-buf.el (): Delete (require 'latex) and add defvar's & declare-function. (TeX-command-default): Add `bound-and-true-p' guard for `LaTeX-using-Biber'. * tests/tex/command-expansion.el: Supply (require 'latex) which is now needed. --- tests/tex/command-expansion.el | 1 + tex-buf.el | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/tex/command-expansion.el b/tests/tex/command-expansion.el index 54078671..373ee3d6 100644 --- a/tests/tex/command-expansion.el +++ b/tests/tex/command-expansion.el @@ -23,6 +23,7 @@ (require 'ert) (require 'tex-buf) +(require 'latex) (ert-deftest TeX-command-expansion () "Check whether \"%%%%\" is correctly expanded when before \"%`\"." diff --git a/tex-buf.el b/tex-buf.el index a3892d3f..c7fbb09f 100644 --- a/tex-buf.el +++ b/tex-buf.el @@ -29,9 +29,14 @@ ;;; Code: (require 'tex) -(require 'latex) (require 'comint) +(defvar LaTeX-largest-level) +(defvar LaTeX-section-list) +(defvar compilation-error-regexp-alist) + +(declare-function LaTeX-bibliography-list "latex") + ;;; Customization: (defcustom TeX-process-asynchronous (not (eq system-type 'ms-dos)) @@ -842,7 +847,8 @@ omitted) and `TeX-region-file'." (append BibTeX-file-extensions TeX-Biber-file-extensions))) ;; We should check for bst files here as well. - (if LaTeX-using-Biber TeX-command-Biber TeX-command-BibTeX)) + (if (bound-and-true-p LaTeX-using-Biber) + TeX-command-Biber TeX-command-BibTeX)) ((and ;; Rationale: makeindex should be run when final document is almost ;; complete (see -- 2.34.1