Function: pp--format-list

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

Signature

(pp--format-list SEXP &optional START)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/pp.el.gz
(defun pp--format-list (sexp &optional start)
  (if (not (let ((head (car sexp)))
             (or pp--inhibit-function-formatting
                 (not (symbolp head))
                 (keywordp head)
                 (let ((l sexp))
                   (catch 'not-funcall
                     (while l
                       (when (or
                              (atom l) ; SEXP is a dotted list
                              ;; Does SEXP have a form like (ELT... . ,X) ?
                              (pp--quoted-or-unquoted-form-p l))
                         (throw 'not-funcall t))
                       (setq l (cdr l)))
                     nil)))))
      (pp--format-function sexp)
    (insert "(")
    (pp--insert start (pop sexp))
    (while sexp
      (if (consp sexp)
          (if (not (pp--quoted-or-unquoted-form-p sexp))
              (pp--insert " " (pop sexp))
            (pp--insert " . " sexp)
            (setq sexp nil))
        (pp--insert " . " sexp)
        (setq sexp nil)))
    (insert ")")))