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'.
This commit is contained in:
Alex Kost 2015-09-15 21:36:23 +03:00
parent eda1cc8b5d
commit b2cb869cf9
2 changed files with 3 additions and 11 deletions

View File

@ -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)

View File

@ -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