Just read about (interactive "@") and tried it.

But it's different from my def-with-selected-window macro.