]> git.eshelyaron.com Git - emacs.git/commit
Move backtrace to ELisp using a new mapbacktrace primitive
authorClément Pit--Claudel <clement.pitclaudel@live.com>
Mon, 5 Dec 2016 05:52:14 +0000 (00:52 -0500)
committerClément Pit--Claudel <clement.pitclaudel@live.com>
Mon, 12 Dec 2016 22:41:27 +0000 (17:41 -0500)
commit27cada035a79b633e856a437dd0e037acc1d61c6
treeb02c80fe4e7b4ce9fe54912118e4fa5e723723c5
parenta41ded87b318ce3cbeb0ba3624bcb83ae3b8a437
Move backtrace to ELisp using a new mapbacktrace primitive

* src/eval.c (get_backtrace_starting_at, backtrace_frame_apply)
(Fmapbacktrace, Fbacktrace_frame_internal): New functions.
(get_backtrace_frame, Fbacktrace_debug): Use `get_backtrace_starting_at'.

* lisp/subr.el (backtrace--print-frame): New function.
(backtrace): Reimplement using `backtrace--print-frame' and `mapbacktrace'.
(backtrace-frame): Reimplement using `backtrace-frame--internal'.

* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Pass a base to
`mapbacktrace' instead of searching for "(debug" in the output of
`backtrace'.

* test/lisp/subr-tests.el (subr-test-backtrace-simple-tests)
(subr-test-backtrace-integration-test): New tests.

* doc/lispref/debugging.texi (Internals of Debugger): Document
`mapbacktrace' and missing argument BASE of `backtrace-frame'.
doc/lispref/debugging.texi
etc/NEWS
lisp/emacs-lisp/debug.el
lisp/subr.el
src/eval.c
test/lisp/subr-tests.el