ox-icalendar: Do not require cl' since cl-lib' is used

* lisp/ox-icalendar.el (org-icalendar-get-categories):
(org-icalendar-entry):
(org-icalendar--vevent): Use "cl-" prefix.
This commit is contained in:
Nicolas Goaziou 2016-05-26 16:08:15 +02:00
parent a169e43a77
commit 82f834ea90

View file

@ -31,7 +31,6 @@
;;; Code: ;;; Code:
(eval-when-compile (require 'cl))
(require 'cl-lib) (require 'cl-lib)
(require 'ox-ascii) (require 'ox-ascii)
(declare-function org-bbdb-anniv-export-ical "org-bbdb" nil) (declare-function org-bbdb-anniv-export-ical "org-bbdb" nil)
@ -413,7 +412,7 @@ used as a communication channel."
(org-uniquify (org-uniquify
(let (categories) (let (categories)
(dolist (type org-icalendar-categories (nreverse categories)) (dolist (type org-icalendar-categories (nreverse categories))
(case type (cl-case type
(category (category
(push (org-export-get-category entry info) categories)) (push (org-export-get-category entry info) categories))
(todo-state (todo-state
@ -576,11 +575,11 @@ inlinetask within the section."
'timestamp 'timestamp
(lambda (ts) (lambda (ts)
(when (let ((type (org-element-property :type ts))) (when (let ((type (org-element-property :type ts)))
(case (plist-get info :with-timestamps) (cl-case (plist-get info :with-timestamps)
(active (memq type '(active active-range))) (active (memq type '(active active-range)))
(inactive (memq type '(inactive inactive-range))) (inactive (memq type '(inactive inactive-range)))
((t) t))) ((t) t)))
(let ((uid (format "TS%d-%s" (incf counter) uid))) (let ((uid (format "TS%d-%s" (cl-incf counter) uid)))
(org-icalendar--vevent (org-icalendar--vevent
entry ts uid summary loc desc cat)))) entry ts uid summary loc desc cat))))
info nil (and (eq type 'headline) 'inlinetask)) info nil (and (eq type 'headline) 'inlinetask))
@ -589,7 +588,7 @@ inlinetask within the section."
;; so, call `org-icalendar--vtodo' to transcode it into ;; so, call `org-icalendar--vtodo' to transcode it into
;; a "VTODO" component. ;; a "VTODO" component.
(when (and todo-type (when (and todo-type
(case (plist-get info :icalendar-include-todo) (cl-case (plist-get info :icalendar-include-todo)
(all t) (all t)
(unblocked (unblocked
(and (eq type 'headline) (and (eq type 'headline)
@ -611,7 +610,7 @@ inlinetask within the section."
(lambda (sexp) (lambda (sexp)
(org-icalendar-transcode-diary-sexp (org-icalendar-transcode-diary-sexp
(org-element-property :value sexp) (org-element-property :value sexp)
(format "DS%d-%s" (incf counter) uid) (format "DS%d-%s" (cl-incf counter) uid)
summary)) summary))
info nil (and (eq type 'headline) 'inlinetask)) info nil (and (eq type 'headline) 'inlinetask))
""))))) "")))))
@ -627,7 +626,7 @@ inlinetask within the section."
contents)))) contents))))
(defun org-icalendar--vevent (defun org-icalendar--vevent
(entry timestamp uid summary location description categories) (entry timestamp uid summary location description categories)
"Create a VEVENT component. "Create a VEVENT component.
ENTRY is either a headline or an inlinetask element. TIMESTAMP ENTRY is either a headline or an inlinetask element. TIMESTAMP
@ -651,7 +650,7 @@ Return VEVENT component as a string."
;; RRULE. ;; RRULE.
(when (org-element-property :repeater-type timestamp) (when (org-element-property :repeater-type timestamp)
(format "RRULE:FREQ=%s;INTERVAL=%d\n" (format "RRULE:FREQ=%s;INTERVAL=%d\n"
(case (org-element-property :repeater-unit timestamp) (cl-case (org-element-property :repeater-unit timestamp)
(hour "HOURLY") (day "DAILY") (week "WEEKLY") (hour "HOURLY") (day "DAILY") (week "WEEKLY")
(month "MONTHLY") (year "YEARLY")) (month "MONTHLY") (year "YEARLY"))
(org-element-property :repeater-value timestamp))) (org-element-property :repeater-value timestamp)))