Pushing this idea a little further, the only information that erlmacs uses that isn't available elsewhere is the value of ErlRoot. You could write a two-line script that simply emits erlroot on stdout (or fails), and invoke that from .emacs to configure your emacs environment appropriately. As a bonus, that erlroot script would probably be useful in other situations, too.