;ELC   
;;; Compiled by nelhage@localhost.localdomain on Tue Dec 13 12:19:29 2005
;;; from file /home/nelhage/Desktop/bbdb-2.34/lisp/bbdb-sc.el
;;; in Emacs version 22.0.50.7
;;; 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 "`bbdb-sc.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\300\302!\207" [require bbdb supercite] 2)
#@172 t if you like to create a new BBDB entry when
entering a non-default attribution, 'ask if the user
should be asked before creation and NIL if we never create a new entry.
(custom-declare-variable 'bbdb/sc-replace-attr-p 't '(#$ . 664) :group 'bbdb-utilities-supercite :type '(choice (const "Create a new BBDB entry" t) (const "Confirm new record creation" ask) (const "Don't create a new entry" nil)))
#@60 The BBDB field used for Supercite attribution information.
(custom-declare-variable 'bbdb/sc-attribution-field ''attribution '(#$ . 1072) :group 'bbdb-utilities-supercite :type '(symbol :tag "Field name"))
#@117 Default attribution return by the SuperCite citation engine,
used to compare against citation selected by the user.
(custom-declare-variable 'bbdb/sc-last-attribution '"" '(#$ . 1285) :group 'bbdb-utilities-supercite :type '(string :tag "Default citation" ""))
#@110 Extract citing information from BBDB using sc-consult where
FROM is user e-mail address to look for in BBDB.
(defalias 'bbdb/sc-consult-attr #[(from) "\203 \306	\206 \307\310\311 !\312Q\211\"\203% \313\314\315!\206 !A@\202& \205S\316\211G\317=\2038 \316G\317=\203A \316\320\321!\210\f\205\224 \322\f\227r\323 q\210\320\316\321\"\210)\"J\316\203\221 @\f\227\324!\206z \325H\206z \326\227\230\203\210 \327C\"A)\202_ *;\203\255 \322\227r\323 q\210\320\316\321\"\210)\"J\202\327 \316\203\324 \204\324 \322@\227r\323 q\210\320\316\321\"\210)\"JA\211\204\264 )\316\211\203\347 \204\375 \203\362 @\206E\205E@\202E\203C@ \203/@ =\203&\316\211 \202A\211\204\203<A\202? \210*\202\375 -\211!\205R\330!\"\"))\207" [from bbdb-user-mail-names check net name bbdb-hashtable string-match "\\b" regexp-quote user-login-name "\\b" mail-extract-address-components sc-mail-field "to" nil 0 bbdb-records t intern-soft bbdb-buffer bbdb-record-name 3 "" append bbdb-record-getprop answer recs n-rec ret net-recs name-recs nets name-rec record bbdb/sc-attribution-field] 8 (#$ . 1553)])
#@24 Add attribute to BBDB.
(defalias 'bbdb/sc-set-attr #[nil "\306\307!\306\310!\306\311!\211\205u \205u \205u \f\230?\205u \312\206- \313\314\315 !\316Q\211	\"?\205u \317\320\n\321\322!\321$\211\205t \323\324\"\211\205T \230?\205s \325=\203f \326\327P!\205s \330#\210\331\317\")*+\207" [attr address from bbdb/sc-replace-attr-p bbdb/sc-last-attribution bbdb-user-mail-names sc-mail-field "from" "sc-from-address" "sc-attribution" string-match "\\b" regexp-quote user-login-name "\\b" nil bbdb-annotate-message-sender t bbdb-invoke-hook-for-value bbdb-record-getprop attribution ask y-or-n-p "Change attribution " bbdb-record-putprop bbdb-change-record bbdb-notice-hook bbdb/mail-auto-create-p record old bbdb/sc-attribution-field] 6 (#$ . 2748)])
#@167 If the current "from" field in `sc-mail-info' alist
contains only an e-mail address, lookup e-mail address in
BBDB, and prepend a new "from" field to `sc-mail-info'.
(defalias 'bbdb/sc-default #[nil "\306\307!\211\205 \310!\211\205K	@?\205K\311	A@\211G\312=\203% \311\nG\312=\203. \311\313\314!\210\205~ \315\227r\316 q\210\313\311\314\"\210\f)\"J\311\203| @\227\317!\206f \320H\206f \321\227\230\203s \322C\"A)\202K *\n;\203\227 \315\n\227r\316 q\210\313\311\314\"\210\f)\"J\202\275 \311\n\203\273 \204\273 \315\n@\227r\316 q\210\313\311\314\"\210\f)\"J\nA\211\204\235 )\311\211\203\315 \204\343 \203\330 @\206+\205+@\202+\203)@\203@=\203\f\311\211\202\361 A\211\204\366 \203\"A\202%\210*\202\343 -\211\2056\317!\211\205J\323\324\325	A@#BB\211**\207" [from pair net name bbdb-hashtable answer sc-mail-field "from" mail-extract-address-components nil 0 bbdb-records t intern-soft bbdb-buffer bbdb-record-name 3 "" append "from" format "%s (%s)" recs n-rec ret net-recs name-recs nets name-rec record sc-mail-info] 8 (#$ . 3529)])
#@463 Set up the various Supercite variables for the BBDB.
`sc-preferred-attribution-list', `sc-attrib-selection-list', and
`sc-mail-glom-frame' are set, but only if they have not previously
been defined.  It is strongly suggested that you not call this
function directly, but that you use this function (specifically the
settings contained herein) as an example.  In other words, set these
variables yourself, either in your Emacs configuration file or using
Custom.
(defalias 'bbdb/sc-setup-variables #[nil "\301\300!\203 \302\235\204 \303\304!\210\202 \305\300!\204 \306\300\307\"\210\305\310!\204) \306\310\311\"\210\305\312!\2044 \306\312\313\"\210\312\207" [sc-preferred-attribution-list boundp "sc-consult" bbdb-warn "\"sc-consult\" not included in sc-preferred-attribution-list.  Attributions cannotbe gathered from the BBDB without \"sc-consult\"in sc-preferred-attribution-list" default-boundp set-default ("sc-lastchoice" "x-attribution" "sc-consult" "initials" "firstname" "lastname") sc-attrib-selection-list (("sc-from-address" ((".*" bbdb/sc-consult-attr (sc-mail-field "sc-from-address"))))) sc-mail-glom-frame ((begin (setq sc-mail-headers-start (point))) ("^x-attribution:[ 	]+.*$" (sc-mail-fetch-field t) nil t) ("^\\S +:.*$" (sc-mail-fetch-field) nil t) ("^$" (progn (bbdb/sc-default) (list 'abort '(step . 0)))) ("^[ 	]+" (sc-mail-append-field)) (sc-mail-warn-if-non-rfc822-p (sc-mail-error-in-mail-field)) (end (setq sc-mail-headers-end (point))))] 3 (#$ . 4682)])
(byte-code "\301B\302\301!\204 \303\301\304\"\210\304\207" [current-load-list attribution default-boundp set-default nil] 3)
#@49 Call this function to hook BBDB into Supercite.
(defalias 'bbdb-insinuate-sc #[nil "\300\301\302\"\210\300\303\304\"\207" [add-hook sc-post-hook bbdb/sc-set-attr sc-attribs-postselect-hook #[nil "\203	 	\227\202\n 	\211\207" [sc-downcase-p attribution bbdb/sc-last-attribution] 2]] 3 (#$ . 6302)])
(provide 'bbdb-sc)
