/[emacs]/emacs/lisp/gnus/gnus-range.el
ViewVC logotype

Diff of /emacs/lisp/gnus/gnus-range.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by gerd, Tue Sep 19 13:37:08 2000 UTC revision 1.5.18.1 by miles, Fri Apr 4 06:20:20 2003 UTC
# Line 343  modified." Line 343  modified."
343          range item selector)          range item selector)
344      (while (or item1 item2)      (while (or item1 item2)
345        (setq selector        (setq selector
346              (cond              (cond
347               ((null item1) nil)               ((null item1) nil)
348               ((null item2) t)               ((null item2) t)
349               ((and (numberp item1) (numberp item2)) (< item1 item2))               ((and (numberp item1) (numberp item2)) (< item1 item2))
# Line 353  modified." Line 353  modified."
353        (setq item        (setq item
354              (or              (or
355               (let ((tmp1 item) (tmp2 (if selector item1 item2)))               (let ((tmp1 item) (tmp2 (if selector item1 item2)))
356                 (cond                 (cond
357                  ((null tmp1) tmp2)                  ((null tmp1) tmp2)
358                  ((null tmp2) tmp1)                  ((null tmp2) tmp1)
359                  ((and (numberp tmp1) (numberp tmp2))                  ((and (numberp tmp1) (numberp tmp2))
360                   (cond                   (cond
361                    ((eq tmp1 tmp2) tmp1)                    ((eq tmp1 tmp2) tmp1)
362                    ((eq (1+ tmp1) tmp2) (cons tmp1 tmp2))                    ((eq (1+ tmp1) tmp2) (cons tmp1 tmp2))
363                    ((eq (1+ tmp2) tmp1) (cons tmp2 tmp1))                    ((eq (1+ tmp2) tmp1) (cons tmp2 tmp1))
364                    (t nil)))                    (t nil)))
365                  ((numberp tmp1)                  ((numberp tmp1)
366                   (cond                   (cond
367                    ((and (>= tmp1 (car tmp2)) (<= tmp1 (cdr tmp2))) tmp2)                    ((and (>= tmp1 (car tmp2)) (<= tmp1 (cdr tmp2))) tmp2)
368                    ((eq (1+ tmp1) (car tmp2)) (cons tmp1 (cdr tmp2)))                    ((eq (1+ tmp1) (car tmp2)) (cons tmp1 (cdr tmp2)))
369                    ((eq (1- tmp1) (cdr tmp2)) (cons (car tmp2) tmp1))                    ((eq (1- tmp1) (cdr tmp2)) (cons (car tmp2) tmp1))
370                    (t nil)))                    (t nil)))
371                  ((numberp tmp2)                  ((numberp tmp2)
372                   (cond                   (cond
373                    ((and (>= tmp2 (car tmp1)) (<= tmp2 (cdr tmp1))) tmp1)                    ((and (>= tmp2 (car tmp1)) (<= tmp2 (cdr tmp1))) tmp1)
374                    ((eq (1+ tmp2) (car tmp1)) (cons tmp2 (cdr tmp1)))                    ((eq (1+ tmp2) (car tmp1)) (cons tmp2 (cdr tmp1)))
375                    ((eq (1- tmp2) (cdr tmp1)) (cons (car tmp1) tmp2))                    ((eq (1- tmp2) (cdr tmp1)) (cons (car tmp1) tmp2))
376                    (t nil)))                    (t nil)))
377                  ((< (1+ (cdr tmp1)) (car tmp2)) nil)                  ((< (1+ (cdr tmp1)) (car tmp2)) nil)
378                  ((< (1+ (cdr tmp2)) (car tmp1)) nil)                  ((< (1+ (cdr tmp2)) (car tmp1)) nil)
379                  (t (cons (min (car tmp1) (car tmp2))                  (t (cons (min (car tmp1) (car tmp2))
380                           (max (cdr tmp1) (cdr tmp2))))))                           (max (cdr tmp1) (cdr tmp2))))))
381               (progn               (progn
382                 (if item (push item range))                 (if item (push item range))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.18.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26