From: Reiner Steib <reinersteib+gmane@imap.cc>
Cc: emacs-devel@gnu.org, ding@gnus.org, Miles Bader <miles@gnu.org>
Subject: Re: Changes in calendar/time-date.el
Date: Mon, 04 Apr 2005 14:09:42 +0200 [thread overview]
Message-ID: <v9k6nieoah.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <87mzsezu5f.fsf@xs4all.nl> (Lute Kamstra's message of "Mon, 04 Apr 2005 12:57:32 +0200")
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
On Mon, Apr 04 2005, Lute Kamstra wrote:
> Reiner Steib <reinersteib+gmane@imap.cc> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: parse-time-loads.patch --]
[-- Type: text/x-patch, Size: 2978 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 171 bytes --]
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/
next prev parent reply other threads:[~2005-04-04 12:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1DGYNu-00038g-00@quimby.gnus.org>
[not found] ` <yotly8c5jpi2.fsf@jpl.org>
2005-03-31 11:27 ` Changes in calendar/time-date.el (was: CVS update of gnus/lisp (4 files)) Reiner Steib
2005-03-31 12:20 ` Miles Bader
2005-03-31 12:58 ` Changes in calendar/time-date.el Lute Kamstra
2005-03-31 22:52 ` Miles Bader
2005-04-01 4:10 ` Richard Stallman
2005-04-04 10:25 ` Reiner Steib
2005-04-04 10:57 ` Lute Kamstra
2005-04-04 12:09 ` Reiner Steib [this message]
2005-04-04 12:52 ` Lute Kamstra
2005-04-04 17:20 ` Reiner Steib
2005-04-04 19:50 ` Stefan Monnier
2005-04-05 7:14 ` Kim F. Storm
2005-04-05 9:33 ` Miles Bader
2005-04-05 10:06 ` Kim F. Storm
2005-04-07 12:47 ` require inside functions. (was: Changes in calendar/time-date.el) Lute Kamstra
2005-04-07 21:45 ` Kim F. Storm
2005-04-08 0:12 ` require inside functions Miles Bader
2005-04-08 0:45 ` Stefan Monnier
2005-04-08 2:09 ` Miles Bader
2005-04-08 0:21 ` Stefan Monnier
2005-04-08 3:22 ` require inside functions. (was: Changes in calendar/time-date.el) Richard Stallman
2005-04-08 8:12 ` Kim F. Storm
2005-04-09 3:38 ` require inside functions. (was: Changes in Richard Stallman
2005-04-09 9:30 ` require inside functions Lute Kamstra
2005-04-10 1:55 ` Richard Stallman
2005-04-13 9:11 ` Lute Kamstra
2005-04-15 2:44 ` Richard Stallman
2005-04-15 9:23 ` Lute Kamstra
2005-04-08 8:16 ` David Kastrup
2005-04-05 13:54 ` Changes in calendar/time-date.el Lute Kamstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v9k6nieoah.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=Reiner.Steib@gmx.de \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).