bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70136: 30.0.50; compilation-mode [was: comint-mode] doesn't call hac


From: Eli Zaretskii
Subject: bug#70136: 30.0.50; compilation-mode [was: comint-mode] doesn't call hack-dir-local-variables-non-file-buffer
Date: Fri, 20 Dec 2024 09:29:08 +0200

> Date: Fri, 20 Dec 2024 05:09:24 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, 70136@debbugs.gnu.org,
>  Stefan Monnier <monnier@iro.umontreal.ca>
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> On 02/05/2024 09:17, Juri Linkov wrote:
> >> @@ -2372,6 +2363,11 @@ compilation-mode
> >>     ;; some other input event happens.
> >>     (setq-local jit-lock-defer-time nil)
> >>     (setq buffer-read-only t)
> >> +  (unless (buffer-file-name)
> >> +    (let ((sym (make-symbol "hack-dir-local-variables-non-file-buffer")))
> >> +      (set sym #'hack-dir-local-variables-non-file-buffer)
> >> +      ;; Ensure hack-dir-locals is called only after a derived mode is 
> >> set.
> >> +      (push sym delayed-mode-hooks)))
> >>     (run-mode-hooks 'compilation-mode-hook))
> > Thanks for the patch.  I confirm it completely fixes the bug
> > reported at the end of bug#68570.
> 
> I'd like to express my support for the change as well (got here from 
> bug#74631).

I agreed with the change, provided it's opt-in.  That was 7 months
ago.

> When we added it to some modes in Emacs 24, the announcement had what 
> seems like advice to call this functions in more others (see the 
> corresponding NEWS).
> 
> The current opt-out options seem sufficient IMHO (the Compilation mode, 
> they would also include setting enable-dir-local-variables to nil 
> locally in the mode hook).

Sorry, I don't understand what you are saying here.  ("Emacs 24"?  I
thought we were discussing this for Emacs 30, for which it is now too
late, and Emacs 31?)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]