Last active
August 29, 2015 14:14
-
-
Save rorra/d3ca58521df0adf5982d to your computer and use it in GitHub Desktop.
emacs for erlang course
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Add MELPA to package sources | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.org/packages/") t) | |
(package-initialize) | |
;; Set my email address. | |
(setq user-mail-address "[email protected]") | |
;; Set the shell emacs uses. | |
(setq explicit-shell-file-name "/bin/bash") | |
;; Use column and line numbering. | |
(line-number-mode 1) | |
(column-number-mode 1) | |
;; Display time in the minibuffer | |
(display-time) | |
;; Hide menu | |
(menu-bar-mode -1) | |
;(tool-bar-mode -1) | |
;(scroll-bar-mode -1) | |
;; | |
;; Erlang settings | |
;; | |
(defvar erlang-esense-path "~/erlang/esense") | |
(defvar erlang-distel-path "~/erlang/distel/elisp") | |
(setq erlang-root-dir "/usr/local/Cellar/erlang/17.4_1") | |
(setq exec-path (cons "/usr/local/Cellar/erlang/17.4_1/bin" exec-path)) | |
(add-to-list 'load-path erlang-esense-path) | |
(add-to-list 'load-path erlang-distel-path) | |
(add-hook 'erlang-load-hook | |
(lambda () | |
;; load distel | |
(require 'distel) | |
(distel-setup) | |
;; load esense | |
(require 'esense-start) | |
(setq esense-indexer-program | |
(concat erlang-esense-path "/esense.sh")) | |
(setq esense-completion-display-method 'frame) | |
;; when loading a beam file from emacs, add the path to erlang | |
(setq erl-reload-dwin t)) | |
; Tell Emacs not to wait the usual 60 seconds for an Erlang prompt | |
(defvar inferior-erlang-prompt-timeout t) | |
) | |
(add-hook 'erlang-mode-hook | |
(lambda () | |
;; esense | |
(esense-mode) | |
;; erlang shell node name | |
(setq inferior-erlang-machine-options '("-sname" "emacs")) | |
(imenu-add-to-menubar "imenu")) | |
) | |
(defconst distel-shell-keys | |
'( | |
("\M-?" erl-complete) | |
("\M-." erl-find-source-under-point) | |
("\M-," erl-find-source-unwind)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment