Function: enriched-decode
enriched-decode is an autoloaded and byte-compiled function defined in
enriched.el.gz.
Signature
(enriched-decode FROM TO)
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/enriched.el.gz
;;;
;;; Decoding files
;;;
;;;###autoload
(defun enriched-decode (from to)
(if enriched-verbose (message "Enriched: decoding document..."))
(use-hard-newlines 1 'never)
(save-excursion
(save-restriction
(narrow-to-region from to)
(goto-char from)
;; Deal with header
(let ((file-width (enriched-get-file-width)))
(enriched-remove-header)
;; Deal with newlines
(while (search-forward-regexp "\n\n+" nil t)
(if (current-justification)
(delete-char -1))
(set-hard-newline-properties (match-beginning 0) (point)))
;; Translate annotations
(format-deannotate-region from (point-max) enriched-translations
'enriched-next-annotation)
;; Indent or fill the buffer
(cond (file-width ; File was filled to this width
(setq fill-column file-width)
(if enriched-verbose (message "Indenting..."))
(enriched-insert-indentation))
(t ; File was not filled.
(if enriched-verbose (message "Filling paragraphs..."))
(fill-region (point-min) (point-max))))
(if enriched-verbose (message nil)))
(point-max))))