Generalized dot file editing into a function.