2009-02-01 Stefan Monnier <monnier@iro.umontreal.ca>
+ * mail/rmailsort.el (rmail-sort-messages): Use car-less-than-car
+ if possible.
+
* mail/rmailedit.el (rmail-edit-map): Move init into declaration.
(rmail-edit-mode, rmail-cease-edit): Use with-current-buffer.
(let ((return-to-point
(if (rmail-buffers-swapped-p)
(point)))
- (predicate nil) ;< or string-lessp
(sort-lists nil))
(rmail-swap-buffers-maybe)
(message "Finding sort keys...")
(message "Finding sort keys...%d" msgnum))
(setq msgnum (1+ msgnum))))
(or reverse (setq sort-lists (nreverse sort-lists)))
- ;; Decide predicate: < or string-lessp
- (if (numberp (car (car sort-lists))) ;Is a key numeric?
- (setq predicate (function <))
- (setq predicate (function string-lessp)))
(setq sort-lists
(sort sort-lists
- (function
- (lambda (a b)
- (funcall predicate (car a) (car b))))))
+ ;; Decide predicate: < or string-lessp
+ (if (numberp (car (car sort-lists))) ;Is a key numeric?
+ 'car-less-than-car
+ (function
+ (lambda (a b)
+ (string-lessp (car a) (car b)))))))
(if reverse (setq sort-lists (nreverse sort-lists)))
;; Now we enter critical region. So, keyboard quit is disabled.
(message "Reordering messages...")