Stefan Monnier writes: >> Actually, that can probably be simplified a bit. > > BTW, it could be argued that the `indent-rigidly` should take place in > `pp` (i.e. consider it as a bug in `pp`). > > The patch looks good to me, tho I have the following nitpicks: > >> (let ((begin (point)) >> + (cols (- (point) (line-beginning-position))) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > (current-column) Oh, TABs and stuff, right. > >> (pp-escape-newlines t) >> (print-escape-control-characters t)) >> (pp object (current-buffer)) >> (unless (bolp) (insert "\n")) >> - (save-excursion >> - (goto-char begin) >> - (indent-sexp)))) >> + (indent-rigidly begin (point-max) cols))) >> ^^^^^^^^^^^ > (point) > > We arguably know that (point) is the same as (point-max) here, so it's > not really important, but (point) is shorter and conceptually more > correct since we wouldn't want to shift text that was there before. Makes sense. Might as well have the function be more generally useful. Thanks. And since the issue is new on the release branch, I'm guessing that's where a patch should go (Cc. Eli)?