[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/23: emacs: Add 'guix-any'.
From: |
Alex Kost |
Subject: |
07/23: emacs: Add 'guix-any'. |
Date: |
Sun, 30 Aug 2015 15:28:12 +0000 |
alezost pushed a commit to branch master
in repository guix.
commit e767752c79975d30341f71d7f9de88edeb192d59
Author: Alex Kost <address@hidden>
Date: Wed Aug 12 15:37:20 2015 +0300
emacs: Add 'guix-any'.
* emacs/guix-utils.el (guix-any): New function.
---
emacs/guix-utils.el | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el
index 3157f63..fb1ca60 100644
--- a/emacs/guix-utils.el
+++ b/emacs/guix-utils.el
@@ -215,6 +215,14 @@ accessed with KEYS."
(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)))))
+
;;; Diff
- branch master updated (600233b -> eb097f3), Alex Kost, 2015/08/30
- 02/23: emacs: Add 'guix-prettify' to 'guix' custom group., Alex Kost, 2015/08/30
- 01/23: emacs: Remove leftover internal variable., Alex Kost, 2015/08/30
- 03/23: emacs: Add and use 'guix-while-search'., Alex Kost, 2015/08/30
- 04/23: emacs: Add and use 'guix-concat-strings'., Alex Kost, 2015/08/30
- 05/23: emacs: Add utils to make symbol and string for guix command., Alex Kost, 2015/08/30
- 09/23: guix lint: Export checkers and <lint-checker> accessors., Alex Kost, 2015/08/30
- 06/23: emacs: Add utils to copy guix command., Alex Kost, 2015/08/30
- 08/23: emacs: Add 'guix-memoized-defalias' macro., Alex Kost, 2015/08/30
- 07/23: emacs: Add 'guix-any'.,
Alex Kost <=
- 10/23: emacs: Add 'guix-lint-checker-names'., Alex Kost, 2015/08/30
- 17/23: ui: Add 'run-guix'., Alex Kost, 2015/08/30
- 11/23: guix graph: Export node types and <node-type> accessors., Alex Kost, 2015/08/30
- 12/23: emacs: Add 'guix-graph-type-names'., Alex Kost, 2015/08/30
- 18/23: emacs: Add code to run guix command in REPL., Alex Kost, 2015/08/30
- 15/23: emacs: Add minibuffer readers., Alex Kost, 2015/08/30
- 19/23: emacs: Add code to run guix command in shell., Alex Kost, 2015/08/30
- 13/23: emacs: Add 'guix-package-names'., Alex Kost, 2015/08/30
- 14/23: emacs: Add help variables., Alex Kost, 2015/08/30
- 21/23: emacs: Add "guix-popup.el"., Alex Kost, 2015/08/30