- (gmm-labels ((update-summary (line)
- (if (string-match "^[^:]+:" line)
- (replace-match (format "\\&%s: " summary-status) t nil line)
- line))
- (update-dtstamp ()
- (format-time-string "DTSTAMP:%Y%m%dT%H%M%SZ" nil t))
- (attendee-matches-identity (line)
- (gnus-icalendar-find-if (lambda (name) (string-match-p name line))
- identities))
- (update-attendee-status (line)
- (when (and (attendee-matches-identity line)
- (string-match "\\(PARTSTAT=\\)[^;]+" line))
- (replace-match (format "\\1%s" attendee-status) t nil line)))
- (process-event-line (line)
- (when (string-match "^\\([^;:]+\\)" line)
- (let* ((key (match-string 0 line))
- ;; 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
- (cond
- ((string= key "ATTENDEE") (update-attendee-status line))
- ((string= key "SUMMARY") (update-summary line))
- ((string= key "DTSTAMP") (update-dtstamp))
- ((member key '("ORGANIZER" "DTSTART" "DTEND"
- "LOCATION" "DURATION" "SEQUENCE"
- "RECURRENCE-ID" "UID")) line)
- (t nil))))
- (when new-line
- (push new-line reply-event-lines))))))
+ (cl-labels
+ ((update-summary
+ (line)
+ (if (string-match "^[^:]+:" line)
+ (replace-match (format "\\&%s: " summary-status) t nil line)
+ line))
+ (update-dtstamp ()
+ (format-time-string "DTSTAMP:%Y%m%dT%H%M%SZ" nil t))
+ (attendee-matches-identity
+ (line)
+ (gnus-icalendar-find-if (lambda (name) (string-match-p name line))
+ identities))
+ (update-attendee-status
+ (line)
+ (when (and (attendee-matches-identity line)
+ (string-match "\\(PARTSTAT=\\)[^;]+" line))
+ (replace-match (format "\\1%s" attendee-status) t nil line)))
+ (process-event-line
+ (line)
+ (when (string-match "^\\([^;:]+\\)" line)
+ (let* ((key (match-string 0 line))
+ ;; 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
+ (cond
+ ((string= key "ATTENDEE") (update-attendee-status line))
+ ((string= key "SUMMARY") (update-summary line))
+ ((string= key "DTSTAMP") (update-dtstamp))
+ ((member key '("ORGANIZER" "DTSTART" "DTEND"
+ "LOCATION" "DURATION" "SEQUENCE"
+ "RECURRENCE-ID" "UID")) line)
+ (t nil))))
+ (when new-line
+ (push new-line reply-event-lines))))))