From: bile <[email protected]>
---
erlang.el | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/erlang.el b/erlang.el
index 39450e3..57619fa 100644
--- a/erlang.el
+++ b/erlang.el
@@ -453,6 +453,13 @@ module after it has been compiled.
To activate the workaround, place the following in your `~/.emacs' file:
(setq erlang-compile-use-outdir nil)")
+(defvar erlang-compile-outdir ""
+ "*This value is concat'ed to outdir while compiling.
+
+If you have your erl files in /some/path/src and desire the beams to
+be placed in ../ebin set in your '~/.emacs' file:
+ (setq erlang-compile-outdir \"../ebin\"")
+
(defvar erlang-indent-level 4
"*Indentation of Erlang calls/clauses within blocks.")
@@ -4620,7 +4627,7 @@ There exists two workarounds for this bug:
(inferior-erlang)))
(or (inferior-erlang-running-p)
(error "Error starting inferior Erlang shell"))
- (let ((dir (file-name-directory (buffer-file-name)))
+ (let ((outdir (concat (file-name-directory (buffer-file-name))
erlang-compile-outdir))
;;; (file (file-name-nondirectory (buffer-file-name)))
(noext (substring (buffer-file-name) 0 -4))
;; Hopefully, noone else will ever use these...
@@ -4631,14 +4638,14 @@ There exists two workarounds for this bug:
(inferior-erlang-wait-prompt)
(setq end (inferior-erlang-send-command
(if erlang-compile-use-outdir
- (format "c(\"%s\", [{outdir, \"%s\"}])." noext dir)
+ (format "c(\"%s\", [{outdir, \"%s\"}])." noext outdir)
(format
(concat
"f(%s), {ok, %s} = file:get_cwd(), "
"file:set_cwd(\"%s\"), "
"%s = c(\"%s\"), file:set_cwd(%s), f(%s), %s.")
tmpvar2 tmpvar
- dir
+ outdir
tmpvar2 noext tmpvar tmpvar tmpvar2))
nil))
(inferior-erlang-wait-prompt)
--
1.6.5.6
--
You received this message because you are subscribed to the Google Groups
"erlware-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/erlware-dev?hl=en.