* bug#8251: c-default-style vs. .dir-locals
@ 2011-03-14 20:50 Juanma Barranquero
2011-03-15 6:26 ` Glenn Morris
0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2011-03-14 20:50 UTC (permalink / raw)
To: 8251
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#8251: c-default-style vs. .dir-locals
2011-03-14 20:50 bug#8251: c-default-style vs. .dir-locals Juanma Barranquero
@ 2011-03-15 6:26 ` Glenn Morris
2011-03-15 9:26 ` Juanma Barranquero
0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2011-03-15 6:26 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: 8251
Is this the same as
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7570 ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#8251: c-default-style vs. .dir-locals
2011-03-15 6:26 ` Glenn Morris
@ 2011-03-15 9:26 ` Juanma Barranquero
0 siblings, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2011-03-15 9:26 UTC (permalink / raw)
To: Glenn Morris; +Cc: 8251
> Is this the same as
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7570 ?
I'm not sure, but it is entirely possible. Both are about the default
style overriding the .dir-locals.el one.
Feel free to merge them.
Thanks,
Juanma
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-15 9:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 20:50 bug#8251: c-default-style vs. .dir-locals Juanma Barranquero
2011-03-15 6:26 ` Glenn Morris
2011-03-15 9:26 ` Juanma Barranquero
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.