Function: cfengine3-reformat-json-string
cfengine3-reformat-json-string is an interactive and byte-compiled
function defined in cfengine.el.gz.
Signature
(cfengine3-reformat-json-string)
Documentation
Reformat the current string as JSON using json-pretty-print.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cfengine.el.gz
(defun cfengine3-reformat-json-string ()
"Reformat the current string as JSON using `json-pretty-print'."
(interactive)
(let ((ppss (syntax-ppss)))
(when (nth 3 ppss) ;inside a string
(save-excursion
(goto-char (nth 8 ppss))
(forward-char 1)
(let ((start (point)))
(forward-sexp 1)
(json-pretty-print start
(point)))))))