diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-21 12:28:54 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-21 12:28:54 -0400 |
commit | e819413e24d81875abaf81c281115e695ad5cc28 (patch) | |
tree | f454acc374805ddc4ee64adaecbb9f592eaa4f3d /lisp/emacs-lisp/byte-opt.el | |
parent | 129bc91a2c9b7a6e314b4a5a4c60c266ca1cac0f (diff) | |
download | emacs-e819413e24d81875abaf81c281115e695ad5cc28.tar.gz emacs-e819413e24d81875abaf81c281115e695ad5cc28.tar.bz2 emacs-e819413e24d81875abaf81c281115e695ad5cc28.zip |
Speed up `describe-char` when a property has a large value
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`.
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
0 files changed, 0 insertions, 0 deletions