;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Thu Jun 8 22:13:04 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/enriched.el ;;; emacs version 19.28.93.6. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.28.90"))) (error "`enriched.el' was compiled for Emacs 19.29 or later")) (byte-code "ÀÁ!ˆ\nƒ\fÃÄ!ˆÀ‡" [provide enriched window-system require facemenu] 2) #@67 *If non-nil, give status messages when reading and writing files. (defvar enriched-verbose t (#$ . -561)) #@238 *Default amount of space to leave on the right edge of the screen. This can be increased inside text by changing the 'right-margin text property. Measured in character widths. If the screen is narrower than this, it is assumed to be 0. (defvar enriched-default-right-margin 10 (#$ . -674)) #@267 If t, fills paragraphs when reading in enriched documents. If nil, only fills when you explicitly request it. If the value is 'ask, then it will query you whether to fill. Filling is never done if the current text-width is the same as the value stored in the file. (defvar enriched-fill-after-visiting t (#$ . 972)) (byte-code "ÀÁ!„\"ÂÁ!ˆ ƒ\"ÄÁÅÆÇÈ #†ÅÉÇÈ #@\"ˆÀÊ!„4ÂÊ!ˆ ƒ4ËÊ!ˆÌ !†=Î ÏBÑÒÓ SÔ\"I‡" [internal-find-face fixed make-face window-system set-face-font x-list-fonts "*fixed-medium*" default selected-frame "*fixed*" excerpt make-face-italic 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 (quote (left-margin right-margin justification)) (#$ . 1677)) #@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 "ÀÁ \"‡" [format "Content-Type: text/enriched\nText-Width: %d\n\n" enriched-text-width] 3] (#$ . 1894)) #@46 General format of enriched-text annotations. (defconst enriched-annotation-format "<%s%s>" (#$ . 2239)) #@56 Regular expression matching enriched-text annotations. (defconst enriched-annotation-regexp "<\\(/\\)?\\([-A-za-z0-9]+\\)>" (#$ . 2349)) #@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 (quote ((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)))) (#$ . 2493)) #@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 (quote (front-sticky rear-nonsticky hard)) (#$ . 3228)) #@36 True if `enriched-mode' is in use. (defvar enriched-mode nil (#$ . 3491)) (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 enriched-mode is left. One way to do this is to add them and their old values to `enriched-old-bindings'. (defvar enriched-mode-hooks nil (#$ . 3695)) #@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 (#$ . 4003)) (byte-code "ÀÁ!ˆÂÃ!„\fÄà BÀÃ!‡" [make-variable-buffer-local enriched-old-bindings boundp enriched-text-width nil current-load-list] 2) #@361 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-hooks'. More information about enriched-mode is available in the file etc/enriched.doc in the Emacs distribution directory. Commands: \\{enriched-mode-map} (defalias 'enriched-mode #[(&optional arg) "À  !ÄX„ ƒ4 „4ÆÇÈ \" \nƒª\n@\nA@Lˆ\nAA‰\n‚ „ªËÈ >„GÈ B Ì\fÍ Îϯ\nÐÍ!ˆÐÎ!ˆÐÏ!ˆÑ \fËÓÔ\"ƒ—@>„Ž@BA‰„}ƒ¥ØÔ#*ÙÚ!ˆÛ !ˆÜ )‡" [buffer-modified-p mod prefix-numeric-value arg 0 enriched-mode nil delq text/enriched buffer-file-format enriched-old-bindings t buffer-display-table indent-line-function use-hard-newlines default-text-properties make-local-variable indent-to-left-margin enriched-display-table plist-get front-sticky enriched-par-props p sticky plist-put run-hooks enriched-mode-hooks set-buffer-modified-p force-mode-line-update] 9 (#$ . 4305) "P"]) #@29 Keymap for `enriched-mode'. (defvar enriched-mode-map nil (#$ . 5341)) (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) "ŠŒƒ\ne}ˆ †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 (#$ . 5792)]) (put (quote enriched-map-property-regions) (quote lisp-indent-hook) 1) #@45 Indent and justify each line in the region. (defalias 'enriched-insert-indentation #[(&optional from to) "ŠŒƒ\ne}ˆ †ebˆn„Âyˆm?…1l„+à jˆÄÅÆÅ#ˆÂyˆ‚*‡" [to from 1 current-left-margin justify-current-line t nil] 4 (#$ . 6554)]) #@132 The width of unindented text in this window, in characters. This is the width of the window minus `enriched-default-right-margin'. (defalias 'enriched-text-width #[nil "†Á ‰ Vƒ\n Z‚\n‰)‡" [enriched-text-width window-width ww enriched-default-right-margin] 3 (#$ . 6796)]) (defalias 'enriched-encode #[(from to) "ƒÁÂ!ˆŒ \f}ˆÅ ˆÆ ˆ bˆÇÈ!ˆÉÊ d Ì %!ˆ bˆ;ƒ4‚7 cˆÏÐÑ`Ò$ˆƒHÁÒ!ˆ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 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‡" ["" i ""] 3]] 5 (#$ . 7577)]) #@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 (#$ . 7960)]) #@37 Return annotations specifying FACE. (defalias 'enriched-face-ans #[(face) "ÀÁ !\"ƒÄ !ÅÆODC‡ÀÇ !\"ƒ&È !ÅÆODC‡É !\nË !\fÍ Î\"ÐÃÆ$A\nƒOÄ\nDB\fƒ]È\fDB,‡" [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 (#$ . 8199)]) (defalias 'enriched-decode #[(from to) "ƒÁÂ!ˆŠŒ \f}ˆ bˆÅ ÆÉ ˆ bˆÊËÌÆ#ƒBÍ ƒ/ÎÏ!ˆÐÑ”`ÒÆ$ˆÐÑ”`ÓÌ$ˆ‚Ô dÖ$ˆƒW× U„iƒiÙ=ƒoÚÛ!„oÜ ˆ‚|ƒwÁÝ!ˆÞed\"ˆ*ƒ…ÁÌ!ˆd*‡" [enriched-verbose message "Enriched: decoding document..." from to enriched-get-file-width t use-hard-newlines file-width enriched-remove-header search-forward-regexp "\n\n+" nil current-justification delete-char -1 put-text-property 0 hard front-sticky format-deannotate-region enriched-translations enriched-next-annotation enriched-text-width enriched-fill-after-visiting ask y-or-n-p "Re-fill for current display width? " enriched-insert-indentation "Filling paragraphs..." fill-region] 5]) #@169 Find and return next text/enriched annotation. Any "<<" strings encountered are coverted 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?…SÄ”\fÄ• ΔΕ{—Ô?\f F,‡" [search-forward "<" nil 1 0 looking-at enriched-annotation-regexp 60 delete-char message format "Warning: malformed annotation in file at %s" beg end 2 name pos] 4 (#$ . 9276)]) #@47 Look for file width information on this line. (defalias 'enriched-get-file-width #[nil "ŠÀÁ`Â\\Ã#…Äp!)‡" [search-forward "Text-Width: " 1000 t read] 4 (#$ . 9760)]) #@37 Remove file-format header at point. (defalias 'enriched-remove-header #[nil "ÀÁ!ƒ`•|ˆ‚ÀÃ!…ÄÅ!‡" [looking-at "^[-A-Za-z]+: .*\n" 0 "^\n" delete-char 1] 2 (#$ . 9933)]) (defalias 'enriched-decode-foreground #[(from to color) "ÀÁ\nP!Ä !„- ƒÆ !„- ƒ\"ÇÈ\n\"ˆ‚-É !ƒ-ÇÊ\n\"ˆ \fà F)‡" [intern "fg:" color face internal-find-face window-system facemenu-get-face message "Warning: color \"%s\" is not defined." make-face "Warning: Color \"%s\" can't be displayed." from to] 4]) (defalias 'enriched-decode-background #[(from to color) "ÀÁ\nP!Ä !„- ƒÆ !„- ƒ\"ÇÈ\n\"ˆ‚-É !ƒ-ÇÊ\n\"ˆ \fà F)‡" [intern "bg:" color face internal-find-face window-system facemenu-get-face message "Warning: color \"%s\" is not defined." make-face "Warning: Color \"%s\" can't be displayed." from to] 4])