]> gitweb.michael.orlitzky.com - emacs.d.git/blob - .emacs
mode-hooks.el: add dns-mode hooks
[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-frame-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 ;; Disable the menu/tool bars when we're using X.
21 (menu-bar-mode -1)
22 (when window-system
23 (tool-bar-mode -1))
24
25 ;; And put the damned scroll bar on the correct side.
26 (when window-system
27 (set-scroll-bar-mode 'right))
28
29 ;; The most important statement in this file.
30 ;; Do not display a splash screen on startup.
31 (setq inhibit-splash-screen t)
32
33 ;; Mode Line
34 (setq line-number-mode t)
35 (setq column-number-mode t)
36 (display-time)
37
38
39 ;; Don't force a newline at the end of every file.
40 ;; Doing so can screw up HTML, where a newline is more
41 ;; or less equivalent to a space.
42 (setq require-final-newline nil)
43
44
45 ;; Unicode
46 ;; (set-language-environment "UTF-8")
47 (prefer-coding-system 'utf-8-unix)
48 (set-terminal-coding-system 'utf-8-unix)
49 (set-keyboard-coding-system 'utf-8-unix)
50
51 (setq inhibit-iso-escape-detection t)
52
53 ;; Don't leave backups everywhere.
54 (setq backup-inhibited t)
55
56 ;; Don't let the file's contents modify my editor, because that needs
57 ;; to be said? More importantly, don't interrupt me to ask me if I
58 ;; want to process the variables that emacs KNOWS are unsafe.
59 (setq enable-local-variables nil)
60
61 ;; Add the directory containing .emacs to the load-path.
62 (add-to-list 'load-path (file-name-directory (file-truename user-init-file)))
63
64 ;; Need this for ignore-errors, and some modes.
65 (require 'cl)
66
67 (load-library "auto-modes")
68 (load-library "mode-hooks")
69
70
71 ;; Open private IRC messages in a new buffer.
72 (setq erc-auto-query 'buffer)
73
74 ;; Never ask me anything, emacs.
75 (setq save-abbrevs nil)
76
77 (load-library "diff-buffer-against-file")
78 (global-set-key "\C-cd" 'diff-buffer-against-file)
79
80 (load-library "fix-nonstandard-chars")
81 (load-library "latex-query-replace-regexp-math")
82
83
84 ;; Enable dired-find-alternate-file without having to stop
85 ;; and explain myself to Emacs.
86 (put 'dired-find-alternate-file 'disabled nil)
87
88
89 ;; Enable the downcase-region function.
90 (put 'downcase-region 'disabled nil)
91
92 ;; I want to see trailing whitespace.
93 (setq-default show-trailing-whitespace t)
94
95 ;; Don't ignore .git directories when tab-completing filenames, for
96 ;; two reasons. First, it's nice to be able to tell that a directory
97 ;; is a git repository from the output of "ls", and giving them a .git
98 ;; suffix is an easy way to do that. Second, editing .git/config is
99 ;; the easiest way to do a lot of things in git.
100 (setq completion-ignored-extensions
101 (remove ".git/" completion-ignored-extensions))