emacs/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
..
advice.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
autoload.el * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): 2018-04-19 13:09:24 -04:00
avl-tree.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
backquote.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
backtrace.el Add backtrace-mode and use it in the debugger, ERT and Edebug 2018-08-03 08:53:02 -07:00
benchmark.el (benchmark-run-compiled): Make it work like 'benchmark-run' again 2018-03-27 16:19:40 -04:00
bindat.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
byte-opt.el Add predicate proper-list-p 2018-07-09 19:00:43 -07:00
byte-run.el Fix the bootstrap differently, so zerop can be where it belongs 2018-07-12 10:29:28 -04:00
bytecomp.el Fix byte compilation of (eq foo 'default) 2018-06-16 09:44:05 -07:00
cconv.el Don't forget to analyze args of lambda lifted functions (Bug#30872) 2018-06-16 18:34:19 -04:00
chart.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
check-declare.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
checkdoc.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
cl-extra.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl-generic.el Prevent name clashes between CL structures and builtin types 2018-01-28 19:21:47 +01:00
cl-indent.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl-lib.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl-macs.el Fix Edebug spec for cl-macrolet (bug#29919) 2018-08-01 13:59:49 -07:00
cl-preloaded.el Add missing module types to cl--typeof-types. 2018-01-28 20:39:58 +01:00
cl-print.el Add methods for strings to cl-print 2018-08-03 08:53:02 -07:00
cl-seq.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl.el Fix #'fun handling inside `labels' (Bug#31792) 2018-06-19 20:02:16 -04:00
copyright.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
crm.el Support list of default values in completing-read-multiple 2018-04-12 23:36:45 +03:00
cursor-sensor.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
debug.el Add backtrace-mode and use it in the debugger, ERT and Edebug 2018-08-03 08:53:02 -07:00
derived.el Remove many items obsolete since Emacs 22.1 2018-03-10 19:15:56 -08:00
disass.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
easy-mmode.el Merge from origin/emacs-26 2018-07-13 09:28:15 -07:00
easymenu.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
edebug.el Add backtrace-mode and use it in the debugger, ERT and Edebug 2018-08-03 08:53:02 -07:00
eieio-base.el Further fix to eieio-persistent 2018-04-13 10:56:55 -07:00
eieio-compat.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
eieio-core.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
eieio-custom.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
eieio-datadebug.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
eieio-opt.el Define cl-type-definition button type as needed (Bug#28899) 2018-01-30 22:14:02 -05:00
eieio-speedbar.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
eieio.el Merge from origin/emacs-26 2018-05-29 10:07:21 +02:00
eldoc.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
elint.el Prefer \... to control chars in .el literals 2018-03-29 17:43:08 -07:00
elp.el Merge from origin/emacs-26 2018-02-17 07:50:28 -08:00
ert-x.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
ert.el Add backtrace-mode and use it in the debugger, ERT and Edebug 2018-08-03 08:53:02 -07:00
ewoc.el * lisp/emacs-lisp/ewoc.el (ewoc-goto-node): 2018-03-05 14:32:20 -05:00
faceup.el Update copyright year to 2018 2018-01-01 01:25:56 -08:00
find-func.el Fix default candidate of find-face-definition 2018-06-09 09:52:54 +03:00
float-sup.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
generator.el * lisp/emacs-lisp/generator.el (iter-defun): Add 'doc-string' prop. 2018-01-11 11:24:38 -05:00
generic.el Remove many items obsolete since Emacs 22.1 2018-03-10 19:15:56 -08:00
gv.el * lisp/emacs-lisp/gv.el (gv-define-setter): Silence compiler warning 2018-04-18 15:56:15 -04:00
helper.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
inline.el * lisp/emacs-lisp/inline.el: Clarify apparent typos 2018-04-04 21:15:36 -04:00
let-alist.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
lisp-mnt.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
lisp-mode.el Add backtrace-mode and use it in the debugger, ERT and Edebug 2018-08-03 08:53:02 -07:00
lisp.el Merge from origin/emacs-26 2018-01-09 15:29:25 -08:00
macroexp.el Quote a few backticks in docstrings. 2018-04-01 23:33:16 +02:00
map-ynp.el New function read-answer (bug#30073) 2018-01-21 23:45:43 +02:00
map.el ; Fix some tiny doc typos 2018-03-27 17:02:04 -04:00
nadvice.el Merge from origin/emacs-26 2018-05-23 01:37:54 -07:00
package-x.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
package.el Merge from origin/emacs-26 2018-07-02 19:19:05 -07:00
pcase.el Allow floats as 'pcase' QPATS 2018-06-17 15:22:30 +02:00
pp.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
radix-tree.el Merge from origin/emacs-26 2018-05-29 10:07:21 +02:00
re-builder.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
regexp-opt.el * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix docstring quotes. 2018-06-24 10:57:54 -04:00
regi.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
ring.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
rmc.el Improve read-multiple-choice docstring (Bug#31628) 2018-05-29 08:17:32 -04:00
rx.el Merge from origin/emacs-26 2018-07-20 10:00:32 -07:00
seq.el Change name of `seqp' argument (Bug#26411) 2018-06-21 20:27:35 -04:00
shadow.el ; Spelling fix 2018-01-22 08:50:06 -08:00
smie.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
subr-x.el Tweak subr-x.el substring functions 2018-07-13 11:28:16 -04:00
syntax.el Remove outdated comment in syntax.el 2018-03-03 14:41:16 +02:00
tabulated-list.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
tcover-ses.el Prefer \... to control chars in .el literals 2018-03-29 17:43:08 -07:00
tcover-unsafep.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
testcover.el Fix Testcover bug in handling of vectors containing dotted lists 2018-04-02 09:38:12 -07:00
text-property-search.el (text-property-search-forward): Copy edits in doc string 2018-04-22 20:34:48 +02:00
thunk.el Quieten cl-lib related compiler warnings 2018-03-22 21:40:24 -07:00
timer-list.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
timer.el Remove many items obsolete since Emacs 22.1 2018-03-10 19:15:56 -08:00
tq.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
trace.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
unsafep.el Remove many items obsolete since Emacs 22.1 2018-03-10 19:15:56 -08:00
warnings.el Let display-warning work during bootstrap 2018-06-12 07:40:33 -04:00