emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115215: * lisp/json.el (json-alist-p): Only return


From: Dmitry Gutov
Subject: [Emacs-diffs] trunk r115215: * lisp/json.el (json-alist-p): Only return non-nil if the alist has
Date: Sun, 24 Nov 2013 22:49:51 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115215
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/13518
author: Simon Schubert <address@hidden>
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Mon 2013-11-25 00:49:37 +0200
message:
  * lisp/json.el (json-alist-p): Only return non-nil if the alist has
  simple keys.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/json.el                   json.el-20091113204419-o5vbwnq5f7feedwu-8583
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-24 22:01:08 +0000
+++ b/lisp/ChangeLog    2013-11-24 22:49:37 +0000
@@ -1,3 +1,8 @@
+2013-11-24  Simon Schubert  <address@hidden>
+
+       * json.el (json-alist-p): Only return non-nil if the alist has
+       simple keys (Bug#13518).
+
 2013-11-22  Mihir Rege  <address@hidden>  (tiny change)
 
        * progmodes/js.el (js--ctrl-statement-indentation): Fix indent

=== modified file 'lisp/json.el'
--- a/lisp/json.el      2013-08-09 21:22:44 +0000
+++ b/lisp/json.el      2013-11-24 22:49:37 +0000
@@ -126,9 +126,10 @@
   (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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]