summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-sync.el
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-12-02 11:55:08 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2012-12-02 11:55:08 +0100
commit1e14f99eca63131af2962b3a104c6f929fb82813 (patch)
tree0caaaa071cc6a91c7df65db2c71f87bfb503ac96 /lisp/gnus/gnus-sync.el
parentf02f19bd4e705614ed5110fab5120f70b3e00c3a (diff)
downloademacs-1e14f99eca63131af2962b3a104c6f929fb82813.tar.gz
* gnus-sync.el (gnus-sync-newsrc-offsets): Restore definition.
(gnus-sync-save): Use correct format for gnus-sync-newsrc-loader.
Diffstat (limited to 'lisp/gnus/gnus-sync.el')
-rw-r--r--lisp/gnus/gnus-sync.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/gnus/gnus-sync.el b/lisp/gnus/gnus-sync.el
index b5f8379e367..c235892a9d3 100644
--- a/lisp/gnus/gnus-sync.el
+++ b/lisp/gnus/gnus-sync.el
@@ -109,6 +109,12 @@ this setting is harmless until the user chooses a sync backend."
:group 'gnus-sync
:type '(repeat regexp))
+(defcustom gnus-sync-newsrc-offsets '(2 3)
+ "List of per-group data to be synchronized."
+ :group 'gnus-sync
+ :type '(set (const :tag "Read ranges" 2)
+ (const :tag "Marks" 3)))
+
(defcustom gnus-sync-global-vars nil
"List of global variables to be synchronized.
You may want to sync `gnus-newsrc-last-checked-date' but pretty
@@ -743,7 +749,15 @@ With a prefix, FORCE is set and all groups will be saved."
;; entry in gnus-newsrc-alist whose group matches any of the
;; gnus-sync-newsrc-groups
;; TODO: keep the old contents for groups we don't have!
- (let ((gnus-sync-newsrc-loader (gnus-sync-newsrc-loader-builder)))
+ (let ((gnus-sync-newsrc-loader
+ (loop for entry in (cdr gnus-newsrc-alist)
+ when (gnus-grep-in-list
+ (car entry) ;the group name
+ gnus-sync-newsrc-groups)
+ collect (cons (car entry)
+ (mapcar (lambda (offset)
+ (cons offset (nth offset entry)))
+ gnus-sync-newsrc-offsets)))))
(with-temp-file gnus-sync-backend
(progn
(let ((coding-system-for-write gnus-ding-file-coding-system)