Function: enriched-mode
enriched-mode is an autoloaded, interactive and byte-compiled function
defined in enriched.el.gz.
Signature
(enriched-mode &optional ARG)
Documentation
Minor mode for editing text/enriched files.
These are files with embedded formatting information in the MIME standard text/enriched format.
Turning the mode on or off runs enriched-mode-hook.
More information about Enriched mode is available in the file
"enriched.txt" in data-directory.
Commands:
reindent-then-newline-and-indent
C-c [ set-left-margin
C-c ] set-right-margin
C-x TAB increase-left-margin
M-S set-justification-center
M-j b set-justification-full
M-j c set-justification-center
M-j l set-justification-left
M-j r set-justification-right
M-j u set-justification-none
M-o M-o font-lock-fontify-block
M-o b facemenu-set-bold
M-o d facemenu-set-default
M-o i facemenu-set-italic
M-o l facemenu-set-bold-italic
M-o m enriched-toggle-markup
M-o o facemenu-set-face
M-o u facemenu-set-underline
RET reindent-then-newline-and-indent
This is a minor mode. If called interactively, toggle the Enriched
mode mode. If the prefix argument is positive, enable the mode, and if
it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate the variable enriched-mode(var)/enriched-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 20.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/enriched.el.gz
;;;###autoload
(define-minor-mode enriched-mode
"Minor mode for editing text/enriched files.
These are files with embedded formatting information in the MIME standard
text/enriched format.
Turning the mode on or off runs `enriched-mode-hook'.
More information about Enriched mode is available in the file
\"enriched.txt\" in `data-directory'.
Commands:
\\{enriched-mode-map}"
:group 'enriched :lighter " Enriched"
(cond ((null enriched-mode)
;; Turn mode off
(remove-hook 'change-major-mode-hook
#'enriched-before-change-major-mode 'local)
(setq buffer-file-format (delq 'text/enriched buffer-file-format))
;; restore old variable values
(while enriched-old-bindings
(set (pop enriched-old-bindings) (pop enriched-old-bindings)))
(unless enriched-default-text-properties-local-flag
(kill-local-variable 'default-text-properties))
(kill-local-variable 'enriched-default-text-properties-local-flag)
(unless use-hard-newlines (use-hard-newlines 0)))
((and (memq 'text/enriched buffer-file-format)
(not enriched-rerun-flag))
;; Mode already on; do nothing.
nil)
(t ; Turn mode on
(add-hook 'change-major-mode-hook
#'enriched-before-change-major-mode nil 'local)
(add-to-list 'buffer-file-format 'text/enriched)
;; Save old variable values before we change them.
;; These will be restored if we exit Enriched mode.
(setq enriched-old-bindings
(list 'buffer-display-table buffer-display-table
'default-text-properties default-text-properties
'use-hard-newlines use-hard-newlines))
(setq-local enriched-default-text-properties-local-flag
(local-variable-p 'default-text-properties))
(make-local-variable 'default-text-properties)
(setq buffer-display-table enriched-display-table)
(use-hard-newlines 1 (if enriched-rerun-flag 'never nil))
(let* ((sticky
(delete-dups
(append
enriched-par-props
(copy-sequence
(plist-get default-text-properties 'front-sticky))))))
(if sticky
(setq default-text-properties
(plist-put default-text-properties
'front-sticky sticky)))))))