Function: icalendar--make-property--list

icalendar--make-property--list is a byte-compiled function defined in icalendar-ast.el.gz.

Signature

(icalendar--make-property--list TYPE VALUE-TYPES RAW-VALUES &optional PARAMS)

Documentation

Make a property node of TYPE with list of values RAW-VALUES.

VALUE-TYPES should be a list of value types that TYPE accepts. PARAMS, if given, should be a list of parameter nodes.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/icalendar-ast.el.gz
(defun ical:-make-property--list (type value-types raw-values &optional params)
  "Make a property node of TYPE with list of values RAW-VALUES.
VALUE-TYPES should be a list of value types that TYPE accepts.
PARAMS, if given, should be a list of parameter nodes."
  (require 'icalendar-parser) ; for `ical:maybe-add-value-param'
  (declare-function ical:maybe-add-value-param "icalendar-parser")

  (let ((value (if (seq-every-p #'ical:ast-node-p raw-values)
                   raw-values
                 (mapcar
                  (lambda (c) (ical:make-value-node-of value-types c))
                  raw-values))))
    (when value
      (ical:ast-node-valid-p
       (ical:maybe-add-value-param
        (ical:make-ast-node type (list :value value) params))))))