* lisp/help.el (help--describe-command): Add links for
lambdas/closures/byte code (bug#24235).
* lisp/emacs-lisp/pp.el (pp-display-expression): Autoload.
Output stream is STREAM, or value of `standard-output' (which see)."
(princ (pp-to-string object) (or stream standard-output)))
+;;;###autoload
(defun pp-display-expression (expression out-buffer-name)
"Prettify and display EXPRESSION in an appropriate way, depending on length.
If a temporary buffer is needed for representation, it will be named
((keymapp definition)
(insert "Prefix Command\n"))
((byte-code-function-p definition)
- (insert "[byte-code]\n"))
+ (insert "[%s]\n"
+ (button-buttonize "byte-code" #'disassemble definition)))
((and (consp definition)
(memq (car definition) '(closure lambda)))
- (insert (format "[%s]\n" (car definition))))
+ (insert (format "[%s]\n"
+ (button-buttonize
+ (symbol-name (car definition))
+ (lambda (_)
+ (pp-display-expression
+ definition "*Help Source*"))))))
(t
(insert "??\n"))))