;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:41:20 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/facemenu.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(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 "`facemenu.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\301\302!\210\303\304\305#\210\303\306\307#\210\310\302\311\312\313\314\315\316&\207" [global-map provide facemenu define-key [C-down-mouse-2] facemenu-menu "\347" facemenu-keymap custom-declare-group nil "Create a face menu for interactively adding fonts to text" :group faces :prefix "facemenu-"] 8)
#@593 Alist of interesting faces and keybindings. 
Each element is itself a list: the car is the name of the face,
the next element is the key to use as a keyboard equivalent of the menu item;
the binding is made in `facemenu-keymap'.

The faces specifically mentioned in this list are put at the top of
the menu, in the order specified.  All other faces which are defined,
except for those in `facemenu-unlisted-faces', are listed after them, 
but get no keyboard equivalents.

If you change this variable after loading facemenu.el, you will need to call
`facemenu-update' to make it take effect.
(custom-declare-variable 'facemenu-keybindings ''((default . "d") (bold . "b") (italic . "i") (bold-italic . "l") (underline . "u")) '(#$ . 936) :type '(repeat (cons face string)) :group 'facemenu)
#@155 *Where in the menu to insert newly-created faces.
This should be nil to put them at the top of the menu, or t to put them
just before "Other" at the end.
(custom-declare-variable 'facemenu-new-faces-at-end 't '(#$ . -1733) :type 'boolean :group 'facemenu)
#@705 *List of faces not to include in the Face menu.
Each element may be either a symbol, which is the name of a face, or a string,
which is a regular expression to be matched against face names.  Matching
faces will not be added to the menu.

You can set this list before loading facemenu.el, or add a face to it before
creating that face if you do not want it to be listed.  If you change the
variable so as to eliminate faces that have already been added to the menu,
call `facemenu-update' to recalculate the menu contents.

