Actually, all you have to do is open "Text/Remove Trailing Spaces" in the bundle editor, set its "save:" option to "current file", and assign it the key equivalent F3 by clicking on the text field next to "key equivalent" and pressing F3.
this way you save the contents of the file BEFORE triggering the command. you need to create the empty command and then enqueue "remove trailing spaces" and said empty command in a macro.