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

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

[Emacs-bug-tracker] bug#8251: closed (c-default-style vs. .dir-locals)


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#8251: closed (c-default-style vs. .dir-locals)
Date: Sun, 24 Jul 2011 10:20:04 +0000

Your message dated Sun, 24 Jul 2011 18:07:49 +0800
with message-id <address@hidden>
and subject line Re: [RFC PATCH] setting indentation styles via `c-file-style' 
fails to actually change indentation
has caused the GNU bug report #7570,
regarding c-default-style vs. .dir-locals
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7570: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7570
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: c-default-style vs. .dir-locals Date: Mon, 14 Mar 2011 21:50:25 +0100
Package: emacs
Version: 24.0.50


The test file contains just three lines:

{
  x;
}

(there are two spaces before "x;", as per the GNU style)

and .dir-locals.el is a one-liner:

((c-mode . ((c-file-style . "GNU"))))

Cases:

1.- No .dir-locals.el, no c-default-style

    rm .dir-locals.el
    emacs -Q test.c

    then c-indentation-style == "gnu", c-basic-offset == 2 (original
value was set-from-style; local in buffer test.c; global value is
set-from-style). And indeed, C-n <TAB> does not change anything.

2.- No .dir-locals, set c-default-style

    rm .dir-locals.el
    emacs -Q --eval '(setq c-default-style '((other . "stroustrup")))' test.c

    then c-indentation-style == "stroustrup", c-basic-offset == 4, and
C-n <TAB> reindents the x; line.

3.- .dir-locals.el, set c-default-style

    echo ((c-mode . ((c-file-style . "GNU"))))> .dir-locals.el
    emacs -Q --eval '(setq c-default-style '((other . "stroustrup")))' test.c

    then c-indentation-style == "gnu", c-basic-offset == 4, and C-n
<TAB> reindents.

4.- Like 3, but manually setting the style

    echo ((c-mode . ((c-file-style . "GNU"))))> .dir-locals.el
    emacs -Q --eval '(setq c-default-style '((other . "stroustrup")))' test.c
    C-c . gnu <RET>

    then c-indentation-style == "gnu", c-basic-offset == 2, and C-n
<TAB> does nothing (as expected).


Shouldn't case 3 work as 4? Or am I misunderstanding something obvious?

    Juanma



--- End Message ---
--- Begin Message --- Subject: Re: [RFC PATCH] setting indentation styles via `c-file-style' fails to actually change indentation Date: Sun, 24 Jul 2011 18:07:49 +0800 User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)
Thanks to Alan, this bug has been fixed in bzr r104815

-- 
Kanru



--- End Message ---

reply via email to

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