;ELC   
;;; Compiled by rms@psilocin.gnu.ai.mit.edu on Tue Sep  2 15:59:37 1997
;;; from file /home/fsf/rms/e19/lisp/enriched.el
;;; in Emacs version 20.0.97.2
;;; with bytecomp version 2.34
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`enriched.el' was compiled for Emacs 19.29 or later"))


(byte-code "ÀÁ!ˆÂÁÃÄÆ%‡" [provide enriched custom-declare-group nil "Read and save files in text/enriched format" :group wp] 6)
#@67 *If non-nil, give status messages when reading and writing files.
(custom-declare-variable 'enriched-verbose 't '(#$ . -671) :type 'boolean :group 'enriched)
(byte-code "ÀÁÂÃ\fÅ%ˆÀÆÇÈ\fÅ%ˆÉ\n!† Ë \fÌB\fÎÏÐ SÑ\"I‡" [custom-declare-face fixed ((t (:bold t))) "Face used for text that must be shown in fixed width.\nCurrently, emacs can only display fixed-width fonts, but this may change.\nThis face is used for text specifically marked as fixed-width, for example\nin text/enriched files." :group enriched excerpt ((t (:italic t))) "Face used for text that is an excerpt from another document.\nThis is used in enriched-mode for text explicitly marked as an excerpt." copy-sequence standard-display-table make-display-table enriched-display-table current-load-list 12 make-vector frame-width 45] 6)
#@120 Text-properties that usually apply to whole paragraphs.
These are set front-sticky everywhere except at hard newlines.
(defconst enriched-par-props '(left-margin right-margin justification) (#$ . 1484))
#@191 What to insert at the start of a text/enriched file.
If this is a string, it is inserted.  If it is a list, it should be a lambda
expression, which is evaluated to get the string to insert.
(defconst enriched-initial-annotation #[nil "ÀÁ\n\"‡" [format "Content-Type: text/enriched\nText-Width: %d\n\n" fill-column] 3] (#$ . 1694))
#@46 General format of enriched-text annotations.
(defconst enriched-annotation-format "<%s%s>" (#$ . 2031))
#@56 Regular expression matching enriched-text annotations.
(defconst enriched-annotation-regexp "<\\(/\\)?\\([-A-za-z0-9]+\\)>" (#$ . 2141))
#@149 List of definitions of text/enriched annotations.
See `format-annotate-region' and `format-deannotate-region' for the definition
of this structure.
(defconst enriched-translations '((face (bold-italic "bold" "italic") (bold "bold") (italic "italic") (underline "underline") (fixed "fixed") (excerpt "excerpt") (default) (nil enriched-encode-other-face)) (left-margin (4 "indent")) (right-margin (4 "indentright")) (justification (none "nofill") (right "flushright") (left "flushleft") (full "flushboth") (center "center")) (PARAMETER (t "param")) (FUNCTION (enriched-decode-foreground "x-color") (enriched-decode-background "x-bg-color")) (read-only (t "x-read-only")) (unknown (nil format-annotate-value))) (#$ . 2285))
#@176 Properties that are OK to ignore when saving text/enriched files.
Any property that is neither on this list nor dealt with by
`enriched-translations' will generate a warning.
(defconst enriched-ignore '(front-sticky rear-nonsticky hard) (#$ . 3013))
#@34 True if Enriched mode is in use.
(defvar enriched-mode nil (#$ . 3269))
(byte-code "ÀÁ!ˆÁ\nž„ Ã\nBÀ‡" [make-variable-buffer-local enriched-mode minor-mode-alist (enriched-mode " Enriched")] 2)
#@257 Functions to run when entering Enriched mode.
If you set variables in this hook, you should arrange for them to be restored
to their old values if you leave Enriched mode.  One way to do this is to add
them and their old values to `enriched-old-bindings'.
(custom-declare-variable 'enriched-mode-hook 'nil '(#$ . 3471) :type 'hook :group 'enriched)
#@111 Store old variable values that we change when entering mode.
The value is a list of (VAR VALUE VAR VALUE...).
(defvar enriched-old-bindings nil (#$ . 3827))
(make-variable-buffer-local 'enriched-old-bindings)
#@360 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 runs `enriched-mode-hook'.

More information about Enriched mode is available in the file 
etc/enriched.doc  in the Emacs distribution directory.

Commands:

\<enriched-mode-map>\{enriched-mode-map}
(defalias 'enriched-mode #[(&optional arg) "À Â!ÄX„ ƒ4 „4 ÆÇÈ	\"	\nƒ“ \n@\nA@Lˆ\nAA‰\n‚ „“ ËÌÉÈ\"ˆÍÎÏ¯\nÐÎ!ˆÐÏ!ˆÑÓÔÆ\"ˆÕÖ\"ƒ€ ÌÙ@\"ˆA‰„p ƒŽ ÚÖ#*ÛÜ!ˆÝ	!ˆÞ )‡" [buffer-modified-p mod prefix-numeric-value arg 0 enriched-mode nil delq text/enriched buffer-file-format enriched-old-bindings t add-to-list buffer-display-table indent-line-function default-text-properties make-local-variable indent-to-left-margin enriched-display-table use-hard-newlines 1 plist-get front-sticky enriched-par-props p sticky plist-put run-hooks enriched-mode-hook set-buffer-modified-p force-mode-line-update] 7 (#$ . 4043) "P"])
#@27 Keymap for Enriched mode.
(defvar enriched-mode-map nil (#$ . 5069))
(byte-code "„ ÀÁ ‰MˆÂž„ ÂBBÄÅÆ#ˆÄÇÈ#ˆÄÉÈ#ˆÄÊË#ˆÄÌÍ#ˆÄÎÏ#ˆÄÐÑ#ˆÄÒÓ#‡" [enriched-mode-map make-sparse-keymap enriched-mode minor-mode-map-alist define-key "" beginning-of-line-text "" reindent-then-newline-and-indent "\n" "ê" facemenu-justification-menu "Ó" set-justification-center "	" increase-left-margin "\f" set-left-margin "" set-right-margin] 4)
#@378 Apply a function to regions of the buffer based on a text property.
For each contiguous region of the buffer for which the value of PROPERTY is
eq, the FUNCTION will be called.  Optional arguments FROM and TO specify the
region over which to scan.

The specified function receives three arguments: the VALUE of the property in
the region, and the START and END of each region.
(defalias 'enriched-map-property-regions #[(prop func &optional from to) "ŠŒƒ\n e}ˆ	† ebˆ`ÂÃ Ä`\"	Ê	d$‰ƒR Â“ˆ	Ì!#ˆÌ!	Ä\"‚! 	dW…a 	d#.‡" [to from nil make-marker get-text-property prop val marker end begin text-property-not-all func marker-position] 6 (#$ . 5518)])
(put 'enriched-map-property-regions 'lisp-indent-hook 1)
#@45 Indent and justify each line in the region.
(defalias 'enriched-insert-indentation #[(&optional from to) "ŠŒƒ\n e}ˆ	† ebˆn„ Âyˆm?…1 l„+ Ã jˆÄÅÆÅ#ˆÂyˆ‚ *‡" [to from 1 current-left-margin justify-current-line t nil] 4 (#$ . 6266)])
(defalias 'enriched-encode #[(from to orig-buf) "ƒ ÁÂ!ˆŒ\f}ˆÅ ˆÆ ˆbˆÇÈ!ˆÉÊdÌ%!ˆbˆ;ƒ4 ‚B Šƒ> qˆ )cˆÐÑÒ`Ó$ˆƒS ÁÓ!ˆd)‡" [enriched-verbose message "Enriched: encoding document..." from to delete-to-left-margin unjustify-region format-replace-strings (("<" . "<<")) format-insert-annotations format-annotate-region enriched-translations enriched-make-annotation enriched-ignore enriched-initial-annotation orig-buf enriched-map-property-regions hard #[(v b e) "… 	fÂU… 	bˆÃc‡" [v b 10 "\n"] 2] nil] 7])
#@127 Format an annotation called NAME.
If POSITIVE is non-nil, this is the opening annotation, if nil, this is the
matching close.
(defalias 'enriched-make-annotation #[(name positive) ";ƒ Á\nƒ Ä‚ Å#‡ƒ. @AÁ\nÄ#ÈÉÄ#P*‡Á\nÅ@#‡" [name format enriched-annotation-format positive "" "/" params item mapconcat #[(i) "À	ÂQ‡" ["<param>" i "</param>"] 3]] 5 (#$ . 7030)])
#@119 Generate annotations for random face change.
One annotation each for foreground color, background color, italic, etc.
(defalias 'enriched-encode-other-face #[(old new) "… Á!\n… Á\n!B‡" [old enriched-face-ans new] 3 (#$ . 7413)])
#@37 Return annotations specifying FACE.
(defalias 'enriched-face-ans #[(face) "ÀÁÂ!\"ƒ ÄÂ!ÅÆODC‡ÀÇÂ!\"ƒ& ÈÂ!ÅÆODC‡É!\nË!\fÍÎ\"ÐÃÆ$A\nƒO Ä\nDB\fƒ] È\fDB,‡" [string-match "^fg:" symbol-name face "x-color" 3 nil "^bg:" "x-bg-color" face-foreground fg face-background bg face-font t props format-annotate-single-property-change enriched-translations ans] 5 (#$ . 7652)])
(defalias 'enriched-decode #[(from to) "ƒ ÁÂ!ˆÃÄÅ\"ˆŠŒ}ˆbˆÈ 	Ê ˆËÌÍÎ#ƒ: Ï ƒ1 ÐÑ!ˆÒÓ”`\"ˆ‚  ÔdÖ$ˆ	ƒZ 	ƒT ÁØ!ˆÙ ˆ‚g ƒb ÁÚ!ˆÛed\"ˆƒo ÁÍ!ˆ)d*‡" [enriched-verbose message "Enriched: decoding document..." use-hard-newlines 1 never from to enriched-get-file-width file-width enriched-remove-header search-forward-regexp "\n\n+" nil t current-justification delete-char -1 set-hard-newline-properties 0 format-deannotate-region enriched-translations enriched-next-annotation fill-column "Indenting..." enriched-insert-indentation "Filling paragraphs..." fill-region] 5])
#@170 Find and return next text/enriched annotation.
Any "<<" strings encountered are converted to "<".
Return value is (begin end name positive-p), or nil if none was found.
(defalias 'enriched-next-annotation #[nil "ÀÁÂÃ#ƒ- Ä”bˆÅ!„- Ãuˆ`fÇUƒ$ ÈÃ!ˆ‚  ÉÊ`S\"ˆ‚  m?…Q Ä”Ä•\fÍ”Í•{—Ã”?\fF,‡" [search-forward "<" nil 1 0 looking-at enriched-annotation-regexp 60 delete-char message "Warning: malformed annotation in file at %s" beg end 2 name pos] 4 (#$ . 8636)])
#@47 Look for file width information on this line.
(defalias 'enriched-get-file-width #[nil "ŠÀÁ`Â\\Ã#… Äp!)‡" [search-forward "Text-Width: " 1000 t read] 4 (#$ . 9112)])
#@37 Remove file-format header at point.
(defalias 'enriched-remove-header #[nil "ÀÁ!ƒ `Â•|ˆ‚  ÀÃ!… ÄÅ!‡" [looking-at "^[-A-Za-z]+: .*\n" 0 "^\n" delete-char 1] 2 (#$ . 9285)])
(defalias 'enriched-decode-foreground #[(from to &optional color) "ÀÁ\nP!\n„ ÄÅ!ˆ‚- Æ!„- ƒ\" È!„- É!ƒ- ÄÊ\n\"ˆ\fÃF)‡" [intern "fg:" color face message "Warning: no color specified for <x-color>" internal-find-face window-system facemenu-get-face make-face "Warning: color `%s' can't be displayed" from to] 4])
(defalias 'enriched-decode-background #[(from to &optional color) "ÀÁ\nP!\n„ ÄÅ!ˆ‚- Æ!„- ƒ\" È!„- É!ƒ- ÄÊ\n\"ˆ\fÃF)‡" [intern "bg:" color face message "Warning: no color specified for <x-bg-color>" internal-find-face window-system facemenu-get-face make-face "Warning: color `%s' can't be displayed" from to] 4])
