EditorWindow positioning

Is there any way to set the docked state of an editor window via script?

My custom window saves its dock state and position after I place it where I want, most of the time, but I’ve not been able to find anything that gives any measure of control over those dock settings.

I would like the window to dock as the default rather than having to be docked manually by the user first.

Not that I recall, you can only un-dock a window.

-Jeremy