1 ;;; A simple rc to configure Emacs' editing behavior.
3 ;;; Spaces instead of tabs.
4 (setq-default tab-width
4
6 (setq tab-stop-list
(number-sequence 4 120 4))
8 ;;; Rectangular selection.
9 ;;; (cua-selection-mode t)
11 ;;; Turn on some "confusing" commands.
12 (put `upcase-region
`disabled nil
)
13 (put `downcase-region
`disabled nil
)
14 (put 'dired-find-alternate-file
'disabled nil
)
16 ;;; "stroustrup" and "k&r" in lieu of "gnu".
17 (setq-default c-default-style
'((java-mode .
"java")
19 (c++-mode .
"stroustrup")
22 ;;; Java is conventionally camel cased.
23 (add-hook 'java-mode-hook
'subword-mode
)
25 ;;; Paredit for all the s-expression language modes.
26 (when (require 'paredit nil t
)
27 (dolist (mode-hook '(clojure-mode-hook
29 inferior-lisp-mode-hook
30 lisp-interaction-mode-hook
34 inferior-scheme-mode-hook
36 (add-hook mode-hook
'paredit-mode
)))
38 ;;; Redshank refactoring for Common Lisp.
39 (when (require 'redshank nil t
)
40 (add-hook 'lisp-mode-hook
'redshank-mode
)
41 (add-hook 'inferior-lisp-mode-hook
'redshank-mode
))
43 ;;; Use buffer local 'lisp-indent-function values corresponding to the
45 (add-hook 'lisp-mode-hook
'yard-set-common-lisp-indent
)
46 (add-hook 'inferior-lisp-mode-hook
'yard-set-common-lisp-indent
)
47 (add-hook 'lisp-interaction-mode-hook
'yard-set-elisp-indent
)
48 (add-hook 'ielm-mode-hook
'yard-set-elisp-indent
)
49 (add-hook 'emacs-lisp-mode-hook
'yard-set-elisp-indent
)
51 ;;; Clojure is married to Java which is married to camel case.
52 (add-hook 'clojure-mode-hook
'subword-mode
)
53 (add-hook 'cider-repl-mode-hook
'subword-mode
)
55 ;;; Clobber javascript-mode with js2-mode.
56 (add-to-list 'auto-mode-alist
'("\\.js$" . js2-mode
))
58 ;;; Automatic minor modes.
59 (add-hook 'find-file-hook
'yard-set-auto-minor-mode
)
61 ;;; Sane indentation of the loop macro in Common Lisp.
62 (setq lisp-simple-loop-indentation
2
63 lisp-loop-keyword-indentation
6
64 lisp-loop-forms-indentation
9)