~ubuntu-branches/ubuntu/oneiric/vm/oneiric

« back to all changes in this revision

Viewing changes to lisp/vm-sort.el

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2010-03-28 08:03:45 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100328080345-3hzv1o8df9vpmyym
Tags: 8.1.0-1
* New upstream version
* [20fe869]: Merge branch 'upstream' into topic--debian
* Bug fix: "sc-cite-original citation hook fails for mime encoded
  messages", thanks to Klaus Reichl              (Closes: #550859).
* Bug fix: "8bit characters are not escapes in In-reply-to field",
  thanks to Neil Brown                           (Closes: #434565).
* Bug fix: "vm-mime-encode-headers may mess up recipient addresses",
  thanks to Francois Fleuret                     (Closes: #553402).

Show diffs side-by-side

added added

removed removed

Lines of Context:
498
498
(defun vm-sort-compare-thread (m1 m2)
499
499
  (let ((list1 (vm-th-thread-list m1))
500
500
        (list2 (vm-th-thread-list m2))
 
501
        (criterion (if vm-sort-threads-by-youngest-date 
 
502
                       'youngest-date
 
503
                     'oldest-date))
501
504
        p1 p2 d1 d2)
502
505
    (catch 'done
503
506
      (if (not (eq (car list1) (car list2)))
504
 
          (let ((date1 (get (car list1) 'youngest-date))
505
 
                (date2 (get (car list2) 'youngest-date)))
 
507
          (let ((date1 (get (car list1) criterion))
 
508
                (date2 (get (car list2) criterion)))
506
509
            (cond ((string-lessp date1 date2) t)
507
510
                  ((string-equal date1 date2)
508
511
                   (string-lessp (car list1) (car list2)))
519
522
                       ((string-lessp p1 p2)
520
523
                        (throw 'done t))
521
524
                       (t
522
 
                        (throw 'done t)))))
 
525
                        (throw 'done nil)))))
523
526
          (setq list1 (cdr list1)
524
527
                list2 (cdr list2)))
525
528
        (cond ((and list1 (not list2)) nil)