]> gitweb.michael.orlitzky.com - emacs.d.git/blob - .emacs
Compute our load-path automatically from the path of .emacs.
[emacs.d.git] / .emacs
1 ;; Disable auto-save for all file buffers
2 (setq auto-save-default nil)
3
4 (global-set-key "\C-m" 'newline-and-indent)
5 (global-font-lock-mode t)
6
7 ;; These are otherwise bound to C-Up and C-Down. To heck with that
8 ;; nonsense, M-n and M-p are unused and analogous to C-f, C-b and M-f,
9 ;; M-b respectively.
10 (global-set-key "\M-p" 'backward-paragraph)
11 (global-set-key "\M-n" 'forward-paragraph)
12
13 ;; Gentoo *or somebody* made the default too small.
14 ;; Make it too big to overcompensate.
15 (set-default-font "DejaVu Sans Mono-14")
16
17 ;; Set the frame title to the name of the buffer, if supported.
18 (setq frame-title-format "%b")
19
20 ;; Currently needed to make Emacs 23 behave sanely.
21 '(diff-jump-to-old-file t)
22
23 ;; Disable the menu/tool bars when we're using X.
24 (menu-bar-mode -1)
25 (when window-system
26 (tool-bar-mode -1))
27
28 ;; And put the damned scroll bar on the correct side.
29 (when window-system
30 (set-scroll-bar-mode 'right))
31
32 ;; The most important statement in this file.
33 ;; Do not display a splash screen on startup.
34 (setq inhibit-splash-screen t)
35
36 ;; Mode Line
37 (setq line-number-mode t)
38 (setq column-number-mode t)
39 (display-time)
40
41
42 ;; Don't force a newline at the end of every file.
43 ;; Doing so can screw up HTML, where a newline is more
44 ;; or less equivalent to a space.
45 (setq require-final-newline nil)
46
47
48 ;; Unicode
49 ;; (set-language-environment "UTF-8")
50 (prefer-coding-system 'utf-8-unix)
51 (set-terminal-coding-system 'utf-8-unix)
52 (set-keyboard-coding-system 'utf-8-unix)
53
54 (setq inhibit-iso-escape-detection t)
55
56 ;; Don't leave backups everywhere.
57 (setq backup-inhibited t)
58
59 ;; Add the directory containing .emacs to the load-path.
60 (add-to-list 'load-path (file-name-directory (file-truename user-init-file)))
61
62 (if (eq system-type 'cygwin)
63 (load-library "win32"))
64
65
66 ;; Need this for ignore-errors, and some modes.
67 (require 'cl)
68
69 (load-library "auto-modes")
70 (load-library "mode-hooks")
71
72
73 ;; Open private IRC messages in a new buffer.
74 (setq erc-auto-query 'buffer)
75
76 ;; Never ask me anything, emacs.
77 (setq save-abbrevs nil)
78
79 ;; Like ansi-term, except I don't get trapped in an inferior emacs
80 ;; session every once in a while.
81 (load-library "multi-term")
82
83 (load-library "diff-buffer-against-file")
84 (global-set-key "\C-cd" 'diff-buffer-against-file)
85
86 (load-library "fix-nonstandard-chars")
87
88
89 ;; Enable dired-find-alternate-file without having to stop
90 ;; and explain myself to Emacs.
91 (put 'dired-find-alternate-file 'disabled nil)
92
93
94 ;; Enable the downcase-region function.
95 (put 'downcase-region 'disabled nil)
96
97 ;; Show trailing whitespace, without having to drop into
98 ;; whitespace-mode.
99 (custom-set-variables '(show-trailing-whitespace t))