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


Message #14 received at 69373 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Arash Esbati <arash <at> gnu.org>
Cc: Tony Zorman via bug-auctex via Bug reporting list for AUCTeX
 <bug-auctex <at> gnu.org>, Tony Zorman <soliditsallgood <at> mailbox.org>,
 69373 <at> debbugs.gnu.org
Subject: Re: 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 83 days ago.

Previous Next


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