about summary refs log tree commit diff
path: root/configs/shared/.emacs.d/wpc/cycle.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2019-12-24T12·29+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-06T15·25+0000
commitd13e347b9fe8cde051928c1ffa7f2dd97e0bc086 (patch)
treeba0c344ab780b30a1ceb4e4ffb53948db4c7a3ce /configs/shared/.emacs.d/wpc/cycle.el
parent837a74f10f008e61d20c6307520bca38d9c9e89c (diff)
Prefer variadic cycle/new
TODO: Ensure all */new functions in my Elisp library share this API.
Diffstat (limited to 'configs/shared/.emacs.d/wpc/cycle.el')
-rw-r--r--configs/shared/.emacs.d/wpc/cycle.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/configs/shared/.emacs.d/wpc/cycle.el b/configs/shared/.emacs.d/wpc/cycle.el
index 762488887ddf..894626383049 100644
--- a/configs/shared/.emacs.d/wpc/cycle.el
+++ b/configs/shared/.emacs.d/wpc/cycle.el
@@ -26,10 +26,10 @@
 ;; `xs' is the original list
 (cl-defstruct cycle current-index xs)
 
-(defun cycle/new ()
+(defun cycle/new (&rest xs)
   "Create an empty cycle."
   (make-cycle :current-index 0
-              :xs '()))
+              :xs xs))
 
 (defun cycle/from-list (xs)
   "Create a cycle from a list of `XS'."