summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-02-28 14:29:29 +0100
committerJonas Bernoulli <jonas@bernoul.li>2024-02-28 14:29:29 +0100
commit60b949fb0aa234dde470cfd6bf622ef4d7a98b7a (patch)
treedbe778fd125b6452ce7684992f0642a7e722a703
parent05c14ca9bcc63f4afa27fc18df1c32ab63b8ed7b (diff)
No longer depend on seq package
-rw-r--r--llama.el17
1 files changed, 7 insertions, 10 deletions
diff --git a/llama.el b/llama.el
index 95289ed..e7ec6a4 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