[erlang-questions] emacs compilation command

Roberto Saccon rsaccon@REDACTED
Wed Aug 8 23:11:30 CEST 2007


there was a lengthy thread a few weeks ago about custom emacs commands
to compile erlang (and what was recommended there worked well for me)

But what I would like to try next, is to hack the the erlang.el, so
that the outdir can be set to ../ebin instead of current directory (or
maybe even the possibility of setting the compiling options in the
~.emacs file.

Unfortunately I am not proficient enough in elisp, is there anybody
who has more elisp experience  and can point me into the right
direction ? I see below at the relevant code-snippet of the function
inferior-erlang-compile, that the current directory is retrieved with
file:get_cwd(), but how can I go from there in elisp to ../ebin ?

	       (if erlang-compile-use-outdir
		   (if current-prefix-arg
		       (format "c(\"%s\", [{outdir, \"%s\"}, debug_info,
export_all])." noext dir)
		     (format "c(\"%s\", [{outdir, \"%s\"}])." noext dir))
		 (format
		  (concat
		   "f(%s), {ok, %s} = file:get_cwd(), "
		   "file:set_cwd(\"%s\"), "
		   (if current-prefix-arg
		       "%s = c(\"%s\", [debug_info, export_all]), file:set_cwd(%s),
f(%s), %s."
		     "%s = c(\"%s\"), file:set_cwd(%s), f(%s), %s."))
		  tmpvar2 tmpvar
		  dir
		  tmpvar2 noext tmpvar tmpvar tmpvar2))
	       nil))



-- 
Roberto Saccon - http://rsaccon.com



More information about the erlang-questions mailing list