guix-commits
[Top][All Lists]
Advanced

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

02/05: emacs: Replace 'guix-any' with 'cl-some'.


From: Alex Kost
Subject: 02/05: emacs: Replace 'guix-any' with 'cl-some'.
Date: Fri, 18 Sep 2015 18:45:46 +0000

alezost pushed a commit to branch master
in repository guix.

commit b2cb869cf928aa0aba7716103548b49af852d6e6
Author: Alex Kost <address@hidden>
Date:   Tue Sep 15 21:36:23 2015 +0300

    emacs: Replace 'guix-any' with 'cl-some'.
    
    * emacs/guix-utils.el (guix-any): Remove.
    * emacs/guix-command.el (guix-command-improve-argument): Use 'cl-some'
      instead of 'guix-any'.
---
 emacs/guix-command.el |    6 +++---
 emacs/guix-utils.el   |    8 --------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/emacs/guix-command.el b/emacs/guix-command.el
index ddafac9..6fdfb93 100644
--- a/emacs/guix-command.el
+++ b/emacs/guix-command.el
@@ -305,9 +305,9 @@ to be modified."
 
 (defun guix-command-improve-argument (argument improvers)
   "Return ARGUMENT modified with IMPROVERS."
-  (or (guix-any (lambda (improver)
-                  (funcall improver argument))
-                improvers)
+  (or (cl-some (lambda (improver)
+                 (funcall improver argument))
+               improvers)
       argument))
 
 (defun guix-command-improve-arguments (arguments commands)
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el
index 682609d..d1f088b 100644
--- a/emacs/guix-utils.el
+++ b/emacs/guix-utils.el
@@ -226,14 +226,6 @@ single argument."
      (while (re-search-forward ,regexp nil t)
        ,@body)))
 
-(defun guix-any (pred lst)
-  "Test whether any element from LST satisfies PRED.
-If so, return the return value from the successful PRED call.
-Return nil otherwise."
-  (when lst
-    (or (funcall pred (car lst))
-        (guix-any pred (cdr lst)))))
-
 
 ;;; Alist accessors
 



reply via email to

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