Subject: bug#70136: 30.0.50; compilation-mode [was: comint-mode] doesn't call hack-dir-local-variables-non-file-buffer

From: Dmitry Gutov <[email-masked]>
Date: Sat, 21 Dec 2024 03:32:21 +0200

On 20/12/2024 09:29, Eli Zaretskii wrote:
>> 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?)

I mean this in NEWS.24 (the last sentence in particular):

   *** Directory local variables can apply to some file-less buffers.
   Affected modes include dired, vc-dir, and log-edit.  For example,
   adding "(diff-mode . ((mode . whitespace)))" to .dir-locals.el will
   turn on 'whitespace-mode' for *vc-diff* buffers.  Modes should call
   'hack-dir-local-variables-non-file-buffer' to support this.