;ELC ;;; compiled by ocschwar@mint-square.mit.edu on Fri Jun 16 17:21:31 2000 ;;; from file /var/tmp/bbdb-2.00.06/lisp/bbdb-srv.el ;;; emacs version 21.1 (patch 4) "Arches" XEmacs Lucid. ;;; bytecomp version 2.25 XEmacs; 22-Mar-96. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 19. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "20"))) (error "`bbdb-srv.el' was compiled for Emacs 20")) (or (boundp 'current-load-list) (setq current-load-list nil)) (byte-code "!!!" [require bbdb gnuserv itimer] 2) (custom-declare-variable 'bbdb/srv-auto-create-p 'nil "*Like `bbdb/news-auto-create-p' and `bbdb/mail-auto-create-p',\nbut for the case where the record is being displayed by some external\nprocess via the `gnudoit' mechanism.\n\nIf this is t, then records will automatically be created; if this is a\nfunction name or lambda, then it is called with no arguments to decide \nwhether an entry should be automatically created. You can use this to,\nfor example, create or not create messages which have a particular subject.\n\n`bbdb/srv-auto-create-mail-news-dispatcher' is a good value for this --\nthat function will try to decide if this is a mail message or a news\nmessage, and then run either `bbdb/news-auto-create-p' or\n`bbdb/mail-auto-create-p' as appropriate." :group 'bbdb-utilities-server :type '(choice (const :tag "Don't automatically create records" nil) (const :tag "Automatically create records" t) (sexp :tag "Use function to determine record creation" bbdb/srv-auto-create-mail-news-dispatcher))) (custom-declare-variable 'bbdb/srv-display-delay '2 "*How long (in seconds) we must be idle before displaying a record." :group 'bbdb-utilities-server :type 'integer) (byte-code "! B!!ȏ B‡" [boundp bbdb/srv-pending-headers nil current-load-list bbdb/srv-pending-map fboundp set-extent-property (byte-code "  \" # )" [make-sparse-keymap m set-keymap-name bbdb/srv-pending-map define-key button1 bbdb/srv-pending-add] 4) ((error))] 3) #@294 Display (or create) the BBDB entry corresponding to the message headers. HEADERS should be a string containing an RFC822 header block; at least a "From:" header should be provided, but others will be made available to the various hooks (like `bbdb-notice-hook' and `bbdb/news-auto-create-p'). (defalias 'bbdb/srv-handle-headers #[(headers &optional create-p) "!!q!q  ̱! !Q !\"!  !$)! ގ! ! )!!\") !%&p'&()*니'q- ?, -q. c`01 c1`\"00\"0#0,#*c*," ["*bbdb-tmp*" nil t from bbdb-force-dialog-boxes record buf get-buffer get-buffer-create buffer-disable-undo erase-buffer headers "\n\n" mail-fetch-field "from" string-match bbdb-user-mail-names "\\b" regexp-quote user-login-name mail-strip-quoted-names "to" bbdb-annotate-message-sender create-p bbdb-invoke-hook-for-value bbdb/srv-auto-create-p get-buffer-window bbdb-buffer-name w selected-window ((select-window w)) fboundp frame-lowest-window select-window bbdb-pop-up-bbdb-buffer set-window-dedicated-p boundp bbdb-pop-up-elided-display bbdb-elided-display b bbdb-electric-p bbdb-use-pop-up bbdb-gag-messages ((byte-code " C!" [bbdb-display-records record] 2)) bbdb/srv-pending-map bbdb/srv-pending-headers buffer-read-only " " e p make-extent set-extent-face bold set-extent-property highlight keymap "\n\n Click to add to BBDB."] 6 (#$ . 2115)]) (defalias 'bbdb/srv-pending-add #[nil "!\"" [bbdb/srv-pending-headers error "lost headers?" bbdb/srv-handle-headers t] 3 nil "@"]) (byte-code "! B‡" [boundp bbdb/srv-itimer-arg nil current-load-list] 2) #@213 Used as a timer function by bbdb/srv-handle-headers-with-delay. This invokes bbdb/srv-handle-headers with bbdb/srv-itimer-arg. We do it this way instead of by using a lambda to start-itimer so that we cons less. (defalias 'bbdb/srv-itimer #[nil " B! !" [current-itimer current-load-list delete-itimer bbdb/srv-itimer-arg bbdb/srv-handle-headers nil] 3 (#$ . 3824)]) #@258 Just like bbdb/srv-handle-headers, but only updates every few seconds. This is so that trying to display many records in succession won't queue them up, but will end up only displaying a record when no displays have been requested for a couple of seconds. (defalias 'bbdb/srv-handle-headers-with-delay #[(headers) " !  $*ɇ" ["bbdb-srv" name get-itimer itimer headers bbdb/srv-itimer-arg start-itimer bbdb/srv-itimer bbdb/srv-display-delay nil] 5 (#$ . 4212)]) (byte-code "M\"" [bbdb-srv bbdb/srv-handle-headers-with-delay autoload bbdb-header-start "bbdb-hooks"] 3) #@339 For use as the value of bbdb/srv-auto-create-p. This will try to decide if this is a mail message or a news message, and then run either bbdb/news-auto-create-p or bbdb/mail-auto-create-p as appropriate. (The heuristic is that news messages never have a Status or X-Mozilla-Status header; and that mail messages never have Path headers.) (defalias 'bbdb/srv-auto-create-mail-news-dispatcher #[nil "  !q b!Ǫ b!Ǫ b!*   !)" [nil mail-p bbdb-header-start start marker-buffer bbdb-extract-field-value "Status" t "X-Mozilla-Status" "Path" bbdb-invoke-hook-for-value bbdb/mail-auto-create-p bbdb/news-auto-create-p] 2 (#$ . 4808)]) (defalias 'bbdb-srv-add-phone #[(phone-string) " \"!\"\nGU\n I ! \n @I\n A@I\n 8I\n 8I)\n\"I H\nCI \" C!*ɇ" [bbdb-completing-read-record format "Add %s to: " phone-string record make-vector bbdb-north-american-phone-numbers-p bbdb-phone-length 2 nil phone 1 bbdb-parse-phone-number newp 3 4 0 read-string "Phone number description: " "cid" bbdb-change-record bbdb-display-records] 6]) (provide 'bbdb-srv)