forked from magnars/.emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup-code-modes.el
More file actions
executable file
·25 lines (21 loc) · 921 Bytes
/
setup-code-modes.el
File metadata and controls
executable file
·25 lines (21 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(require 'coding-hooks)
(defun my-code-mode-hook ()
(show-paren-mode t)
(local-set-key (kbd "<return>") 'newline-and-indent)
(local-set-key (kbd "C-<return>") 'newline)
(local-set-key (kbd "C-(") 'my-matching-paren)
(make-local-variable 'dabbrev-case-fold-search)
(setq dabbrev-case-fold-search nil)
)
(install-hook 'coding-hooks 'my-code-mode-hook)
;;sets e.g. c-modes c-modes-hook
;; suggestion: either (for all) (install-hook 'coding-hooks X) or (install-hooks lisp-mode-hooks X)
(set-coding-modes 'c js js2 c idl c++ cc java go)
(set-coding-modes 'lisp scheme lisp emacs-lisp lisp-interaction)
(set-coding-modes 'jvm java scala clojure tuareg)
(set-coding-modes 'ml ocaml ml haskell tuareg)
(set-coding-modes 'make make cmake makefile makefile-gmake jam fundamental conf conf-unix change-log)
(set-coding-modes 'doc LaTeX html)
;;(require 'python)
(install-coding-hooks)
(provide 'setup-code-modes)