Add cc-mode
This commit is contained in:
parent
648629f95c
commit
72f9c1469e
18
init-package/init-cc-mode.el
Normal file
18
init-package/init-cc-mode.el
Normal file
|
@ -0,0 +1,18 @@
|
|||
(require 'cc-mode)
|
||||
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)
|
||||
(c-toggle-hungry-state t)))
|
||||
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t)
|
||||
(c-toggle-hungry-state t)))
|
||||
|
||||
;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
|
||||
(setq compilation-finish-function
|
||||
(lambda (buf str)
|
||||
|
||||
(if (string-match "exited abnormally" str)
|
||||
|
||||
;;there were errors
|
||||
(message "compilation errors, press C-x ` to visit")
|
||||
|
||||
;;no errors, make the compilation window go away in 0.5 seconds
|
||||
(run-at-time 0.5 nil 'delete-windows-on buf)
|
||||
(message "No compilation errors."))))
|
|
@ -12,6 +12,7 @@
|
|||
auto-complete
|
||||
auto-dictionary
|
||||
buffer-move
|
||||
cc-mode
|
||||
cmake-mode
|
||||
color-moccur
|
||||
csharp-mode
|
||||
|
|
Loading…
Reference in a new issue