Skip to content

Commit 29235c8

Browse files
committed
test: implement plistp
1 parent e897c29 commit 29235c8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/benchmark_and_compare.template.el

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
(and (listp x)
2424
(-all (lambda (e) (and (consp e) (symbolp (car e)))) x)))
2525

26+
(defun -plistp (x)
27+
(and (listp x)
28+
x
29+
(keywordp (car x))))
30+
2631
(defun -sort-alist (x)
2732
(sort x (lambda (a b) (string< (symbol-name (car a)) (symbol-name (car b))))))
2833

@@ -60,8 +65,8 @@
6065
(equal (length a) (length b))
6166
(-check-equal-sorted-alist (-sort-alist a)
6267
(-sort-alist b))))
63-
((pred plistp)
64-
(and (plistp b)
68+
((pred -plistp) ;; plistp is not available before emacs29
69+
(and (-plistp b)
6570
(equal (length a) (length b))
6671
(-check-equal-sorted-alist (-plist-to-sorted-alist a)
6772
(-plist-to-sorted-alist b))))

0 commit comments

Comments
 (0)