;; .emacs file for mavassar@scarlett.vassar.edu -EAM 93/10/12 ;; @(#) $Revision: 4.0 $ : $Date: 2003/01/26 16:01:07 $ : $Author: myers $ ;;======================================================================* ;; This file is executed whenever you start the emacs editor ;; (message "loading your ~/.emacs file...") ;; Uncomment the line below to add ~myers/emacs/src to path to get ;; good stuff from E. Myers, like vt200 and sun key bindings: ;;(setq load-path (cons "~myers/src/emacs/" load-path)) ;; put your own ~/src/emacs in the load-path to get your own personal tools (setq HOME (getenv "HOME")) (setq load-path (cons (concat HOME "/src/emacs/") load-path)) ;; subliminal message. If you can read this your computer is too slow! (message "Green eggs and ham!") ;; ---------- Customized FORTRAN mode (setq fortran-do-indent 2) (setq fortran-if-indent 2) (setq fortran-continuation-indent 4) ;(setq fortran-continuation-char 38) ;; Emacs 18.x (OLD) (setq fortran-continuation-string "&") ;; Emacs 19.x ;; ---------- Set default switches (setq default-major-mode 'text-mode) ; (setq text-mode-hook 'turn-on-auto-fill); automatically auto-fill (setq default-fill-column 72) ; (setq default-comment-column 40) ; (setq ask-about-buffer-names t) ; be helpful (setq completion-auto-help t) ; with buffer names (setq insert-default-directory t) ; be helpful with file paths (setq default-truncate-lines t) ; truncate, not wrap, long lines (setq default-case-fold-search t) ; t = upper/lower case same (setq next-screen-context-lines 4) ; overlap when scroll off screen (setq display-time-day-and-date t) ; display time and date on screen (setq indent-tabs-mode nil) ; don't use TABs (setq version-control t) ; t = *do* save old versions (setq kept-new-versions 2) ; save this many recent backups (setq kept-old-versions 1) ; save this many older backups (setq delete-auto-save-files t) ; delete #*# files when done (setq rmail-delete-after-output t) ; delete message when saved (setq explicit-shell-file-name "/bin/csh") ; csh, not tcsh in *shell* ! (put 'narrow-to-region 'disabled nil) (put 'eval-expression 'disabled nil) ;;(load "emacs-tools" t t) ; some more useful tools ;; ---------- some additional key definitions beyond "standard" emacs (global-set-key "\C-cc" 'compile) ; ^C-c is 'compile' (global-set-key "\C-cn" 'next-error) ; ^C-n is 'next-error' (global-set-key "\e#" 'goto-line) ; ESC-# is goto line (global-set-key "\C-x#" 'what-line) ; ^X-# is what-line ? (global-set-key "\C-c@" 'set-mark-command) ; set-mark if ^@ fails (global-set-key "\e\e" 'execute-extended-command) ; ESC-ESC is DO (global-set-key "\C-x?" 'help-for-help) ; ^X-? is help (global-set-key "\e?" 'command-apropos) ; ESC-? is a help command (global-set-key "\C-\\" 'isearch-forward) ; ^\ is forward search (global-set-key "\C-c\\" 'isearch-forward) ; alt if ^S not working ;;(global-set-key "\C-x\\" 'isearch-forward-regexp) ; ^X-\ is forward search (global-set-key "\e\t" 'indent-for-comment) ; ESC-TAB indents comment (global-set-key "\t" 'tab-to-tab-stop) ; tab the right way (global-set-key "\C-x\C-q" 'toggle-read-only) ; NOT version control! (global-set-key "\C-x\C-m" 'save-some-buffers) ; ^X-^M saves modified bufs (global-set-key "\C-cq" 'quoted-insert) ; ^C-q quotes char (alt) (global-set-key "\C-cy" 'yank) ; ^C-y alt to ^Y (yank) (global-set-key "\C-cY" 'yank) ; ^C-y alt to ^Y (yank) (global-set-key "\C-c\C-c" 'exit-recursive-edit) ; (global-set-key "\C-x " 'call-last-kbd-macro) ; ^X-SPC executes macro ;;(global-set-key "\ei" 'lisp-indent-line) ; ESC-i is Lisp tab ;;(global-set-key "\C-cv" 'eval-expression) ; value of lisp expression ;;(global-set-key "\C-ct" 'transpose-lines) ; ^X-t swaps lines (global-set-key [f1] 'set-mark-command) (global-set-key [f2] 'shell) ;; ---------- X colors using hilit19.el (cond (window-system (setq hilit-mode-enable-list '(not text-mode) hilit-background-mode 'dark hilit-quietly t hilit-inhibit-hooks nil hilit-inhibit-rebinding nil) (require 'hilit19) (hilit-translate comment 'Yellow define 'PaleVioletRed1 string 'LightSalmon ) (hilit-add-pattern "error" "error" 'Red) (hilit-add-pattern "\\\\Push\\w*Color" "Push\\w*Color" 'PaleVioletRed1 'plain-tex-mode t) (hilit-add-pattern "\\\\PopColor" "PopColor" 'PaleVioletRed1 'plain-tex-mode t) )) ;; ---------- ;; Other personal stuff (setq TeX-dvi-print-command "dviprint") (setq TeX-dvi-view-command "xdvi") (setq paragraph-start (concat paragraph-separate "\\\|<" )) (setq mail-archive-file-name ".mail-archive") (display-time) ; display date and time (message "Loaded your ~/.emacs file. ") ;;>>> end-of-file .emacs <<<