aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka <[email protected]>2010-08-13 10:39:16 +0000
committerKatsumi Yamaoka <[email protected]>2010-08-13 10:39:16 +0000
commit771549612082c4b6a154850287ef7bafe5b563c8 (patch)
tree09052388568b0da30d44a8b2200ef05c8216fc24
parentc4b1c354d398c6734d4ef7a92ad4dfabbfe83f34 (diff)
Add new gnus-sync.el library.
From Ted Zlatanov <[email protected]>. * gnus-registry.el (gnus-registry-follow-group-p): Use `gnus-grep-in-list'. * gnus-util.el (gnus-grep-in-list): Moved from gnus-registry.el and renamed from `gnus-registry-grep-in-list'. * gnus-sync.el: New library for synchronization of marks.
-rw-r--r--lisp/gnus/ChangeLog7
-rw-r--r--lisp/gnus/gnus-registry.el12
-rw-r--r--lisp/gnus/gnus-util.el8
3 files changed, 17 insertions, 10 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 884a454925..1c8b917348 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,12 @@
2010-08-12 Teodor Zlatanov <[email protected]>
+ * gnus-sync.el: New library for synchronization of marks.
+
+ * gnus-util.el (gnus-grep-in-list): Moved from gnus-registry.el and
+ renamed from `gnus-registry-grep-in-list'.
+
+ * gnus-registry.el (gnus-registry-follow-group-p): Use `gnus-grep-in-list'.
+
* gnus-start.el (gnus-start-draft-setup): Make it interactive.
2010-08-06 Katsumi Yamaoka <[email protected]>
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index db10440116..e3af088278 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -661,10 +661,10 @@ necessary."
"Determines if a group name should be followed.
Consults `gnus-registry-unfollowed-groups' and
`nnmail-split-fancy-with-parent-ignore-groups'."
- (not (or (gnus-registry-grep-in-list
+ (not (or (gnus-grep-in-list
group
gnus-registry-unfollowed-groups)
- (gnus-registry-grep-in-list
+ (gnus-grep-in-list
group
nnmail-split-fancy-with-parent-ignore-groups))))
@@ -745,14 +745,6 @@ Consults `gnus-registry-unfollowed-groups' and
(assoc article (gnus-data-list nil)))))
nil))
-(defun gnus-registry-grep-in-list (word list)
-"Find if a WORD matches any regular expression in the given LIST."
- (when (and word list)
- (catch 'found
- (dolist (r list)
- (when (string-match r word)
- (throw 'found r))))))
-
(defun gnus-registry-do-marks (type function)
"For each known mark, call FUNCTION for each cell of type TYPE.
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index b8a1c266c9..93cc1f0a54 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1297,6 +1297,14 @@ Return the modified alist."
(setq alist (delq entry alist)))
alist)))
+(defun gnus-grep-in-list (word list)
+ "Find if a WORD matches any regular expression in the given LIST."
+ (when (and word list)
+ (catch 'found
+ (dolist (r list)
+ (when (string-match r word)
+ (throw 'found r))))))
+
(defmacro gnus-pull (key alist &optional assoc-p)
"Modify ALIST to be without KEY."
(unless (symbolp alist)