diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-04-05 14:24:00 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-04-05 14:24:00 +0200 |
commit | 20f7fa691b7c2859b96550d9ccb326bf394e160d (patch) | |
tree | b340d48c7c0fc151884470b656ed148d0ffc5d3b /lisp/gnus/gnus-range.el | |
parent | 257caab1d0bea17fb9bfb5a9e2c782cf96a7d052 (diff) | |
download | emacs-20f7fa691b7c2859b96550d9ccb326bf394e160d.tar.gz |
Obsolete local set difference functions in favor of seq-difference
* lisp/emacs-lisp/seq.el (seq-difference): Add autoload cookie.
* lisp/gnus/gnus-range.el (gnus-set-difference):
* lisp/gnus/spam.el (spam-set-difference): Make obsolete in favor
of seq-difference. Update callers.
Diffstat (limited to 'lisp/gnus/gnus-range.el')
-rw-r--r-- | lisp/gnus/gnus-range.el | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el index 456209f3d9a..7d12ae9fdcc 100644 --- a/lisp/gnus/gnus-range.el +++ b/lisp/gnus/gnus-range.el @@ -42,13 +42,8 @@ If RANGE is a single range, return (RANGE). Otherwise, return RANGE." (defun gnus-set-difference (list1 list2) "Return a list of elements of LIST1 that do not appear in LIST2." - (let ((hash2 (make-hash-table :test 'eq)) - (result nil)) - (dolist (elt list2) (puthash elt t hash2)) - (dolist (elt list1) - (unless (gethash elt hash2) - (setq result (cons elt result)))) - (nreverse result))) + (declare (obsolete seq-difference "28.1")) + (seq-difference list1 list2 #'eq)) (defun gnus-range-nconcat (&rest ranges) "Return a range comprising all the RANGES, which are pre-sorted. |