emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/compat e93f64ce94: Fix byte compiler failure introduced


From: ELPA Syncer
Subject: [elpa] externals/compat e93f64ce94: Fix byte compiler failure introduced in ec82f43ef0
Date: Sun, 29 May 2022 09:57:29 -0400 (EDT)

branch: externals/compat
commit e93f64ce94d0214b23ad89087977db654a04334e
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Fix byte compiler failure introduced in ec82f43ef0
    
    The test in `json-available-p' assumes that t can be interpreted as a
    JSON value, which was not the case prior to 28.1.  It is therefore
    necessary to modify the test by serializing a value that was supported
    with Emacs 27.1.
---
 compat-27.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/compat-27.el b/compat-27.el
index f3f74c3819..b08d5604d4 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -170,7 +170,7 @@ In you specify the same value for `:null-object' and 
`:false-object',
 a potentially ambiguous situation, the JSON output will not contain
 any JSON false values."
   :cond (not (condition-case nil
-                 (json-serialize t)
+                 (equal (json-serialize '()) "{}")
                (:success t)
                (json-unavailable nil)))
   :realname compat--json-serialize
@@ -230,7 +230,7 @@ This is the same as (insert (json-serialize OBJECT)), but 
potentially
 faster.  See the function `json-serialize' for allowed values of
 OBJECT."
   :cond (not (condition-case nil
-                 (json-serialize t)
+                 (equal (json-serialize '()) "{}")
                (:success t)
                (json-unavailable nil)))
   (insert (apply #'compat--json-serialize object args)))
@@ -260,7 +260,7 @@ to represent a JSON null value.  It defaults to `:null'.
 The keyword argument `:false-object' specifies which object to use to
 represent a JSON false value.  It defaults to `:false'."
   :cond (not (condition-case nil
-                 (json-serialize t)
+                 (equal (json-serialize '()) "{}")
                (:success t)
                (json-unavailable nil)))
   (require 'json)
@@ -303,7 +303,7 @@ to represent a JSON null value.  It defaults to `:null'.
 The keyword argument `:false-object' specifies which object to use to
 represent a JSON false value.  It defaults to `:false'."
   :cond (not (condition-case nil
-                 (json-serialize t)
+                 (equal (json-serialize '()) "{}")
                (:success t)
                (json-unavailable nil)))
   (require 'json)



reply via email to

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