jfbu <[email protected]> writes:

Hi all,

>> --8<---------------cut here---------------start------------->8---
>> Debugger entered--Lisp error: (void-variable compilation-in-progress)
>>    TeX-run-command("TeX" "pdftex -file-line-error -interaction=nonstopmode
>> --8<---------------cut here---------------end--------------->8---
>
> FWIW the problem does not arise with release_12_2 checkout of the git
> repo.
>
> I did "git log --grep 'compilation-in-progress'" and with --oneline
> option the output is
>
> [...]
>
> So perhaps look at 087b0300 whose commit message says
>
> Simplify mode line for emacs 27
>          * tex-buf.el: Don't add an entry in `minor-mode-alist' for
>     `compilation-in-progress'. In emacs 27, compile.el adds a similar
>     entry in `mode-line-modes'.

The diff is:

--8<---------------cut here---------------start------------->8---
diff --git a/tex-buf.el b/tex-buf.el
index ff6be7e6..510722cb 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1883,9 +1883,11 @@ variable is nil."
 (defvar compilation-in-progress nil
   "List of compilation processes now running.")
 
-(or (assq 'compilation-in-progress minor-mode-alist)
-    (setq minor-mode-alist (cons '(compilation-in-progress " Compiling")
-                                minor-mode-alist)))
+;; COMPATIBILITY for emacs < 27
+(if (< emacs-major-version 27)
+    (or (assq 'compilation-in-progress minor-mode-alist)
+       (setq minor-mode-alist (cons '(compilation-in-progress " Compiling")
+                                    minor-mode-alist))))
 
 (defun TeX-process-get-variable (name symbol &optional default)
   "Return the value in the process buffer for NAME of SYMBOL.
--8<---------------cut here---------------end--------------->8---

I wonder if this entry has ever been correct?  `compilation-in-progress'
is no minor mode.  Shouldn't that be

  (compilation-minor-mode " Compilation")

instead?

Anyway, I've put a (require 'compile) into TeX-run-command &
TeX-run-compile just before the code that accesses compile.el variables
to make sure it's loaded.

Bye,
Tassilo

Reply via email to