]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-dst.el
Make typing into incomplete C++ raw strings work, and make it work fast enough
[gnu-emacs] / lisp / calendar / cal-dst.el
index e3996cae3de6c3a59084bb0261132e56ec7efe0c..84831e7beea1236660a2c2f4f74a97164aef2344 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cal-dst.el --- calendar functions for daylight saving rules
 
-;; Copyright (C) 1993-1996, 2001-201 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1996, 2001-2016 Free Software Foundation, Inc.
 
 ;; Author: Paul Eggert <eggert@twinsun.com>
 ;;         Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -82,7 +82,7 @@ list and for correcting times of day in the solar and lunar calculations.
 
 For example, if daylight saving time ends on the last Sunday in October:
 
-      '(calendar-nth-named-day -1 0 10 year)
+      (calendar-nth-named-day -1 0 10 year)
 
 If the locale never uses daylight saving time, set this to nil."
   :type 'sexp
@@ -179,6 +179,7 @@ Return nil if no such transition can be found."
          (if (eq (car (current-time-zone probe)) hi-utc-diff)
              (setq hi probe)
            (setq lo probe)))
+       (setcdr hi (list (cdr hi)))
        hi))))
 
 (autoload 'calendar-persian-to-absolute "cal-persia")
@@ -347,8 +348,8 @@ DST-ZONE are equal, and all the DST-* integer variables are 0.
 Some operating systems cannot provide all this information to Emacs; in this
 case, `calendar-current-time-zone' returns a list containing nil for the data
 it can't find."
-  (unless calendar-current-time-zone-cache
-    (setq calendar-current-time-zone-cache (calendar-dst-find-data))))
+  (or calendar-current-time-zone-cache
+      (setq calendar-current-time-zone-cache (calendar-dst-find-data))))
 
 
 ;; Following options should be set based on conditions when the code