summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kirkpatrick <ubermonk@gmail.com>2012-12-31 14:44:00 +1030
committerAndrew Kirkpatrick <ubermonk@gmail.com>2012-12-31 14:44:00 +1030
commitea74f5bfb6817b2b4e76a8ebb137ba57d27bdcad (patch)
treeedafb3f5a1a7a3b1d22f4a3d909b0c083ff494a5
parent83df0dd7a0c6ff9e982c1601b65b83647872bf29 (diff)
removed recursion from kvplist->alist
-rw-r--r--kv.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/kv.el b/kv.el
index 8d54b5e..ffed5b6 100644
--- a/kv.el
+++ b/kv.el
@@ -177,11 +177,9 @@ Converting to a symbol means dropping the :."
The keys are expected to be :prefixed and the colons are removed.
The keys in the resulting alist are symbols."
- ;; RECURSION KLAXON
(when plist
- (destructuring-bind (key value &rest plist) plist
- (cons `(,(keyword->symbol key) . ,value)
- (kvplist->alist plist)))))
+ (loop for (key value . rest) on plist by 'cddr
+ collect (cons (keyword->symbol key) value))))
(defun kvalist2->plist (alist2)
"Convert a list of alists too a list of plists."