http://bugs.gentoo.org/259695 --- distel-4.03-orig/elisp/erl-service.el 2008-06-25 19:05:09.000000000 +0200 +++ distel-4.03/elisp/erl-service.el 2009-02-20 19:01:31.000000000 +0100 @@ -172,15 +172,18 @@ (&erl-load-backend node)) (_ t)))))) +(defvar distel-ebin-directory + (let ((elisp-directory + (file-name-directory (or (locate-library "distel") load-file-name)))) + (concat elisp-directory "../ebin")) + "Directory where beam files are located.") + (defun &erl-load-backend (node) - (let* ((elisp-directory - (file-name-directory (or (locate-library "distel") load-file-name))) - (ebin-directory (concat elisp-directory "../ebin")) - (modules '())) - (dolist (file (directory-files ebin-directory)) + (let ((modules '())) + (dolist (file (directory-files distel-ebin-directory)) (when (string-match "^\\(.*\\)\\.beam$" file) (let ((module (intern (match-string 1 file))) - (filename (concat ebin-directory "/" file))) + (filename (concat distel-ebin-directory "/" file))) (push (list module filename) modules)))) (if (null modules) (erl-warn-backend-problem "don't have beam files")