Mercurial > emacs
changeset 104803:2fb28585eb6b
Use gnus-float-time rather than time-to-seconds.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 02 Sep 2009 03:29:49 +0000 |
parents | 0b94fa0fdedb |
children | 6a1f7b318ddf |
files | lisp/gnus/ChangeLog lisp/gnus/gnus-delay.el lisp/gnus/gnus-sum.el lisp/gnus/nnspool.el |
diffstat | 4 files changed, 18 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Wed Sep 02 03:27:14 2009 +0000 +++ b/lisp/gnus/ChangeLog Wed Sep 02 03:29:49 2009 +0000 @@ -1,5 +1,13 @@ 2009-09-02 Glenn Morris <rgm@gnu.org> + * 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):
--- a/lisp/gnus/gnus-delay.el Wed Sep 02 03:27:14 2009 +0000 +++ b/lisp/gnus/gnus-delay.el Wed Sep 02 03:29:49 2009 +0000 @@ -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 <Kai.Grossjohann@CS.Uni-Dortmund.DE> ;; Keywords: mail, news, extensions @@ -101,10 +102,10 @@ (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 @@ (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)))
--- a/lisp/gnus/gnus-sum.el Wed Sep 02 03:27:14 2009 +0000 +++ b/lisp/gnus/gnus-sum.el Wed Sep 02 03:29:49 2009 +0000 @@ -5002,7 +5002,7 @@ (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
--- a/lisp/gnus/nnspool.el Wed Sep 02 03:27:14 2009 +0000 +++ b/lisp/gnus/nnspool.el Wed Sep 02 03:29:49 2009 +0000 @@ -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 <umerin@flab.flab.fujitsu.junet> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -288,7 +289,8 @@ (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]+ ")