Function: icalendar--get-unfolded-buffer
icalendar--get-unfolded-buffer is a byte-compiled function defined in
icalendar.el.gz.
Signature
(icalendar--get-unfolded-buffer FOLDED-ICAL-BUFFER)
Documentation
Return a new buffer containing the unfolded contents of a buffer.
Folding is the iCalendar way of wrapping long lines. In the created buffer all occurrences of CR LF BLANK are replaced by the empty string. Argument FOLDED-ICAL-BUFFER is the folded input buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/icalendar.el.gz
;; ======================================================================
;; Core functionality
;; Functions for parsing icalendars, importing and so on
;; ======================================================================
(defun icalendar--get-unfolded-buffer (folded-ical-buffer)
"Return a new buffer containing the unfolded contents of a buffer.
Folding is the iCalendar way of wrapping long lines. In the
created buffer all occurrences of CR LF BLANK are replaced by the
empty string. Argument FOLDED-ICAL-BUFFER is the folded input
buffer."
(let ((unfolded-buffer (get-buffer-create " *icalendar-work*")))
(save-current-buffer
(set-buffer unfolded-buffer)
(erase-buffer)
(insert-buffer-substring folded-ical-buffer)
(icalendar--clean-up-line-endings)
(goto-char (point-min))
(while (re-search-forward "\r?\n[ \t]" nil t)
(replace-match "" nil nil)))
unfolded-buffer))