From 3b9792f7787fb6d567997748f06e0ed2ef52c9a2 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Wed, 10 Apr 2013 11:05:41 +0100 Subject: [PATCH] Also convert json-fix.el to use cl-lib --- json-fix.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/json-fix.el b/json-fix.el index e56f6b33..7f70e821 100644 --- a/json-fix.el +++ b/json-fix.el @@ -1,6 +1,7 @@ ;;; Fixes for json.el such that integer plist / alist keys are rendered as strings, in order to comply with the json spec (require 'json) +(require 'cl-lib) (defun json-encode-key-value-pair (pair) "Encode a (key . value) PAIR as JSON, ensuring that key is encoded into a string." @@ -26,9 +27,9 @@ (defun json-encode-plist (plist) "Return a JSON representation of PLIST." (json-encode-alist - (loop while plist - collect (cons (car plist) (cadr plist)) - do (setf plist (cddr plist))))) + (cl-loop while plist + collect (cons (car plist) (cadr plist)) + do (setf plist (cddr plist))))) (provide 'json-fix)