(setq list1-only (cons (car clist1) list1-only))
(setq clist1 (cdr clist1))))
((< (car clist1) (car clist2))
- (while (not (eq (car clist1) (car clist2)))
+ (while (and clist1 (< (car clist1) (car clist2)))
(setq list1-only (cons (car clist1) list1-only))
- (setq clist1 (cdr clist1)))
- (setq clist1 (cdr clist1)
- clist2 (cdr clist2)))
+ (setq clist1 (cdr clist1))))
((< (car clist2) (car clist1))
- (while (not (eq (car clist1) (car clist2)))
+ (while (and clist2 (< (car clist2) (car clist1)))
(setq list2-only (cons (car clist2) list2-only))
- (setq clist2 (cdr clist2)))
- (setq clist1 (cdr clist1)
- clist2 (cdr clist2)))
+ (setq clist2 (cdr clist2))))
((= (car clist1) (car clist2))
(setq clist1 (cdr clist1)
clist2 (cdr clist2)))))