;ELC   
;;; Compiled by jmorzins@kamp-krusty.mit.edu on Mon Oct  3 10:37:26 2005
;;; from file /afs/sipb/contrib/emacs/packages/mh-e-7.82/mh-identity.el
;;; in Emacs version 21.4.1
;;; 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 "`mh-identity.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\300\302!\210\303\304\305\"\207" [require cl mh-comp autoload mml-insert-tag "mml"] 3)
#@111 Holds the GPG key ID to be used by pgg.el.
This is normally set as part of an Identity in `mh-identity-list'.
(defvar mh-identity-pgg-default-user-id nil (#$ . 753))
(make-variable-buffer-local 'mh-identity-pgg-default-user-id)
#@109 Build the Identity menu.
This should be called any time `mh-identity-list' or `mh-auto-fields-list'
change.
(defalias 'mh-identity-make-menu #[nil "\303\300\304\305#\210\306\300!\204 \307\310\300	\305\311\312\313\314\315\314\316\n\"\"\317$$\207" [mh-identity-menu mh-letter-mode-map mh-identity-list put variable-documentation "MH-E identity menu" boundp nil easy-menu-do-define append ("Identity") (["Insert Auto Fields" (mh-insert-auto-fields) mh-auto-fields-list] "--") mapcar #[(arg) "\301\302D\303\304\305\306\307E&\207" [arg vector mh-insert-identity :style radio :selected equal mh-identity-local] 9] car (["None" (mh-insert-identity "None") :style radio :selected (not mh-identity-local)] "--" ["Set Default for Session" (setq mh-identity-default mh-identity-local) t] ["Save as Default" (customize-save-variable 'mh-identity-default mh-identity-local) t] ["Customize Identities" (customize-variable 'mh-identity-list) t])] 12 (#$ . 988)])
#@223 Update the `mh-identity-list' variable, and rebuild the menu.
Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in
customization).  This is called after 'customize is used to alter
`mh-identity-list'.
(defalias 'mh-identity-list-set #[(symbol value) "\302	\"\210\303 \207" [symbol value set-default mh-identity-make-menu] 3 (#$ . 1949)])
#@62 Buffer-local variable holding the identity currently in use.
(defvar mh-identity-local nil (#$ . 2315))
(make-variable-buffer-local 'mh-identity-local)
#@105 Delete FIELD in the mail header, or only its value if VALUE-ONLY is t.
Return t if anything is deleted.
(defalias 'mh-header-field-delete #[(field value-only) "\303\304\"\203 \202 \305P\306	!\2051 \n\204 \307 \210\202\" \310u\210`\311 \210\n\204- \312u\210`|\210\313)\207" [field field-colon value-only string-match "^.*:$" ":" mh-goto-header-field beginning-of-line nil mh-header-field-end 1 t] 3 (#$ . 2474)])
#@75 Marker for the beginning of a signature inserted by `mh-insert-identity'.
(defvar mh-identity-signature-start nil (#$ . 2899))
#@69 Marker for the end of a signature inserted by `mh-insert-identity'.
(defvar mh-identity-signature-end nil (#$ . 3032))
#@257 Return the handler for a FIELD or nil if none set.
The field name is downcased. If the FIELD begins with the character
`:', then it must have a special handler defined in
`mh-identity-handlers', else return an error since it is not a legal
message header.
(defalias 'mh-identity-field-handler #[(field) "\302\227	\"A\206# \303H\304=\203 \305\306\307\"!\206# \302\310	\"A\206# \311\207" [field mh-identity-handlers assoc 0 58 error format "Field %s - unknown mh-identity-handler" ":default" mh-identity-handler-default] 4 (#$ . 3158)])
#@99 Insert proper fields for given IDENTITY.
Edit the `mh-identity-list' variable to define identity.
(defalias 'mh-insert-identity #[(identity) "\212\203, \306	\"\211A@)\211\203+ \211@@)\307\f!\211\f\310\"\210*A\211\204 )\f\311\232\204e \306\f	\"\211A@)\211\203d \211@@)\211@A)\307\f!\211\f\312#\210+A\211\204B ))\f\311\232\203q \313\211\207\f\211\207" [mh-identity-local mh-identity-list x pers-list field handler assoc mh-identity-field-handler remove "None" add nil identity value] 5 (#$ . 3703) (list (completing-read "Identity: " (if mh-identity-local (cons '("None") (mapcar 'list (mapcar 'car mh-identity-list))) (mapcar 'list (mapcar 'car mh-identity-list))) nil t))])
#@176 For FIELD "pgg-default-user-id", process for ACTION 'remove or 'add.
The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE
when action 'add is selected.
(defalias 'mh-identity-handler-gpg-identity #[(field action &optional value) "\303\232\204 	\203 	\304\230\203 \305\211\207\306\232\205 	\211\207" [action value mh-identity-pgg-default-user-id remove "" nil add] 2 (#$ . 4415)])
#@88 For FIELD "signature", process headers for ACTION 'remove or 'add.
The VALUE is added.
(defalias 'mh-identity-handler-signature #[(field action &optional value) "\304\232\203 \305	!\205 \305\n!\205E 	\n|\207\306 ?\205E db\210\214``}\210\204. \307 \210\2022 \307!\210\310\301!\311 L\210\312	\313\"\210\310\302!\314 L)\207" [action mh-identity-signature-start mh-identity-signature-end value remove markerp mh-signature-separator-p mh-insert-signature make-local-variable point-min-marker set-marker-insertion-type t point-max-marker] 3 (#$ . 4832)])
#@51 Marker for the beginning of the attribution verb.
(defvar mh-identity-attribution-verb-start nil (#$ . 5392))
#@45 Marker for the end of the attribution verb.
(defvar mh-identity-attribution-verb-end nil (#$ . 5508))
#@95 For FIELD "attribution_verb", process headers for ACTION 'remove or 'add.
The VALUE is added.
(defalias 'mh-identity-handler-attribution-verb #[(field action &optional value) "\304!\205  \304	!\205  	|\210b\210\n\305\232\203 \306\307!\207\306!\207" [mh-identity-attribution-verb-start mh-identity-attribution-verb-end action value markerp remove mh-identity-insert-attribution-verb nil] 2 (#$ . 5616)])
#@123 Insert VALUE as attribution verb, setting up delimiting markers.
If VALUE is nil, use `mh-extract-from-attribution-verb'.
(defalias 'mh-identity-insert-attribution-verb #[(value) "\214``}\210\204 	c\210\202 c\210\303\302!\304 L\210\305\n\306\"\210\303\307!\310 L)\207" [value mh-extract-from-attribution-verb mh-identity-attribution-verb-start make-local-variable point-min-marker set-marker-insertion-type t mh-identity-attribution-verb-end point-max-marker] 3 (#$ . 6031)])
#@183 For FIELD, process mh-identity headers for ACTION 'remove or 'add.
if TOP is non-nil, add the field and it's VALUE at the top of the header, else
add it at the bottom of the header.
(defalias 'mh-identity-handler-default #[(field action top &optional value) "\305\306\"\203 \202 \307P\n\310\232\203 \311	\312\"\202J \203& \313\230\203- \311	\312\"\202J \311	\314\"\2039 c\202J eb\210\f\204D \315\316!\210	\317\320\261)\207" [field field-colon action value top string-match "^.*:$" ":" remove mh-header-field-delete nil "" t mh-goto-header-end 0 " " "\n"] 4 (#$ . 6518)])
#@142 For FIELD, process mh-identity headers for ACTION 'remove or 'add.
If the field wasn't present, the VALUE is added at the top of the header.
(defalias 'mh-identity-handler-top #[(field action &optional value) "\303	\304\n$\207" [field action value mh-identity-handler-default t] 5 (#$ . 7108)])
#@145 For FIELD, process mh-identity headers for ACTION 'remove or 'add.
If the field wasn't present, the VALUE is added at the bottom of the header.
(defalias 'mh-identity-handler-bottom #[(field action &optional value) "\303	\304\n$\207" [field action value mh-identity-handler-default nil] 5 (#$ . 7411)])
(provide 'mh-identity)
