6/25 how do you make emacs auto-indent after pressing "ENTER" in
perl/cc-mode? What do I need to add in my .emacs file? TIA
- clueless emacs user
\_ M-X vi-mode; set ai
\_ In your .emacs, add: (add-hook 'c-mode-common-hook
(function (lambda ()
(define-key c-mode-map "\C-m" 'newline-and-indent) ) ) )
... And a similar thing for your perl mode. --sowings
\_ I assume it's: (add-hook 'perl-mode-common-hook
(function (lambda ()
(define-key perl-mode-map "\C-m" 'newline-and-indent) ) ))
for perl? it didnt work for me. - still clueless
\_ It would probably be 'perl-mode-hook, without "common".
\_ Use vi. |