[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31559: 26.1; Debugger and ERT backtraces are not abbreviated

From: Gemini Lasswell
Subject: bug#31559: 26.1; Debugger and ERT backtraces are not abbreviated
Date: Tue, 22 May 2018 12:56:44 -0700

In Emacs 25, the backtraces produced by debug.el and ert.el
abbreviated long lists and deeply nested forms with "...".  This
doesn't happen in Emacs 26.

To reproduce, evaluate these lines of code:

(defun my-func (arg) arg)
(debug-on-entry 'my-func)
(my-func (make-list 100 'a))

Result: An ellipsis appears in the list in the backtrace in
Emacs 25, and the entire list is printed in Emacs 26.

Edebug's backtraces still have ellipses, but its printing of
evaluation results no longer shows them.

The reason this is happening is that the printing of backtraces by the
debugger was switched to use cl-prin1 by the fix to bug#6991.
Edebug's results printing was switched to cl-prin1 when CL printing
was added to Emacs but its backtrace printing was left as before.

edebug.el, debug.el and ert.el all bind print-level and print-length
before printing backtraces, but CL printing does not pay any attention
to those variables, in spite of cl-prin1's docstring which says
that it does.

Here is a patch that makes cl-prin1 behave like prin1 with respect to
print-level and print-length, except for hash tables (because prin1
prints hash table items and cl-prin1 doesn't, although maybe it

Attachment: 0001-Make-CL-printing-respect-print-level-and-print-lengt.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]