[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12634: Patch for pretty-printing in json.el
From: |
Stefan Monnier |
Subject: |
bug#12634: Patch for pretty-printing in json.el |
Date: |
Thu, 25 Oct 2012 14:08:59 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
> 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
bug#12634: Patch for pretty-printing in json.el, Ryan Crum, 2012/10/25
- bug#12634: Patch for pretty-printing in json.el,
Stefan Monnier <=