Skip to content

Instantly share code, notes, and snippets.

Created October 8, 2014 20:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
;; erlang-mode and customizations
(add-to-list 'load-path "/Users/sean/erlang/R16B02/lib/erlang/lib/tools-2.6.12/emacs")
(add-to-list 'exec-path "/Users/sean/erlang/R16B02/bin")
(setq erlang-root-dir "/Users/sean/erlang/R16B02/lib/erlang")
(require 'erlang-start)
(require 'erlang-flymake)
(setq erlang-flymake-command "/Users/sean/erlang/R16B02/bin/erlc")
;; Add files to erlang-mode
(add-to-list 'auto-mode-alist '("\\.erl$" . erlang-mode)) ;; default .erl
(add-to-list 'auto-mode-alist '("\\.hrl$" . erlang-mode))
(add-to-list 'auto-mode-alist '("rebar.config" . erlang-mode)) ;; rebar
(add-to-list 'auto-mode-alist '("rebar.config.script" . erlang-mode)) ;; rebar
(add-to-list 'auto-mode-alist '("app.config" . erlang-mode)) ;; embedded node/riak
(add-to-list 'auto-mode-alist '(".riak_test.config" . erlang-mode))
(add-to-list 'auto-mode-alist '(".*\\.app\\.src" . erlang-mode))
;; EQC Emacs Mode -- Configuration Start
(add-to-list 'load-path "/Users/sean/erlang/R16B02-basho3/lib/erlang/lib/eqc-1.30.4/emacs/")
(autoload 'eqc-erlang-mode-hook "eqc-ext" "EQC Mode" t)
(add-hook 'erlang-mode-hook 'eqc-erlang-mode-hook)
(setq eqc-max-menu-length 30)
(setq eqc-root-dir "/Users/sean/erlang/R16B02-basho3/lib/erlang/lib/eqc-1.30.4")
;; EQC Emacs Mode -- Configuration End
;; We never want to edit Erlang .beam files
(add-to-list 'completion-ignored-extensions ".beam")
;; Wrangler for Erlang
(add-to-list 'load-path "/Users/sean/dev/wrangler/elisp")
(require 'wrangler)
(defun erlang-insert-binary ()
"Inserts a binary string into an Erlang buffer and places the
point between the quotes."
(insert "<<\"\">>")
(backward-char 3)
(eval-after-load "erlang" '(define-key erlang-mode-map (kbd "C-c b") 'erlang-insert-binary))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment