• Stefan Monnier's avatar
    Speed up `describe-char` when a property has a large value · e819413e
    Stefan Monnier authored
    Doing `C-u C-x =` on a buffer position where the overlay/text
    properties hold large values (e.g. inside the profiler report)
    can be surprisingly slow because it pretty prints all those properties.
    Change the code to do the pretty printing more lazily.
    While at it, share that duplicated code between `descr-text.el` and
    `wid-browse.el`.
    
    * lisp/emacs-lisp/pp.el (pp-insert-short-sexp): New function.
    
    * lisp/descr-text.el (describe-text-sexp): Delete function.
    (describe-property-list): Use `pp-insert-short-sexp` instead.
    
    * lisp/wid-browse.el (widget-browse-sexp): Use `pp-insert-short-sexp`
    and `widget--allow-insertion`.
    e819413e