Skip to content

Instantly share code, notes, and snippets.

@stesla
Created October 23, 2008 20:10
Show Gist options
  • Select an option

  • Save stesla/19187 to your computer and use it in GitHub Desktop.

Select an option

Save stesla/19187 to your computer and use it in GitHub Desktop.
;;;
;;; This part is in ~/.emacs.local
;;;
;;; You can load it in your .emacs with this:
;;; (load "~/.emacs.local" t)
;; Erlang
(add-to-list 'load-path "/usr/local/lib/erlang/lib/tools-2.6.1/emacs")
(setq erlang-root-dir "/usr/local/lib/erlang")
;; Distel
(add-to-list 'load-path "/Users/samuel/Projects/distel/elisp")
(when (require-no-error 'distel)
(distel-setup))
;;;
;;; This is in .emacs
;;;
(defun require-no-error (package)
"This is Ted O'Connor's non-erroring version of (require PACKAGE)."
(condition-case nil (require package) (error nil)))
;;; erlang-mode
(when (and (require-no-error 'erlang-start)
(require-no-error 'erlang))
(setq erlang-indent-level 2)
(let* ((mnesia-dir (concat (expand-file-name "~/.emacs.d/") "mnesia"))
(quoted-mnesia-dir (concat "\"" mnesia-dir "\""))
(options (list "-sname" "emacs" "-mnesia" "dir" quoted-mnesia-dir)))
(setq inferior-erlang-machine-options options)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment