`

win7下erlang开发环境EmacsW32+Distel

阅读更多
1.下载软件
· EmacsW32 http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl下载页面 选择 Download latest EmacsW32+Emacs patched ~
· Distel http://sourceforge.net/projects/distel/下载页面
· Erlang OTP  http://www.erlang.org/download.html下载页面
2.安装
  emacs解压  Distel解压到emacs下的lib Erlang 安装最好路径不要空格
  配置:系统盘下:\\Users\你的用户名\AppData\Roaming下的.emacs,加入以下內容
  其中的路径与版本需要修改

 
;; Erlang mode
(setq load-path (cons  "C:/erl5.8.5/lib/tools-2.6.6.5/emacs" load-path))
(setq erlang-root-dir "C:/erl5.8.5")
(setq exec-path (cons "C:/erl5.8.5/bin" exec-path))
(require 'erlang-start)

 

;; Distel
(let ((distel-dir "C:/erl5.8.5/lib/distel-4.03/elisp"))
  (unless (member distel-dir load-path)
    (setq load-path (append load-path (list distel-dir)))))
(require 'distel)
(distel-setup)

 

;; Some Erlang customizations
(add-hook 'erlang-mode-hook
  (lambda ()
  ;; when starting an Erlang shell in Emacs, default in the node name
    (setq inferior-erlang-machine-options '("-sname" "emacs"))
    ;; add Erlang functions to an imenu menu
    (imenu-add-to-menubar "imenu")))
;; A number of the erlang-extended-mode key bindings are useful in the shell too
(defconst distel-shell-keys
  '(("/C-/M-i"   erl-complete)
    ("/M-?"      erl-complete) 
    ("/M-."      erl-find-source-under-point)
    ("/M-,"      erl-find-source-unwind) 
    ("/M-*"      erl-find-source-unwind) 
    )
  "Additional keys to bind when in Erlang shell.")
(add-hook 'erlang-shell-mode-hook
   (lambda ()
     ;; add some Distel bindings to the Erlang shell
     (dolist (spec distel-shell-keys)
       (define-key erlang-shell-mode-map (car spec) (cadr spec)))))


3.然后打开emacs,打开erl文件,菜单栏多了Erlang可以编译调试了
   copy程序试试
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics