Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 158 lines (125 sloc) 5.27 kb
5fcb34d @technomancy initial commit
technomancy authored
1 ;;; starter-kit-misc.el --- Things that don't fit anywhere else
2 ;;
3 ;; Part of the Emacs Starter Kit
4
5 (when window-system
6 (setq frame-title-format '(buffer-file-name "%f" ("%b")))
7 (tooltip-mode -1)
0e17b37 @technomancy Only turn on mouse-wheel-mode if a window system is running.
technomancy authored
8 (mouse-wheel-mode t)
5fcb34d @technomancy initial commit
technomancy authored
9 (blink-cursor-mode -1))
10
9e78e16 @technomancy Turn off toolbar even when in daemon-mode.
technomancy authored
11 (add-hook 'before-make-frame-hook 'turn-off-tool-bar)
12
9a4a7c2 @technomancy Explicitly prefer utf8; thanks jmhodges.
technomancy authored
13 (set-terminal-coding-system 'utf-8)
14 (set-keyboard-coding-system 'utf-8)
15 (prefer-coding-system 'utf-8)
418be9d @technomancy Add experimental eshell/find.
technomancy authored
16 (ansi-color-for-comint-mode-on)
9a4a7c2 @technomancy Explicitly prefer utf8; thanks jmhodges.
technomancy authored
17
5fcb34d @technomancy initial commit
technomancy authored
18 (setq visible-bell t
2e8ee75 @technomancy Add alias for tail; clean up hippie-expand.
technomancy authored
19 fringe-mode (cons 4 0)
7860d38 @Singletoned Set unfinished commands to show as you are typing them
Singletoned authored
20 echo-keystrokes 0.1
5fcb34d @technomancy initial commit
technomancy authored
21 font-lock-maximum-decoration t
22 inhibit-startup-message t
23 transient-mark-mode t
24 color-theme-is-global t
3967f4b @technomancy Remove ELPA'd ruby libs, clean up regen-autoloads.
technomancy authored
25 shift-select-mode nil
08180c7 @technomancy Yank at point and require final newline (for cron, yuck).
technomancy authored
26 mouse-yank-at-point t
27 require-final-newline t
5fcb34d @technomancy initial commit
technomancy authored
28 truncate-partial-width-windows nil
29 uniquify-buffer-name-style 'forward
2e8ee75 @technomancy Add alias for tail; clean up hippie-expand.
technomancy authored
30 ffap-machine-p-known 'reject
8b83d57 @technomancy Tweak a few variables, change the package list.
technomancy authored
31 whitespace-style '(trailing lines space-before-tab
6561445 @technomancy Fix whitespace-mode for Emacs 24.
technomancy authored
32 face indentation space-after-tab)
8b83d57 @technomancy Tweak a few variables, change the package list.
technomancy authored
33 whitespace-line-column 100
5fcb34d @technomancy initial commit
technomancy authored
34 ediff-window-setup-function 'ediff-setup-windows-plain
f821261 @technomancy Autoload and invoke paredit. Fix ruby-mode RET.
technomancy authored
35 oddmuse-directory (concat dotfiles-dir "oddmuse")
0a9f568 @technomancy Mostly readme updates; a few other small tweaks.
technomancy authored
36 xterm-mouse-mode t
8b83d57 @technomancy Tweak a few variables, change the package list.
technomancy authored
37 save-place-file (concat dotfiles-dir "places"))
5fcb34d @technomancy initial commit
technomancy authored
38
b30f368 @technomancy Some changes suggested by Bob Willan.
technomancy authored
39 (add-to-list 'safe-local-variable-values '(lexical-binding . t))
40 (add-to-list 'safe-local-variable-values '(whitespace-line-column . 80))
41
3446372 @technomancy Don't end comments in colons; can be interpreted as local vars.
technomancy authored
42 ;; Set this to whatever browser you use
192c111 @technomancy Don't set browse-url-browser-function by default.
technomancy authored
43 ;; (setq browse-url-browser-function 'browse-url-firefox)
5fcb34d @technomancy initial commit
technomancy authored
44 ;; (setq browse-url-browser-function 'browse-default-macosx-browser)
45 ;; (setq browse-url-browser-function 'browse-default-windows-browser)
46 ;; (setq browse-url-browser-function 'browse-default-kde)
47 ;; (setq browse-url-browser-function 'browse-default-epiphany)
48 ;; (setq browse-url-browser-function 'browse-default-w3m)
49 ;; (setq browse-url-browser-function 'browse-url-generic
50 ;; browse-url-generic-program "~/src/conkeror/conkeror")
51
52 ;; Transparently open compressed files
53 (auto-compression-mode t)
54
55 ;; Enable syntax highlighting for older Emacsen that have it off
56 (global-font-lock-mode t)
57
58 ;; Save a list of recent files visited.
59 (recentf-mode 1)
60
61 ;; Highlight matching parentheses when the point is on them.
62 (show-paren-mode 1)
63
64 ;; ido-mode is like magic pixie dust!
65 (when (> emacs-major-version 21)
66 (ido-mode t)
67 (setq ido-enable-prefix nil
68 ido-enable-flex-matching t
69 ido-create-new-buffer 'always
6d71efa @technomancy Fix ido-find-file-at-point behaviour for /* */ comments.
technomancy authored
70 ido-use-filename-at-point 'guess
5fcb34d @technomancy initial commit
technomancy authored
71 ido-max-prospects 10))
72
73 (set-default 'indent-tabs-mode nil)
74 (set-default 'indicate-empty-lines t)
680a6d6 @technomancy ruby-compilation cleanups.
technomancy authored
75 (set-default 'imenu-auto-rescan t)
5fcb34d @technomancy initial commit
technomancy authored
76
cd73bce Use 'turn-on-* instead of a lambda when adding hooks
Seth Falcon authored
77 (add-hook 'text-mode-hook 'turn-on-auto-fill)
78 (add-hook 'text-mode-hook 'turn-on-flyspell)
b95c632 @technomancy Doc updates, textile-mode, and a haml fix.
technomancy authored
79
b2ffdf1 @technomancy Make coding-hook a real hook instead of a defun.
technomancy authored
80 (defvar coding-hook nil
81 "Hook that gets run on activation of any programming mode.")
82
5fcb34d @technomancy initial commit
technomancy authored
83 (defalias 'yes-or-no-p 'y-or-n-p)
84 (random t) ;; Seed the random-number generator
85
2e8ee75 @technomancy Add alias for tail; clean up hippie-expand.
technomancy authored
86 (defalias 'auto-revert-tail-mode 'tail-mode)
87
5fcb34d @technomancy initial commit
technomancy authored
88 ;; Hippie expand: at times perhaps too hip
89 (delete 'try-expand-line hippie-expand-try-functions-list)
90 (delete 'try-expand-list hippie-expand-try-functions-list)
2e8ee75 @technomancy Add alias for tail; clean up hippie-expand.
technomancy authored
91 (delete 'try-complete-file-name-partially hippie-expand-try-functions-list)
92 (delete 'try-complete-file-name hippie-expand-try-functions-list)
5fcb34d @technomancy initial commit
technomancy authored
93
94 ;; Don't clutter up directories with files~
3967f4b @technomancy Remove ELPA'd ruby libs, clean up regen-autoloads.
technomancy authored
95 (setq backup-directory-alist `(("." . ,(expand-file-name
96 (concat dotfiles-dir "backups")))))
5fcb34d @technomancy initial commit
technomancy authored
97
98 ;; nxhtml stuff
99 (setq mumamo-chunk-coloring 'submode-colored
100 nxhtml-skip-welcome t
101 indent-region-mode t
102 rng-nxml-auto-validate-flag nil)
103
104 ;; Associate modes with file extensions
105
106 (add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . diff-mode))
107 (add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
c54c106 @genehack add yaml mode
genehack authored
108 (add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
5fcb34d @technomancy initial commit
technomancy authored
109 (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
110 (add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
111 (add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js2-mode))
112 (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
113
418be9d @technomancy Add experimental eshell/find.
technomancy authored
114 (eval-after-load 'grep
d833085 @technomancy Sometimes grep-find-ignored-files isn't defined.
technomancy authored
115 '(when (boundp 'grep-find-ignored-files)
418be9d @technomancy Add experimental eshell/find.
technomancy authored
116 (add-to-list 'grep-find-ignored-files "target")
117 (add-to-list 'grep-find-ignored-files "*.class")))
118
a4aee72 @nonsequitur Default to unified diffs.
nonsequitur authored
119 ;; Default to unified diffs
0e00d53 @ramen Don't set magit-diff-options, which is a string in magit 0.8 and a li…
ramen authored
120 (setq diff-switches "-u -w")
a4aee72 @nonsequitur Default to unified diffs.
nonsequitur authored
121
5fcb34d @technomancy initial commit
technomancy authored
122 ;; Cosmetics
123
9da1a50 @technomancy What the heck was that about?
technomancy authored
124 ;; (set-face-background 'vertical-border "white")
125 ;; (set-face-foreground 'vertical-border "white")
418be9d @technomancy Add experimental eshell/find.
technomancy authored
126
5fcb34d @technomancy initial commit
technomancy authored
127 (eval-after-load 'diff-mode
128 '(progn
129 (set-face-foreground 'diff-added "green4")
130 (set-face-foreground 'diff-removed "red3")))
131
132 (eval-after-load 'magit
133 '(progn
134 (set-face-foreground 'magit-diff-add "green3")
9da1a50 @technomancy What the heck was that about?
technomancy authored
135 (set-face-foreground 'magit-diff-del "red3")))
5fcb34d @technomancy initial commit
technomancy authored
136
6c4e20a @technomancy Fix mumamo face tweak; clojure-project function.
technomancy authored
137 (eval-after-load 'mumamo
acc7e69 @technomancy Installation note in the readme for poor souls on w32.
technomancy authored
138 '(eval-after-load 'zenburn
3a9d81b @technomancy Load environment from a *shudder* plist.xml file on OS X.
technomancy authored
139 '(ignore-errors (set-face-background
140 'mumamo-background-chunk-submode "gray22"))))
141
142 ;; Platform-specific stuff
143 (when (eq system-type 'darwin)
144 ;; Work around a bug on OS X where system-name is FQDN
188721b @technomancy OS X plist stuff seems to cause more problems than it fixes.
technomancy authored
145 (setq system-name (car (split-string system-name "\\."))))
acc7e69 @technomancy Installation note in the readme for poor souls on w32.
technomancy authored
146
745e4b5 @pedrodelgallego Make emacs to use the clipboard
pedrodelgallego authored
147 ;; make emacs use the clipboard
148 (setq x-select-enable-clipboard t)
149
778ba24 @technomancy Add oddmuse wiki protection.
technomancy authored
150 ;; Get around the emacswiki spam protection
151 (add-hook 'oddmuse-mode-hook
152 (lambda ()
153 (unless (string-match "question" oddmuse-post)
154 (setq oddmuse-post (concat "uihnscuskc=1;" oddmuse-post)))))
155
5fcb34d @technomancy initial commit
technomancy authored
156 (provide 'starter-kit-misc)
188721b @technomancy OS X plist stuff seems to cause more problems than it fixes.
technomancy authored
157 ;;; starter-kit-misc.el ends here
Something went wrong with that request. Please try again.