If this variable is t, no faces will be added to the menu.  This is useful for
temporarily turning off the feature that automatically adds faces to the menu
when they are created.
(custom-declare-variable 'facemenu-unlisted-faces '`(modeline region secondary-selection highlight scratch-face ,(purecopy "^font-lock-") ,(purecopy "^gnus-") ,(purecopy "^message-") ,(purecopy "^ediff-") ,(purecopy "^term-") ,(purecopy "^vc-") ,(purecopy "^widget-") ,(purecopy "^custom-") ,(purecopy "^vm-")) '(#$ . -1996) :type '(choice (const :tag "Don't add" t) (const :tag "None" nil) (repeat (choice symbol regexp))) :group 'facemenu)
#@24 Menu keymap for faces.
(defvar facemenu-face-menu (byte-code "\301\302!\303\304\305\306B#\210)\207" [map make-sparse-keymap "Face" define-key "o" "Other..." facemenu-set-face] 5) (#$ . 3148))
(defalias 'facemenu-face-menu facemenu-face-menu)
#@36 Menu keymap for foreground colors.
(defvar facemenu-foreground-menu (byte-code "\301\302!\303\304\305\306B#\210)\207" [map make-sparse-keymap "Foreground Color" define-key "o" "Other..." facemenu-set-foreground] 5) (#$ . 3399))
(defalias 'facemenu-foreground-menu facemenu-foreground-menu)
#@36 Menu keymap for background colors.
(defvar facemenu-background-menu (byte-code "\301\302!\303\304\305\306B#\210)\207" [map make-sparse-keymap "Background Color" define-key "o" "Other..." facemenu-set-background] 5) (#$ . 3698))
(defalias 'facemenu-background-menu facemenu-background-menu)
#@43 Menu keymap for non-face text-properties.
(defvar facemenu-special-menu (byte-code "\301\302!\303\304\305\306!\307B#\210\303\310\305\311!\312B#\210\303\313\305\314!\315B#\210\303\316\305\317!\320B#\210)\207" [map make-sparse-keymap "Special" define-key [115] purecopy "Remove Special" facemenu-remove-special [116] "Intangible" facemenu-set-intangible [118] "Invisible" facemenu-set-invisible [114] "Read-Only" facemenu-set-read-only] 5) (#$ . 3997))
(defalias 'facemenu-special-menu facemenu-special-menu)
#@42 Submenu for text justification commands.
(defvar facemenu-justification-menu (byte-code "\301\302!\303\304\305\306!\307B#\210\303\310\305\311!\312B#\210\303\313\305\314!\315B#\210\303\316\305\317!\320B#\210\303\321\305\322!\323B#\210)\207" [map make-sparse-keymap "Justification" define-key [99] purecopy "Center" set-justification-center [98] "Full" set-justification-full [114] "Right" set-justification-right [108] "Left" set-justification-left [117] "Unfilled" set-justification-none] 5) (#$ . 4516))
(defalias 'facemenu-justification-menu facemenu-justification-menu)
#@35 Submenu for indentation commands.
(defvar facemenu-indentation-menu (byte-code "\301\302!\303\304\305\306!\307B#\210\303\310\305\311!\312B#\210\303\313\305\314!\315B#\210\303\316\305\317!\320B#\210)\207" [map make-sparse-keymap "Indentation" define-key [decrease-right-margin] purecopy "Indent Right Less" decrease-right-margin [increase-right-margin] "Indent Right More" increase-right-margin [decrease-left-margin] "Indent Less" decrease-left-margin [increase-left-margin] "Indent More" increase-left-margin] 5) (#$ . 5102))
(defalias 'facemenu-indentation-menu facemenu-indentation-menu)
#@33 Facemenu top-level menu keymap.
(defvar facemenu-menu nil (#$ . 5705))
(byte-code "\302\303!\211\304	\305\306\307!\310B#\210\304	\311\306\312!\313B#\210\304	\314\306\315!\316B#\210\304	\317\306\320!\321B#\210\304	\322\306\323!\324B#\210\304	\325\306\326!C#\210)\304	\327\306\330!\331B#\210\304	\332\306\333!\334B#\210\304	\335\306\326!C#\210\304	\336\306\337!\340B#\210\304	\341\306\342!\343B#\210\304	\344\306\345!\346B#\210\304	\347\306\350!\351B#\210)\352\300\"\207" [facemenu-menu map make-sparse-keymap "Text Properties" define-key [dc] purecopy "Display Colors" list-colors-display [df] "Display Faces" list-faces-display [dp] "List Properties" list-text-properties-at [ra] "Remove Text Properties" facemenu-remove-all [rm] "Remove Face Properties" facemenu-remove-face-props [s1] "--" [in] "Indentation" facemenu-indentation-menu [ju] "Justification" facemenu-justification-menu [s2] [sp] "Special Properties" facemenu-special-menu [bg] "Background Color" facemenu-background-menu [fg] "Foreground Color" facemenu-foreground-menu [fc] "Face" facemenu-face-menu defalias] 6)
#@137 Keymap for face-changing commands.
`Facemenu-update' fills in the keymap according to the bindings
requested in `facemenu-keybindings'.
(defvar facemenu-keymap (byte-code "\301\302!\303\304\305\306!\307B#\210)\207" [map make-sparse-keymap "Set face" define-key "o" purecopy "Other..." facemenu-set-face] 5) (#$ . 6798))
(defalias 'facemenu-keymap facemenu-keymap)
#@204 Function called at beginning of text to change or nil.
This function is passed the FACE to set and END of text to change, and must
return a string which is inserted.  It may set `facemenu-end-add-face'.
(custom-declare-variable 'facemenu-add-face-function 'nil '(#$ . 7172) :type '(choice (const :tag "None" nil) function) :group 'facemenu)
#@155 String to insert or function called at end of text to change or nil.
This function is passed the FACE to set, and must return a string which is
inserted.
(custom-declare-variable 'facemenu-end-add-face 'nil '(#$ . 7520) :type '(choice (const :tag "None" nil) string function) :group 'facemenu)
#@178 When non-nil, this is a function called to remove faces.
This function is passed the START and END of text to change.
May also be t meaning to use `facemenu-add-face-function'.
(custom-declare-variable 'facemenu-remove-face-function 'nil '(#$ . 7821) :type '(choice (const :tag "None" nil) (const :tag "Use add-face" t) function) :group 'facemenu)
#@83 Alist of colors, used for completion.
If null, `facemenu-read-color' will set it.
(defvar facemenu-color-alist nil (#$ . 8175))
#@138 Add or update the "Face" menu in the menu bar.
You can call this to update things if you change any of the menu configuration
variables.
(defalias 'facemenu-update #[nil "\301\302\303!\"\207" [facemenu-keybindings facemenu-iterate facemenu-add-new-face facemenu-complete-face-list] 4 (#$ . 8310) nil])
#@552 Add FACE to the region or next character typed.
It will be added to the top of the face list; any faces lower on the list that
will not show through at all will be removed.

Interactively, the face to be used is read with the minibuffer.

In the Transient Mark mode, if the region is active and there is no
prefix argument, this command sets the region to the requested face.

Otherwise, this command specifies the face for the next character
inserted.  Moving point or switching buffers before
typing a character to insert cancels the specification.
(defalias 'facemenu-set-face #[(face &optional start end) "\305 \210\306!\210	\203$ \n\204$ \206 \307 \f\206 \310 \311\f#*\207\311!\207" [face mark-active current-prefix-arg start end barf-if-buffer-read-only facemenu-add-new-face region-beginning region-end facemenu-add-face] 4 (#$ . 8620) (list (read-face-name "Use face"))])
#@437 Set the foreground COLOR of the region or next character typed.
The color is prompted for.  A face named `fg:color' is used (or created).
If the region is active, it will be set to the requested face.  If
it is inactive (even if mark-even-if-inactive is set) the next
character that is typed (via `self-insert-command') will be set to
the selected face.  Moving point or switching buffers before
typing a character cancels the request.
(defalias 'facemenu-set-foreground #[(color &optional start end) "\304\305P!\306	!\204 \307\310\"\210\311	\n#)\207" [color face start end intern "fg:" facemenu-get-face error "Unknown color: %s" facemenu-set-face] 4 (#$ . 9516) (list (facemenu-read-color "Foreground color: "))])
#@437 Set the background COLOR of the region or next character typed.
The color is prompted for.  A face named `bg:color' is used (or created).
If the region is active, it will be set to the requested face.  If
it is inactive (even if mark-even-if-inactive is set) the next
character that is typed (via `self-insert-command') will be set to
the selected face.  Moving point or switching buffers before
typing a character cancels the request.
(defalias 'facemenu-set-background #[(color &optional start end) "\304\305P!\306	!\204 \307\310\"\210\311	\n#)\207" [color face start end intern "bg:" facemenu-get-face error "Unknown color: %s" facemenu-set-face] 4 (#$ . 10244) (list (facemenu-read-color "Background color: "))])
#@459 Set the FACE of the region or next character typed.
This function is designed to be called from a menu; the face to use
is the menu item's name.

In the Transient Mark mode, if the region is active and there is no
prefix argument, this command sets the region to the requested face.

Otherwise, this command specifies the face for the next character
inserted.  Moving point or switching buffers before
typing a character to insert cancels the specification.
(defalias 'facemenu-set-face-from-menu #[(face start end) "\303 \210\304!\210	\203 \305	\n#\207\305!\207" [face start end barf-if-buffer-read-only facemenu-get-face facemenu-add-face] 4 (#$ . 10973) (list last-command-event (if (and mark-active (not current-prefix-arg)) (region-beginning)) (if (and mark-active (not current-prefix-arg)) (region-end)))])
#@118 Make the region invisible.
This sets the `invisible' text property; it can be undone with
`facemenu-remove-special'.
(defalias 'facemenu-set-invisible #[(start end) "\302	\303#\207" [start end add-text-properties (invisible t)] 4 (#$ . 11797) "r"])
#@145 Make the region intangible: disallow moving into it.
This sets the `intangible' text property; it can be undone with
`facemenu-remove-special'.
(defalias 'facemenu-set-intangible #[(start end) "\302	\303#\207" [start end add-text-properties (intangible t)] 4 (#$ . 12054) "r"])
#@121 Make the region unmodifiable.
This sets the `read-only' text property; it can be undone with
`facemenu-remove-special'.
(defalias 'facemenu-set-read-only #[(start end) "\302	\303#\207" [start end add-text-properties (read-only t)] 4 (#$ . 12340) "r"])
#@49 Remove `face' and `mouse-face' text properties.
(defalias 'facemenu-remove-face-props #[(start end) "\303\304	\n\305#)\207" [inhibit-read-only start end t remove-text-properties (face nil mouse-face nil)] 4 (#$ . 12599) "*r"])
#@45 Remove all text properties from the region.
(defalias 'facemenu-remove-all #[(start end) "\303\304	\n\305#)\207" [inhibit-read-only start end t set-text-properties nil] 4 (#$ . 12833) "*r"])
#@135 Remove all the "special" text properties from the region.
These special properties include `invisible', `intangible' and `read-only'.
(defalias 'facemenu-remove-special #[(start end) "\303\304	\n\305#)\207" [inhibit-read-only start end t remove-text-properties (invisible nil intangible nil read-only nil)] 4 (#$ . 13032) "*r"])
#@54 Pop up a buffer listing text-properties at LOCATION.
(defalias 'list-text-properties-at #[(p) "\305!\306\211\211\204 \307\310!\202\230 AA\2048 @\302=\2048 \311\312@A@$\211G\313 W\2038 \307\314	\"\202\230 \315\220\316\311\317\"!\210\306\203e @\302=\203R A@\316\311\320@A@#!\210AA\211\204G \n\205\227 \321\n!\316\311\322\n\"!\210\205\227 \316\311\320@A@#!\210@\302=\203\216 A@AA\211\204x \306\221+\207" [p str category props help-xref-stack text-properties-at nil message "None" format "Text property at %d:  %s  %S" frame-width "%s" "*Text Properties*" princ "Text properties at %d:\n\n" "%-20s %S\n" symbol-plist "\nCategory %s:\n\n"] 7 (#$ . 13368) "d"])
#@36 Read a color using the minibuffer.
(defalias 'facemenu-read-color #[(&optional prompt) "\303\206 \304	\206 \305\306\307 \"\310\311$\211\312\232?\205 \n)\207" [prompt facemenu-color-alist col completing-read "Color: " mapcar list defined-colors nil t ""] 6 (#$ . 14060)])
#@236 Display names of defined colors, and show what they look like.
If the optional argument LIST is non-nil, it should be a list of
colors to display.  Otherwise, this command computes a list
of colors that the current display can handle.
(defalias 'list-colors-display #[(&optional list) "\204) \304 \211	A\203( \305	@	A@\"\203! 	\211AA\241\210\202	 	A\211\202\n )\306\220\212\nq\210\307\205c `@c\210\310j\210\311`\312\313@B$\210`\314@\315\261\210\311`\312\316@B$\210A\211\2045 \307*\221\207" [list l standard-output s defined-colors facemenu-color-equal "*Colors*" nil 20 put-text-property face background-color "  " "\n" foreground-color] 8 (#$ . 14343) nil])
#@251 Return t if colors A and B are the same color.
A and B should be strings naming colors.
This function queries the display system to find out what the color
names mean.  It returns nil if the colors differ or if it can't
determine the correct answer.
(defalias 'facemenu-color-equal #[(a b) "	\232\203 \302\207\303!\303	!\232\207" [a b t color-values] 3 (#$ . 15026)])
#@626 Add FACE to text between START and END.
If START is nil or START to END is empty, add FACE to next typed character
instead.  For each section of that region that has a different face property,
FACE will be consed onto it, and other faces that are completely hidden by
that will be removed from the list.
If `facemenu-add-face-function' and maybe `facemenu-end-add-face' are non-`nil'
they are used to set the face information.

As a special case, if FACE is `default', then the region is left with NO face
text property.  Otherwise, selecting the default face would not have any
effect.  See `facemenu-remove-face-function'.
(defalias 'facemenu-add-face #[(face &optional start end) "\306=\203, 	\307=\204, 	\203 	\n\"\207\n\203% \nW\203% \310\n\311#\207\306\211\207\203a \212\2039 b\210\212\n\203A \nb\210\312\"!\210)\205_ ;\203Z \202^ !c)\207\n\203\266 \nW\203\266 \n\313\211U?\205\264 \314\300\313$\315\300\"\316\300\204\227 \202\251 \317<\203\244 \202\247 CB!$\210)\211\202r *\207=\203\316 \f<\203\310 \f\202\312 \fCB\202\317 \211\207" [face facemenu-remove-face-function start end self-insert-face this-command default t remove-text-properties (face default) insert-before-markers nil next-single-property-change get-text-property put-text-property facemenu-active-faces self-insert-face-command facemenu-add-face-function facemenu-end-add-face part-end part-start prev last-command] 8 (#$ . 15404) "*xFace: \nr"])
#@363 Return from FACE-LIST those faces that would be used for display.
This means each face attribute is not specified in a face earlier in FACE-LIST
and such a face is therefore active when used to display text.
If the optional argument FRAME is given, use the faces in that frame; otherwise
use the selected frame.  If t, then the global, non-frame faces are used.
(defalias 'facemenu-active-faces #[(face-list &optional frame) "\306\307@	\"!@CA\nG\203X \307@	\"\f\310\fS\211\311V\203G \fH\203\" \nH\204\" \n\312\211I\210\202\" +\203Q @BA\211\204 \237,\207" [face-list frame mask-atts active-list mask-len useful copy-sequence internal-get-face nil 1 t i face-atts] 5 (#$ . 16900)])
#@359 Make sure FACE exists.
If not, create it and add it to the appropriate menu.  Return the SYMBOL.

If a window system is in use, and this function creates a face named
`fg:color', then it sets the foreground to that color.  Likewise, `bg:color'
means to set the background.  In either case, if the color is undefined,
no color is set and a warning is issued.
(defalias 'facemenu-get-face #[(symbol) "\305!\306\307!\204Q \310 \203M \311\312\n\"\211\204! \311\313\n\"\203M \314!\n\315\306O\316!\203D 	\203< \317\f\"\210\202I \320\f\"\210\202I \321\322\"\210*\202Q \314!\210*\207" [symbol foreground name color face symbol-name nil facep display-color-p string-match "^fg:" "^bg:" make-face 3 x-color-defined-p set-face-foreground set-face-background message "Color \"%s\" undefined"] 4 (#$ . 17620)])
#@91 Add a FACE to the appropriate Face menu.
Automatically called when a new face is created.
(defalias 'facemenu-add-new-face #[(face) "\306!\307\307\310\f\"A\307\"\307#\311\312	\"\203* 	\313\307O\314\315	\"\316\202G \311\317	\"\203@ 	\313\307O\314\320	\"\321\202G \314\322	\"\323$\324=\204\371 $>\204\371 $\307%&&\203\205 %\204\205 &@;\203| \311&@	\"\203| \324%\202\\ &A\211&\204a %*\204\371 \203\271 \325\326	P!\211\"\327\307\330\331\332DD\257M\210\333\334	\"B#\210\333\n	\"B#\210\202\371 \335\336\nKA\"\204\371 \337!\340\"\nK#'\203\360 #G\313V\203\360 \341#	\"B#G\313Z#8@$\210\202\371 \333\n	\"B#\210.\307\207" [face name menu docstring facemenu-keybindings key symbol-name nil assoc string-match "^fg:" 3 format "Select foreground color %s for subsequent insertion." facemenu-foreground-menu "^bg:" "Select background color %s for subsequent insertion." facemenu-background-menu "Select face `%s' for subsequent insertion." facemenu-face-menu t intern "facemenu-set-" lambda (interactive) facemenu-set-face quote define-key facemenu-keymap facemenu-iterate #[(m) "<\205 @9\205 \302@	\"\207" [m face face-equal] 3] vector facemenu-set-face-from-menu define-key-after function menu-val facemenu-unlisted-faces matched unlisted facemenu-new-faces-at-end] 9 (#$ . 18438)])
#@251 Return list of all faces that look different.
Starts with given ALIST of faces, and adds elements only if they display 
differently from any face already on the list.
The faces on ALIST will end up at the end of the returned list, in reverse 
order.
(defalias 'facemenu-complete-face-list #[(&optional oldlist) "\302\303\"\237\304\305\306 \237\"\210	)\207" [oldlist list mapcar car facemenu-iterate #[(new-face) "	>\204\n 	B\302\207" [new-face list nil] 2] face-list] 3 (#$ . 19773)])
#@123 Apply FUNC to each element of LIST until one returns non-nil.
Returns the non-nil value it found, or nil if all were nil.
(defalias 'facemenu-iterate #[(func list) "\203 	@!\204 A\211\204 @\207" [list func] 3 (#$ . 20270)])
(facemenu-update)
