emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 403010f 3/5: Make ediff-intersection into obsolete alias for seq-


From: Stefan Kangas
Subject: master 403010f 3/5: Make ediff-intersection into obsolete alias for seq-intersection
Date: Fri, 17 Sep 2021 05:13:19 -0400 (EDT)

branch: master
commit 403010f2fda1a35f6ac40484646bb6708f4319ad
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Make ediff-intersection into obsolete alias for seq-intersection
    
    * lisp/vc/ediff-util.el (ediff-intersection): Make into obsolete
    function alias for 'seq-intersection'.
    * lisp/vc/ediff-mult.el (ediff-intersect-directories): Update
    single caller.
---
 lisp/vc/ediff-mult.el |  4 ++--
 lisp/vc/ediff-util.el | 11 +----------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el
index 0a16862..3ad1c30 100644
--- a/lisp/vc/ediff-mult.el
+++ b/lisp/vc/ediff-mult.el
@@ -610,13 +610,13 @@ behavior."
     (if (ediff-nonempty-string-p merge-autostore-dir)
        (setq merge-autostore-dir
              (file-name-as-directory merge-autostore-dir)))
-    (setq common (ediff-intersection lis1 lis2 #'string=))
+    (setq common (seq-intersection lis1 lis2 #'string=))
 
     ;; In merge with ancestor jobs, we don't intersect with lis3.
     ;; If there is no ancestor, we'll offer to merge without the ancestor.
     ;; So, we intersect with lis3 only when we are doing 3-way file comparison
     (if (and lis3 (ediff-comparison-metajob3 jobname))
-       (setq common (ediff-intersection common lis3 #'string=)))
+        (setq common (seq-intersection common lis3 #'string=)))
 
     ;; copying is needed because sort sorts via side effects
     (setq common (sort (copy-sequence common) #'string-lessp))
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index 0ae2f09..7aae70f 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -4151,16 +4151,6 @@ Mail anyway? (y or n) ")
        (key-description desc)
       (format "M-x %s" func-def))))
 
-;; this uses comparison-func to decide who is a member, and this determines how
-;; intersection looks like
-(defun ediff-intersection (lis1 lis2 comparison-func)
-  (let ((result (list 'a)))
-    (while lis1
-      (if (ediff-member (car lis1) lis2 comparison-func)
-         (nconc result (list (car lis1))))
-      (setq lis1 (cdr lis1)))
-    (cdr result)))
-
 ;; eliminates duplicates using comparison-func
 (defun ediff-set-difference (lis1 lis2 comparison-func)
   (let ((result (list 'a)))
@@ -4174,6 +4164,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")
+(define-obsolete-function-alias 'ediff-intersection #'seq-intersection "28.1")
 
 (run-hooks 'ediff-load-hook)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]