joshwnj/json-mode — pull request #17 by vincentbernat (2014-01-16 20:47:06+00:00)
Title: Make `json-mode-beautify` work without a mark.

It is possible to not have a mark (for example, just after opening a
file) and hence, `json-mode-beautify` didn't work in this case. We don't
take a region as a parameter but we use the current active region
instead.

On the other hand, this makes the function more difficult to handle in non-interactive mode. A possibility would be to tune the interactive form to not use `r` but something like `(interactive (if (use-region-p) (list (region-beginning) (region-end)))`. I don't know how to handle `P` in this case...