; This .emacs file is modified from the version of Shayne Steele's .emacs file. ; See below for the details. I made some addition, deletion on the original ; version. The current version seems to fit my needs at home quite well. ; I use emacs mainly to edit latex file, html file, R script, and sometimes lisp ; script. So I installed ESS and AucTex in addition to NTEmacs on my home PC, ; which runs Windows ME. I use Cygwin at home too, you'll see some reference to ; Cygwin in this .emacs file. ; Happy editing with Emacs! ; Shayne Steele (steele@cs.fsu.edu) ; This is my .emacs file I use on a Windows NT 4.0 Servise Pack 4 machine ; The version of Emacs I use is 20.3.7.1 ; See the NT Emacs FAQ at ; http://www.cs.washington.edu/homes/voelker/ntemacs.html ; and see the Emacs Homepage at ; http://www.emacs.org/ ; Set titles for frame and icon (%f == file name, %b == buffer name) (setq frame-title-format "Emacs - %f") (setq icon-title-format "Emacs - %b") ;;-- load path (defun set-load-path () ;; add others here (set 'load-path (cons (expand-file-name "~/emacs/site-lisp") load-path)) (message "Load path set.")) (set-load-path) (require 'ess-site) (require 'tex-site) ;matlab mode setup (autoload 'matlab-mode "matlab.el" "Enter Matlab mode." t) (setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist)) ;(autoload 'matlab-shell "matlab.el" "Interactive Matlab mode." t) ; Cygwin setup ;(setenv "PATH" (concat "d:/cygwin/bin;" (getenv "PATH"))) ;(setq exec-path (cons "d:/cygwin/bin/" exec-path)) ;(require 'cygwin-mount) ;(cygwin-mount-activate) ; Replace dos shell with Cygwin bash shell ;(add-hook 'comint-output-filter-functions ; 'shell-strip-ctrl-m nil t) ;(add-hook 'comint-output-filter-functions ; 'comint-watch-for-password-prompt nil t) ;(setq explicit-shell-file-name "bash.exe") ;; For subprocesses invoked via the shell ;; (e.g., "shell -c command") ;(setq shell-file-name explicit-shell-file-name) ; Display settings ; default size and color options for all frames (setq default-frame-alist '( ; frame width and height (width . 81) (height . 26) ; foreground, background, and cursor colors (foreground-color . "grey8") (background-color . "grey92") (cursor-color . "red3") ) ) ; places top left corner of initial frame at location (0, 80) on screen (setq initial-frame-alist '( (top . 20) (left . 30) ) ) ; Colorized fonts ; Turn on font-lock in all modes that support it (global-font-lock-mode t) ; Maximum colors (setq font-lock-maximum-decoration t) ; Highlighting ; highlight region between point and mark (transient-mark-mode t) ; highlight during query (setq query-replace-highlight t) ; highlight incremental search (setq search-highlight t) ; Don't show matching parens ;(show-paren-mode 1) ; Display the column number of the point in the mode line (column-number-mode t) ; Make Text mode the default mode for new buffers ; turn on Auto Fill mode automatically in Text mode (setq default-major-mode 'text-mode) ;(add-hook 'text-mode-hook 'turn-on-auto-fill) ; 80 column wide lines when Fill mode is on ;(setq set-fill-column 80) ; Start off in "C:/" dir. ;(cd "C:/") ;;-- personalization variables (defun set-personal-variables () "Set personal variables." ;; do stuff here (set 'user-full-name "Xianhong Xie") (set 'user-mail-address "xie@stat.wisc.edu") (message "Personal variables set.")) (set-personal-variables) ;; I use these once in a while ;; Ensure newline at end of all files (setq require-final-newline t) ;; ;; Add Line numbers when printing (GREAT when printing out code) ;;(setq ps-line-number t) ; time display is last because during .emacs debugging if .emacs file is OK ; then time will display, otherwise I know that entire .emacs file was not read ; Display time in the mode line ;(setq display-time-24hr-format t) ;;uncomment this line to use 24hr format (display-time)