emacs-devel
[Top][All Lists]
Advanced

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

Re: Trying to cope with Calendar's dynamic scoping


From: Stefan Monnier
Subject: Re: Trying to cope with Calendar's dynamic scoping
Date: Wed, 21 Aug 2013 00:30:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> &%%(let* ((month (extract-calendar-month date))
>           (day (extract-calendar-day date))
>           (year (extract-calendar-year date))
>           (last (calendar-last-day-of-month month year))
>           (dayname (calendar-day-of-week date)))
>      (or (and (= day last) (memq dayname '(1 2 3 4 5)))
>          (and (or (= day (1- last)) (= day (- last 2)))
>               (= dayname 5)))) 8am Print IIT pay stub

AFAIK my patch should handle this just fine.

> I suspect the only reason anyone cares is that it generates warning
> messages in compilation.  Is there any other reason?!

With the introduction of lexical scoping, using dynamic scoping on
variables that are normally only used for local vars can lead to
actual breakage (because the presence of the dynamic-scope declaration
changes the nature of the variable).

So while the problems are hypothetical so far, they're not just theoretical.

> Tread very carefully.

Indeed.


        Stefan



reply via email to

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