From: Alex Kost <alezost@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH] emacs: Replace 'guix-any' with 'cl-some'.
Date: Tue, 15 Sep 2015 21:56:14 +0300 [thread overview]
Message-ID: <87io7btstt.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 120 bytes --]
I was surprised when I didn't found ‘cl-any’ function. Now it's clear —
its name is ‘cl-some’. Oops :-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-Replace-guix-any-with-cl-some.patch --]
[-- Type: text/x-patch, Size: 1595 bytes --]
From 0ca666e091735c82a5f197b43bd2317c2b2e4b84 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
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)))))
-
\f
;;; Alist accessors
--
2.5.0
next reply other threads:[~2015-09-15 18:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 18:56 Alex Kost [this message]
2015-09-18 9:42 ` [PATCH] emacs: Replace 'guix-any' with 'cl-some' Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87io7btstt.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.