--- /dev/null
+;; Disable auto-save for all file buffers
+(setq auto-save-default nil)
+
+(global-set-key "\C-m" 'newline-and-indent)
+(global-font-lock-mode t)
+
+;; Set the frame title to the name of the buffer, if supported.
+(setq frame-title-format "%b")
+
+;; Disable the menu bar
+(menu-bar-mode -1)
+
+;; The most important statement in this file.
+;; Do not display a splash screen on startup.
+(setq inhibit-splash-screen t)
+
+;; Mode Line
+(setq line-number-mode t)
+(setq column-number-mode t)
+(display-time)
+
+
+;; Don't force a newline at the end of every file.
+;; Doing so can screw up HTML, where a newline is more
+;; or less equivalent to a space.
+(setq require-final-newline nil)
+
+
+;; Unicode
+;; (set-language-environment "UTF-8")
+(prefer-coding-system 'utf-8-unix)
+(set-terminal-coding-system 'utf-8-unix)
+(set-keyboard-coding-system 'utf-8-unix)
+
+(setq inhibit-iso-escape-detection t)
+
+;; 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")
+
+(if (eq system-type 'cygwin)
+ (load-library "win32"))
+
+
+;; Need this for ignore-errors, and some modes.
+(require 'cl)
+
+(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)
+
+
+;; Never ask me anything, emacs.
+(setq save-abbrevs nil)
+
+
+(load-library "diff-buffer-against-file")
+(global-set-key "\C-cd" 'diff-buffer-against-file)
+
+
+;; 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)
+;; )
+
+;;(defun verify-visited-file-modtime (bf)
+;; t
+;; )
--- /dev/null
+(setq auto-mode-alist
+ (append
+ (list
+
+ ;; apache-mode
+ '("\\.htaccess$" . apache-mode)
+ '("httpd\\.conf$" . apache-mode)
+ '("srm\\.conf$" . apache-mode)
+ '("access\\.conf$" . apache-mode)
+ '("apache[12]\?\\.conf$" . apache-mode)
+ '("commonapache[12]\?\\.conf$" . apache-mode)
+
+ ;; basic-mode
+ '("\\.class\\.asp$" . basic-mode)
+ '("\\.vbs$" . basic-mode)
+
+ ;; csharp-mode
+ '("\\.ascx$" . csharp-mode)
+ '("\\.cs$" . csharp-mode)
+
+ ;; css-mode
+ '("\\.css$" . css-mode)
+
+ ;; ecmascript-mode
+ '("\\.js$" . ecmascript-mode)
+
+ ;; haskell-mode
+ '("\\.hs$" . haskell-mode)
+
+ ;; nagios-mode
+ '("\\.cfg$" . nagios-mode)
+
+ ;; nxml-mode
+ '("\\.asp$" . nxml-mode)
+ '("\\.aspx$" . nxml-mode)
+ '("\\.xml$" . nxml-mode)
+ '("\\.?html$" . nxml-mode)
+ '("\\.config$" . nxml-mode)
+ '("\\.tpl$" . nxml-mode)
+ '("\\.rdf$" . nxml-mode)
+ '("\\.xul$" . nxml-mode)
+
+ ;; php-mode
+ '("\\.php$" . php-mode)
+
+ ;; python-mode
+ '("\\.py$" . python-mode)
+
+ ;; ruby-mode
+ '("\\.rake$" . ruby-mode)
+ '("\\.rb$" . ruby-mode)
+
+ )
+
+ auto-mode-alist))
--- /dev/null
+(autoload 'apache-mode "apache-mode" nil t)
+(autoload 'basic-mode "basic-mode" nil t)
+(autoload 'csharp-mode "csharp-mode" nil t)
+(autoload 'css-mode "css-mode" nil t)
+(autoload 'ecmascript-mode "ecmascript-mode" nil t)
+(autoload 'haskell-mode "haskell-mode" nil t)
+(autoload 'nagios-mode "nagios-mode" nil t)
+(autoload 'nxml-mode "nxml-mode" nil t)
+(autoload 'php-mode "php-mode" nil t)
+(autoload 'python-mode "python-mode" nil t)
+(autoload 'ruby-mode "ruby-mode" nil t)
--- /dev/null
+(defun diff-buffer-against-file (context)
+ "diff the current (edited) buffer against the file of the same name"
+ (interactive "P")
+ (let (($file (concat "\"" buffer-file-name "\""))
+ ($temp_buffer "emacs.diff")
+ ($temp_file "/tmp/emacs.diff"))
+
+ (delete-other-windows)
+ (push-mark (point) t)
+ (generate-new-buffer $temp_file)
+ (copy-to-buffer $temp_buffer (point-min) (point-max))
+ (set-buffer $temp_buffer)
+ (write-file $temp_file)
+ (shell-command (concat (if context "diff -c " "diff ") $file " " $temp_file))
+ (kill-buffer $temp_file)
+ (pop-mark)
+ )
+ )
--- /dev/null
+(setq load-path
+ (append
+ (list
+
+ ;; From ~/.home
+ "~/.home/emacs/modes/basic-mode/"
+ "~/.home/emacs/modes/csharp-mode/"
+ "~/.home/emacs/modes/nagios-mode/"
+ "~/.home/emacs/modes/ecmascript-mode/"
+
+ ;; From /usr/share/emacs
+ "/usr/share/emacs/site-lisp/apache-mode/"
+ "/usr/share/emacs/site-lisp/css-mode/"
+ "/usr/share/emacs/site-lisp/erc/"
+ "/usr/share/emacs/site-lisp/haskell-mode/"
+ "/usr/share/emacs/site-lisp/nxml-mode/"
+ "/usr/share/emacs/site-lisp/php-mode/"
+ "/usr/share/emacs/site-lisp/ruby-mode/"
+ "/usr/share/emacs/site-lisp/ruby1.9-elisp/"
+
+ ;; From /usr/share/emacs21
+ "/usr/share/emacs21/site-lisp/css-mode/"
+ "/usr/share/emacs21/site-lisp/php-mode/"
+ )
+
+ load-path))
--- /dev/null
+(add-to-list 'load-path "~/.home/emacs/mode-hooks/")
+
+(load-library "basic-mode-hooks")
+(load-library "nxml-mode-hooks")
+(load-library "css-mode-hooks")
+(load-library "ruby-mode-hooks")
+(load-library "csharp-mode-hooks")
--- /dev/null
+(defun bm-set-indent-level()
+ (setq basic-indent-level 2)
+ )
+
+
+(add-hook 'basic-mode-hook (function bm-set-indent-level))
--- /dev/null
+(defun csm-hook()
+ ;; csharp-mode overrides this somewhere. Fix that.
+ (setq require-final-newline nil)
+ )
+
+
+(add-hook 'csharp-mode-hook (function csm-hook))
--- /dev/null
+(defun cssm-right-brace-macro()
+ (interactive)
+ (cssm-insert-right-brace-and-indent)
+ (forward-char)
+ )
+
+
+(defun cssm-hook()
+
+ (cssm-leave-mirror-mode)
+ (setq cssm-indent-function 'cssm-c-style-indenter)
+
+ (define-key cssm-mode-map (read-kbd-macro "}") 'cssm-right-brace-macro)
+
+ ;; Add "focus" to the list of pseudo-selectors
+ (add-to-list 'cssm-pseudos "focus")
+
+ ;; Redefine the CSS regular expressions to allow underscores
+ (setq cssm-font-lock-keywords
+ (list
+ (cons (cssm-list-2-regexp cssm-keywords) font-lock-keyword-face)
+ (cons "\\.[a-zA-Z][-a-zA-Z_0-9.]+" font-lock-variable-name-face)
+ (cons (concat ":" (cssm-list-2-regexp cssm-pseudos))
+ font-lock-variable-name-face)
+ (cons "#[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)?"
+ font-lock-reference-face)
+ (cons "\\[.*\\]" font-lock-variable-name-face)
+ (cons "#[-a-zA-Z_0-9]*" font-lock-function-name-face)
+ (cons "rgb(\\s-*[0-9]+\\(\\.[0-9]+\\s-*%\\s-*\\)?\\s-*,\\s-*[0-9]+\\(\\.[0-9]+\\s-*%\\s-*\\)?\\s-*,\\s-*[0-9]+\\(\\.[0-9]+\\s-*%\\s-*\\)?\\s-*)"
+ font-lock-reference-face)
+ )
+ )
+ )
+
+
+(add-hook 'css-mode-hook (function cssm-hook))
--- /dev/null
+(defun nxmlm-hook()
+
+ (custom-set-faces
+ ;; Get rid of that goddamn underline face
+ '(rng-error-face ((t (:foreground "yellow" :weight light)))))
+
+ ;; Start flyspell, checking only prog-mode faces.
+ (flyspell-prog-mode)
+
+ ;; And add normal xml text to that list of prog-mode faces.
+ (add-to-list 'flyspell-prog-text-faces 'nxml-text-face)
+ )
+
+(add-hook 'nxml-mode-hook (function nxmlm-hook))
--- /dev/null
+(defun rbm-hook()
+ ;; Put ruby-mode back into newline-and-indent
+ (define-key ruby-mode-map "\C-m" 'ruby-reindent-then-newline-and-indent)
+ )
+
+
+(add-hook 'ruby-mode-hook (function rbm-hook))
--- /dev/null
+[^.]*
\ No newline at end of file
--- /dev/null
+(setq explicit-shell-file-name "bash.exe")
+(setq shell-file-name explicit-shell-file-name)