Function: icalendar-mode
icalendar-mode is an autoloaded, interactive and byte-compiled
function defined in icalendar-mode.el.gz.
Signature
(icalendar-mode)
Documentation
Major mode for viewing and editing iCalendar (RFC5545) data.
This mode provides syntax highlighting for iCalendar components, properties, values, and property parameters, and defines a format to automatically handle folding and unfolding iCalendar content lines.
Folding means inserting whitespace characters to continue long
lines; unfolding means removing the extra whitespace inserted
by folding. The iCalendar standard requires folding lines when
serializing data to iCalendar format, and unfolding before
parsing it.
Thus icalendar-mode's syntax highlighting is designed to work with
unfolded lines. When icalendar-mode is activated in a buffer, it will
automatically unfold lines using a file format conversion, and
automatically fold lines when saving the buffer to a file; see Info
node (elisp)Format Conversion for more information. It also disables
auto-fill-mode if it is active, since filling interferes with line
folding and syntax highlighting. Consider using visual-line-mode(var)/visual-line-mode(fun) in
icalendar-mode instead.
In addition to any hooks its parent mode text-mode might have run,
this mode runs the hook icalendar-mode-hook, as the final or
penultimate step during initialization.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/icalendar-mode.el.gz
;;; Mode definition
;;;###autoload
(define-derived-mode icalendar-mode text-mode "iCalendar"
"Major mode for viewing and editing iCalendar (RFC5545) data.
This mode provides syntax highlighting for iCalendar components,
properties, values, and property parameters, and defines a format to
automatically handle folding and unfolding iCalendar content lines.
`Folding' means inserting whitespace characters to continue long
lines; `unfolding' means removing the extra whitespace inserted
by folding. The iCalendar standard requires folding lines when
serializing data to iCalendar format, and unfolding before
parsing it.
Thus icalendar-mode's syntax highlighting is designed to work with
unfolded lines. When `icalendar-mode' is activated in a buffer, it will
automatically unfold lines using a file format conversion, and
automatically fold lines when saving the buffer to a file; see Info
node `(elisp)Format Conversion' for more information. It also disables
`auto-fill-mode' if it is active, since filling interferes with line
folding and syntax highlighting. Consider using `visual-line-mode' in
`icalendar-mode' instead."
:group 'icalendar
:syntax-table ical:mode-syntax-table
;; TODO: Keymap?
;; TODO: buffer-local variables?
;; TODO: indent-line-function and indentation variables
;; TODO: mode-specific menu and context menus
;; TODO: eldoc integration
;; TODO: completion of keywords
(progn
(setq font-lock-defaults '(ical:font-lock-keywords nil t))))