How to use Emacs/matlab-mode ============================ setup ----- Add the following to your .emacs file: ;; load matlab-mode (load "/home/helpdesk/trial/matlab-mode/matlab") ;; syntax color (global-font-lock-mode t) ;; use matlab-mode when you load .m files (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) ;; use F10 to submit selected txt (define-key matlab-mode-map (quote [f10]) `matlab-shell-run-region) use --- 1. Start emacs 2. M-x matlab-shell 3. try to input command and navigate through them. 4. when you open .m file, it will be in matlab-mode. 5. select any text and use F10 to run it. helpdesk@stat.rice.edu $Date: 2003/07/17 16:15:45 $ $Author: helpdesk $ $Log: emacs-matlab.txt,v $ Revision 1.1 2003/07/17 16:15:45 helpdesk add emacs-matlab.txt to module web/howto