From: Glenn Morris Date: Wed, 2 Sep 2009 03:29:49 +0000 (+0000) Subject: Use gnus-float-time rather than time-to-seconds. X-Git-Tag: emacs-pretest-23.1.90~1516 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9693d3c4a3f735395912387902debd22eb10e4b9;p=emacs.git Use gnus-float-time rather than time-to-seconds. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 08f9fa2f195..c69d4d8acb8 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,13 @@ 2009-09-02 Glenn Morris + * gnus-util.el (gnus-float-time): New function. + * gnus-delay.el (gnus-delay-article): + * gnus-sum.el (gnus-thread-latest-date): + * gnus-util.el (gnus-user-date): Use gnus-float-time. + * nnspool.el (nnspool-request-newgroups): + Use gnus-float-time rather than time-to-seconds. + * ecomplete.el (ecomplete-add-item): In Emacs, use float-time. + * gnus-art.el (gnus-signature-face, gnus-header-from-face) (gnus-header-subject-face, gnus-header-newsgroups-face) (gnus-header-name-face, gnus-header-content-face): diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el index 14480315f31..bd781f9df30 100644 --- a/lisp/gnus/gnus-delay.el +++ b/lisp/gnus/gnus-delay.el @@ -1,6 +1,7 @@ ;;; gnus-delay.el --- Delayed posting of articles -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +;; Free Software Foundation, Inc. ;; Author: Kai Großjohann ;; Keywords: mail, news, extensions @@ -101,10 +102,10 @@ DELAY is a string, giving the length of the time. Possible values are: (aset deadline 1 minute) (aset deadline 2 hour) ;; Convert to seconds. - (setq deadline (time-to-seconds (apply 'encode-time + (setq deadline (gnus-float-time (apply 'encode-time (append deadline nil)))) ;; If this time has passed already, add a day. - (when (< deadline (time-to-seconds (current-time))) + (when (< deadline (gnus-float-time (current-time))) (setq deadline (+ 3600 deadline))) ;3600 secs/day ;; Convert seconds to date header. (setq deadline (message-make-date @@ -127,7 +128,7 @@ DELAY is a string, giving the length of the time. Possible values are: (t (setq delay (* num 60)))) (setq deadline (message-make-date - (seconds-to-time (+ (time-to-seconds (current-time)) + (seconds-to-time (+ (gnus-float-time (current-time)) delay))))) (t (error "Malformed delay `%s'" delay))) (message-add-header (format "%s: %s" gnus-delay-header deadline))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 7f460ac70d6..b1fa5254bdc 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5002,7 +5002,7 @@ Unscored articles will be counted as having a score of zero." (lambda (header) (setq previous-time (condition-case () - (time-to-seconds (mail-header-parse-date + (gnus-float-time (mail-header-parse-date (mail-header-date header))) (error previous-time)))) (sort diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 38dfd60c942..6f8330f2080 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el @@ -1,7 +1,8 @@ ;;; nnspool.el --- spool access for GNU Emacs ;; Copyright (C) 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA ;; Lars Magne Ingebrigtsen @@ -288,7 +289,8 @@ there.") (while (and (not (looking-at "\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] ")) (zerop (forward-line -1)))) - (let ((seconds (time-to-seconds (date-to-time date))) + ;; We require nnheader which requires gnus-util. + (let ((seconds (gnus-float-time (date-to-time date))) groups) ;; Go through lines and add the latest groups to a list. (while (and (looking-at "\\([^ ]+\\) +[0-9]+ ")