# GNU Emacs configuration file # # Balaji S. Srinivasan # This file can be found at http://jinome.stanford.edu/stat366/unix/.emacs # Modified to include examples of loading ESS and matlab.el to allow interactive processing of R/Matlab code (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. '(auto-compression-mode t nil (jka-compr)) '(case-fold-search t) '(current-language-environment "UTF-8") '(default-input-method "rfc1345") ;;'(global-font-lock-mode t nil (font-lock)) '(show-paren-mode t nil (paren)) '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))) '(transient-mark-mode t) '(uniquify-buffer-name-style (quote forward) nil (uniquify))) (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. ) (cond ((fboundp 'global-font-lock-mode) ;; Customize face attributes (setq font-lock-face-attributes ;; Symbol-for-Face Foreground Background Bold Italic Underline '( ;; (font-lock-comment-face "Red") ;; (font-lock-string-face "LightGreen") ;; (font-lock-keyword-face "LightBlue") ;; (font-lock-function-name-face "Blue") (font-lock-variable-name-face "Blue") ;; (font-lock-type-face "Black") ;; (font-lock-reference-face "DarkGreen") )) ;; Load the font-lock package. (require 'font-lock) ;; Maximum colors (setq font-lock-maximum-decoration t) ;; Turn on font-lock in all modes that support it (global-font-lock-mode t))) ;;Set Undo to C-o because of OS X weirdness <-- mainly useful if you're on OS X ;;(global-set-key [(ctrl o)] 'undo) ;;LOAD EMACS DESKTOP ;;This allows easy restoration of previous workspace (load "desktop") (desktop-load-default) (desktop-read) ;;LOAD ESS ;;You can get ESS from http://ess.r-project.org/ ;;Uncomment and modify the below load code to point to the ess-site subdirectory of the ESS file ;;(load "~/downloads/ess-5.3.0/lisp/ess-site") ;;LOAD MATLAB EDITOR STUFF ;;You can get the Matlab major mode file from: http://www.mathworks.com/matlabcentral/files/104/matlab.el ;;See also: http://www2.imm.dtu.dk/~kas/software/emacs/ ;;You can use the below block or you can make your own from the above links ;;(setq matlab-shell-command-switches '("-nojvm -glnx86 -nosplash -nojvm")) ;;(load "~/matlab.el") ;;(autoload 'matlab-mode "matlab" "Enter MATLAB mode." t) ;;(setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist)) ;;(autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t) ;;User Level customizations (You need not use them all): ;; (setq matlab-indent-function t) ; if you want function bodies indented ;; (setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save ;; (defun my-matlab-mode-hook () ;; (setq fill-column 76)) ; where auto-fill should wrap ;; (add-hook 'matlab-mode-hook 'my-matlab-mode-hook) ;; (defun my-matlab-shell-mode-hook () ;; '()) ;; (add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook)