I'm getting some screwy indentation behavior from C mode. From a current bzr checkout/install of emacs, try the following recipe: emacs -Q foo.c | starts emacs on foo.c (included below) C-u 7 C-n | move down 7 lines TAB | indent, nothing changes (good) C-p C-p | move up 2 lines TAB C-n TAB C-n | indent 2 lines, nothing changes (good) TAB | line unindents by 2 (bad) TAB | line re-indents (good, but strange) TAB | no change this time And here's another recipe for weirdness: emacs -Q foo.c | starts emacs on foo.c (included below) C-x h | select buffer C-M-\ | indent region everything from line 7 | down to the while (0) unindents 2 C-u 5 C-n | move down to the do { C-x ( TAB C-n C-x ) | define a macro to indent and move down | a line C-x e e e e e e | Indent each line, no change Here's foo.c