emacs/test/lisp/emacs-lisp
Gemini Lasswell e09120d686 Add backtrace-mode and use it in the debugger, ERT and Edebug
* doc/lispref/debugging.texi (Using Debugger): Remove explanation of
backtrace buffer.  Refer to new node.
(Backtraces): New node.
(Debugger Commands): Refer to new node.  Remove 'v'.
* doc/lispref/edebug.texi (Edebug Misc): Refer to new node.
* doc/misc/ert.texi (Running Tests Interactively): Refer to new node.

* lisp/emacs-lisp-backtrace.el: New file.
* test/lisp/emacs-lisp/backtrace-tests.el: New file.

* lisp/emacs-lisp/debug.el: (debugger-buffer-state): New cl-defstruct.
(debugger--restore-buffer-state): New function.
(debug): Use a debugger-buffer-state object to save and restore buffer
state.  Fix bug#15749 by leaving an unused buffer in debugger-mode,
empty, instead of in fundamental-mode, and then when reusing a buffer,
not calling debugger-mode if the buffer is already in debugger-mode.
(debugger-insert-backtrace): Remove.
(debugger-setup-buffer): Use backtrace-mode.
(debugger--insert-header): New function.
(debugger-continue, debugger-return-value): Change check for flags to
use backtrace-frames.
(debugger-frame-number): Determine backtrace frame number from
backtrace-frames.
(debugger--locals-visible-p, debugger--insert-locals)
(debugger--show-locals, debugger--hide-locals)
(debugger-toggle-locals): Remove.
(debugger-mode-map): Make a child of backtrace-mode-map.  Move
navigation commands to backtrace-mode-map.  Bind 'q' to debugger-quit
instead of top-level.  Make Help Follow menu item call
backtrace-help-follow-symbol.
(debugger-mode): Derive from backtrace-mode.
(debug-help-follow): Remove.  Move body of this function to
'backtrace-help-follow-symbol' in backtrace.el.
(debugger-quit): New function.

* lisp/emacs-lisp/edebug.el (edebug-unwrap-results): Remove warning
in docstring about circular results.
(edebug-unwrap): Use pcase.
(edebug-unwrap1): New function to unwrap circular objects.
(edebug-unwrap*): Use it.
(edebug--frame): New cl-defstruct.
(edebug-backtrace): Call the buffer *Edebug Backtrace* and use
backtrace-mode.  Get the frames from edebug--backtrace-frames.
(edebug--backtrace-frames, edebug--unwrap-and-add-info)
(edebug--symbol-not-prefixed-p): New functions.

* lisp/emacs-lisp/lisp-mode.el
(lisp-el-font-lock-keywords-for-backtraces)
(lisp-el-font-lock-keywords-for-backtraces-1)
(lisp-el-font-lock-keywords-for-backtraces-2): New constants.

* lisp/emacs-lisp/ert.el (ert--print-backtrace): Remove.
(ert--run-test-debugger): Use backtrace-get-frames.
(ert-run-tests-batch): Use backtrace-to-string.
(ert-results-pop-to-backtrace-for-test-at-point): Use backtrace-mode.
(ert--insert-backtrace-header): New function.

* tests/lisp/emacs-lisp/ert-tests.el (ert-test--which-file):
Use backtrace-frame slot accessor.
2018-08-03 08:53:02 -07:00
..
edebug-resources Fix Edebug spec for cl-macrolet (bug#29919) 2018-08-01 13:59:49 -07:00
eieio-tests Merge from origin/emacs-26 2018-03-22 07:50:37 -07:00
faceup-resources Update copyright year to 2018 2018-01-01 01:25:56 -08:00
faceup-tests Update copyright year to 2018 2018-01-01 01:25:56 -08:00
package-resources Don't use IP 0.0.0.0 for package test server (Bug#22582) 2017-02-25 12:56:09 -05:00
shadow-resources Handle case-insensitive filenames for load-path shadows (Bug#5845) 2018-01-18 16:26:52 -05:00
testcover-resources Fix Testcover bug in handling of vectors containing dotted lists 2018-04-02 09:38:12 -07:00
backtrace-tests.el Add backtrace-mode and use it in the debugger, ERT and Edebug 2018-08-03 08:53:02 -07:00
benchmark-tests.el (benchmark-run-compiled): Make it work like 'benchmark-run' again 2018-03-27 16:19:40 -04:00
bytecomp-tests.el Fix byte compilation of (eq foo 'default) 2018-06-16 09:44:05 -07:00
cconv-tests.el Don't forget to analyze args of lambda lifted functions (Bug#30872) 2018-06-16 18:34:19 -04:00
checkdoc-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl-extra-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl-generic-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl-lib-tests.el * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Handle lambda! 2018-02-08 21:41:21 -05:00
cl-macs-tests.el Prevent name clashes between CL structures and builtin types 2018-01-28 19:21:47 +01:00
cl-preloaded-tests.el ; * test/lisp/emacs-lisp/cl-preloaded-tests.el: Fix copyright notice. 2018-01-28 18:07:03 -08:00
cl-print-tests.el Add methods for strings to cl-print 2018-08-03 08:53:02 -07:00
cl-seq-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl-tests.el Fix #'fun handling inside `labels' (Bug#31792) 2018-06-19 20:02:16 -04:00
derived-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
edebug-tests.el Fix Edebug spec for cl-macrolet (bug#29919) 2018-08-01 13:59:49 -07:00
ert-tests.el Add backtrace-mode and use it in the debugger, ERT and Edebug 2018-08-03 08:53:02 -07:00
ert-x-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
generator-tests.el ; Add test for iter-lambda variable shadowing (Bug#26073) 2018-02-14 21:31:06 -05:00
gv-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
let-alist-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
lisp-mode-tests.el Don't fail to indent-sexp before a full sexp (Bug#31984) 2018-07-27 19:41:39 -04:00
lisp-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
map-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
nadvice-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
package-tests.el Don't test symmetric operations on gpg 2.0 (Bug#23561) 2018-07-15 16:26:22 -04:00
pcase-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
pp-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
regexp-opt-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
ring-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
rmc-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
rx-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
seq-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
shadow-tests.el ; Spelling fix 2018-01-22 08:42:29 -08:00
subr-x-tests.el Tweak subr-x.el substring functions 2018-07-13 11:28:16 -04:00
tabulated-list-test.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
testcover-tests.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
text-property-search-tests.el Add a test suite for text-property-search 2018-04-22 16:57:16 +02:00
thunk-tests.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
timer-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00