В файле ~/.emacs есть следующие строки:
;; enable automatic indentation
(add-hook 'c-mode-hook
'(lambda ()
(define-key global-map (kbd "RET") 'newline-and-indent)))
(add-hook 'c++-mode-hook
'(lambda ()
(define-key global-map (kbd "RET") 'newline-and-indent)))
(add-hook 'scheme-mode-hook
'(lambda ()
(define-key global-map (kbd "RET") 'newline-and-indent)))
;; disable automatic indentation for haskell-mode
(add-hook 'haskell-mode-hook
'(lambda ()
(define-key global-map (kbd "RET") 'newline)))