;ELC ;;; Compiled by proclus@darwintel on Tue Jan 1 13:53:26 2008 ;;; from file /mnt/gmirror/ports/databases/bbdb/work/bbdb-2.34/lisp/bbdb-merge.el ;;; in Emacs version 21.2.1 ;;; with bytecomp version 1.1.1.4 ;;; 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-merge.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require bbdb bbdb-com] 2) #@583 Generic merge function. Merges new-record into your bbdb, using DATE to check who's more up-to-date and OVERRIDE to decide who gets precedence if two dates match. DATE can be extracted from a notes if it's an alist with an element marked timestamp. Set OVERRIDE to 'new to allow the new record to stomp on existing data, 'old to preserve existing data or nil to merge both together . If it can't find a record to merge with, it will create a new record. If MERGE-RECORD is set, it's a record discovered by other means that should be merged with. Returns the Grand Unified Record. (defalias 'bbdb-merge-record #[(new-record &optional merge-record override) "\306H\307H\310H\311H\312H\313H3\314H4\315H \316\nQ5\317\3205\"\20395\306\225\321O5\317\3225\"\203I5\306\211\224O5\323\3065G\3215$\2105)6<\205c\324\236A7\3218;\203u\325BC9\204\2356\f:\2116G\306=\203\213\3216:G\306=\203\226\321:\326\327!\2106\205\355\3306\227r\331 q\210\326\321\327\"\210;)\"J\321<==\203\352=@>6\227\332>!\206\323>\314H\206\323\333\227\230\203\341\334=>C\"<=A=)\202\267<*:;\203 \330:\227r\331 q\210\326\321\327\"\210;)\"J\2028\321<:\2035<\2045\330:@\227r\331 q\210\326\321\327\"\210;)\"J<:A\211:\204<)\321?@\211A\203H@\204^A\203SA@\206\232@\205\232@@\202\232A\203\230A@@B\f\203\212\f@B=\203\203\321\321AB?\202k\fA\211\204oA\203\224AAA*\202^?-99\203[\3359\324\"87\206\2608787\231\203\323C\336=\203\305\337\202\321C\337=\203\320\336\202\321\321C9\306C\204\346\3409\306H \316#\202\365C\337=\203\361 \202\3659\306HI\2109\307C\204\n\3409\307H\n\316#\202C\337=\203\n\2029\307HI\2109\314C\204/\3409\314H4\316#\202?C\337=\203;4\202?9\314HI\2109\310C\204_\3419\310H <\203W \202Y C\342\343$\202nC\337=\203j \202n9\310HI\2109\311C\204\204\3419\311H\f\342\343$\202\223C\337=\203\217\f\202\2239\311HI\2109\313C\204\251\3419\313H3\344#\202\271C\337=\203\2653\202\2719\313HI\2109\312C\204\316\3419\312H \344#\202\335C\337=\203\331 \202\3359\312HI\2109\315H\321\340DEF\211GF\232\204WG<\204\325GBCGF<\204\325FBCFF\203PF@@G\236\211E\203>EF@@H\236A\2061DEAF@A\"\241\210\202GGF@C\244GFA\211F\2049\315GI\210,\202u\34564\f 3&\2119\306 I\2109\307\nI\2109\306H\333\232\203\2049\306\321I\2109\307H\333\232\203\2239\307\321I\210\3469\327\"\210\3329!9\314H4\2116G\306V\203\333\3306\227r\331 q\210I\205\302\347\350\351J!!!K\212\352\213+\"\211L\203\332L\3539LJ\"L\210)4G\306V\203\3304\227r\331 q\210I\205\371\347\350\351J!!!K\212\354\213+\"\211L\203L\3539LJ\"L\210)*9\355H\306\321I\2109\307H\204)9\306H\203[\356\3329!\227r\331 q\210I\205A\347\350\351J!!!K\212\357\213+\"\211M9\360M!\205WMJBL\210)9\314H\203\224\3569\314H\227r\331 q\210I\205z\347\350\351J!!!K\212\361\213+\"\211M9\360M!\205\220MJBL\210)r\331 q\210I\205\246\347\350\351J!!!K\212\362\213\210+9. \207" [new-record firstname lastname aka nets addrs 0 1 2 6 5 4 3 7 " " string-match "\\`[ \n]+" nil "[ \n]+\\'" set-text-properties timestamp notes bbdb-records t intern-soft bbdb-buffer bbdb-record-name "" append bbdb-record-getprop old new bbdb-merge-strings bbdb-merge-lists! string= downcase equal bbdb-create-internal bbdb-change-record get-buffer-window buffer-name get-buffer ((byte-code "\203\302!\210\303\304\305\"\210 \207" [w bbdb-hashtable select-window bbdb-records nil t] 3)) bbdb-remove! ((byte-code "\203\302!\210\303\304\305\"\210 \207" [w bbdb-hashtable select-window bbdb-records nil t] 3)) 8 intern ((byte-code "\203\302!\210\303\304\305\"\210 \207" [w bbdb-hashtable select-window bbdb-records nil t] 3)) boundp ((byte-code "\203\302!\210\303\304\305\"\210 \207" [w bbdb-hashtable select-window bbdb-records nil t] 3)) ((byte-code "\203\303!\210 \n>\204 \nB\303\207" [w merge-record bbdb-changed-records select-window] 2)) phones company string name date olddate merge-record net bbdb-hashtable answer recs n-rec ret net-recs name-recs name-rec override bbdb-refile-notes-default-merge-function tmp n2 n1 bbdb-refile-notes-generate-alist bbdb-debug bbdb-file w s sym] 8 (#$ . 705)]) #@82 Merge two strings together uniquely. If s1 doesn't contain s2, return s1+sep+s2. (defalias 'bbdb-merge-strings #[(s1 s2 &optional sep) "\203\n\303\230\203\f \207 \203 \303\230\203\207\304 \"\203!\207\n\206'\303 Q\207" [s1 s2 sep "" string-match] 3 (#$ . 4986)]) #@42 Merge a bbdb file into the in-core bbdb. (defalias 'bbdb-merge-file #[(&optional bbdb-new override match-fun) "\204 \204 \306\307\n\"\210 \n \310\311\312 \311\f\313\314\315\"\210.\n\316 !\211\207" [bbdb-gag-messages bbdb-silent-running bbdb-new bbdb-file bbdb-live-file bbdb-buffer-name message "Merging %s" "*BBDB-merge*" nil bbdb-records bbdb-merge-strings mapcar #[(rec) "\303 \205 !\n#\207" [rec match-fun override bbdb-merge-record] 4] get-file-buffer bbdb-live-buffer-name bbdb-buffer new-records bbdb-refile-notes-default-merge-function] 3 (#$ . 5268) "fMerge bbdb file: "]) (provide 'bbdb-merge)