aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/json.el5
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7365e8c274e..acc3435ce08 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-11-24 Simon Schubert <2@0x2c.org>
2
3 * json.el (json-alist-p): Only return non-nil if the alist has
4 simple keys (Bug#13518).
5
12013-11-22 Mihir Rege <mihirrege@gmail.com> (tiny change) 62013-11-22 Mihir Rege <mihirrege@gmail.com> (tiny change)
2 7
3 * progmodes/js.el (js--ctrl-statement-indentation): Fix indent 8 * progmodes/js.el (js--ctrl-statement-indentation): Fix indent
diff --git a/lisp/json.el b/lisp/json.el
index aaa7bb0c499..21523c1aa8b 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -126,9 +126,10 @@ without indentation.")
126 (mapconcat 'identity strings separator)) 126 (mapconcat 'identity strings separator))
127 127
128(defun json-alist-p (list) 128(defun json-alist-p (list)
129 "Non-null if and only if LIST is an alist." 129 "Non-null if and only if LIST is an alist with simple keys."
130 (while (consp list) 130 (while (consp list)
131 (setq list (if (consp (car list)) 131 (setq list (if (and (consp (car list))
132 (atom (caar list)))
132 (cdr list) 133 (cdr list)
133 'not-alist))) 134 'not-alist)))
134 (null list)) 135 (null list))