Function: gnus-sorted-nintersection
gnus-sorted-nintersection is an autoloaded and byte-compiled function
defined in gnus-range.el.gz.
Signature
(gnus-sorted-nintersection LIST1 LIST2)
Documentation
Return intersection of LIST1 and LIST2 by modifying cdr pointers of LIST1.
LIST1 and LIST2 have to be sorted over <.
Aliases
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-range.el.gz
;;;###autoload
(defun gnus-sorted-nintersection (list1 list2)
"Return intersection of LIST1 and LIST2 by modifying cdr pointers of LIST1.
LIST1 and LIST2 have to be sorted over <."
(let* ((top (cons nil list1))
(prev top))
(while (and list1 list2)
(cond ((= (car list1) (car list2))
(setq prev list1
list1 (cdr list1)
list2 (cdr list2)))
((< (car list1) (car list2))
(setcdr prev (cdr list1))
(setq list1 (cdr list1)))
(t
(setq list2 (cdr list2)))))
(setcdr prev nil)
(cdr top)))