[gnus git] branch master updated: m0-13-102-gac9f01c =1= Fix `gnus-union' so as to behave like `cl-union'
Katsumi Yamaoka <[email protected]> Thu, 24 Dec 2015 00:09:25 +0100
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via ac9f01c45db8c08ffa835bbcdc2662ed14f40a73 (commit)
from 386e4d3ea54d4898bd5c7447991a116a1ef2c11f (commit)
- Log -----------------------------------------------------------------
commit ac9f01c45db8c08ffa835bbcdc2662ed14f40a73
Author: Katsumi Yamaoka <[email protected]>
Date: Wed Dec 23 23:08:17 2015 +0000
Fix `gnus-union' so as to behave like `cl-union'
* gnus-group.el (gnus-group-prepare-flat):
Make gnus-union use `equal' to compare items in lists.
* gnus-util.el (gnus-union): Make it behave like cl-union partially.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index aab4aec..058e47a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2015-12-23 Katsumi Yamaoka <[email protected]>
+
+ Fix `gnus-union' so as to behave like `cl-union'.
+
+ * gnus-group.el (gnus-group-prepare-flat):
+ Make gnus-union use `equal' to compare items in lists.
+
+ * gnus-util.el (gnus-union): Make it behave like cl-union partially.
+
2015-12-17 Eli Zaretskii <[email protected]>
* auth-source.el (auth-source-ensure-strings):
diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el
index b1a4933..9f272f4 100644
--- a/lisp/gnus-group.el
+++ b/lisp/gnus-group.el
@@ -1396,7 +1396,8 @@ if it is a string, only list groups matching REGEXP."
(gnus-group-prepare-flat-list-dead
(gnus-union
not-in-list
- (setq gnus-killed-list (sort gnus-killed-list 'string<)))
+ (setq gnus-killed-list (sort gnus-killed-list 'string<))
+ :test 'equal)
gnus-level-killed ?K regexp))
(gnus-group-set-mode-line)
diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el
index 40e2dcf..6759c07 100644
--- a/lisp/gnus-util.el
+++ b/lisp/gnus-util.el
@@ -1372,18 +1372,25 @@ Return the modified alist."
(if (fboundp 'union)
(defalias 'gnus-union 'union)
- (defun gnus-union (l1 l2)
- "Set union of lists L1 and L2."
+ (defun gnus-union (l1 l2 &rest keys)
+ "Set union of lists L1 and L2.
+If KEYS contains the `:test' and `equal' pair, use `equal' to compare
+items in lists, otherwise use `eq'."
(cond ((null l1) l2)
((null l2) l1)
((equal l1 l2) l1)
(t
(or (>= (length l1) (length l2))
(setq l1 (prog1 l2 (setq l2 l1))))
+ (if (eq 'equal (plist-get keys :test))
(while l2
(or (member (car l2) l1)
(push (car l2) l1))
(pop l2))
+ (while l2
+ (or (memq (car l2) l1)
+ (push (car l2) l1))
+ (pop l2)))
l1))))
(declare-function gnus-add-text-properties "gnus"
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 9 +++++++++
lisp/gnus-group.el | 3 ++-
lisp/gnus-util.el | 19 +++++++++++++------
3 files changed, 24 insertions(+), 7 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project