-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhooks.el
55 lines (41 loc) · 1.47 KB
/
hooks.el
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
;;;; -*- Mode: Emacs-Lisp -*-
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(setq indent-tabs-mode nil)
(auto-compile-mode t)
(show-prog-keywords)))
;;;; Lisp hooks:
(add-hook 'lisp-mode-hook 'filcab-lisp-mode-hook)
(add-hook 'slime-repl-mode-hook
(lambda ()
(if (fboundp 'lisp-mode-more-brackets)
(lisp-mode-more-brackets))
(show-prog-keywords)))
(add-hook 'inferior-lisp-mode-hook
(lambda ()
(if (fboundp 'inferior-slime-mode)
(inferior-slime-mode t))
(show-prog-keywords)))
;;;; Java hooks:
(add-hook 'java-mode-common-hook
(lambda ()
(c-set-style "k&r")
(local-set-key (kbd "<return>") 'newline-and-indent)
(setq c-basic-offset 4)
(setq c-indent-level 4)
(setq c-tab-always-indent 'complete)
(setq tab-width 4)
;; indent com tabs
(setq indent-tabs-mode nil)
(show-prog-keywords)))
;;;; Haskell hooks
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook 'show-prog-keywords)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;;;; (La)TeX hooks
(add-hook 'LaTeX-mode-hook 'filcab-latex-mode-hook)
(add-hook 'LaTeX-mode-hook 'show-prog-keywords)
;; Text mode hooks
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(provide 'hooks)