From 3e6c69de9d1ae99ebb71eb2ed04bdb9ee42cbb80 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 16 Dec 2021 09:40:21 -0800 Subject: [PATCH] Fix icalendar time zone parsing glitch MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 7a483d40627..15778ea14bc 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -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 -- 2.39.5