Skip to content
Newer
Older
100644 136 lines (109 sloc) 4.65 KB
008de68 @technomancy Clean up starter-kit-misc.el.
authored
1 ;;; starter-kit-misc.el --- Saner defaults and goodies: miscellany
5fcb34d @technomancy initial commit
authored
2 ;;
008de68 @technomancy Clean up starter-kit-misc.el.
authored
3 ;; Copyright (c) 2008-2010 Phil Hagelberg and contributors
4 ;;
5 ;; Author: Phil Hagelberg <technomancy@gmail.com>
6 ;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit
e0b9de2 @technomancy Version 2.0.2 of the base starter-kit.
authored
7 ;; Version: 2.0.2
008de68 @technomancy Clean up starter-kit-misc.el.
authored
8 ;; Keywords: convenience
9
10 ;; This file is not part of GNU Emacs.
11
12 ;;; Commentary:
13
14 ;; "Emacs outshines all other editing software in approximately the
15 ;; same way that the noonday sun does the stars. It is not just bigger
16 ;; and brighter; it simply makes everything else vanish."
17 ;; -Neal Stephenson, "In the Beginning was the Command Line"
18
19 ;; This file contains setqs and things that aren't bindings or defuns.
20
21 ;;; License:
22
23 ;; This program is free software; you can redistribute it and/or
24 ;; modify it under the terms of the GNU General Public License
25 ;; as published by the Free Software Foundation; either version 3
26 ;; of the License, or (at your option) any later version.
27 ;;
28 ;; This program is distributed in the hope that it will be useful,
29 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;; GNU General Public License for more details.
32 ;;
33 ;; You should have received a copy of the GNU General Public License
34 ;; along with GNU Emacs; see the file COPYING. If not, write to the
35 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
36 ;; Boston, MA 02110-1301, USA.
37
38 ;;; Code:
5fcb34d @technomancy initial commit
authored
39
40 (when window-system
41 (setq frame-title-format '(buffer-file-name "%f" ("%b")))
42 (tooltip-mode -1)
0e17b37 @technomancy Only turn on mouse-wheel-mode if a window system is running.
authored
43 (mouse-wheel-mode t)
5fcb34d @technomancy initial commit
authored
44 (blink-cursor-mode -1))
45
3a979e0 @technomancy Add esk- prefixes; remove unneeded code.
authored
46 ;; can't do it at launch or emacsclient won't always honor it
47 (add-hook 'before-make-frame-hook 'esk-turn-off-tool-bar)
9e78e16 @technomancy Turn off toolbar even when in daemon-mode.
authored
48
5fcb34d @technomancy initial commit
authored
49 (setq visible-bell t
50 inhibit-startup-message t
51 color-theme-is-global t
33ded01 @technomancy None of this double-space nonsense.
authored
52 sentence-end-double-space nil
3967f4b @technomancy Remove ELPA'd ruby libs, clean up regen-autoloads.
authored
53 shift-select-mode nil
08180c7 @technomancy Yank at point and require final newline (for cron, yuck).
authored
54 mouse-yank-at-point t
5fcb34d @technomancy initial commit
authored
55 uniquify-buffer-name-style 'forward
8a7b8f7 @technomancy Fix whitespace-mode for Emacs 24.
authored
56 whitespace-style '(face trailing lines-tail tabs)
769b803 @technomancy No more mister nice-guy.
authored
57 whitespace-line-column 80
5fcb34d @technomancy initial commit
authored
58 ediff-window-setup-function 'ediff-setup-windows-plain
3a979e0 @technomancy Add esk- prefixes; remove unneeded code.
authored
59 oddmuse-directory "~/.emacs.d/oddmuse"
031dfc8 @technomancy Cleanup mostly for things that aren't necessary in 24 anymore.
authored
60 save-place-file "~/.emacs.d/places"
61 backup-directory-alist `(("." . ,(expand-file-name "~/.emacs.d/backups")))
62 diff-switches "-u")
5fcb34d @technomancy initial commit
authored
63
b30f368 @technomancy Some changes suggested by Bob Willan.
authored
64 (add-to-list 'safe-local-variable-values '(lexical-binding . t))
65 (add-to-list 'safe-local-variable-values '(whitespace-line-column . 80))
66
3446372 @technomancy Don't end comments in colons; can be interpreted as local vars.
authored
67 ;; Set this to whatever browser you use
192c111 @technomancy Don't set browse-url-browser-function by default.
authored
68 ;; (setq browse-url-browser-function 'browse-url-firefox)
5fcb34d @technomancy initial commit
authored
69 ;; (setq browse-url-browser-function 'browse-default-macosx-browser)
70 ;; (setq browse-url-browser-function 'browse-default-windows-browser)
71 ;; (setq browse-url-browser-function 'browse-default-kde)
72 ;; (setq browse-url-browser-function 'browse-default-epiphany)
73 ;; (setq browse-url-browser-function 'browse-default-w3m)
74 ;; (setq browse-url-browser-function 'browse-url-generic
75 ;; browse-url-generic-program "~/src/conkeror/conkeror")
76
77 ;; Highlight matching parentheses when the point is on them.
78 (show-paren-mode 1)
79
80 ;; ido-mode is like magic pixie dust!
031dfc8 @technomancy Cleanup mostly for things that aren't necessary in 24 anymore.
authored
81 (ido-mode t)
f12cd31 @technomancy Bump ido-ubiquitous to 0.4.
authored
82 (ido-ubiquitous t)
031dfc8 @technomancy Cleanup mostly for things that aren't necessary in 24 anymore.
authored
83 (setq ido-enable-prefix nil
84 ido-enable-flex-matching t
85 ido-auto-merge-work-directories-length nil
86 ido-create-new-buffer 'always
87 ido-use-filename-at-point 'guess
88 ido-use-virtual-buffers t
89 ido-handle-duplicate-virtual-buffers 2
90 ido-max-prospects 10)
5fcb34d @technomancy initial commit
authored
91
92 (set-default 'indent-tabs-mode nil)
93 (set-default 'indicate-empty-lines t)
680a6d6 @technomancy ruby-compilation cleanups.
authored
94 (set-default 'imenu-auto-rescan t)
5fcb34d @technomancy initial commit
authored
95
cd73bce Use 'turn-on-* instead of a lambda when adding hooks
Seth Falcon authored
96 (add-hook 'text-mode-hook 'turn-on-auto-fill)
97 (add-hook 'text-mode-hook 'turn-on-flyspell)
b95c632 @technomancy Doc updates, textile-mode, and a haml fix.
authored
98
5fcb34d @technomancy initial commit
authored
99 (defalias 'yes-or-no-p 'y-or-n-p)
8967c61 @technomancy Switch to using prog-mode-hook instead of our own coding-hook.
authored
100 (defalias 'auto-tail-revert-mode 'tail-mode)
008de68 @technomancy Clean up starter-kit-misc.el.
authored
101
5fcb34d @technomancy initial commit
authored
102 (random t) ;; Seed the random-number generator
103
104 ;; Hippie expand: at times perhaps too hip
008de68 @technomancy Clean up starter-kit-misc.el.
authored
105 (dolist (f '(try-expand-line try-expand-list try-complete-file-name-partially))
106 (delete f hippie-expand-try-functions-list))
5fcb34d @technomancy initial commit
authored
107
3a979e0 @technomancy Add esk- prefixes; remove unneeded code.
authored
108 ;; Add this back in at the end of the list.
109 (add-to-list 'hippie-expand-try-functions-list 'try-complete-file-name-partially t)
5fcb34d @technomancy initial commit
authored
110
418be9d @technomancy Add experimental eshell/find.
authored
111 (eval-after-load 'grep
d833085 @technomancy Sometimes grep-find-ignored-files isn't defined.
authored
112 '(when (boundp 'grep-find-ignored-files)
008de68 @technomancy Clean up starter-kit-misc.el.
authored
113 (add-to-list 'grep-find-ignored-files "*.class")))
418be9d @technomancy Add experimental eshell/find.
authored
114
5fcb34d @technomancy initial commit
authored
115 ;; Cosmetics
116
117 (eval-after-load 'diff-mode
118 '(progn
119 (set-face-foreground 'diff-added "green4")
120 (set-face-foreground 'diff-removed "red3")))
121
122 (eval-after-load 'magit
123 '(progn
031dfc8 @technomancy Cleanup mostly for things that aren't necessary in 24 anymore.
authored
124 (set-face-foreground 'magit-diff-add "green4")
5fcb34d @technomancy initial commit
authored
125 (set-face-foreground 'magit-diff-del "red3")))
126
778ba24 @technomancy Add oddmuse wiki protection.
authored
127 ;; Get around the emacswiki spam protection
5dcf8f7 @technomancy Remove unused esk-system-name setq and move oddmuse fix to eval-after…
authored
128 (eval-after-load 'oddmuse
129 (add-hook 'oddmuse-mode-hook
130 (lambda ()
131 (unless (string-match "question" oddmuse-post)
132 (setq oddmuse-post (concat "uihnscuskc=1;" oddmuse-post))))))
778ba24 @technomancy Add oddmuse wiki protection.
authored
133
5fcb34d @technomancy initial commit
authored
134 (provide 'starter-kit-misc)
188721b @technomancy OS X plist stuff seems to cause more problems than it fixes.
authored
135 ;;; starter-kit-misc.el ends here
Something went wrong with that request. Please try again.