emacs 安装 distel
2012-04-23 16:12 rhinovirus 阅读(859) 评论(0) 收藏 举报administrator@ubuntu:~$ cd ~/.emacs.d/plugins/distel administrator@ubuntu:~/.emacs.d/plugins/distel$ sudo make && sudo make install [sudo] password for administrator: mkdir ebin erlc -W -o ebin +debug_info src/distel.erl erlc -W -o ebin +debug_info src/distel_ie.erl erlc -W -o ebin +debug_info src/fdoc.erl src/fdoc.erl:48: Warning: regexp:parse/1: removed in R15; use the re module instead src/fdoc.erl:151: Warning: regexp:match/2: removed in R15; use the re module instead erlc -W -o ebin +debug_info src/otp_doc.erl emacs -batch -f batch-byte-compile elisp/erlext.el Loading cl-extra... In erlext-binary-to-term: erlext.el:77:9:Warning: `default-enable-multibyte-characters' is an obsolete variable (as of Emacs 23.2); use enable-multibyte-characters or set-buffer-multibyte instead In erlext-term-to-binary: erlext.el:85:9:Warning: `default-enable-multibyte-characters' is an obsolete variable (as of Emacs 23.2); use enable-multibyte-characters or set-buffer-multibyte instead Wrote /home/administrator/.emacs.d/plugins/distel/elisp/erlext.elc * Installing Emacs Lisp Library install -m 775 -d /usr/local/share/distel/elisp /usr/local/share/distel/ebin /usr/local/share/distel/src install -m 775 elisp/*.el elisp/*.elc /usr/local/share/distel/elisp * Installing Erlang Library install -m 775 ebin/*.beam /usr/local/share/distel/ebin install -m 775 src/*.erl /usr/local/share/distel/src *** Successfully installed. See README for usage instructions. administrator@ubuntu:~/.emacs.d/plugins/distel$
添加下面内容到 .emacs中
;; This is needed for Distel setup
(let ((distel-dir "/usr/local/share/distel/elisp"))
(unless (member distel-dir load-path)
;; Add distel-dir to the end of 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.0许可协议发布,欢迎转载,演绎,但是必须保留本文的署名rhinovirus(包含链接http://www.cnblogs.com/rhinovirus/),且不得用于商业目的。如您有任何疑问或者授权方面的协商,请与我联系。
浙公网安备 33010602011771号