[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113725: gnus-icalendar.el (gnus-icalendar-event-fro
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] trunk r113725: gnus-icalendar.el (gnus-icalendar-event-from-ical): Replace pcase with cond for backwards compatability |
Date: |
Tue, 06 Aug 2013 22:09:35 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113725
revision-id: address@hidden
parent: address@hidden
author: Jan Tatarik <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Tue 2013-08-06 22:09:27 +0000
message:
gnus-icalendar.el (gnus-icalendar-event-from-ical): Replace pcase with cond
for backwards compatability
modified:
lisp/gnus/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1433
lisp/gnus/gnus-icalendar.el
gnusicalendar.el-20130801225830-k3bdrwt8427ren1n-1
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2013-08-06 13:52:59 +0000
+++ b/lisp/gnus/ChangeLog 2013-08-06 22:09:27 +0000
@@ -1,3 +1,8 @@
+2013-08-06 Jan Tatarik <address@hidden>
+
+ * gnus-icalendar.el (gnus-icalendar-event-from-ical): Replace pcase
+ with cond for backwards compatability.
+
2013-08-06 Katsumi Yamaoka <address@hidden>
* mm-decode.el (mm-display-external): Bind process-connection-type to
=== modified file 'lisp/gnus/gnus-icalendar.el'
--- a/lisp/gnus/gnus-icalendar.el 2013-08-01 22:58:40 +0000
+++ b/lisp/gnus/gnus-icalendar.el 2013-08-06 22:09:27 +0000
@@ -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 @@
;; 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 @@
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113725: gnus-icalendar.el (gnus-icalendar-event-from-ical): Replace pcase with cond for backwards compatability,
Katsumi Yamaoka <=