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

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

bug#23827: 25.1.50; tab-width file-local variable has no effect in etc/H


From: Alan Mackenzie
Subject: bug#23827: 25.1.50; tab-width file-local variable has no effect in etc/HELLO
Date: Thu, 30 Jun 2016 09:22:40 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Stefan.

On Tue, Jun 28, 2016 at 05:43:42PM -0400, Stefan Monnier wrote:
> > I think the temp-buffer will pick up any .dir-locals from its "current

> There's no need to think/guess here, really.  Instead someone needs to
> look at the code and/or test it.

Oh, OK.

I put the following into my .dir-locals.el:

(fundamental-mode . ((indent-tabs-mode . nil)))

, and then ran the following command "in" the current directory
containing the .dir-locals.el:

  M-: (with-temp-buffer (message "indent-tabs-mode: %s.  major-mode: %s" 
indent-tabs-mode major-mode))

Displayed was:

  "indent-tabs-mode: t.  major-mode: fundamental-mode"

.  So it would appear that the temporary buffer, although ostensibly in
fundamental mode, isn't picking up the .dir-local.el variables.  In fact,
it would appear, from looking at the code, that `fundamental-mode' doesn't
get called.  It isn't clear to me where `major-mode', which presumably is
set to binary zeros when the buffer structure gets allocated, gets set to
`fundamental-mode'.

Maybe we just don't need to worry about this - it appears to do the Right
Thing.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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