; Fix customization and doc strings in pp.el

* lisp/emacs-lisp/pp.el (pp-default-function): Fix :tag's.
(pp-29, pp-28): Doc fixes.  (Bug#78801)
This commit is contained in:
Eli Zaretskii 2025-06-16 10:00:41 +03:00
parent df3fb94f09
commit a2bfce5d2a

View file

@ -71,9 +71,9 @@ Lisp syntax."
(const :tag "Emacs<29 algorithm, fast and good enough" pp-28) (const :tag "Emacs<29 algorithm, fast and good enough" pp-28)
(const :tag "Work hard for code (slow on large inputs)" (const :tag "Work hard for code (slow on large inputs)"
pp-emacs-lisp-code) pp-emacs-lisp-code)
(const :tag "`pp-emacs-lisp-code' if `pp-use-max-width' else `pp-28'" (const :tag "Work hard for code if `pp-use-max-width' non-nil, else as in Emacs<29"
pp-29) pp-29)
function) (function :tag "Custom function"))
:version "30.1") :version "30.1")
(defvar pp--inhibit-function-formatting nil) (defvar pp--inhibit-function-formatting nil)
@ -123,7 +123,7 @@ and should pretty print it at point into the current buffer."
(defun pp-29 (beg-or-sexp &optional end) ;FIXME: Better name? (defun pp-29 (beg-or-sexp &optional end) ;FIXME: Better name?
"Prettify the current region with printed representation of a Lisp object. "Prettify the current region with printed representation of a Lisp object.
Uses the pretty-printing algorithm that was standard in Emacs-29, Uses the pretty-printing algorithm that was standard in Emacs 29,
which, depending on `pp-use-max-width', will either use `pp-28' which, depending on `pp-use-max-width', will either use `pp-28'
or `pp-emacs-lisp-code'." or `pp-emacs-lisp-code'."
(if pp-use-max-width (if pp-use-max-width
@ -271,7 +271,7 @@ it inserts and pretty-prints that arg at point."
(defun pp-28 (beg &optional end) ;FIXME: Better name? (defun pp-28 (beg &optional end) ;FIXME: Better name?
"Prettify the current region with printed representation of a Lisp object. "Prettify the current region with printed representation of a Lisp object.
Uses the pretty-printing algorithm that was standard before Emacs-30. Uses the pretty-printing algorithm that was standard before Emacs 30.
Non-interactively can also be called with a single argument, in which Non-interactively can also be called with a single argument, in which
case that argument will be inserted pretty-printed at point." case that argument will be inserted pretty-printed at point."
(interactive "r") (interactive "r")