about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/wpc/cycle.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/emacs/.emacs.d/wpc/cycle.el b/emacs/.emacs.d/wpc/cycle.el
index 592de10e0de7..f876cf7054a4 100644
--- a/emacs/.emacs.d/wpc/cycle.el
+++ b/emacs/.emacs.d/wpc/cycle.el
@@ -131,6 +131,11 @@ underlying struct."
         (cycle/jump i cycle)
       (error "No element in cycle matches predicate"))))
 
+(defun cycle/focus-item (x xs)
+  "Focus ITEM in cycle XS.
+ITEM is the first item in XS that t for `equal'."
+  (cycle/focus (lambda (y) (equal x y)) xs))
+
 (defun cycle/contains? (x xs)
   "Return t if cycle, XS, has member X."
   (->> xs