Function: ring-next
ring-next is a byte-compiled function defined in ring.el.gz.
Signature
(ring-next RING ITEM)
Documentation
Return the next item in the RING, after ITEM.
Raise error if ITEM is not in the RING.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/ring.el.gz
(defun ring-next (ring item)
"Return the next item in the RING, after ITEM.
Raise error if ITEM is not in the RING."
(let ((curr-index (ring-member ring item)))
(unless curr-index (error "Item is not in the ring: `%s'" item))
(ring-ref ring (ring-plus1 curr-index (ring-length ring)))))