Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 133 lines (106 sloc) 4.404 kB
de9195a @waratuman initial ci
authored
1 ;;; waratuman-misc.el
2
3 (when window-system
4 (setq frame-title-format '(buffer-file-name "%f" ("%b")))
5 (tooltip-mode -1)
6 (mouse-wheel-mode t)
7 (blink-cursor-mode -1))
8
9 (add-hook 'before-make-frame-hook 'turn-off-tool-bar)
10
11 (set-terminal-coding-system 'utf-8)
12 (set-keyboard-coding-system 'utf-8)
13 (prefer-coding-system 'utf-8)
55a8b6f @waratuman Turned on the auto-fill-mode for all major modes
authored
14
de9195a @waratuman initial ci
authored
15 (setq visible-bell t
16 echo-keystrokes 0.1
17 font-lock-maximum-decoration t
18 inhibit-startup-message t
19 transient-mark-mode t
20 color-theme-is-global t
21 shift-select-mode nil
22 mouse-yank-at-point t
23 require-final-newline t
24 line-number-mode t
25 column-number-mode t
26 truncate-partial-width-windows nil
1d4d58f @waratuman Misc. updates.
authored
27 default-truncate-lines t
de9195a @waratuman initial ci
authored
28 uniquify-buffer-name-style 'forward
29 whitespace-style '(trailing lines space-before-tab
30 indentation space-after-tab)
31 whitespace-line-column 100
32 ediff-window-setup-function 'ediff-setup-windows-plain
33 oddmuse-directory (concat dotfiles-dir "oddmuse")
34 xterm-mouse-mode t
35 save-place-file (concat dotfiles-dir "places"))
36
37 ;; Set this to whatever browser you use
38 ;; (setq browse-url-browser-function 'browse-url-firefox)
39 ;; (setq browse-url-browser-function 'browse-default-macosx-browser)
40 ;; (setq browse-url-browser-function 'browse-default-windows-browser)
41 ;; (setq browse-url-browser-function 'browse-default-kde)
42 ;; (setq browse-url-browser-function 'browse-default-epiphany)
43 ;; (setq browse-url-browser-function 'browse-default-w3m)
44 ;; (setq browse-url-browser-function 'browse-url-generic
45 ;; browse-url-generic-program "~/src/conkeror/conkeror")
46
47 ;; Transparently open compressed files
48 (auto-compression-mode t)
49
50 ;; Save a list of recent files visited.
51 (recentf-mode 1)
52
53 ;; Highlight matching parentheses when the point is on them.
54 (show-paren-mode 1)
55
56 ;; ido-mode is like magic pixie dust!
57 (when (> emacs-major-version 21)
58 (ido-mode t)
59 (setq ido-enable-prefix nil
60 ido-enable-flex-matching t
61 ido-create-new-buffer 'always
62 ido-use-filename-at-point 'guess
63 ido-max-prospects 10))
64
65 (set-default 'indent-tabs-mode nil)
66 (set-default 'indicate-empty-lines t)
67 (set-default 'imenu-auto-rescan t)
68
69 (add-hook 'text-mode-hook 'turn-on-auto-fill)
70 (add-hook 'text-mode-hook 'turn-on-flyspell)
1d4d58f @waratuman Misc. updates.
authored
71
72 (add-hook 'clojure-mode-hook 'turn-on-paredit)
73 (add-hook 'clojure-mode-hook 'turn-on-auto-fill)
de9195a @waratuman initial ci
authored
74
75 (defvar coding-hook nil
76 "Hook that gets run on activation of any programming mode.")
77
78 (defalias 'yes-or-no-p 'y-or-n-p)
79 (random t) ;; Seed the random-number generator
80
81 ;; Hippie expand: at times perhaps too hip
82 (delete 'try-expand-line hippie-expand-try-functions-list)
83 (delete 'try-expand-list hippie-expand-try-functions-list)
84
85 ;; Don't clutter up directories with files~
86 (setq backup-directory-alist `(("." . ,(expand-file-name
87 (concat dotfiles-dir "backups")))))
88
89 ;; Associate modes with file extensions
90 (add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . diff-mode))
91 (add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
92 (add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
93 (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
94 (add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
95 (add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js2-mode))
96 (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
97
98 ;; Default to unified diffs
99 (setq diff-switches "-u")
100
101 ;; Cosmetics
102
103 (eval-after-load 'diff-mode
104 '(progn
105 (set-face-foreground 'diff-added "green4")
106 (set-face-foreground 'diff-removed "red3")))
107
108 (eval-after-load 'magit
109 '(progn
110 (set-face-foreground 'magit-diff-add "green3")
111 (set-face-foreground 'magit-diff-del "red3")))
112
113 (eval-after-load 'mumamo
114 '(eval-after-load 'zenburn
115 '(ignore-errors (set-face-background
116 'mumamo-background-chunk-submode "gray22"))))
117
118 ;; Platform-specific stuff
119 (when (eq system-type 'darwin)
120 ;; Work around a bug on OS X where system-name is FQDN
121 (setq system-name (car (split-string system-name "\\."))))
122
123 ;; make emacs use the clipboard
124 (setq x-select-enable-clipboard t)
125
126 ;; Get around the emacswiki spam protection
127 (add-hook 'oddmuse-mode-hook
128 (lambda ()
129 (unless (string-match "question" oddmuse-post)
130 (setq oddmuse-post (concat "uihnscuskc=1;" oddmuse-post)))))
131
55a8b6f @waratuman Turned on the auto-fill-mode for all major modes
authored
132 (provide 'waratuman-misc)
Something went wrong with that request. Please try again.