Function: pp--insert

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

Signature

(pp--insert DELIM &rest THINGS)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/pp.el.gz
(defun pp--insert (delim &rest things)
  (let ((start (if (markerp delim)
                   (prog1
                       delim
                     (setq delim nil))
                 (point-marker))))
    (when delim
      (insert delim))
    (dolist (thing things)
      (pp--insert-lisp thing))
    ;; We need to indent what we have so far to see if we have to fold.
    (pp--indent-buffer)
    (when (> (current-column) (pp--max-width))
      (save-excursion
        (goto-char start)
        (unless (looking-at "[ \t]+$")
          (insert "\n"))
        (pp--indent-buffer)
        (goto-char (point-max))
        ;; If we're still too wide, then go up one step and try to
        ;; insert a newline there.
        (when (> (current-column) (pp--max-width))
          (condition-case ()
              (backward-up-list 1)
            (:success (when (and (not (bobp)) (looking-back " " 2))
                        (insert "\n")))
            (error nil)))))))