Function: pp-emacs-lisp-code
pp-emacs-lisp-code is an autoloaded and byte-compiled function defined
in pp.el.gz.
Signature
(pp-emacs-lisp-code SEXP)
Documentation
Insert SEXP into the current buffer, formatted as Emacs Lisp code.
Use the pp-max-width variable to control the desired line length.
Note that this could be slow for large SEXPs.
Probably introduced at or before Emacs version 29.1.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/pp.el.gz
;;;###autoload
(defun pp-emacs-lisp-code (sexp)
"Insert SEXP into the current buffer, formatted as Emacs Lisp code.
Use the `pp-max-width' variable to control the desired line length.
Note that this could be slow for large SEXPs."
(require 'edebug)
(let ((obuf (current-buffer)))
(with-temp-buffer
(emacs-lisp-mode)
(pp--insert-lisp sexp)
(insert "\n")
(goto-char (point-min))
(indent-sexp)
(while (re-search-forward " +$" nil t)
(replace-match ""))
(insert-into-buffer obuf))))