Function: iswitchb-chop

iswitchb-chop is a byte-compiled function defined in iswitchb.el.gz.

Signature

(iswitchb-chop LIST ELEM)

Documentation

Remove all elements before ELEM and put them at the end of LIST.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/iswitchb.el.gz
(defun iswitchb-chop (list elem)
  "Remove all elements before ELEM and put them at the end of LIST."
  (let ((ret nil)
	(next nil)
	(sofar nil))
    (while (not ret)
      (setq next (car list))
      (if (equal next elem)
	  (setq ret (append list (nreverse sofar)))
	;; else
	(progn
	  (setq list (cdr list))
	  (setq sofar (cons next sofar)))))
    ret))