From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60100 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: Changes in calendar/time-date.el Date: Tue, 05 Apr 2005 15:54:24 +0200 Message-ID: <87br8tjpm7.fsf@xs4all.nl> References: <871x9w9dkn.fsf@xs4all.nl> <87mzsezu5f.fsf@xs4all.nl> <87hdimzou0.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112709340 10468 80.91.229.2 (5 Apr 2005 13:55:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Apr 2005 13:55:40 +0000 (UTC) Cc: emacs-devel@gnu.org, ding@gnus.org, Miles Bader , Stefan Monnier , "Kim F. Storm" Original-X-From: ding-owner+M8627@lists.math.uh.edu Tue Apr 05 15:55:35 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by ciao.gmane.org with esmtp (Exim 4.43) id 1DIoVq-0005jV-FI for ding-account@gmane.org; Tue, 05 Apr 2005 15:54:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DIoW3-0005bQ-00; Tue, 05 Apr 2005 08:54:51 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DIoVv-0005bK-00 for ding@lists.math.uh.edu; Tue, 05 Apr 2005 08:54:43 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DIoVg-0003C9-CU for ding@lists.math.uh.edu; Tue, 05 Apr 2005 08:54:28 -0500 Original-Received: from smtp-vbr14.xs4all.nl ([194.109.24.34]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DIoVf-0007eN-00 for ; Tue, 05 Apr 2005 15:54:27 +0200 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr14.xs4all.nl (8.12.11/8.12.11) with ESMTP id j35DsOTx019693; Tue, 5 Apr 2005 15:54:24 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DIoVc-000167-00; Tue, 05 Apr 2005 15:54:24 +0200 Original-To: Reiner Steib In-Reply-To: (Reiner Steib's message of "Mon, 04 Apr 2005 19:20:59 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 56 X-Virus-Scanned: by XS4ALL Virus Scanner X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60100 gmane.emacs.devel:35585 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:60100 Reiner Steib writes: [...] > I have committed the changes to Gnus v5-10 branch. If anyone want to > handle the compiler differently, feel free to change it. I'd prefer to handle it like in the patch below. If the function message-make-date or nnimap-date-days-ago is called *very* often, then a single (require 'parse-time) at top level may be better. But all require does is a memq on features, which has typically a few hundred members. I suspect that doesn't take too much time. Lute. Index: lisp/gnus/message.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/message.el,v retrieving revision 1.76 diff -u -r1.76 message.el --- lisp/gnus/message.el 5 Apr 2005 04:10:27 -0000 1.76 +++ lisp/gnus/message.el 5 Apr 2005 13:42:31 -0000 @@ -4564,12 +4564,11 @@ (when (re-search-forward ",+$" nil t) (replace-match "" t t)))))) +(eval-when-compile (require 'parse-time)) (defun message-make-date (&optional now) "Make a valid data header. If NOW, use that time instead." (require 'parse-time) - (defvar parse-time-weekdays) - (defvar parse-time-months) (let* ((now (or now (current-time))) (zone (nth 8 (decode-time now))) (sign "+")) Index: lisp/gnus/nnimap.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/nnimap.el,v retrieving revision 1.24 diff -u -r1.24 nnimap.el --- lisp/gnus/nnimap.el 5 Apr 2005 04:10:27 -0000 1.24 +++ lisp/gnus/nnimap.el 5 Apr 2005 13:42:33 -0000 @@ -1386,10 +1386,10 @@ (list (- ms 1) (+ (expt 2 16) ls)) (list ms ls)))) +(eval-when-compile (require 'parse-time)) (defun nnimap-date-days-ago (daysago) "Return date, in format \"3-Aug-1998\", for DAYSAGO days ago." (require 'parse-time) - (defvar parse-time-months) (let* ((time (nnimap-time-substract (current-time) (days-to-time daysago))) (date (format-time-string (format "%%d-%s-%%Y"