diff options
| author | Jim Blandy | 1993-03-25 01:28:21 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-03-25 01:28:21 +0000 |
| commit | cb0d33b2a15dcf81870779f6055bcfa2c4afac65 (patch) | |
| tree | 74971ebd648cc95a63b9da1479ae7c5cea818ad8 | |
| parent | 723d4d15ae2774f7a95a9dcc727c8a521fe18f75 (diff) | |
| download | emacs-cb0d33b2a15dcf81870779f6055bcfa2c4afac65.tar.gz emacs-cb0d33b2a15dcf81870779f6055bcfa2c4afac65.zip | |
* calendar.el (calendar-standard-time-zone-name,
calendar-daylight-time-zone-name): Initialize these at load-time,
as well as calendar-time-zone.
* calendar.el (calendar-time-zone): Fix code which initializes
this.
| -rw-r--r-- | lisp/calendar/calendar.el | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index cda1bb31b33..9f389b81574 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -479,33 +479,50 @@ For example, -74.0 for New York City.") | |||
| 479 | `calendar-longitude', calendar-latitude'. Default value is just the latitude, | 479 | `calendar-longitude', calendar-latitude'. Default value is just the latitude, |
| 480 | longitude pair.") | 480 | longitude pair.") |
| 481 | 481 | ||
| 482 | ;;; Since this defvar is marked to go into loaddefs.el, it will be | 482 | ;;; Since the following three defvars are marked to go into |
| 483 | ;;; evaluated when Emacs is dumped. However, this variable's | 483 | ;;; loaddefs.el, they will be evaluated when Emacs is dumped. |
| 484 | ;;; appropriate value really depends on the conditions under which the | 484 | ;;; However, these variables' appropriate values really depend on the |
| 485 | ;;; code is invoked; it would be inappropriate to initialize this when | 485 | ;;; conditions under which the code is invoked; so it's inappropriate |
| 486 | ;;; Emacs is dumped. So, we initialize it to nil now, and if it's | 486 | ;;; to initialize them when Emacs is dumped. Thus we initialize them |
| 487 | ;;; still nil when this file is actually loaded, we give it its real value. | 487 | ;;; to nil now, and if they are still nil when this file is actually |
| 488 | ;;; loaded, we give them their real values then. | ||
| 489 | |||
| 488 | ;;;###autoload | 490 | ;;;###autoload |
| 489 | (defvar calendar-time-zone nil | 491 | (defvar calendar-time-zone nil |
| 490 | "*Number of minutes difference between local standard time at | 492 | "*Number of minutes difference between local standard time at |
| 491 | `calendar-location-name' and Universal (Greenwich) Time. For example, -300 | 493 | `calendar-location-name' and Universal (Greenwich) Time. For example, -300 |
| 492 | for New York City, -480 for Los Angeles. | 494 | for New York City, -480 for Los Angeles. |
| 495 | |||
| 493 | If this is nil, it will be set to the local time zone when the calendar | 496 | If this is nil, it will be set to the local time zone when the calendar |
| 494 | package loads.") | 497 | package loads.") |
| 495 | ;;; If the user has given this a real value, don't wipe it out. | 498 | ;;; If the user has given this a real value, don't wipe it out. |
| 496 | (or calendar-time-zone | 499 | (or calendar-time-zone |
| 497 | (setq calendar-time-zone (current-time-zone))) | 500 | (setq calendar-time-zone (car (current-time-zone)))) |
| 498 | 501 | ||
| 499 | ;;;###autoload | 502 | ;;;###autoload |
| 500 | (defvar calendar-standard-time-zone-name (car (nthcdr 2 (current-time-zone))) | 503 | (defvar calendar-standard-time-zone-name nil |
| 501 | "*Abbreviated name of standard time zone at `calendar-location-name'. | 504 | "*Abbreviated name of standard time zone at `calendar-location-name'. |
| 502 | For example, \"EST\" in New York City, \"PST\" for Los Angeles.") | 505 | For example, \"EST\" in New York City, \"PST\" for Los Angeles. |
| 506 | |||
| 507 | If this is nil, it will be set for the local time zone when the calendar | ||
| 508 | package loads.") | ||
| 509 | ;;; If the user has given this a value, don't wipe it out. | ||
| 510 | (or calendar-standard-time-zone-name | ||
| 511 | (setq calendar-standard-time-zone-name | ||
| 512 | (car (nthcdr 2 (current-time-zone))))) | ||
| 503 | 513 | ||
| 504 | ;;;###autoload | 514 | ;;;###autoload |
| 505 | (defvar calendar-daylight-time-zone-name (car (nthcdr 3 (current-time-zone))) | 515 | (defvar calendar-daylight-time-zone-name nil |
| 506 | "*Abbreviated name of daylight-savings time zone at `calendar-location-name'. | 516 | "*Abbreviated name of daylight-savings time zone at `calendar-location-name'. |
| 507 | For example, \"EDT\" in New York City, \"PDT\" for Los Angeles.") | 517 | For example, \"EDT\" in New York City, \"PDT\" for Los Angeles. |
| 508 | 518 | ||
| 519 | If this is nil, it will be set for the local time zone when the calendar | ||
| 520 | package loads.") | ||
| 521 | ;;; If the user has given this a value, don't wipe it out. | ||
| 522 | (or calendar-daylight-time-zone-name | ||
| 523 | (setq calendar-daylight-time-zone-name | ||
| 524 | (car (nthcdr 3 (current-time-zone))))) | ||
| 525 | |||
| 509 | ;;;###autoload | 526 | ;;;###autoload |
| 510 | (defvar calendar-daylight-savings-starts | 527 | (defvar calendar-daylight-savings-starts |
| 511 | '(calendar-nth-named-day 1 0 4 year) | 528 | '(calendar-nth-named-day 1 0 4 year) |