(or (boundp 'running-xemacs)
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)))
(or (fboundp 'emacs-version>=)
(defun emacs-version>= (major &optional minor patch)
"Return true if the Emacs version is >= to the given MAJOR, MINOR,
and PATCH numbers.
The MAJOR version number argument is required, but the other arguments
argument are optional. Only the Non-nil arguments are used in the test."
(let ((emacs-patch (or emacs-patch-level emacs-beta-version -1)))
(cond ((> emacs-major-version major))
((< emacs-major-version major) nil)
((null minor))
((> emacs-minor-version minor))
((< emacs-minor-version minor) nil)
((null patch))
((>= emacs-patch patch))))))
(setq gc-cons-threshold 4000000
garbage-collection-messages t
max-lisp-eval-depth 4096
enable-local-variables t
auto-save-default nil
make-backup-files nil
truncate-partial-width-windows t
truncate-lines t
inhibit-startup-message t
default-major-mode 'indented-text-mode
visible-bell nil
display-time-24hr-format t
dired-dwim-target t)
(setq initial-frame-alist '((top . 1) (left . 100) (width . 120) (height . 60)))
(dolist (item '((global-font-lock-mode 1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(icomplete-mode 1)
(ido-mode 1)
(column-number-mode 1)
(line-number-mode 1)
(blink-cursor-mode -1)
(auto-compression-mode 1)
(display-time)
(auto-insert-mode 1)
(global-auto-revert-mode 1)
(auto-image-file-mode 1)
(cua-selection-mode 1)))
(when (fboundp (car item))
(apply (car item) (cdr item))))
(fset 'yes-or-no-p 'y-or-n-p)
(setq user-mail-address "ole@sugarshark.com"
user-full-name "Ole Arndt"
mail-host-address "localhost")
(defun user-mail-address () "ole@sugarshark.com")
(set-language-environment "UTF-8")
(prefer-coding-system 'utf-8-unix)
(setq file-coding-system-alist
(append '(("\\.java\\'" utf-8 . utf-8)
("\\.xml\\'" utf-8 . utf-8)
("\\.java\\'" utf-8 . utf-8))
file-coding-system-alist))
(defvar goto-keymap (make-sparse-keymap "Goto: (c)ompilation, (e)rc, (g)nus, (j)ournal, (p)lan, (s)hell, (t)erminal, (w)3m, (?)")
"Keymap used to switch to different applications")
(define-key mode-specific-map [?g] goto-keymap)
(define-key goto-keymap [??] 'describe-prefix-bindings)
(defvar toggle-keymap (make-sparse-keymap "Toggle: (c)ase-fold, debug (e)rror+(q)uit, (f)ill, trunc (l)ines, (o)ption, (r)ead-only, (t)ab-width, (?)")
"Keymap for global and buffer local toggles")
(define-key mode-specific-map [?t] toggle-keymap)
(define-key toggle-keymap [?c] 'toggle-case-fold-search)
(define-key toggle-keymap [?e] 'toggle-debug-on-error)
(define-key toggle-keymap [?q] 'toggle-debug-on-quit)
(define-key toggle-keymap [?l] 'toggle-truncate-lines)
(define-key toggle-keymap [?r] 'toggle-read-only)
(define-key toggle-keymap [?f] 'toggle-text-mode-auto-fill)
(define-key toggle-keymap [?o] 'toggle-option)
(define-key toggle-keymap [?t] 'toggle-tab-width)
(define-key toggle-keymap [??] 'describe-prefix-bindings)
(dolist (spec '(("[A-Z]+$" . text-mode)
("\\.el$" . emacs-lisp-mode)
("\\.asd$" . lisp-mode)
("\\.cl$" . lisp-mode)
("\\.log$" . text-mode)
("\\.py$" . python-mode)
("\\.inputrc$" . sh-mode)
("\\.js$" . java-mode)
("\\.sql$" . sql-mode)
("ChangeLog$" . change-log-mode)))
(add-to-list 'auto-mode-alist spec))
(require 'color-theme)
(load "color-theme-sugarshark")
(color-theme-sugarshark)