9d53d9b19c
* Mapped <Return> to c-indent-new-comment-line followed by a c-indent-line-or-region. * Mapped <C-return> to newline, since c-indent-new-comment-line inserts a \ at the end of #define statements and #include statements which makes the compiler think the line continues on the next.
9 lines
381 B
EmacsLisp
9 lines
381 B
EmacsLisp
(add-hook 'c-mode-hook
|
|
(lambda ()
|
|
(local-set-key [f11] 'c-toggle-header-source)
|
|
(local-set-key "\C-m"
|
|
(lambda ()
|
|
(interactive)
|
|
(c-indent-new-comment-line)
|
|
(c-indent-line-or-region)))
|
|
(local-set-key [C-return] 'newline)))
|