]> gitweb.michael.orlitzky.com - emacs.d.git/blobdiff - .emacs
Compute our load-path automatically from the path of .emacs.
[emacs.d.git] / .emacs
diff --git a/.emacs b/.emacs
index e1c5691d121680e88abd97079bef868bcc2c7ef8..68341ddf165707c19154d47d298682bb071b6e94 100644 (file)
--- a/.emacs
+++ b/.emacs
@@ -4,15 +4,30 @@
 (global-set-key "\C-m" 'newline-and-indent)
 (global-font-lock-mode t)
 
+;; These are otherwise bound to C-Up and C-Down. To heck with that
+;; nonsense, M-n and M-p are unused and analogous to C-f, C-b and M-f,
+;; M-b respectively.
+(global-set-key "\M-p" 'backward-paragraph)
+(global-set-key "\M-n" 'forward-paragraph)
+
+;; Gentoo *or somebody* made the default too small.
+;; Make it too big to overcompensate.
+(set-default-font "DejaVu Sans Mono-14")
+
 ;; Set the frame title to the name of the buffer, if supported.
 (setq frame-title-format "%b")
 
-;; Disable the menu/tool bars
+;; Currently needed to make Emacs 23 behave sanely.
+'(diff-jump-to-old-file t)
+
+;; Disable the menu/tool bars when we're using X.
 (menu-bar-mode -1)
-(tool-bar-mode -1)
+(when window-system
+  (tool-bar-mode -1))
 
 ;; And put the damned scroll bar on the correct side.
-(set-scroll-bar-mode 'right)
+(when window-system
+  (set-scroll-bar-mode 'right))
 
 ;; The most important statement in this file.
 ;; Do not display a splash screen on startup.
@@ -41,9 +56,8 @@
 ;; Don't leave backups everywhere.
 (setq backup-inhibited t)
 
-;; Add this to load-path manually, then add the rest in load-paths.el
-(add-to-list 'load-path "~/.home/emacs/")
-(load-library "load-paths")
+;; Add the directory containing .emacs to the load-path.
+(add-to-list 'load-path (file-name-directory (file-truename user-init-file)))
 
 (if (eq system-type 'cygwin)
     (load-library "win32"))
 
 (load-library "auto-modes")
 (load-library "mode-hooks")
-(load-library "autoloads")
-
 
-(defun load-erc()
-  (interactive)
-  (ignore-errors
-    (load-library "erc")
-    )
-  )
-
-(global-set-key "\C-ce" 'load-erc)
 
+;; Open private IRC messages in a new buffer.
+(setq erc-auto-query 'buffer)
 
 ;; Never ask me anything, emacs.
 (setq save-abbrevs nil)
 
+;; Like ansi-term, except I don't get trapped in an inferior emacs
+;; session every once in a while.
+(load-library "multi-term")
 
 (load-library "diff-buffer-against-file")
 (global-set-key "\C-cd" 'diff-buffer-against-file)
 
+(load-library "fix-nonstandard-chars")
+
+
+;; Enable dired-find-alternate-file without having to stop
+;; and explain myself to Emacs.
+(put 'dired-find-alternate-file 'disabled nil)
 
-;; These next functions override the defaults provided by emacs. They
-;; prevent warning messages related to file modification times,
-;; particularly on weird filesystems.
 
-;;(defun ask-user-about-supersession-threat (fn)
-;;  )
+;; Enable the downcase-region function.
+(put 'downcase-region 'disabled nil)
 
-;;(defun verify-visited-file-modtime (bf)
-;;  t
-;;  )
+;; Show trailing whitespace, without having to drop into
+;; whitespace-mode.
+(custom-set-variables '(show-trailing-whitespace t))