Function: pp--format-definition

pp--format-definition is a byte-compiled function defined in pp.el.gz.

Signature

(pp--format-definition SEXP INDENT EDEBUG)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/pp.el.gz
(defun pp--format-definition (sexp indent edebug)
  (while (and (plusp indent)
              sexp)
    (insert " ")
    ;; We don't understand all the edebug specs.
    (unless (consp edebug)
      (setq edebug nil))
    (if (and (consp (car edebug))
             (eq (caar edebug) '&rest)
             (proper-list-p (car sexp)))
        (pp--insert-binding (pop sexp))
      (if (null (car sexp))
          (insert "()")
        (pp--insert-lisp (car sexp)))
      (pop sexp))
    (pop edebug)
    (decf indent))
  (when (stringp (car sexp))
    (insert "\n")
    (prin1 (pop sexp) (current-buffer)))
  ;; Then insert the rest with line breaks before each form.
  (while sexp
    (insert "\n")
    (if (keywordp (car sexp))
        (progn
          (pp--insert-lisp (pop sexp))
          (when sexp
            (pp--insert " " (pop sexp))))
      (pp--insert-lisp (pop sexp)))))