mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Currently, in *Backtrace* we have a nice behavior for cl-printed objects where they're truncated by default to a manageable size but we can click on the "..." to expand them when needed. The patch below moves that functionality to `cl-print.el` such that it can be enjoyed "everywhere" (bug#64536). It also has the benefit of simplifying the code since `backtrace.el` had to look for ellipses in order to add buttons to them, whereas now we can put the ellipses right when we write them. * lisp/emacs-lisp/cl-print.el (cl-print-object-contents): Improve docstring. (cl-print-expand-ellipsis-function): New var. (cl-print--default-expand-ellipsis): New function. (cl-print-expand-ellipsis): New command. (cl-print-insert-ellipsis): Allow nil instead of 0 to mean "this elides the whole object". (cl-print-ellipsis): Move button type from `backtrace.el`. (cl-print-propertize-ellipsis): Put a button. (cl-print--expand-ellipsis): Rename from `cl-print-expand-ellipsis`. (cl-print-to-string-with-limit): Allow new value t for `limit`. * lisp/emacs-lisp/backtrace.el (backtrace--font-lock-keywords): Simplify. (backtrace--match-ellipsis-in-string): Delete function. (backtrace--change-button-skip): Adjust to new button type name. (backtrace--expand-ellipsis): New function, extracted from `backtrace-expand-ellipsis`. (backtrace-expand-ellipsis): Delete function. (backtrace-ellipsis): Move button type to `cl-print.el`. (backtrace--print-to-string): Don't look for cl-print ellipses any more. (backtrace-mode): Use `backtrace--expand-ellipsis`. * lisp/ielm.el (ielm--expand-ellipsis): New function. (inferior-emacs-lisp-mode): Use it to fill the data when expanded. * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-check-ellipsis-expansion) (cl-print-tests-check-ellipsis-expansion-rx): Adjust to new internal function name. |
||
|---|---|---|
| .. | ||
| bytecomp-resources | ||
| edebug-resources | ||
| eieio-tests | ||
| faceup-resources | ||
| faceup-tests | ||
| macroexp-resources | ||
| package-resources | ||
| pp-resources | ||
| shadow-resources | ||
| testcover-resources | ||
| backquote-tests.el | ||
| backtrace-tests.el | ||
| benchmark-tests.el | ||
| bindat-tests.el | ||
| bytecomp-tests.el | ||
| cconv-tests.el | ||
| check-declare-tests.el | ||
| checkdoc-tests.el | ||
| cl-extra-tests.el | ||
| cl-generic-tests.el | ||
| cl-lib-tests.el | ||
| cl-macs-tests.el | ||
| cl-preloaded-tests.el | ||
| cl-print-tests.el | ||
| cl-seq-tests.el | ||
| comp-cstr-tests.el | ||
| comp-tests.el | ||
| copyright-tests.el | ||
| derived-tests.el | ||
| easy-mmode-tests.el | ||
| edebug-tests.el | ||
| ert-tests.el | ||
| ert-x-tests.el | ||
| find-func-tests.el | ||
| float-sup-tests.el | ||
| generator-tests.el | ||
| gv-tests.el | ||
| hierarchy-tests.el | ||
| icons-tests.el | ||
| let-alist-tests.el | ||
| lisp-mnt-tests.el | ||
| lisp-mode-tests.el | ||
| lisp-tests.el | ||
| macroexp-tests.el | ||
| map-tests.el | ||
| memory-report-tests.el | ||
| multisession-tests.el | ||
| nadvice-tests.el | ||
| oclosure-tests.el | ||
| package-tests.el | ||
| pcase-tests.el | ||
| pp-tests.el | ||
| range-tests.el | ||
| regexp-opt-tests.el | ||
| ring-tests.el | ||
| rmc-tests.el | ||
| rx-tests.el | ||
| seq-tests.el | ||
| shadow-tests.el | ||
| shortdoc-tests.el | ||
| subr-x-tests.el | ||
| syntax-tests.el | ||
| tabulated-list-tests.el | ||
| testcover-tests.el | ||
| text-property-search-tests.el | ||
| thunk-tests.el | ||
| timer-tests.el | ||
| unsafep-tests.el | ||
| vtable-tests.el | ||
| warnings-tests.el | ||