Function: icalendar-folding-annotations

icalendar-folding-annotations is a byte-compiled function defined in icalendar-parser.el.gz.

Signature

(icalendar-folding-annotations START END &optional BUFFER)

Documentation

Return a list of annotations for folding lines in the region.

This function is a wrapper for icalendar-fold-region that provides the interface to be used from write-region-annotation-functions, which see.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/icalendar-parser.el.gz
(defun ical:folding-annotations (start end &optional buffer)
  "Return a list of annotations for folding lines in the region.

This function is a wrapper for `icalendar-fold-region' that provides the
interface to be used from `write-region-annotation-functions', which
see."
  ;; start may be nil or a string; see `write-region'
  (if (stringp start)
      (let ((buf (generate-new-buffer " *icalendar-folded*")))
        (set-buffer buf)
        (insert start)
        (ical:fold-region (point-min) (point-max) t))

    (when (bufferp buffer) (set-buffer buffer))
    (ical:fold-region (or start (point-min))
                      (if start end (point-max))
                      t)))