Function: ido-chop
ido-chop is a byte-compiled function defined in ido.el.gz.
Signature
(ido-chop ITEMS ELEM)
Documentation
Remove all elements before ELEM and put them at the end of ITEMS.
Source Code
;; Defined in /usr/src/emacs/lisp/ido.el.gz
(defun ido-chop (items elem)
"Remove all elements before ELEM and put them at the end of ITEMS."
(let ((ret nil)
(next nil)
(sofar nil))
(while (not ret)
(setq next (car items))
(if (equal next elem)
(setq ret (append items (nreverse sofar)))
;; else
(progn
(setq items (cdr items))
(setq sofar (cons next sofar)))))
ret))