diff options
| author | Paul Eggert | 2019-07-09 23:18:13 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-09 23:18:36 -0700 |
| commit | d579dd370d27882722f2d510d76a8357ca7bec2f (patch) | |
| tree | e3724d5c0788fdbdbc144d6f2a599c1159408d6a | |
| parent | 77cf71ce8cc611ecfd143277441e2ad4acc9401b (diff) | |
| download | emacs-d579dd370d27882722f2d510d76a8357ca7bec2f.tar.gz emacs-d579dd370d27882722f2d510d76a8357ca7bec2f.zip | |
Simplify math-get-calendar-tzinfo
* lisp/calc/calc-forms.el (calendar-current-time-zone-cache):
Remove defvar.
(math-get-calendar-tzinfo): Simplify and do not reach
into caldst’s cache.
| -rw-r--r-- | lisp/calc/calc-forms.el | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 8faeb0a9dec..eb1a8248cdf 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el | |||
| @@ -1472,9 +1472,6 @@ as measured in the integer number of days before December 31, 1 BC (Gregorian)." | |||
| 1472 | 1472 | ||
| 1473 | (defvar var-TimeZone nil) | 1473 | (defvar var-TimeZone nil) |
| 1474 | 1474 | ||
| 1475 | ;; From cal-dst | ||
| 1476 | (defvar calendar-current-time-zone-cache) | ||
| 1477 | |||
| 1478 | (defvar math-calendar-tzinfo | 1475 | (defvar math-calendar-tzinfo |
| 1479 | nil | 1476 | nil |
| 1480 | "Information about the timezone, retrieved from the calendar.") | 1477 | "Information about the timezone, retrieved from the calendar.") |
| @@ -1487,9 +1484,7 @@ second, the number of seconds offset for daylight savings." | |||
| 1487 | (if math-calendar-tzinfo | 1484 | (if math-calendar-tzinfo |
| 1488 | math-calendar-tzinfo | 1485 | math-calendar-tzinfo |
| 1489 | (require 'cal-dst) | 1486 | (require 'cal-dst) |
| 1490 | (let ((tzinfo (progn | 1487 | (let ((tzinfo (calendar-current-time-zone))) |
| 1491 | (calendar-current-time-zone) | ||
| 1492 | calendar-current-time-zone-cache))) | ||
| 1493 | (setq math-calendar-tzinfo | 1488 | (setq math-calendar-tzinfo |
| 1494 | (list (* 60 (- (nth 0 tzinfo))) | 1489 | (list (* 60 (- (nth 0 tzinfo))) |
| 1495 | (* 60 (nth 1 tzinfo))))))) | 1490 | (* 60 (nth 1 tzinfo))))))) |