GNU bug report logs - #69373
14.0.3; hack-local-variables misbehaves after loading AUCTeX

Previous Next

Package: auctex;

Reported by: Tony Zorman <soliditsallgood <at> mailbox.org>

Date: Sun, 25 Feb 2024 07:46:02 UTC

Severity: normal

Found in version 14.0.3

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Arash Esbati <arash <at> gnu.org>
Cc: 69373 <at> debbugs.gnu.org, soliditsallgood <at> mailbox.org
Subject: bug#69373: 14.0.3; hack-local-variables misbehaves after loading AUCTeX
Date: Sun, 25 Feb 2024 10:32:40 -0500
> Thanks for the report.  I think this is more an Emacs issue than AUCTeX
> and should be assigned/fixed there.

Agreed.
I think the patch below is needed.
Tony, are you able to recompile your own Emacs to test that patch?
If so, I'd appreciate if you could try it to confirm that it fixes the
problem for you as well.


        Stefan


diff --git a/lisp/files.el b/lisp/files.el
index 524385edc84..d1b7ab04b6f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4353,9 +4366,7 @@ hack-one-local-variable
     ('mode
      (let ((mode (intern (concat (downcase (symbol-name val))
                                  "-mode"))))
-       (unless (eq (indirect-function mode)
-                   (indirect-function major-mode))
-         (funcall mode))))
+       (set-auto-mode-0 mode t)))
     ('eval
      (pcase val
        (`(add-hook ',hook . ,_) (hack-one-local-variable--obsolete hook)))





This bug report was last modified 1 year and 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.