From 40f42945ed1ee76c16ee4c58c7f37a412a3aa407 Mon Sep 17 00:00:00 2001 From: Roland Winkler Date: Wed, 2 Dec 2020 13:51:35 -0600 Subject: [PATCH] bibtex-mode: do not fail when local variables are disabled * lisp/textmodes/bibtex.el (bibtex-mode): Check if enable-local-variables is non-nil (bug#37957). --- lisp/textmodes/bibtex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index a6c5f637f33..38fea32d2e9 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -3483,7 +3483,7 @@ if that value is non-nil. (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s))))) - (if buffer-file-name + (if (and buffer-file-name enable-local-variables) (add-hook 'hack-local-variables-hook fun nil t) (funcall fun)))) -- 2.39.5