• emacs的MATLAB模式 - [Matlab]

    2006-09-18
    在.emacs文件中添加如下内容:
    ;; Matlab-mode setup:

    ;; Add local lisp folder to load-path
    (setq load-path (append load-path (list "/win/D/MATLAB701/java/extern
    /EmacsLink/lisp/(这是emacs.el文件的位置,一般matlab安装目录下有)")))

    ;; Set up matlab-mode to load on .m files
    (autoload &aposmatlab-mode "matlab" "Enter MATLAB mode." t)
    (setq auto-mode-alist (cons &apos("\\.m\\&apos" . matlab-mode) auto-mode-alist))
    (autoload &aposmatlab-shell "matlab" "Interactive MATLAB mode." t)

    ;; Customization:
    (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 &aposmatlab-mode-hook &aposmy-matlab-mode-hook)
    (defun my-matlab-shell-mode-hook ()
    &apos())
    (add-hook &aposmatlab-shell-mode-hook &aposmy-matlab-shell-mode-hook)

    ;; Turn off Matlab desktop
    (setq matlab-shell-command-switches &apos("-nodesktop -nosplash"))
    截图如下,第一个窗口是matlab-shell,第二个窗口是matlab-mode:

    uuzone photo