1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 14:01:43 -08:00
emacs/doc/misc
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
..
ada-mode.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
auth.texi Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
autotype.texi Fix typos in several manuals (Bug#31610) 2018-06-01 16:33:58 +03:00
bovine.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
calc.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
cc-mode.texi ; Spelling fixes 2018-03-04 17:10:34 -08:00
ChangeLog.1 Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cl.texi Merge from origin/emacs-26 2018-06-23 07:50:59 -07:00
dbus.texi Further improvements on manuals 2018-03-01 09:25:55 +01:00
dired-x.texi Remove obsolete objects from dired-x.el 2018-05-14 17:06:33 +02:00
doclicense.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
ebrowse.texi * doc/misc/ebrowse.texi: Use @key{} for keys. 2018-02-24 17:56:43 +01:00
ede.texi Merge from origin/emacs-26 2018-02-28 09:40:40 -08:00
ediff.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
edt.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
efaq-w32.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
efaq.texi * lisp/comint.el: Clean up namespace 2018-07-18 10:23:20 -04:00
eieio.texi Fix @cindex entries in manuals 2018-02-24 20:52:21 +01:00
emacs-gnutls.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
emacs-mime.texi Fix a typo in emacs-mime.texi (Bug#31610) 2018-06-01 16:38:09 +03:00
epa.texi Fix @kindex entries in manuals 2018-02-25 16:29:39 +01:00
erc.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
ert.texi Add backtrace-mode and use it in the debugger, ERT and Edebug 2018-08-03 08:53:02 -07:00
eshell.texi Merge from origin/emacs-26 2018-04-20 08:07:43 -07:00
eudc.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
eww.texi Remove @key{} markups from @kindex entries in manuals 2018-02-26 09:24:39 +01:00
flymake.texi Fix @include directive in Flymake doc again 2018-07-28 08:41:10 +01:00
forms.texi Remove @key{} markups from @kindex entries in manuals 2018-02-26 09:24:39 +01:00
gnus-coding.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
gnus-faq.texi Use “Cc” for email copies, as per RFC 5322. 2018-05-20 11:02:50 -07:00
gnus-news.el Fix copyright years by hand 2018-01-01 01:02:09 -08:00
gnus-news.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
gnus-overrides.texi
gnus.texi Revert "Make nnimap support IMAP namespaces" 2018-07-23 09:01:24 +02:00
gpl.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
htmlfontify.texi Doc fixes re obsolete items 2018-03-13 14:47:41 -04:00
idlwave.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
ido.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
info.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
mairix-el.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
Makefile.in Update copyright year to 2018 2018-01-01 00:57:59 -08:00
message.texi Revert part of the previous change 2018-05-20 21:27:42 +03:00
mh-e.texi Use “Cc” for email copies, as per RFC 5322. 2018-05-20 11:02:50 -07:00
newsticker.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
nxml-mode.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
octave-mode.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
org.texi Merge from origin/emacs-26 2018-06-02 10:29:37 -07:00
pcl-cvs.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
pgg.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
rcirc.texi Remove @key{} markups from @kindex entries in manuals 2018-02-26 09:24:39 +01:00
reftex.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
remember.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
sasl.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
sc.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
sem-user.texi Fix @cindex entries in manuals 2018-02-24 20:52:21 +01:00
semantic.texi Semantic manual fixes 2018-02-21 20:13:01 +01:00
ses.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
sieve.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
smtpmail.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
speedbar.texi Replace some obsolete aliases in documentation 2018-03-07 15:41:29 -05:00
srecode.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
texinfo.tex Update from Gnulib 2018-06-29 17:32:35 -07:00
todo-mode.texi Update copyright year to 2018 2018-01-01 00:57:59 -08:00
tramp.texi Merge from origin/emacs-26 2018-07-28 07:50:36 -07:00
trampver.texi Fix (Bug#32218). Do not merge with master 2018-07-20 10:56:41 +02:00
url.texi ; * doc/misc/url.texi (file/ftp): Remove stray '@end defopt'. 2018-04-14 01:58:38 -04:00
vhdl-mode.texi Mark keys consistently in manuals 2018-02-26 13:53:37 +01:00
vip.texi Fix use of @key in Texinfo manuals 2018-04-19 12:21:06 +03:00
viper.texi Fix typos in several manuals (Bug#31610) 2018-06-01 16:33:58 +03:00
widget.texi Fix copyright years by hand 2018-01-01 01:02:09 -08:00
wisent.texi Fix typos in several manuals (Bug#31610) 2018-06-01 16:33:58 +03:00
woman.texi Remove @key{} markups from @kindex entries in manuals 2018-02-26 09:24:39 +01:00