aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorGemini Lasswell2018-06-19 07:27:41 -0700
committerGemini Lasswell2018-08-03 08:53:02 -0700
commite09120d68694272ea5efbe13b16936b4382389d8 (patch)
tree99f072a54e22202ee74969370722564a519e27a7 /etc
parent8a7620955b4d859caecd9a5dc9f2a986baf994fd (diff)
downloademacs-e09120d68694272ea5efbe13b16936b4382389d8.tar.gz
emacs-e09120d68694272ea5efbe13b16936b4382389d8.zip
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS31
1 files changed, 29 insertions, 2 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 6ccf6fc0890..486e0d4384a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -466,6 +466,14 @@ the shift key.
466*** Isearch now remembers the regexp-based search mode for words/symbols 466*** Isearch now remembers the regexp-based search mode for words/symbols
467and case-sensitivity together with search strings in the search ring. 467and case-sensitivity together with search strings in the search ring.
468 468
469** Debugger
470
471+++
472*** The Lisp Debugger is now based on 'backtrace-mode'.
473Backtrace mode adds fontification and commands for changing the
474appearance of backtrace frames. See the node "Backtraces" in the Elisp
475manual for documentation of the new mode and its commands.
476
469** Edebug 477** Edebug
470 478
471+++ 479+++
@@ -475,14 +483,18 @@ using the new variables 'edebug-behavior-alist',
475'edebug-new-definition-function'. Edebug's behavior can be changed 483'edebug-new-definition-function'. Edebug's behavior can be changed
476globally or for individual definitions. 484globally or for individual definitions.
477 485
486+++
487*** Edebug's backtrace buffer now uses 'backtrace-mode'.
488Backtrace mode adds fontification, links and commands for changing the
489appearance of backtrace frames. See the node "Backtraces" in the Elisp
490manual for documentation of the new mode and its commands.
491
478** Enhanced xterm support 492** Enhanced xterm support
479 493
480*** New variable 'xterm-set-window-title' controls whether Emacs sets 494*** New variable 'xterm-set-window-title' controls whether Emacs sets
481the XTerm window title. This feature is experimental and is disabled 495the XTerm window title. This feature is experimental and is disabled
482by default. 496by default.
483 497
484** Gamegrid
485
486** grep 498** grep
487 499
488+++ 500+++
@@ -499,6 +511,14 @@ The abbreviation can be disabled by the new option
499*** New variable 'ert-quiet' allows to make ERT output in batch mode 511*** New variable 'ert-quiet' allows to make ERT output in batch mode
500less verbose by removing non-essential information. 512less verbose by removing non-essential information.
501 513
514+++
515*** ERT's backtrace buffer now uses 'backtrace-mode'.
516Backtrace mode adds fontification and commands for changing the
517appearance of backtrace frames. See the node "Backtraces" in the Elisp
518manual for documentation of the new mode and its commands.
519
520** Gamegrid
521
502--- 522---
503*** Gamegrid now determines its default glyph size based on display 523*** Gamegrid now determines its default glyph size based on display
504dimensions, instead of always using 16 pixels. As a result, Tetris, 524dimensions, instead of always using 16 pixels. As a result, Tetris,
@@ -669,6 +689,13 @@ transport strategies as well as a separate API to use them. A
669transport implementation for process-based communication, such as is 689transport implementation for process-based communication, such as is
670used by the Language Server Protocol (LSP), is readily available. 690used by the Language Server Protocol (LSP), is readily available.
671 691
692+++
693** Backtrace mode improves viewing of Elisp backtraces.
694Backtrace mode adds pretty printing, fontification and ellipsis
695expansion to backtrace buffers produced by the Lisp debugger, Edebug
696and ERT. See the node "Backtraces" in the Elisp manual for
697documentation of the new mode and its commands.
698
672 699
673* Incompatible Lisp Changes in Emacs 27.1 700* Incompatible Lisp Changes in Emacs 27.1
674 701