;ELC   
;;; compiled by amu@mit.edu on Fri May 16 19:55:13 1997
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/bbdb-1.50/bbdb-mhe.el
;;; emacs version 19.30.1.
;;; 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.29")))
    (error "`bbdb-mhe.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!!" [require bbdb mh-e advice] 2)
#@36 Return a (numeric) key for MESSAGE
(defalias 'bbdb/mh-cache-key '(macro . #[(message) "DDBBB" [let* attrs file-attributes message ((status-time (nth 6 attrs)) (status-time-2 (cdr status-time))) ((logxor (nth 10 attrs) (car status-time) (if (integerp status-time-2) status-time-2 (car status-time-2))))] 4 (#$ . 543)]))
#@232 Returns the record corresponding to the current MH message, creating or
modifying it as necessary.  A record will be created if 
bbdb/mail-auto-create-p is non-nil, or if OFFER-TO-CREATE is true and
the user confirms the creation.
(defalias 'bbdb/mh-update-record #[(&optional offer-to-create) " \n!\f!8A8@' * @#+=7  g ` AHH` \"͂c A) !͉ژ   !Q!\" !ژ   !Q!\"  %! \n\n$& & p!&BB@A &)+)" [bbdb-use-pop-up bbdb/mh-pop-up-bbdb-buffer offer-to-create file-attributes buffer-file-name attrs 6 status-time status-time-2 logxor 10 msg 0 nil bbdb-records bbdb-message-caching-enabled bbdb-message-cache --cons-- 8 3 delq bbdb/mh-get-field "^From[ 	]*:" net name from "" string-match bbdb-user-mail-names "\\b" regexp-quote user-login-name mail-strip-quoted-names "^To[ 	]*:" bbdb-annotate-message-sender t bbdb-invoke-hook-for-value bbdb/mail-auto-create-p --rec-- notice-buffer-with-cache] 6 (#$ . 876)])
#@107 Add a line to the end of the Notes field of the BBDB record 
corresponding to the sender of this message.
(defalias 'bbdb/mh-annotate-sender #[(string) " p`q!\"\nq	b*" [mh-show p b mh-show-buffer bbdb-annotate-notes bbdb/mh-update-record t string] 3 (#$ . 1937) (list (if bbdb-readonly-p (error "The Insidious Big Brother Database is read-only.") (read-string "Comments: ")))])
#@130 Edit the notes field or (with a prefix arg) a user-defined field
of the BBDB record corresponding to the sender of this message.
(defalias 'bbdb/mh-edit-notes #[(&optional arg) " p`q! !	\n	C!\f- 	#3 	\"*\nq	b*" [mh-show p b mh-show-buffer nil bbdb/mh-update-record t error "" record bbdb-electric-p bbdb-display-records arg bbdb-record-edit-property bbdb-record-edit-notes] 4 (#$ . 2336) "P"])
#@129 Display the contents of the BBDB for the sender of this message.
This buffer will be in bbdb-mode, with associated keybindings.
(defalias 'bbdb/mh-show-sender #[nil " p`q! C!  !)\nq	b*" [mh-show p b mh-show-buffer bbdb/mh-update-record t record bbdb-display-records error "unperson"] 3 (#$ . 2769) nil])
#@137 Make the *BBDB* buffer be displayed along with the MH window,
displaying the record corresponding to the sender of the current message.
(defalias 'bbdb/mh-pop-up-bbdb-buffer #[(&optional offer-to-create) "!É!! \n \f\f) \fC!\f-" [bbdb-pop-up-bbdb-buffer #[(w) "p\n!q=q)" [b window-buffer w major-mode mh-folder-mode] 2] t nil bbdb-electric-p bbdb-use-pop-up bbdb-gag-messages bbdb/mh-update-record offer-to-create boundp bbdb-pop-up-elided-display bbdb-elided-display record bbdb-display-records] 3 (#$ . 3103)])
#@47 Invoked after message is displayed in buffer.
(defvar mh-show-message-hook nil (#$ . 3660))
(byte-code "$\"" [ad-add-advice mh-display-msg (mh-bbdb-display-msg nil t (advice lambda nil (run-hooks (quote mh-show-message-hook)))) after nil ad-activate-on] 5)
(defalias 'bbdb/mh-get-field #[(field) "eb# łQ ! łQ #ɔɕ{`\ny!9 y- !`\nXH P \n`{#*)" [nil case-fold-search re-search-forward field t "" looking-at "[	 ]*$" "[	 ]*\\([^	 \n].*\\)$" 1 end-of-match "[ 	]" backward-char format "%s%s"] 5])
(byte-code "$\"$\"$\"$\"$\"$\"$\"$\"$\"$\"$\"$\"$\"" [ad-add-advice mh-process-commands (mh-bbdb-process nil t (advice lambda nil (bbdb-offer-save))) after nil ad-activate-on mh-send (mh-bbdb-send nil t (advice lambda nil (interactive (list (bbdb-read-addresses-with-completion "To: ") (bbdb-read-addresses-with-completion "Cc: ") (read-string "Subject: "))))) before mh-send-other-window (mh-bbdb-send-other nil t (advice lambda nil (interactive (list (bbdb-read-addresses-with-completion "To: ") (bbdb-read-addresses-with-completion "Cc: ") (read-string "Subject: "))))) mh-forward (mh-bbdb-forward nil t (advice lambda nil (interactive (list current-prefix-arg (if current-prefix-arg (mh-read-seq-default "Forward" t) (mh-get-msg-num t)) (bbdb-read-addresses-with-completion "To: ") (bbdb-read-addresses-with-completion "Cc: "))))) mh-redistribute (mh-bbdb-redist nil t (advice lambda nil (interactive (list (bbdb-read-addresses-with-completion "Redist-To: ") (bbdb-read-addresses-with-completion "Redist-Cc: ") (mh-get-msg-num t))))) mh-toggle-showing (mh-bbdb-use-pop-up nil t (advice lambda nil "Turn off bbdb pop up window before the command.  Used for commands\nthat (a) get confused by otherwindowness, and (b) will trigger a\nre-pop-up when they're done." (if (and mh-showing bbdb-use-pop-up) (delete-windows-on bbdb-buffer-name t)))) mh-inc-folder (mh-bbdb-use-pop-up nil t (advice lambda nil "Turn off bbdb pop up window before the command.  Used for commands\nthat (a) get confused by otherwindowness, and (b) will trigger a\nre-pop-up when they're done." (if (and mh-showing bbdb-use-pop-up) (delete-windows-on bbdb-buffer-name t)))) mh-visit-folder (mh-bbdb-use-pop-up nil t (advice lambda nil "Turn off bbdb pop up window before the command.  Used for commands\nthat (a) get confused by otherwindowness, and (b) will trigger a\nre-pop-up when they're done." (if (and mh-showing bbdb-use-pop-up) (delete-windows-on bbdb-buffer-name t)))) mh-previous-undeleted-msg (mh-bbdb-use-pop-up nil t (advice lambda nil "Turn off bbdb pop up window before the command.  Used for commands\nthat (a) get confused by otherwindowness, and (b) will trigger a\nre-pop-up when they're done." (if (and mh-showing bbdb-use-pop-up) (delete-windows-on bbdb-buffer-name t)))) mh-next-undeleted-msg (mh-bbdb-use-pop-up nil t (advice lambda nil "Turn off bbdb pop up window before the command.  Used for commands\nthat (a) get confused by otherwindowness, and (b) will trigger a\nre-pop-up when they're done." (if (and mh-showing bbdb-use-pop-up) (delete-windows-on bbdb-buffer-name t)))) mh-delete-msg (mh-bbdb-use-pop-up nil t (advice lambda nil "Turn off bbdb pop up window before the command.  Used for commands\nthat (a) get confused by otherwindowness, and (b) will trigger a\nre-pop-up when they're done." (if (and mh-showing bbdb-use-pop-up) (delete-windows-on bbdb-buffer-name t)))) mh-reply (mh-bbdb-use-pop-up nil t (advice lambda nil "Turn off bbdb pop up window before the command.  Used for commands\nthat (a) get confused by otherwindowness, and (b) will trigger a\nre-pop-up when they're done." (if (and mh-showing bbdb-use-pop-up) (delete-windows-on bbdb-buffer-name t)))) (mh-bbdb-use-pop-up nil t (advice lambda nil "Turn off bbdb pop up window before the command.  Used for commands\nthat (a) get confused by otherwindowness, and (b) will trigger a\nre-pop-up when they're done." (if (and mh-showing bbdb-use-pop-up) (delete-windows-on bbdb-buffer-name t))))] 5)
#@44 Call this function to hook BBDB into MH-E.
(defalias 'bbdb-insinuate-mh #[nil "	#	#\"" [define-key mh-folder-mode-map ":" bbdb/mh-show-sender ";" bbdb/mh-edit-notes bbdb-add-hook mh-show-message-hook bbdb/mh-update-record] 4 (#$ . 7814)])
(provide (quote bbdb-mhe))
