From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: Changes in calendar/time-date.el Date: Mon, 04 Apr 2005 14:09:42 +0200 Message-ID: References: <871x9w9dkn.fsf@xs4all.nl> <87mzsezu5f.fsf@xs4all.nl> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1112616823 14067 80.91.229.2 (4 Apr 2005 12:13:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2005 12:13:43 +0000 (UTC) Cc: emacs-devel@gnu.org, ding@gnus.org, Miles Bader Original-X-From: ding-owner+M8613@lists.math.uh.edu Mon Apr 04 14:13:40 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 1DIQRu-0007mq-Lo for ding-account@gmane.org; Mon, 04 Apr 2005 14:12:59 +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 1DIQQ1-0003dy-00; Mon, 04 Apr 2005 07:11:01 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DIQPv-0003dt-00 for ding@lists.math.uh.edu; Mon, 04 Apr 2005 07:10:55 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DIQPu-0005eI-9o for ding@lists.math.uh.edu; Mon, 04 Apr 2005 07:10:54 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.1]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DIQPp-0005CY-00 for ; Mon, 04 Apr 2005 14:10:49 +0200 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by mail.uni-ulm.de (8.13.3/8.13.3) with ESMTP id j34C9fpr027463; Mon, 4 Apr 2005 14:09:44 +0200 (MEST) Original-Received: by bridgekeeper.physik.uni-ulm.de (Postfix, from userid 170) id 513AA101B6; Mon, 4 Apr 2005 14:09:42 +0200 (CEST) Original-To: Lute Kamstra X-Face: P05mdcZT&lL[-s2=mw~RsllZ0zZAb?vdE}.s (Lute Kamstra's message of "Mon, 04 Apr 2005 12:57:32 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DCC-servers-Metrics: gemini 1049; Body=4 Fuz1=4 Fuz2=4 X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60087 gmane.emacs.devel:35535 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35535 --=-=-= On Mon, Apr 04 2005, Lute Kamstra wrote: > Reiner Steib writes: >> Wouldn't it be better to put (require 'parse-time) at the beginning of >> the file instead of inside `message-make-date'? > > message-make-date is the only function in message.el that uses > parse-time, so it's best to put the require there. If you change > message-make-date so that it no longer uses parse-time, you will > probably notice the require and remove it. Had you put require at the > beginning of the file, you would most likely forget this. Putting a > require at the beginning of a file is useful if the file uses a > particular feature a lot. Okay, I agree. Putting it at the beginning of a file additionally avoids some "reference to free variable" warnings. The following patch[1] would avoid them too. (autoload 'parse-time-string ...) should be there for the standalone Gnus which is supposed to work with older Emacs versions. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=parse-time-loads.patch Index: message.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/message.el,v retrieving revision 1.75 diff -u -r1.75 message.el --- message.el 30 Mar 2005 08:14:32 -0000 1.75 +++ message.el 4 Apr 2005 11:36:12 -0000 @@ -32,6 +32,8 @@ (eval-when-compile (require 'cl) + (defvar parse-time-weekdays) ;; parse-time is required where necessary + (defvar parse-time-months) (defvar gnus-message-group-art) (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary (require 'canlock) Index: nnimap.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/nnimap.el,v retrieving revision 1.23 diff -u -r1.23 nnimap.el --- nnimap.el 18 Mar 2005 02:49:57 -0000 1.23 +++ nnimap.el 4 Apr 2005 11:36:12 -0000 @@ -69,6 +69,8 @@ (require 'gnus-range) (require 'gnus-start) (require 'gnus-int) + ;; Only for `parse-time-months' in `nnimap-date-days-ago': +(require 'parse-time) (eval-when-compile (require 'cl)) Index: nnultimate.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/nnultimate.el,v retrieving revision 1.5 diff -u -r1.5 nnultimate.el --- nnultimate.el 4 Sep 2004 13:13:44 -0000 1.5 +++ nnultimate.el 4 Apr 2005 11:36:12 -0000 @@ -39,6 +39,7 @@ (require 'mm-util) (require 'mm-url) (require 'nnweb) +(require 'parse-time) (autoload 'w3-parse-buffer "w3-parse") (nnoo-declare nnultimate) Index: gnus-art.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-art.el,v retrieving revision 1.65 diff -u -r1.65 gnus-art.el --- gnus-art.el 18 Mar 2005 02:49:57 -0000 1.65 +++ gnus-art.el 4 Apr 2005 11:36:13 -0000 @@ -46,6 +46,7 @@ (autoload 'gnus-msg-mail "gnus-msg" nil t) (autoload 'gnus-button-mailto "gnus-msg") (autoload 'gnus-button-reply "gnus-msg" nil t) +(autoload 'parse-time-string "parse-time" nil nil) (defgroup gnus-article nil "Article display." Index: gnus-demon.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-demon.el,v retrieving revision 1.9 diff -u -r1.9 gnus-demon.el --- gnus-demon.el 4 Sep 2004 13:13:43 -0000 1.9 +++ gnus-demon.el 4 Apr 2005 11:36:13 -0000 @@ -40,6 +40,8 @@ (require 'itimer) (require 'timer))) +(autoload 'parse-time-string "parse-time" nil nil) + (defgroup gnus-demon nil "Demonic behaviour." :group 'gnus) Index: gnus-delay.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-delay.el,v retrieving revision 1.5 diff -u -r1.5 gnus-delay.el --- gnus-delay.el 9 Feb 2005 15:50:39 -0000 1.5 +++ gnus-delay.el 4 Apr 2005 11:36:13 -0000 @@ -37,6 +37,7 @@ (require 'nndraft) (require 'gnus-draft) +(autoload 'parse-time-string "parse-time" nil nil) ;;;###autoload (defgroup gnus-delay nil --=-=-= Does it look correct? Bye, Reiner. [1] The patch is for Emacs' CVS. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ --=-=-=--