aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-03-25 01:28:21 +0000
committerJim Blandy1993-03-25 01:28:21 +0000
commitcb0d33b2a15dcf81870779f6055bcfa2c4afac65 (patch)
tree74971ebd648cc95a63b9da1479ae7c5cea818ad8
parent723d4d15ae2774f7a95a9dcc727c8a521fe18f75 (diff)
downloademacs-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.el39
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,
480longitude pair.") 480longitude 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
492for New York City, -480 for Los Angeles. 494for New York City, -480 for Los Angeles.
495
493If this is nil, it will be set to the local time zone when the calendar 496If this is nil, it will be set to the local time zone when the calendar
494package loads.") 497package 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'.
502For example, \"EST\" in New York City, \"PST\" for Los Angeles.") 505For example, \"EST\" in New York City, \"PST\" for Los Angeles.
506
507If this is nil, it will be set for the local time zone when the calendar
508package 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'.
507For example, \"EDT\" in New York City, \"PDT\" for Los Angeles.") 517For example, \"EDT\" in New York City, \"PDT\" for Los Angeles.
508 518
519If this is nil, it will be set for the local time zone when the calendar
520package 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)