aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-09-02 03:29:49 +0000
committerGlenn Morris2009-09-02 03:29:49 +0000
commit9693d3c4a3f735395912387902debd22eb10e4b9 (patch)
treedd38d103339108348a39862d3381cae58b807526
parentfeefd9f3ddfd06ecadec89580aab9c247c9cfe3d (diff)
downloademacs-9693d3c4a3f735395912387902debd22eb10e4b9.tar.gz
emacs-9693d3c4a3f735395912387902debd22eb10e4b9.zip
Use gnus-float-time rather than time-to-seconds.
-rw-r--r--lisp/gnus/ChangeLog8
-rw-r--r--lisp/gnus/gnus-delay.el9
-rw-r--r--lisp/gnus/gnus-sum.el2
-rw-r--r--lisp/gnus/nnspool.el6
4 files changed, 18 insertions, 7 deletions
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 @@
12009-09-02 Glenn Morris <rgm@gnu.org> 12009-09-02 Glenn Morris <rgm@gnu.org>
2 2
3 * gnus-util.el (gnus-float-time): New function.
4 * gnus-delay.el (gnus-delay-article):
5 * gnus-sum.el (gnus-thread-latest-date):
6 * gnus-util.el (gnus-user-date): Use gnus-float-time.
7 * nnspool.el (nnspool-request-newgroups):
8 Use gnus-float-time rather than time-to-seconds.
9 * ecomplete.el (ecomplete-add-item): In Emacs, use float-time.
10
3 * gnus-art.el (gnus-signature-face, gnus-header-from-face) 11 * gnus-art.el (gnus-signature-face, gnus-header-from-face)
4 (gnus-header-subject-face, gnus-header-newsgroups-face) 12 (gnus-header-subject-face, gnus-header-newsgroups-face)
5 (gnus-header-name-face, gnus-header-content-face): 13 (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 @@
1;;; gnus-delay.el --- Delayed posting of articles 1;;; gnus-delay.el --- Delayed posting of articles
2 2
3;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4;; Free Software Foundation, Inc.
4 5
5;; Author: Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> 6;; Author: Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
6;; Keywords: mail, news, extensions 7;; Keywords: mail, news, extensions
@@ -101,10 +102,10 @@ DELAY is a string, giving the length of the time. Possible values are:
101 (aset deadline 1 minute) 102 (aset deadline 1 minute)
102 (aset deadline 2 hour) 103 (aset deadline 2 hour)
103 ;; Convert to seconds. 104 ;; Convert to seconds.
104 (setq deadline (time-to-seconds (apply 'encode-time 105 (setq deadline (gnus-float-time (apply 'encode-time
105 (append deadline nil)))) 106 (append deadline nil))))
106 ;; If this time has passed already, add a day. 107 ;; If this time has passed already, add a day.
107 (when (< deadline (time-to-seconds (current-time))) 108 (when (< deadline (gnus-float-time (current-time)))
108 (setq deadline (+ 3600 deadline))) ;3600 secs/day 109 (setq deadline (+ 3600 deadline))) ;3600 secs/day
109 ;; Convert seconds to date header. 110 ;; Convert seconds to date header.
110 (setq deadline (message-make-date 111 (setq deadline (message-make-date
@@ -127,7 +128,7 @@ DELAY is a string, giving the length of the time. Possible values are:
127 (t 128 (t
128 (setq delay (* num 60)))) 129 (setq delay (* num 60))))
129 (setq deadline (message-make-date 130 (setq deadline (message-make-date
130 (seconds-to-time (+ (time-to-seconds (current-time)) 131 (seconds-to-time (+ (gnus-float-time (current-time))
131 delay))))) 132 delay)))))
132 (t (error "Malformed delay `%s'" delay))) 133 (t (error "Malformed delay `%s'" delay)))
133 (message-add-header (format "%s: %s" gnus-delay-header deadline))) 134 (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."
5002 (lambda (header) 5002 (lambda (header)
5003 (setq previous-time 5003 (setq previous-time
5004 (condition-case () 5004 (condition-case ()
5005 (time-to-seconds (mail-header-parse-date 5005 (gnus-float-time (mail-header-parse-date
5006 (mail-header-date header))) 5006 (mail-header-date header)))
5007 (error previous-time)))) 5007 (error previous-time))))
5008 (sort 5008 (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 @@
1;;; nnspool.el --- spool access for GNU Emacs 1;;; nnspool.el --- spool access for GNU Emacs
2 2
3;; Copyright (C) 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998, 3;; Copyright (C) 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998,
4;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 4;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5;; Free Software Foundation, Inc.
5 6
6;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7;; Lars Magne Ingebrigtsen <larsi@gnus.org> 8;; Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -288,7 +289,8 @@ there.")
288 (while (and (not (looking-at 289 (while (and (not (looking-at
289 "\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] ")) 290 "\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] "))
290 (zerop (forward-line -1)))) 291 (zerop (forward-line -1))))
291 (let ((seconds (time-to-seconds (date-to-time date))) 292 ;; We require nnheader which requires gnus-util.
293 (let ((seconds (gnus-float-time (date-to-time date)))
292 groups) 294 groups)
293 ;; Go through lines and add the latest groups to a list. 295 ;; Go through lines and add the latest groups to a list.
294 (while (and (looking-at "\\([^ ]+\\) +[0-9]+ ") 296 (while (and (looking-at "\\([^ ]+\\) +[0-9]+ ")