defining functions in startup file

Garry Hodgson <>
Wed Nov 14 20:42:55 CET 2001


i'd like to define some simple functions to use while working in
the erlang interpreter, like one to edit a module, given its name, 
and things like that.

at the prompt, i can manually type something like:

    E = fun( Module ) ->
              os:cmd( "fred " ++ atom_to_list( Module ) ++ ".erl" )
        end.

and then use:

    E( foo ).

to edit "foo.erl".  a small convenience.
but if i put the above in my .erlang file, i can't use it once
erlang's started.  how do i make this work, or is there a better
mechanism for customizing my environment?

thanks

-- 
Garry Hodgson                   One way or another
Senior Hacker                   One way or another
Software Innovation Services    One way or another
AT&T Labs                       This darkness got to give...




More information about the erlang-questions mailing list