emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/git-commit e8d4674fd7 08/15: Use seq-find instead of -firs


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit e8d4674fd7 08/15: Use seq-find instead of -first
Date: Mon, 31 Jul 2023 10:00:17 -0400 (EDT)

branch: elpa/git-commit
commit e8d4674fd72d2ad558cfdc480d64dbcada56de21
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Use seq-find instead of -first
---
 lisp/magit-base.el   | 10 +++++-----
 lisp/magit-branch.el |  2 +-
 lisp/magit-refs.el   | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index c750d86200..32a3cf4f33 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -560,11 +560,11 @@ acts similarly to `completing-read', except for the 
following:
   `magit-builtin-completing-read'."
   (setq magit-completing-read--silent-default nil)
   (if-let ((dwim (and def
-                      (nth 2 (-first (pcase-lambda (`(,cmd ,re ,_))
-                                       (and (eq this-command cmd)
-                                            (or (not re)
-                                                (string-match-p re prompt))))
-                                     magit-dwim-selection)))))
+                      (nth 2 (seq-find (pcase-lambda (`(,cmd ,re ,_))
+                                         (and (eq this-command cmd)
+                                              (or (not re)
+                                                  (string-match-p re prompt))))
+                                       magit-dwim-selection)))))
       (if (eq dwim 'ask)
           (if (y-or-n-p (format "%s %s? " prompt def))
               def
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index 96589e9e0a..abfa9c3f9e 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -611,7 +611,7 @@ prompt is confusing."
        (let ((len (length ambiguous)))
          (cond
           ((= len 1)
-           (format "%s is" (-first #'magit-ref-ambiguous-p branches)))
+           (format "%s is" (seq-find #'magit-ref-ambiguous-p branches)))
           ((= len (length refs))
            (format "These %s names are" len))
           (t
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 478c3e1044..8073b66952 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -749,11 +749,11 @@ line is inserted at all."
      branch (if head-face (list face head-face) face))))
 
 (defun magit-refs--insert-refname-p (refname)
-  (--if-let (-first (pcase-lambda (`(,key . ,_))
-                      (if (functionp key)
-                          (funcall key refname)
-                        (string-match-p key refname)))
-                    magit-refs-filter-alist)
+  (--if-let (seq-find (pcase-lambda (`(,key . ,_))
+                        (if (functionp key)
+                            (funcall key refname)
+                          (string-match-p key refname)))
+                      magit-refs-filter-alist)
       (cdr it)
     t))
 



reply via email to

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