Subject: Re: bug#12634: Patch for pretty-printing in json.el

From: Stefan Monnier <[email-masked]>
Date: Thu, 25 Oct 2012 14:08:59 -0400

> I've consolidated my changes into json.el.  I have not yet received
> the form for copyright assignment in the mail, but I have
> requested it.

Great, thanks.

> Please advise me if you'd like me to make any changes here, and I'll
> be happy to accomodate.  Patch attached.

It looks OK overall, but I do have some comments:
- it would be better not to re-compute json-encoding-current-separator
  every time we call json-encode, since that function is called all
  the time.
  IOW, build it once in an external caller.  Or better yet: get rid of
  json-encoding-current-separator and add a "\n" at the beginning of
  json-encoding-current-indentation instead.
- you can use the "json--" prefix to indicate it is an internal
  variable/function.
- You could also prefer to place the closing ] at the end of the
  previous line, à la Lisp ;-)

        Stefan