;; See below for why this is commented out -RHK 2006-07-11 ; (menu-bar-mode 0) ; (tool-bar-mode 0) ; (set-scroll-bar-mode nil) ;; Replaced these lisp commands with their .Xresources equivalents so ;; that the frame size (x-window size) is set properly to begin with. ;; emacs.menuBar: off ;; emacs.verticalScrollBars: off ;; emacs.toolBar: 0 ;; appearance ;(setq default-frame-alist ; '((cursor-color . "blue") ; (cursor-type . box) ; ;(font . "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1") ; (top . 0) (left . 80) ; (width . 81) (height . 60) ; (foreground-color . "wheat1") ; (background-color . "black")) ; ) ;;Fontification (setq font-lock-face-attributes '((font-lock-comment-face "DodgerBlue") (font-lock-string-face "Sienna") (font-lock-keyword-face "wheat4") (font-lock-function-name-face "OrangeRed") (font-lock-variable-name-face "orange1") (font-lock-type-face "BlueViolet") (font-lock-reference-face "MediumVioletRed"))) (setq font-lock-maximum-decoration t) (cond ((fboundp 'global-font-lock-mode) (global-font-lock-mode t) (show-paren-mode 1) (custom-set-faces;; I don't like the paren color and this changes it '(show-paren-match-face ((((class color)) (:background "DodgerBlue"))))) )) (column-number-mode 1) (display-time) (defconst my-fg "wheat") (defconst my-mg "DarkRed") (defconst my-bg "black") (set-face-background 'modeline my-mg) (set-face-foreground 'modeline my-fg) (set-face-background 'region my-mg) (set-face-background 'highlight my-fg) (set-face-foreground 'highlight my-bg) ;; some key bindings (global-set-key [end] 'end-of-line) (global-set-key [home] 'beginning-of-line) (global-set-key [C-end] 'end-of-buffer) (global-set-key [C-home] 'beginning-of-buffer) (global-set-key [delete] 'delete-char) (global-set-key [f1] 'undo) (global-set-key [f2] 'goto-line) (global-set-key [f3] 'delete-other-windows) (fset 'macro-kill-current-buffer [?\C-X ?K return]) (global-set-key [f4] 'macro-kill-current-buffer) (global-set-key [f6] 'call-last-kbd-macro) (global-set-key [f12] 'save-buffer) (global-set-key [f11] 'find-file) (global-set-key [f10] 'find-file-other-frame) (global-set-key [f9] 'switch-to-buffer) ;; spaces instead of tabs, and set tab width ;(setq-default indent-tabs-mode nil) (setq tab-width 2) (setq tab-interval 2) ;; narrow tabs for perl (setq perl-indent-level 2) ;; enable narrow to region mode for limited search/replace, etc. (put 'narrow-to-region 'disabled nil) ;; mode preferences (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode)) (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode)) (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode)) (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode)) (setq cperl-invalid-face (quote off)) (setq cperl-electric-keywords t) (setq cperl-hairy t) (setq auto-mode-alist (cons '("mutt" . mail-mode) auto-mode-alist)) (setq latex-mode-hook ; do auto fill mode in text mode '(lambda () (flyspell-mode 1) )) (setq text-mode-hook ; do auto fill mode in text mode '(lambda () (auto-fill-mode 1) (flyspell-mode 1) (setq-default indent-tabs-mode 1) )) ;html (setq html-mode-hook ; do auto fill mode in text mode '(lambda () (auto-fill-mode 0))) ; -- Java -- (setq java-mode-hook '(lambda () (setq c-basic-offset 2) (define-key java-mode-map "\C-c\C-k" 'kill-compilation) (define-key java-mode-map "\C-c\C-c" 'my-save-and-compile-java) (define-key java-mode-map [C-f12] 'my-save-and-compile-java) )) (defun my-save-and-compile-java () "Save current java buffer and compile it." (interactive "") (save-buffer 0) (compile (concat "javac " (buffer-file-name))) ) (setq emacs-lisp-mode-hook '(lambda () (font-lock-mode 1))) (setq asm-mode-hook '(lambda () (custom-set-variables '(tab-stop-list (quote (12 22 32 42 52 62)))))) ; VM initializers (cond ((string-match "dec" emacs-build-system) (setq load-path (cons "~/bin/emacs-dec/" load-path))) ((string-match "redhat" emacs-build-system) (setq load-path (cons "~/bin/emacs-intel/" load-path))) ) (eval-after-load "vm" '(defun vm-check-emacs-version () t)) (autoload 'vm "vm" "Start VM on your primary inbox." t) (autoload 'vm-other-frame "vm" "Like `vm' but starts in another frame." t) (autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t) (autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t) (autoload 'vm-mode "vm" "Run VM major mode on a buffer" t) (autoload 'vm-mail "vm" "Send a mail message using VM." t) (autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t) (setq load-path (cons "/usr/share/maxima/5.9.1/emacs" load-path )) (setq auto-mode-alist (cons '("\\.max" . maxima-mode) auto-mode-alist)) (autoload 'maxima "maxima" "Running Maxima interactively" t) (autoload 'maxima-mode "maxima" "Maxima editing mode" t) ;; Setup the desktop package. ;; Do this last so everything else is already activated (like font-lock-mode) ;(load "desktop") ;(desktop-load-default) ;(desktop-read) (custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(cperl-syntaxify-by-font-lock nil)) (custom-set-faces ;; custom-set-faces was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(show-paren-match-face ((((class color)) (:background "DodgerBlue")))))