Function: icalendar-fix-line-endings
icalendar-fix-line-endings is a byte-compiled function defined in
icalendar-parser.el.gz.
Signature
(icalendar-fix-line-endings)
Documentation
Convert all line endings to LF.
This function is intended to be used from icalendar-pre-unfolding-hook
(which see) to make files with inconsistent line endings parseable.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/icalendar-parser.el.gz
(defun ical:fix-line-endings ()
"Convert all line endings to LF.
This function is intended to be used from `icalendar-pre-unfolding-hook'
(which see) to make files with inconsistent line endings parseable."
(when ical:parse-strictly
(ical:warn
(concat "Converting line endings to LF causes parsing "
"errors when `icalendar-parse-strictly' is non-nil.")))
(goto-char (point-min))
(while (re-search-forward "\r\n?" nil t)
(replace-match "\n")))