mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Use gnus-float-time rather than time-to-seconds.
This commit is contained in:
parent
feefd9f3dd
commit
9693d3c4a3
4 changed files with 18 additions and 7 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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 @@ 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)))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 @@ 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]+ ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue