1

It is my .emacs file:

(setq load-path (cons  "/usr/local/Cellar/erlang/R16B02/lib/erlang/lib/tools-2.6.12/emacs"
      load-path))
      (setq erlang-root-dir "/usr/local/Cellar/erlang/R16B")
      (setq exec-path (cons "/usr/local/Cellar/erlang/R16B/bin" exec-path))
      (require 'erlang-start)

As you can see the erlang paths are not very consistent.

I want to define a variable to capture the path /usr/local/Cellar/erlang/R16B02 so I can set the path in one place and use the variable to construct the relevant erlang paths.

What is the syntax for doing that? I think I will need to know how to declare the variable as well as the concatenation of the variable and path suffix.

1 Answer 1

2

(setq erpath "/usr/path/to/erlang")

and then use it like this

(setq erlang-root-dir (format "%s/%s" erpath "R16B"))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .