@register(u'yank-pop')
def yank_pop(event):
 buff = event.current_buffer
 doc_before_paste = buff.document_before_paste
 clipboard = event.cli.clipboard
 if (doc_before_paste is not None):
  buff.document = doc_before_paste
  clipboard.rotate()
  buff.paste_clipboard_data(clipboard.get_data(), paste_mode=PasteMode.EMACS)

@ register ( u'yank-pop' ) def yank_pop ( event ) : buff = event . current_buffer doc_before_paste = buff . document_before_paste clipboard = event . cli . clipboard if ( doc_before_paste is not None ) : buff . document = doc_before_paste clipboard . rotate ( ) buff . paste_clipboard_data ( clipboard . get_data ( ) , paste_mode = PasteMode . EMACS )
rotate the kill ring .