From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40190 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: expiry problems? Date: Sat, 10 Nov 2001 20:04:33 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87668kggle.fsf@mclinux.com> <87adxvrihi.fsf@squeaker.lickey.com> <87itcjg6jy.fsf@mclinux.com> <874ro369fj.fsf@squeaker.lickey.com> <87wv0z35yw.fsf@mclinux.com> <87vggitswm.fsf@mclinux.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175778 32002 80.91.224.250 (21 Oct 2002 04:49:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:49:38 +0000 (UTC) Return-Path: Original-Received: (qmail 18768 invoked from network); 10 Nov 2001 19:06:22 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 10 Nov 2001 19:06:22 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 162dS6-0000LM-00; Sat, 10 Nov 2001 13:06:02 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 10 Nov 2001 13:05:44 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id NAA09827 for ; Sat, 10 Nov 2001 13:05:32 -0600 (CST) Original-Received: (qmail 18760 invoked by alias); 10 Nov 2001 19:05:45 -0000 Original-Received: (qmail 18753 invoked from network); 10 Nov 2001 19:05:43 -0000 Original-Received: from unknown (HELO dolk.extundo.com) (195.42.214.242) by gnus.org with SMTP; 10 Nov 2001 19:05:43 -0000 Original-Received: from dhcp128.extundo.com (slipsten.extundo.com [195.42.214.241]) (authenticated bits=0) by dolk.extundo.com (8.12.1/8.12.1) with ESMTP id fAAJ5Edi015561; Sat, 10 Nov 2001 20:05:14 +0100 Original-To: ding@gnus.org, xemacs-patches@xemacs.org In-Reply-To: <87vggitswm.fsf@mclinux.com> (Josh Huber's message of "Sat, 10 Nov 2001 12:52:41 -0500") Mail-Copies-To: nobody Mail-Followup-To: ding@gnus.org Original-Lines: 53 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40190 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40190 Josh Huber writes: >> (time-less-p (days-to-time 7) >> (time-since (date-to-time "Jan 1 00:00:00 1940"))) >> t > > This returns nil for me. Maybe it's an XEmacs bug? I see you're > running emacs21... Yes. The patch below fixes it, someone at xemacs-patches please have a look at it. XEmacs 21.1, 21.4 (without patch): (encode-time 0 0 1 1 1 1969 nil nil 3600) (65054 52352) Emacs 20.7, 21.1 (and XEmacs 21.4 with patch): (encode-time 0 0 1 1 1 1969 nil nil 3600) (-482 52352) 2001-11-10 Simon Josefsson * editfns.c (make_time): New function, from Emacs. (Fencode_time): Use it, instead of `wasteful_word_to_lisp'. --- editfns.c.~1.27.2.2.~ Wed Nov 7 20:43:02 2001 +++ editfns.c Sat Nov 10 19:57:27 2001 @@ -1176,6 +1176,14 @@ static void set_time_zone_rule (char *tzstring); +Lisp_Object +make_time (time) + time_t time; +{ + return Fcons (make_int (time >> 16), + Fcons (make_int (time & 0177777), Qnil)); +} + DEFUN ("encode-time", Fencode_time, 6, MANY, 0, /* Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time. This is the reverse operation of `decode-time', which see. @@ -1249,7 +1257,7 @@ if (the_time == (time_t) -1) error ("Specified time is not representable"); - return wasteful_word_to_lisp (the_time); + return make_time (the_time); } DEFUN ("current-time-string", Fcurrent_time_string, 0, 1, 0, /*