Make toggling script call macros restore previous editor setting

Using variables, the user-specific `$editor` setting can be restored in the macros.