[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 20afc89 78/99: Add :cond checks to json-* functi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 20afc89 78/99: Add :cond checks to json-* functions in compat-27.1 |
Date: |
Sun, 17 Oct 2021 05:58:00 -0400 (EDT) |
branch: externals/compat
commit 20afc898975b5136dca150391c41f20613a28e95
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Add :cond checks to json-* functions in compat-27.1
---
compat-27.1.el | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/compat-27.1.el b/compat-27.1.el
index f9e22af..ddc94b3 100644
--- a/compat-27.1.el
+++ b/compat-27.1.el
@@ -171,6 +171,10 @@ represent a JSON false value. It defaults to `:false'.
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 (condition-case nil
+ (json-parse-string "[]")
+ (json-unavailable t)
+ (void-function t))
(require 'json)
(let ((json-false (or (plist-get args :false-object) :false))
(json-null (or (plist-get args :null-object) :null)))
@@ -181,6 +185,10 @@ any JSON false values."
This is the same as (insert (json-serialize OBJECT)), but potentially
faster. See the function `json-serialize' for allowed values of
OBJECT."
+ :cond (condition-case nil
+ (json-parse-string "[]")
+ (json-unavailable t)
+ (void-function t))
(insert (apply #'compat--json-serialize object args)))
(compat-defun json-parse-string (string &rest args)
@@ -207,6 +215,10 @@ 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 (condition-case nil
+ (json-parse-string "[]")
+ (json-unavailable t)
+ (void-function t))
(require 'json)
(condition-case err
(let ((json-object-type (or (plist-get args :object-type) 'hash-table))
@@ -246,6 +258,10 @@ 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 (condition-case nil
+ (json-parse-string "[]")
+ (json-unavailable t)
+ (void-function t))
(require 'json)
(condition-case err
(let ((json-object-type (or (plist-get args :object-type) 'hash-table))
- [elpa] externals/compat 10ef8f4 36/99: Declare string-trim-left and directory-name-p, (continued)
- [elpa] externals/compat 10ef8f4 36/99: Declare string-trim-left and directory-name-p, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 9df8e0c 38/99: Add GitHub action file for CI, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 4364563 43/99: Use unprefixed symbols where possible, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 658db90 47/99: Simplify and-let* implementation, ELPA Syncer, 2021/10/17
- [elpa] externals/compat ad92d70 61/99: Add decoded-time-* functions from 27.1, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 476aa10 62/99: Add json-* functions from 27.1, ELPA Syncer, 2021/10/17
- [elpa] externals/compat a0ea4ae 65/99: Call alist-get-full-elisp from alist-get-handle-testfn, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 4513631 70/99: Fix compat-func-arity advice handling, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 09bf8d8 75/99: Declare nadvice functions for compat-func-arity, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 80ab781 77/99: Use advice.el for advising functions previously to Emacs 24.4, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 20afc89 78/99: Add :cond checks to json-* functions in compat-27.1,
ELPA Syncer <=
- [elpa] externals/compat 72c0781 81/99: Mention Chris Wellons' article on lambdas and byte compilation, ELPA Syncer, 2021/10/17
- [elpa] externals/compat ee068f0 82/99: Revert back to manual advising, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 7bef68b 84/99: Mark regexp-opt as part of regexp-opt.el, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 7619f21 89/99: Display version number of manual advice docstring, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 7245918 96/99: Fix handling of file-missing in require advice, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 29dc297 98/99: Ensure that compat-maxargs-/= is visible at compile time, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 61a1da1 44/99: Remove indirect-function compatibility, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 044acff 58/99: Optionally let compat-func-arity handle advice, ELPA Syncer, 2021/10/17
- [elpa] externals/compat a46ab78 19/99: Add button-buttonize to emacs-28.1, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 9c6818c 20/99: Add directory-name-p compatibility function, ELPA Syncer, 2021/10/17