在Emacs 24.4中,默認的縮進行爲已被更改 - 現在新的行自動縮進。從release notes:如何禁用RET上的電子縮進但仍保留其他電子字符(例如'{')?
*** `electric-indent-mode' is now enabled by default.
Typing RET reindents the current line and indents the new line.
`C-j' inserts a newline but does not indent. In some programming modes,
additional characters are electric (eg `{').
我喜歡舊的行爲,所以我加了
(electric-indent-mode 0)
我.emacs
文件。但是,這會禁用所有電子字符,這不是我想要的。
有沒有什麼辦法可以禁用新的行爲,同時還有像'{'或':'這樣的字符觸發縮進?
這正是我一直在尋找。謝謝! – user3426575 2014-11-22 17:20:42