<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_bookmark(self, slot_num):

 """Bookmark current position to given slot."""

        if self.data:
            editor = self.get_current_editor()
            editor.add_bookmark(slot_num)