From: Jan Tatarik Date: Tue, 6 Aug 2013 22:09:27 +0000 (+0000) Subject: gnus-icalendar.el (gnus-icalendar-event-from-ical): Replace pcase with cond for backw... X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~398 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec9564383ba1599be3e253d0b6643d392938de41;p=emacs.git gnus-icalendar.el (gnus-icalendar-event-from-ical): Replace pcase with cond for backwards compatability --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 238017e25fc..96187c48844 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2013-08-06 Jan Tatarik + + * gnus-icalendar.el (gnus-icalendar-event-from-ical): Replace pcase + with cond for backwards compatability. + 2013-08-06 Katsumi Yamaoka * mm-decode.el (mm-display-external): Bind process-connection-type to diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 0286fd5dd89..3a9e743e8ed 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -183,11 +183,11 @@ :end (gnus-icalendar-event--decode-datefield event 'DTEND zone-map) :rsvp (string= (plist-get (cadr attendee) 'RSVP) "TRUE"))) - (event-class (pcase method - ("REQUEST" 'gnus-icalendar-event-request) - ("CANCEL" 'gnus-icalendar-event-cancel) - ("REPLY" 'gnus-icalendar-event-reply) - (_ 'gnus-icalendar-event)))) + (event-class (cond + ((string= method "REQUEST") 'gnus-icalendar-event-request) + ((string= method "CANCEL") 'gnus-icalendar-event-cancel) + ((string= method "REPLY") 'gnus-icalendar-event-reply) + (t 'gnus-icalendar-event)))) (labels ((map-property (prop) (let ((value (icalendar--get-event-property event prop))) @@ -252,14 +252,15 @@ status will be retrieved from the first matching attendee record." ;; NOTE: not all of the below fields are mandatory, ;; but they are often present in other clients' ;; replies. Can be helpful for debugging, too. - (new-line (pcase key - ("ATTENDEE" (update-attendee-status line)) - ("SUMMARY" (update-summary line)) - ("DTSTAMP" (update-dtstamp)) - ((or "ORGANIZER" "DTSTART" "DTEND" - "LOCATION" "DURATION" "SEQUENCE" - "RECURRENCE-ID" "UID") line) - (_ nil)))) + (new-line + (cond + ((string= key "ATTENDEE") (update-attendee-status line)) + ((string= key "SUMMARY") (update-summary line)) + ((string= key "DTSTAMP") (update-dtstamp)) + ((find key '("ORGANIZER" "DTSTART" "DTEND" + "LOCATION" "DURATION" "SEQUENCE" + "RECURRENCE-ID" "UID")) line) + (t nil)))) (when new-line (push new-line reply-event-lines)))))) @@ -405,7 +406,8 @@ Return nil for non-recurring EVENT." (defun gnus-icalendar--deactivate-org-timestamp (ts) (replace-regexp-in-string "[<>]" - (lambda (m) (pcase m ("<" "[") (">" "]"))) + (lambda (m) (cond ((string= m "<") "[") + ((string= m ">") "]"))) ts)) (defun gnus-icalendar-find-org-event-file (event &optional org-file)