branch: elpa/llama
commit 60b949fb0aa234dde470cfd6bf622ef4d7a98b7a
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    No longer depend on seq package
---
 llama.el | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/llama.el b/llama.el
index 95289ed6fe..e7ec6a45af 100644
--- a/llama.el
+++ b/llama.el
@@ -6,8 +6,6 @@
 ;; Homepage: https://git.sr.ht/~tarsius/llama
 ;; Keywords: extensions
 
-;; Package-Requires: ((seq "2.23"))
-
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;; This file is free software: you can redistribute it and/or modify
@@ -69,8 +67,6 @@
 
 ;;; Code:
 
-(require 'seq)
-
 ;;;###autoload
 (defmacro ## (fn &rest args)
     "Expand to a `lambda' expression that wraps around FN and ARGS.
@@ -134,10 +130,12 @@ It also looks a bit like #\\='function."
                   (list symbol))
                  ((setq optional t)
                   (list '&optional symbol))))
-              (vconcat (reverse (seq-drop-while
-                                 #'null
-                                 (reverse (seq-subseq args 1))))
-                       (and-let* ((rest (aref args 0))) (list rest))))))))
+              (nconc (let (symbols)
+                       (dolist (symbol (nreverse (cdr (append args nil))))
+                         (when (or symbol symbols)
+                           (push symbol symbols)))
+                       symbols)
+                     (and-let* ((rest (aref args 0))) (list rest))))))))
 
 (defun llama--collect (data args)
   (cond
@@ -157,8 +155,7 @@ It also looks a bit like #\\='function."
    ((and (not (eq (car-safe data) '##))
          (or (listp data)
              (vectorp data)))
-    (seq-doseq (elt data)
-      (llama--collect elt args)))))
+    (mapc (lambda (elt) (llama--collect elt args)) data))))
 
 ;;; Advices
 

Reply via email to