GNU bug report logs - #3429
23.0.91; solar.el: solar seasons variable should not be a constant

Previous Next

Package: emacs;

Reported by: Teemu Likonen <tlikonen <at> iki.fi>

Date: Sun, 31 May 2009 14:00:04 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Teemu Likonen <tlikonen <at> iki.fi>
To: emacs-pretest-bug <at> gnu.org
Cc: rfrancoise <at> debian.org
Subject: bug#3429: 23.0.91; solar.el: solar seasons variable should not be a constant
Date: Sun, 31 May 2009 16:58:26 +0300
This commit made solar-?-hemi-seasons constants:

    commit 7ac202f6ec47df634066e61cc4cf17705257d9dc
    Author: Glenn Morris <rgm <at> gnu.org>
    Date:   2008-03-15 02:55:06 +0000

        (solar-n-hemi-seasons, solar-s-hemi-seasons): Make constants.
        (solar-sunrise-sunset): Rename some local variables for clarity.
        (sunrise-sunset): Use zerop.
        (solar-mean-equinoxes/solstices): Doc fix.

What is the rationale for that? They were defvars before.

As the doc of "defconst" says "The intent is that neither programs nor
users should ever change this value." Having solar seasons constants is
not sensible because it's very useful to localize the solar seasons'
names, and I'm trying to do exactly that with my Finnish localized
holidays:

    http://www.emacswiki.org/emacs/suomalainen-kalenteri.el

Yes, I can localize solar season by putting this in my ~/.emacs:

    (eval-after-load 'solar
      '(setq solar-n-hemi-seasons '("Kevätpäiväntasaus" "Kesäpäivänseisaus"
                                    "Syyspäiväntasaus" "Talvipäivänseisaus")
             solar-s-hemi-seasons '("Syyspäiväntasaus" "Talvipäivänseisaus"
                                    "Kevätpäiväntasaus" "Kesäpäivänseisaus")))

But this is not nice and it's difficult for external packages to
localize those variables.

I'd suggest making them defvas again (or defcustoms).



This bug report was last modified 15 years and 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.