X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-sync.el;h=b0b0d30534349edc21c6f01d36c8356654ab7cea;hb=57f5db3978bdf010b90cd2be4e1910ec46117cb6;hp=6a45c672ed1fd4dcdde09fbd88724cb160481f70;hpb=d38bed32440e3c3b979152602f37d6d2d5e0fa36;p=gnus diff --git a/lisp/gnus-sync.el b/lisp/gnus-sync.el index 6a45c672e..b0b0d3053 100644 --- a/lisp/gnus-sync.el +++ b/lisp/gnus-sync.el @@ -100,6 +100,12 @@ (require 'gnus-start) (require 'gnus-util) +(defvar gnus-topic-alist) ;; gnus-group.el +(eval-when-compile + (autoload 'gnus-group-topic "gnus-topic") + (autoload 'gnus-topic-create-topic "gnus-topic" nil t) + (autoload 'gnus-topic-enter-dribble "gnus-topic")) + (defgroup gnus-sync nil "The Gnus synchronization facility." :version "24.1" @@ -139,11 +145,13 @@ and `gnus-topic-alist'. Also see `gnus-variable-list'." (defcustom gnus-sync-lesync-name (system-name) "The LeSync name for this machine." :group 'gnus-sync + :version "24.3" :type 'string) -(defcustom gnus-sync-lesync-install-topics 'ask +(defcustom gnus-sync-lesync-install-topics 'ask "Should LeSync install the recorded topics?" :group 'gnus-sync + :version "24.3" :type '(choice (const :tag "Never Install" nil) (const :tag "Always Install" t) (const :tag "Ask Me Once" ask))) @@ -230,7 +238,7 @@ When SALT is nil, a random one will be generated using `random'." (security-object (concat url "/_security")) (user-record `((names . [,user]) (roles . []))) (couch-user-name (format "org.couchdb.user:%s" user)) - (salt (or salt (sha1 (format "%s" (random t))))) + (salt (or salt (sha1 (format "%s" (random))))) (couch-user-record `((_id . ,couch-user-name) (type . user) @@ -810,24 +818,24 @@ With a prefix, SUBSCRIBE-ALL is set and unknown groups will be subscribed." (stringp (nth 1 gnus-sync-backend))) (let ((errored nil) name ftime) - (mapcar (lambda (entry) - (setq name (cdr (assq 'id entry))) - ;; set ftime the FIRST time through this loop, that - ;; way it reflects the time we FINISHED reading - (unless ftime (setq ftime (float-time))) - - (unless errored - (setq errored - (when (equal name - (gnus-sync-lesync-read-group-entry - (nth 1 gnus-sync-backend) - name - (cdr (assq 'value entry)) - `(read-time ,ftime) - `(subscribe-all ,subscribe-all))) - (gnus-sync-lesync-install-group-entry - (cdr (assq 'id entry))))))) - (gnus-sync-lesync-groups-builder (nth 1 gnus-sync-backend))))) + (mapc (lambda (entry) + (setq name (cdr (assq 'id entry))) + ;; set ftime the FIRST time through this loop, that + ;; way it reflects the time we FINISHED reading + (unless ftime (setq ftime (float-time))) + + (unless errored + (setq errored + (when (equal name + (gnus-sync-lesync-read-group-entry + (nth 1 gnus-sync-backend) + name + (cdr (assq 'value entry)) + `(read-time ,ftime) + `(subscribe-all ,subscribe-all))) + (gnus-sync-lesync-install-group-entry + (cdr (assq 'id entry))))))) + (gnus-sync-lesync-groups-builder (nth 1 gnus-sync-backend))))) ((stringp gnus-sync-backend) ;; read data here...