[erlang-questions] erlang emacsmode problem

Dominic Williams <>
Thu Jun 26 09:54:41 CEST 2008


Hi,

> Double check your paths. Make sure they actually exist as written. If
> you've been getting this error since the upgrade to R12B-3 the cause
> of the error should be obvious.

And if that was your problem, you could use some more flexible emacs-lisp
such as this (no hard-coded tools-x.y.z version):

(if
    (not (boundp 'erlang-root-dir))
    (message "Skipping erlang-mode: erlang-root-dir not defined")
  (progn
    (set 'erlang-bin (concat erlang-root-dir "/bin/"))
    (set 'erlang-lib (concat erlang-root-dir "/lib/"))
    (if
	(not (boundp 'erlang-mode-path))
	(set 'erlang-mode-path
	     (concat
	      erlang-lib
	      (file-name-completion "tools-" erlang-lib)
	      "emacs/erlang.el")))
    (if
	(and
	 (file-readable-p erlang-mode-path)
	 (file-readable-p erlang-bin))
	(progn
	  (message "Setting up erlang-mode")
	  (set 'exec-path (cons erlang-bin exec-path))
	  (set 'load-path (cons
			   (concat
			    erlang-lib
			    (file-name-completion "tools-" erlang-lib)
			    "emacs")
			   load-path))
	  (set 'load-path (cons (file-name-directory erlang-mode-path) load-path))
	  (require 'erlang-start))
      (message "Skipping erlang-mode: %s and/or %s not readable"
erlang-bin erlang-mode-path))))

Regards,

Dominic Williams
http://dominicwilliams.net




More information about the erlang-questions mailing list