博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

工作小结:Emacs的Flex开发环境搭建

Posted on 2010-10-15 16:51  cshao  阅读(730)  评论(0编辑  收藏  举报

在公司里写的用来共享的小笔记,就用英文了。

 

The mode info and download link can be found in www.emacswiki.com.

 

1. Install cc-mode

Make a directory named cc-mode under your /site-lisp directory of emacs.

Download cc-mode compress package and uncompress it.

Compile all the .el files according to its README document.

Move all the .elc files to the /site-lisp/cc-mode directory.

 

2. Install actionscript-mode

Download actionscript-mode.el and move it to the /site-lisp directory of emacs

 

3.Modifiy your ~/.emacs file and add the following content, note the site-lisp dir path may be different on your machine:

(add-to-list 'load-path "/usr/share/emacs23/site-lisp/cc-mode")

(when (require 'actionscript-mode nil t)

 (setq auto-mode-alist

        (cons '("\.as" . actionscript-mode) auto-mode-alist)))

 

Open an .as file and you can see the syntax highlight now.

 

For .mxml file, it uses nxml-mode by default (I'm using emacs 23.1.1), you can switch to actionscript mode by typing "M-x actionscript-mode RET" to read AS code, and switch back by typing "M-x nxml-mode RET" to read xml code. Currently there is no flex-mode.el available and I don't like the multi-major-mode idea.