Function: indent-pp-sexp

indent-pp-sexp is an interactive and byte-compiled function defined in lisp-mode.el.gz.

Signature

(indent-pp-sexp &optional ARG)

Documentation

Indent each line of the list starting just after point, or prettyprint it.

A prefix argument specifies pretty-printing.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/lisp-mode.el.gz
(defun indent-pp-sexp (&optional arg)
  "Indent each line of the list starting just after point, or prettyprint it.
A prefix argument specifies pretty-printing."
  (interactive "P")
  (if arg
      (save-excursion
        (save-restriction
          (narrow-to-region (point) (progn (forward-sexp 1) (point)))
          (pp-buffer)
          (goto-char (point-max))
          (if (eq (char-before) ?\n)
              (delete-char -1)))))
  (indent-sexp))