From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH] emacs: Replace 'guix-any' with 'cl-some'. Date: Tue, 15 Sep 2015 21:56:14 +0300 Message-ID: <87io7btstt.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbvOo-00028q-M0 for guix-devel@gnu.org; Tue, 15 Sep 2015 14:56:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbvOn-0006kw-PF for guix-devel@gnu.org; Tue, 15 Sep 2015 14:56:14 -0400 Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:32877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbvOn-0006kg-IC for guix-devel@gnu.org; Tue, 15 Sep 2015 14:56:13 -0400 Received: by lamp12 with SMTP id p12so112801656lam.0 for ; Tue, 15 Sep 2015 11:56:12 -0700 (PDT) Received: from leviafan ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id qj3sm3478263lbb.17.2015.09.15.11.56.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 11:56:12 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I was surprised when I didn't found =E2=80=98cl-any=E2=80=99 function. Now= it's clear =E2=80=94 its name is =E2=80=98cl-some=E2=80=99. Oops :-) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-emacs-Replace-guix-any-with-cl-some.patch >From 0ca666e091735c82a5f197b43bd2317c2b2e4b84 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Tue, 15 Sep 2015 21:36:23 +0300 Subject: [PATCH] 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 -- 2.5.0 --=-=-=--