Rotate the kill ring, then yank back the new top.

        Returns
        -------
        A text string or None.
764890
def rotate(self):
        
        self._index -= 1
        if self._index >= 0:
            return self._ring[self._index]
        return None
318075
def kill_word(event):
    
    buff = event.current_buffer
    pos = buff.document.find_next_word_ending(count=event.arg)

    if pos:
        deleted = buff.delete(count=pos)
        event.cli.clipboard.set_text(deleted)
97657
def revert(self, strip=0, root=None):
    
    reverted = copy.deepcopy(self)
    reverted._reverse()
    return reverted.apply(strip, root)
272669
def rotate(self, n=1):
        
        # No work to do for a 0-step rotate
        if n == 0:
            return

        def rotate_trans(pipe):
            # Synchronize the cache before rotating
            if self.writeback:
                self._sync_helper(pipe)

            # Rotating len(self) times has no effect.
            len_self = self.__len__(pipe)
            steps = abs_n % len_self

            # When n is positive we can use the built-in Redis command
            if forward:
                pipe.multi()
                for __ in range(steps):
                    pipe.rpoplpush(self.key, self.key)
            # When n is negative we must use Python
            else:
                for __ in range(steps):
                    pickled_value = pipe.lpop(self.key)
                    pipe.rpush(self.key, pickled_value)

        forward = n >= 0
        abs_n = abs(n)
        self._transaction(rotate_trans)
709175
def circularize(self):
        '''

        '''
        if self.top[-1].seq == '-' and self.bottom[0].seq == '-':
            raise ValueError('Cannot circularize - termini disconnected.')
        if self.bottom[-1].seq == '-' and self.top[0].seq == '-':
            raise ValueError('Cannot circularize - termini disconnected.')

        copy = self.copy()
        copy.circular = True
        copy.top.circular = True
        copy.bottom.circular = True
        return copy
162631
def remove(self, position):
        
        if position <= 0:  # at beginning
            return self.remove_first()

        if position >= self.length() - 1:  # at end
            return self.remove_last()

        counter = 0
        last_node = self.head
        current_node = self.head

        while current_node is not None and counter <= position:
            if counter == position:
                last_node.next_node = current_node.next_node  # remove current
                return True

            last_node = current_node
            current_node = current_node.next_node
            counter += 1

        return False
129424
def OnTextRotation0(self, event):
        """"""

        with undo.group(_("Rotation 0°")):
            self.grid.actions.set_attr("angle", 0)

        self.grid.ForceRefresh()

        self.grid.update_attribute_toolbar()
337463
def backspace(self):
        
        if self._cx + self._cw >= 0:
            self.erase()
            self._cx -= self._cw

        self.flush()
6986
def _reset_internal_state(self):
        
        self.rotation = np.array([[-1., 0., 0.], [0., 1., 0.], [0., 0., -1.]])
        self.pos = np.zeros(3)  # (x, y, z)
        self.last_pos = np.zeros(3)
        self.grasp = False
195281
def move_back_boxed_texts(self):
        
        body = self.main.getroot().find('body')
        back = self.article.root.find('back')
        if back is None:
            return
        boxed_texts = back.xpath('.//boxed-text')
        for boxed_text in boxed_texts:
            body.append(deepcopy(boxed_text))
855057
def _kill_word(text, pos):
    
    text, end_pos = _forward_word(text, pos)
    return text[:pos] + text[end_pos:], pos
1131269
def transform(root, opts={})
      new_copy = opts[:in_place] ? root : clone_sexp(root)
      scope_stack = ScopeStack.new
      transform_tree(new_copy, scope_stack)
      new_copy
    end
1219431
def set_text(self, text):
        ''''''
        if text in [None, ""]:
            return self.jsonrpc.clearTextField(self.selector)  # TODO no return
        else:
            return self.jsonrpc.setText(self.selector, text)
568549
def _resetSelection(self, moveToTop=False):
        
        ancor, pos = self._qpart.selectedPosition
        dst = min(ancor, pos) if moveToTop else pos
        self._qpart.cursorPosition = dst
612943
def commit(self):
        

        tc = self.qteWidget.textCursor()

        # If this is the first ever call to this undo/redo element then
        # backup the current cursor position and the selected text (may be
        # none). This information will be required for the redo operation
        # to position the cursor (and selected text) where it was at the
        # very first call.
        if self.cursorPos0 is None:
            self.cursorPos0 = tc.position()
            self.selText = tc.selection().toHtml()
            self.selStart = tc.selectionStart()
            self.selEnd = tc.selectionEnd()
        else:
            tc.setPosition(self.cursorPos0, QtGui.QTextCursor.MoveAnchor)

        # Remove the originally selected text (may be none).
        tc.setPosition(self.selStart, QtGui.QTextCursor.MoveAnchor)
        tc.setPosition(self.selEnd, QtGui.QTextCursor.KeepAnchor)
        tc.removeSelectedText()

        # Move to the start of the (just deleted) text block and insert
        # the characters there.
        if len(self.selText) > 0:
            pos = self.selStart
        else:
            pos = tc.position()
        tc.setPosition(pos)

        # Backup the cursor position before the insertion operation,
        # insert the new character(s), move the cursor forward, and
        # backup the new cursor position as well.
        self.cursorPos1 = tc.position()
        tc.insertText(self.text)
        self.cursorPos2 = tc.position()

        self.qteWidget.setTextCursor(tc)
781293
def rotate(prefixes, hosts, **kwargs):
    

    rotator = Rotator(pyes.ES(hosts), **kwargs)

    for prefix in prefixes:
        rotator.rotate(prefix)
530448
def pop(self):
        
        result = self.redis.spop(self.key)
        if result is None:
            raise KeyError

        return self._unpickle(result)