Disable auto indent globally in Emacs

msorc picture msorc · Dec 8, 2010 · Viewed 11.9k times · Source

How to disable auto indent in Emacs globally or only for some modes?

I have a number of packages installed for RubyOnRails (ruby, html, js, css).

Let's say I want to disable autoindent for css-mode.

Answer

daveloyall picture daveloyall · Mar 2, 2016

For me, on emacs 24.x, M-xelectric-indent-mode toggled the behavior that I wanted to disable.

FWIW, the behavior was that RET was bound to the command newline which is defined in simple.el... Among other things, the behavior of that command is altered by electric-indent-mode.