GNU bug report logs - #4146
23.1.50; c-file-style in buffer local variables does not work!

Previous Next

Packages: cc-mode, emacs;

Reported by: Jamie Lokier <jamie <at> shareable.org>

Date: Sat, 15 Aug 2009 03:50:06 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Jamie Lokier <jamie <at> shareable.org>
Cc: 4146 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
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 <at> 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.



This bug report was last modified 15 years and 120 days ago.

Previous Next


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