;; Red Hat Linux default .emacs initialization file ;; Are we running XEmacs or Emacs? (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) ;; Set up the keyboard so the delete key on both the regular keyboard ;; and the keypad delete the character under the cursor and to the right ;; under X, instead of the default, backspace behavior. (global-set-key [(control =)] 'copy-region-as-kill) (global-set-key [(control tab)] 'hippie-expand) (global-set-key [(control backspace)] 'backward-kill-word) ;; Turn on font-lock mode for Emacs (cond ((not running-xemacs) (global-font-lock-mode t) )) (cond (running-xemacs (font-lock-mode t) )) ;; AucTex & RefTex ;; comment out if using emacs instead of xemacs (setq load-path (cons "~/elisp" load-path)) (cond (running-xemacs (require 'tex-site) )) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) (setq reftex-plug-into-AUCTeX t) ;; allow kde dviview to move emacs to clicked location ;; (requires \usepackage[active]{srcltx} in latex document) ;; (server-start) ;; Always end a file with a newline (setq require-final-newline t) ;; Stop at the end of the file, not just add lines (setq next-line-add-newlines nil) ;; Enable wheelmouse support by default (if (not running-xemacs) (require 'mwheel) ; Emacs (mwheel-install) ; XEmacs ) ;;Set color settings ;;(color-theme-word-perfect) ;; Kenny's stuff (setq default-major-mode 'text-mode) (setq text-mode-hook '(lambda () (auto-fill-mode 1))) (autoload 'ude-compile "ude-compile" "" t) (autoload 'bee-mode "bee-mode" "bee mode" t) (setq auto-mode-alist (cons '("\\.\\(?:scm\\|sch\\|scme\\|bee\\|ast\\)$" . bee-mode) auto-mode-alist)) ;July2003: uncomment the following line (cond (running-xemacs (load "tex-site") )) (require 'font-lock) (add-hook 'font-lock-mode-hook 'turn-on-lazy-lock) (custom-set-faces) (put 'downcase-region 'disabled nil) (put 'upcase-region 'disabled nil) (set-face-font 'default "-adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1") ;;(set-background-color "blue") ;;(set-foreground-color "white") ;; source: xemacs 20.3 (defun count-words-region (start end) (interactive "r") (save-excursion (let ((n 0)) (goto-char start) (while (< (point) end) (if (forward-word 1) (setq n (1+ n)))) (message "Region has %d words" n) n))) (global-set-key "\C-cw" 'count-words-region) ;; VM / MAIL (custom-set-variables '(user-mail-address "jzuidema@science.uva.nl" t) '(query-user-mail-address nil)) ;;(setq vm-spool-files (list ;; (concat "imap:imap.science.uva.nl:143:/home/jzuidema/Mail/INBOX:jzuidema:" ;; (getenv "USER") ":*"))) (setq vm-spool-files '("mail.science.uva.nl:110:pass:jzuidema:*" "home/jzuidema/Mail/INBOX")) (setq inferior-lisp-program "/scratch/jzuidema/software/clisp-2.33.2/src/clisp") ;;bin/sbcl/sbcl") ;;gcl-2.6.6/bin/gcl")