mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-03 08:30:09 +00:00
Make ediff-union into obsolete alias for seq-union
* lisp/emacs-lisp/seq.el (seq-union): Autoload. * lisp/vc/ediff-util.el (ediff-union): Make into obsolete function alias for 'seq-union'. * lisp/vc/ediff-mult.el (ediff-intersect-directories): Update single caller.
This commit is contained in:
parent
0cf0a2b986
commit
fb9df9b883
@ -467,6 +467,7 @@ negative integer or 0, nil is returned."
|
||||
(setq sequence (seq-drop sequence n)))
|
||||
(nreverse result))))
|
||||
|
||||
;;;###autoload
|
||||
(cl-defgeneric seq-union (sequence1 sequence2 &optional testfn)
|
||||
"Return a list of all elements that appear in either SEQUENCE1 or SEQUENCE2.
|
||||
Equality is defined by TESTFN if non-nil or by `equal' if nil."
|
||||
|
@ -623,9 +623,9 @@ behavior."
|
||||
|
||||
;; compute difference list
|
||||
(setq difflist (ediff-set-difference
|
||||
(ediff-union (ediff-union lis1 lis2 #'string=)
|
||||
lis3
|
||||
#'string=)
|
||||
(seq-union (seq-union lis1 lis2 #'string=)
|
||||
lis3
|
||||
#'string=)
|
||||
common
|
||||
#'string=)
|
||||
difflist (delete "." difflist)
|
||||
|
@ -4161,20 +4161,6 @@ Mail anyway? (y or n) ")
|
||||
(setq lis1 (cdr lis1)))
|
||||
(cdr result)))
|
||||
|
||||
|
||||
;; eliminates duplicates using comparison-func
|
||||
(defun ediff-union (lis1 lis2 comparison-func)
|
||||
(let ((result (list 'a)))
|
||||
(while lis1
|
||||
(or (ediff-member (car lis1) (cdr result) comparison-func)
|
||||
(nconc result (list (car lis1))))
|
||||
(setq lis1 (cdr lis1)))
|
||||
(while lis2
|
||||
(or (ediff-member (car lis2) (cdr result) comparison-func)
|
||||
(nconc result (list (car lis2))))
|
||||
(setq lis2 (cdr lis2)))
|
||||
(cdr result)))
|
||||
|
||||
;; eliminates duplicates using comparison-func
|
||||
(defun ediff-set-difference (lis1 lis2 comparison-func)
|
||||
(let ((result (list 'a)))
|
||||
@ -4187,6 +4173,7 @@ Mail anyway? (y or n) ")
|
||||
|
||||
(define-obsolete-function-alias 'ediff-add-to-history #'add-to-history "27.1")
|
||||
(define-obsolete-function-alias 'ediff-copy-list #'copy-sequence "28.1")
|
||||
(define-obsolete-function-alias 'ediff-union #'seq-union "28.1")
|
||||
|
||||
(run-hooks 'ediff-load-hook)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user