Mercurial > emacs
comparison lisp/gnus/gnus-util.el @ 109764:f5fa348fd8eb
Add new gnus-sync.el library.
From Ted Zlatanov <tzz@lifelogs.com>.
* 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.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Fri, 13 Aug 2010 10:39:16 +0000 |
parents | b7963ca9e06e |
children | 8d09094063d0 |
comparison
equal
deleted
inserted
replaced
109763:410b495bd9be | 109764:f5fa348fd8eb |
---|---|
1295 (let (entry) | 1295 (let (entry) |
1296 (while (setq entry (assq key alist)) | 1296 (while (setq entry (assq key alist)) |
1297 (setq alist (delq entry alist))) | 1297 (setq alist (delq entry alist))) |
1298 alist))) | 1298 alist))) |
1299 | 1299 |
1300 (defun gnus-grep-in-list (word list) | |
1301 "Find if a WORD matches any regular expression in the given LIST." | |
1302 (when (and word list) | |
1303 (catch 'found | |
1304 (dolist (r list) | |
1305 (when (string-match r word) | |
1306 (throw 'found r)))))) | |
1307 | |
1300 (defmacro gnus-pull (key alist &optional assoc-p) | 1308 (defmacro gnus-pull (key alist &optional assoc-p) |
1301 "Modify ALIST to be without KEY." | 1309 "Modify ALIST to be without KEY." |
1302 (unless (symbolp alist) | 1310 (unless (symbolp alist) |
1303 (error "Not a symbol: %s" alist)) | 1311 (error "Not a symbol: %s" alist)) |
1304 (let ((fun (if assoc-p 'assoc 'assq))) | 1312 (let ((fun (if assoc-p 'assoc 'assq))) |