Commit 7c1bf12e authored by Simon Schubert's avatar Simon Schubert Committed by Dmitry Gutov
Browse files

* lisp/json.el (json-alist-p): Only return non-nil if the alist has

simple keys.

Fixes: debbugs:13518
parent 64e41529
2013-11-24 Simon Schubert <2@0x2c.org>
* json.el (json-alist-p): Only return non-nil if the alist has
simple keys (Bug#13518).
2013-11-22 Mihir Rege <mihirrege@gmail.com> (tiny change)
* progmodes/js.el (js--ctrl-statement-indentation): Fix indent
......
......@@ -126,9 +126,10 @@ without indentation.")
(mapconcat 'identity strings separator))
(defun json-alist-p (list)
"Non-null if and only if LIST is an alist."
"Non-null if and only if LIST is an alist with simple keys."
(while (consp list)
(setq list (if (consp (car list))
(setq list (if (and (consp (car list))
(atom (caar list)))
(cdr list)
'not-alist)))
(null list))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment