[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4146: 23.1.50; c-file-style in buffer local variables does not work!
From: |
Dan Nicolaescu |
Subject: |
bug#4146: 23.1.50; c-file-style in buffer local variables does not work! |
Date: |
Sat, 15 Aug 2009 00:10:08 -0700 (PDT) |
Jamie Lokier <jamie@shareable.org> writes:
> Hi,
>
>
> In GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.16.1)
> of 2009-07-31 on lansones, modified by Debian
> (emacs-snapshot package, version 1:20090730-1~jaunty1)
> (= the Ubuntu-PPA Jaunty package at the time of writing)
>
> In theory, if you put this at the top of a file, you'd expect C
> indentation style to be Linux style instead of the default GNU style
> (it's just an example):
>
> -*- c-file-style: "linux" -*-
>
> I have just opened a fresh new emacs-23.1.50.1 with "emacs -Q -nw"
> and then opened a file called foo.c containing that line.
>
> What I found is that the variable c-file-style is set to "linux" and
> is buffer-local, but it does not have the effect of setting the C
> indentation style.
>
> This is the output of C-h v c-file-style RET from that buffer:
>
> c-file-style is a variable defined in `cc-vars.el'.
> Its value is "linux"
> Local in buffer foo.c; global value is nil
>
> Automatically becomes buffer-local when set in any fashion.
> This variable is a file local variable.
> This variable is safe as a file local variable if its value
> satisfies the predicate `string-or-null-p'.
>
> The problem is that the variable is set correctly, but the intended
> effect of setting the C indentation style does not happen.
I can confirm this.
This is a regression, it works as expected in emacs-22.3.
IMO this is the type of bad bug that warrants making a dot release as
soon as it's fixed.