;ELC   
;;; Compiled by daveg@contents-vnder-pressvre.mit.edu on Wed Dec 27 15:22:08 2006
;;; from file /afs/sipb.mit.edu/user/daveg/el/bbdb/lisp/bbdb-ftp.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 "`bbdb-ftp.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\302\303!\203 \300\304!\210\202 \300\305!\210\300\207" [require bbdb featurep efs-cu efs ange-ftp] 2)
#@41 *The default login to use when ftp-ing.
(custom-declare-variable 'bbdb-default-ftp-user '"anonymous" '(#$ . -771) :group 'bbdb-utilities-ftp :type 'string)
#@46 *The default directory to open when ftp-ing.
(custom-declare-variable 'bbdb-default-ftp-dir '"/" '(#$ . -933) :group 'bbdb-utilities-ftp :type 'string)
#@75 *The prefix that all ftp sites in the bbdb will have in their name field.
(custom-declare-variable 'bbdb-ftp-site-name-designator-prefix '"Ftp Site: " '(#$ . -1091) :group 'bbdb-utilities-ftp :type 'string)
#@65 Expands into an accessor function for slots in the notes alist.
(defalias 'defun-bbdb-raw-notes-accessor '(macro . #[(slot) "\302\303\304!P!\305	\306C\307\310\311D\312\306DEDF)\207" [slot fn-name intern "bbdb-record-" symbol-name defun record cdr assoc quote bbdb-record-raw-notes] 8 (#$ . 1304)]))
(defalias 'bbdb-record-ftp-dir #[(record) "\301\302\303H\"A\207" [record assoc ftp-dir 7] 4])
(defalias 'bbdb-record-ftp-user #[(record) "\301\302\303H\"A\207" [record assoc ftp-user 7] 4])
#@73 Acessor Function. Returns the ftp-site field of the BBDB record or nil.
(defalias 'bbdb-record-ftp-site #[(record) "\304!\n\305P\306	\"\205 	\307\225\310O*\207" [record name bbdb-ftp-site-name-designator-prefix ftp-pfx-regexp bbdb-record-name " *" string-match 0 nil] 4 (#$ . 1804)])
#@62 Remove any spaces or tabs from only the start of the string.
(defalias 'remove-leading-whitespace #[(string) "\304\305!\306\307\205( \310\234\n\"\204 \310\234	\"\203$ T\202\f \311O+\207" [index tab-char-code space-char-code string string-to-char " " 9 0 char-equal nil] 3 (#$ . 2099)])
#@210 Use ange-ftp to open an ftp-connection to a BBDB record's name.
If this command is executed from the *BBDB* buffer, ftp the site of
the record at point; otherwise, it prompts for an ftp-site.
\<bbdb-mode-map>
(defalias 'bbdb-ftp #[(bbdb-record) ":\204 C\205 \301@!\210A\211\204\f \302\207" [bbdb-record bbdb-ftp-internal nil] 3 (#$ . 2405) (list (if (string= bbdb-buffer-name (buffer-name)) (bbdb-current-record) (let (r (p "BBDB Ftp: ")) (while (not r) (setq r (bbdb-completing-read-record p)) (if (not r) (ding)) (setq p "Not in the BBDB!  Ftp: ")) r)))])
(defalias 'bbdb-ftp-internal #[(bbdb-record) "\306!\206 \307\310!\206 \n\311!\206 \f\312\313	\314\260\203- \315\316D!\210	\2038 \317!\202; \320\321!,\207" [bbdb-record site bbdb-default-ftp-dir dir bbdb-default-ftp-user user bbdb-record-ftp-site "" bbdb-record-ftp-dir bbdb-record-ftp-user "/" "@" ":" bbdb-electric-throw-to-execute bbdb-ftp-internal find-file-other-window error "Not an ftp site.  Check bbdb-ftp-site-name-designator-prefix" file-string bbdb-inside-electric-display] 6])
#@212 Prompt for and return a completely new bbdb-record that is
specifically an ftp site entry.  Doesn't insert it in to the database
or update the hashtables, but does insure that there will not be name
collisions.
(defalias 'bbdb-read-new-ftp-site-record #[nil "\306 \210\203 \307\310!\210\311\312\313\215\210\314\315\n\"\314\316\f\"\314\317!\314\320!\321	!\211@A@\f\230\203< \311\322\230\203F \311\n\230\204R \322\230\203T \311\322\230\203^ \311\323\311\311\211\211\324\205t \325BC\205| \326BC\205\204 \327BC#\330\311\"&	.\207" [bbdb-readonly-p site bbdb-default-ftp-dir dir bbdb-default-ftp-user user bbdb-records error "The Insidious Big Brother Database is read-only." nil --bbdb-error-retry-- (byte-code "\300\301\302\217\210\202  " [--c-- (byte-code "\306\307\310\311!	P\312\227\212p\313\216\203  \314!\203  \202& \315\f\316\"\211q\210\2053 \317\314\320\f!!!\212\321\213-\"J\205B \322\323\"\"\207" [site bbdb-ftp-site-name-designator-prefix --bbdb-obuf-- bbdb-buffer bbdb-file bbdb-debug throw --bbdb-error-retry-- bbdb-read-string "Ftp Site: " intern-soft ((set-buffer --bbdb-obuf--)) buffer-name find-file-noselect nowarn get-buffer-window get-buffer ((byte-code "\203 \302!\210\303\304\305\"\210	\207" [w bbdb-hashtable select-window bbdb-records nil t] 3)) error "%s is already in the database" w] 8) ((error (byte-code "\302 \210\303\304\305!\203 \305	\306\"\210\202 \307\310	A@\"\210\311\312!\210)\306\207" [cursor-in-echo-area --c-- ding t fboundp display-error nil message "Error: %s" sit-for 2] 3)))] 3) bbdb-read-string "Ftp Directory: " "Ftp Username: " "Company: " "Additional Comments: " bbdb-divide-name "" vector append notes ftp-dir ftp-user make-vector company names firstname lastname bbdb-cache-length] 14 (#$ . 3487)])
#@156 Add a new ftp-site entry to the bbdb database; prompts for all relevant info
using the echo area, inserts the new record in the db, sorted alphabetically.
(defalias 'bbdb-create-ftp-site #[(record) "\301\302\"\210\303\304\"\210\305C!\207" [record bbdb-invoke-hook bbdb-create-hook bbdb-change-record t bbdb-display-records] 3 (#$ . 5302) (list (bbdb-read-new-ftp-site-record))])
(provide 'bbdb-ftp)
