diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-02-28 14:29:29 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-02-28 14:29:29 +0100 |
| commit | 60b949fb0aa234dde470cfd6bf622ef4d7a98b7a (patch) | |
| tree | dbe778fd125b6452ce7684992f0642a7e722a703 | |
| parent | 05c14ca9bcc63f4afa27fc18df1c32ab63b8ed7b (diff) | |
No longer depend on seq package
| -rw-r--r-- | llama.el | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -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 |
