branch: externals/compat
commit 740e975fbcb3079d1277f60c9438e46f146f0125
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Add docstring
---
 compat.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/compat.el b/compat.el
index 1e38672e45..d2c8bb875f 100644
--- a/compat.el
+++ b/compat.el
@@ -89,10 +89,14 @@ See also `compat-function' to lookup compatibility 
functions."
   (defvar json-object-type)
   (defvar json-key-type)
   (declare-function json-read nil)
-
   (declare-function compat--json--print nil)
+
   (unless (eval-when-compile (ignore-errors (eval '(json-parse-string "[]") 
t)))
     (defun compat--json--print (obj)
+      "Print OBJ to the current-buffer/standard-output.
+We provide our entire reimplementation of `json--print' and
+`json-encode', since the error checking and the format of
+libjansson and json.el differ too much."
       (cond
        ((numberp obj) (prin1 obj))
        ((eq obj t) (insert "true"))

Reply via email to