Emacs 写matlab程序

                                                                           matlab-emacs-mode

Table of Contents

  • 1 下载
  • 2 安装
  • 3 配置
  • 4 matlab-shell
  • 5 Enjoy it.

1 下载

首先下载matlab-mode,一篇介绍emacs-matlab的文章,点击下载

2 安装

解压后打开INSTALL文件,根据其说明,为使其支持cedet,make 的时候需要加上后面的LOADPATH

make "LOADPATH=../cedet-VER/common ../cedet-VER/eieio ../cedet-VER/semantic/bovine/ ../cedet-VER/semantic/"

其中=../cedet-VER为你的cedet所在的位置

3 配置

之后在.emacs中加上这么几句:

;这里是我的matlab-emacs所在的路径

(add-to-list 'load-path "home/visaya.emacs.d/matlab-emacs/matlab-emacs")

(require 'matlab-load)

(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)

(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)

(global-font-lock-mode t)

;(matlab-mode-hilit)

(autoload 'tlc-mode "tlc" "tlc Editing Mode" t)

(add-to-list 'auto-mode-alist '("//.tlc$" . tlc-mode))

(setq tlc-indent-function t)

4 matlab-shell

之后打开一个.m文件就可以进入matlab-mode了

点击matlab-start matlab后出现错误,是因为你没有配置matlab

matlab-customize-customize

最后一行matlab-shell进入

把第一行改成你的matlab所在的路径,我的是/usr/local/MATLAB/R2010b/bin/matlab

save for future后exit

之后再点击start matlab后就会另启一个buffer,这是matlab shell buffer

5 Enjoy it.

Author: [email protected]

Date: 2011-02-27 11:31:30 CST

HTML generated by org-mode 6.21b in emacs 23

你可能感兴趣的:(shell,matlab,buffer,emacs,autoload,2010)