[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes in calendar/time-date.el

From: Stefan Monnier
Subject: Re: Changes in calendar/time-date.el
Date: Mon, 04 Apr 2005 15:50:05 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>> (eval-when-compile
>>>   (require 'cl)
>>>   (defvar parse-time-weekdays) ;; parse-time is required where necessary
>>>   (defvar parse-time-months)

Why not (require 'parse-time) simply?
This way if parse-time is ever changed to remove parse-time-months, the
byte-compiler will correctly catch it.

> `with-no-warnings' isn't available in Emacs 21.

with-no-warnings should be avoided as much as possible since it can hide any
warning whatsoever without justification.  (defvar foo) explains to the
byte-compiler (and the human reader) *why* the warning should be skipped.

>  (defun nnimap-date-days-ago (daysago)
>    "Return date, in format \"3-Aug-1998\", for DAYSAGO days ago."
> +  (require 'parse-time)
> +  (defvar parse-time-months)

A (defvar foo) form only makes sense at the toplevel.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]