]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix icalendar time zone parsing glitch
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 17:40:21 +0000 (09:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 19:17:25 +0000 (11:17 -0800)
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
Use pcase instead of cl-case, as cl-macs might not be loaded.
Otherwise, a build complains “calendar/icalendar.el:618:57:
Warning: ‘90’ is a malformed function” and some
icalendar--decode-isodatetime tests fail.  This fixes a bug
introduced in 2021-11-21T08:18:57Z!dick.r.chiang@gmail.com.

lisp/calendar/icalendar.el

index 7a483d40627148ec43f720e8890dc393525a18cb..15778ea14bc90c9077569c20c47ad340396bf3d7 100644 (file)
@@ -645,10 +645,10 @@ FIXME: multiple comma-separated values should be allowed!"
           (setq second (read (substring isodatetimestring 13 15))))
        ;; FIXME: Support subseconds.
         (when (> (length isodatetimestring) 15)
-          (cl-case (aref isodatetimestring 15)
+         (pcase (aref isodatetimestring 15)
             (?Z
              (setq source-zone t))
-            ((?- ?+)
+           ((or ?- ?+)
              (setq source-zone
                    (concat "UTC" (substring isodatetimestring 15))))))
         ;; shift if necessary