0

I have this single line in my ~/.emacs:

(add-hook 'prog-mode-hook 'auto-fill-mode)

Now I open a foo.c with Emacs and type this code. I only type the code and enter. I do not type any tab. This is the indentation I get:

int main()
{
  for (;;) {
    printf("hello, world\n");
}
}

Why did Emacs indent my code like this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.