[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseedn 3f93aab1ed 23/32: Remove the a.el dependency
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseedn 3f93aab1ed 23/32: Remove the a.el dependency |
Date: |
Tue, 28 Dec 2021 14:04:43 -0500 (EST) |
branch: elpa/parseedn
commit 3f93aab1edc55c918bc57da88ed42a58187ce935
Author: Arne Brasseur <arne@arnebrasseur.net>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
Remove the a.el dependency
Necessary for inclusing in ELPA.
See also https://github.com/clojure-emacs/parseclj/pull/29
---
parseedn.el | 29 +++++++++++++++--------------
test/parseedn-el-parity-test.el | 5 ++---
test/parseedn-test.el | 1 +
3 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/parseedn.el b/parseedn.el
index 786231a6ee..8b63774904 100644
--- a/parseedn.el
+++ b/parseedn.el
@@ -4,7 +4,7 @@
;; Author: Arne Brasseur <arne@arnebrasseur.net>
;; Keywords: lisp clojure edn parser
-;; Package-Requires: ((emacs "25") (a "0.1.0alpha4") (parseclj "0.1.0"))
+;; Package-Requires: ((emacs "25") (parseclj "0.2.0") (map "2"))
;; Version: 0.1.0
;; This file is not part of GNU Emacs.
@@ -47,18 +47,18 @@
;; Note that this is kind of broken, we don't correctly detect if \u or \o
forms
;; don't have the right forms.
-(require 'a)
(require 'cl-lib)
+(require 'map)
(require 'parseclj-parser)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Reader
(defvar parseedn-default-tag-readers
- (a-list 'inst (lambda (s)
- (cl-list* 'edn-inst (date-to-time s)))
- 'uuid (lambda (s)
- (list 'edn-uuid s)))
+ (list (cons 'inst (lambda (s)
+ (cl-list* 'edn-inst (date-to-time s))))
+ (cons 'uuid (lambda (s)
+ (list 'edn-uuid s))))
"Default reader functions for handling tagged literals in EDN.
These are the ones defined in the EDN spec, #inst and #uuid. It
is not recommended you change this variable, as this globally
@@ -84,7 +84,7 @@ CHILDREN is a collection elisp values to be reduced into an
elisp
sequence.
OPTIONS is an association list. See `parseclj-parse' for more information
on available options."
- (let ((tag-readers (a-merge parseedn-default-tag-readers (a-get options
:tag-readers)))
+ (let ((tag-readers (map-merge 'alist parseedn-default-tag-readers (alist-get
:tag-readers options)))
(token-type (parseclj-lex-token-type opening-token)))
(if (eq token-type :discard)
stack
@@ -100,10 +100,10 @@ on available options."
(puthash (car pair) (cadr pair) hash-map))
kvs)
hash-map))
- (:tag (let* ((tag (intern (substring (a-get opening-token :form) 1)))
- (reader (a-get tag-readers tag :missing)))
+ (:tag (let* ((tag (intern (substring (alist-get :form opening-token)
1)))
+ (reader (alist-get tag tag-readers :missing)))
(when (eq :missing reader)
- (user-error "No reader for tag #%S in %S" tag (a-keys
tag-readers)))
+ (user-error "No reader for tag #%S in %S" tag (map-keys
tag-readers)))
(funcall reader (car children)))))
stack))))
@@ -116,7 +116,7 @@ identifying *tags*, and values are tag handler functions
that receive one
argument: *the tagged element*, and specify how to interpret it."
(parseclj-parser #'parseedn-reduce-leaf
#'parseedn-reduce-branch
- (a-list :tag-readers tag-readers)))
+ (list (cons :tag-readers tag-readers))))
(defun parseedn-read-str (s &optional tag-readers)
"Parse string S as EDN.
@@ -142,11 +142,12 @@ TAG-READERS is an optional association list. For more
information, see
(parseedn-print-seq next))))
(defun parseedn-print-hash-or-alist (map &optional ks)
- "Insert hash table MAP or elisp a-list as an EDN map into the current
buffer."
- (let ((keys (or ks (a-keys map))))
+ "Insert hash table MAP or elisp alist as an EDN map into the current buffer."
+ (let ((alist? (listp map))
+ (keys (or ks (map-keys map))))
(parseedn-print (car keys))
(insert " ")
- (parseedn-print (a-get map (car keys)))
+ (parseedn-print (map-elt map (car keys)))
(let ((next (cdr keys)))
(when (not (seq-empty-p next))
(insert ", ")
diff --git a/test/parseedn-el-parity-test.el b/test/parseedn-el-parity-test.el
index 330669af8f..78ef2f68c4 100644
--- a/test/parseedn-el-parity-test.el
+++ b/test/parseedn-el-parity-test.el
@@ -204,9 +204,8 @@
1)
(setq parseedn-test-extra-handlers
- (a-list
- 'my/type #'test-val-passed-to-handler
- 'my/other-type (lambda (val) 2)))
+ (list (cons 'my/type #'test-val-passed-to-handler)
+ (cons 'my/other-type (lambda (val) 2))))
(ert-deftest tags ()
:tags '(edn tags)
diff --git a/test/parseedn-test.el b/test/parseedn-test.el
index 8815543fd0..552a86b423 100644
--- a/test/parseedn-test.el
+++ b/test/parseedn-test.el
@@ -27,6 +27,7 @@
;;; Code
+(require 'a)
(require 'ert)
(require 'parseedn)
- [nongnu] branch elpa/parseedn created (now e5ba280d1f), ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn edfee3ae28 26/32: Bump versions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn d6abb3adf7 25/32: Update parseclj dependency to 1.0.2, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn 9c2a37d02c 04/32: Add a missing require, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn 2a30c83198 02/32: Tweak the keywords, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn 3f93aab1ed 23/32: Remove the a.el dependency,
ELPA Syncer <=
- [nongnu] elpa/parseedn 876dfead6b 16/32: Fix reference to parseedn-print-kvs -> parseedn-print-hash-or-alist, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn d25ebc5554 18/32: Add CHANGELOG.md, prep for v0.2.0, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn e7ff673cd9 24/32: Release 1.0, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn 3e0b5d729e 09/32: Fix references in tests: s/parseclj/parseedn, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn 3e74411f89 20/32: Add print handler for #uuid and #inst, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn e1de65e463 30/32: Merge pull request #10 from clojure-emacs/cl-case-to-cond, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn 90cfe3df51 19/32: Add date/sha to CHANGELOG, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn 6d80a59673 14/32: Add support for alist, plist and an explicit error for unsupported dotted pair notation., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn ff3cb233bc 07/32: Bump the copyright years, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseedn 5470d4ed67 21/32: Fix the inst parsing test for the case where TZ=UTC, ELPA Syncer, 2021/12/28