rebuilt so files emanating from events get passed along to routines rather than asking for current editor.
make it compile in 12
no error during file close
Merge pull request #95 from parrt/dont-rely-on-current-file

Dont rely on current file