Skip to content

Commit

Permalink
added (modified) patch from gentoo-people:
Browse files Browse the repository at this point in the history
  use distel-ebin-directory as path to find distel *.beam files
  value of which defaults to old, hardcoded, path.

  http://bugs.gentoo.org/259695


git-svn-id: https://distel.googlecode.com/svn/trunk@89 d5f8e727-742a-0410-b67d-dd739a6cc792
  • Loading branch information
massemanet committed Feb 21, 2009
1 parent 0bdfd90 commit 0009d8b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions elisp/erl-service.el
Expand Up @@ -172,15 +172,18 @@ If not then try to send the module over as a binary and load it in."
(&erl-load-backend node))
(_ t))))))

(defvar distel-ebin-directory
(file-truename
(concat (file-name-directory
(or (locate-library "distel") load-file-name)) "../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")
Expand Down Expand Up @@ -846,6 +849,8 @@ prompts for an mfa."
(erl-receive ()
((['rex nil]
(message "No doc found."))
(['rex 'no_html]
(message "no html docs installed"))
(['rex ['mfas string]]
(message "candidates: %s" string))
(['rex ['sig string]]
Expand Down

0 comments on commit 0009d8b

Please sign in to comment.