;; ==== ERLANG SETUP ====
(defun erlang-setup ()
(if (and (file-exists-p "/usr/lib64/")
(file-exists-p "/usr/lib64/erlang"))
(setq erlang-basefolder "/usr/lib64/erlang")
(if (and (file-exists-p "/usr/lib/")
(file-exists-p "/usr/lib/erlang"))
(setq erlang-basefolder "/usr/lib/erlang")))
(if erlang-basefolder
(progn
(let ((lib-folder (concat erlang-basefolder "/lib")))
(dolist (fldr (directory-files lib-folder))
(if (and
(> (length fldr) 6)
(string= (substring fldr 0 6) "tools-"))
(setq erlang-tools-dir (concat lib-folder (concat "/" fldr)))))
(setq load-path (cons (concat erlang-tools-dir "/emacs") load-path))
(setq erlang-root-dir erlang-basefolder)
(setq exec-path (cons (concat erlang-basefolder "/bin") exec-path))
(require 'erlang-start)
(add-hook 'erlang-mode-hook 'highlight-parentheses-mode)))))
(erlang-setup)
Emacs Lisp is kind of nice, I enjoyed writing this. :-)