aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVasilij Schneidermann2016-09-30 16:22:26 +0300
committerEli Zaretskii2016-09-30 16:22:26 +0300
commitd1890a3a4a18f79cabf4caf8d194cdc29ea4bf05 (patch)
tree2bc07affe29f93d7c0287b9723d0a1b022b671c9 /src
parent97f35401771f782d5edc0dc6b841e054ca8685c3 (diff)
downloademacs-d1890a3a4a18f79cabf4caf8d194cdc29ea4bf05.tar.gz
emacs-d1890a3a4a18f79cabf4caf8d194cdc29ea4bf05.zip
New user option 'debugger-stack-frame-as-list'
* src/eval.c (syms_of_eval) <debugger-stack-frame-as-list>: New variable. * lisp/cus-start.el (standard): Add debugger-stack-frame-as-list. * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Adjust backtrace processing for the value of debugger-stack-frame-as-list. * lisp/emacs-lisp/edebug.el (edebug-backtrace): Adjust backtrace processing for the value of debugger-stack-frame-as-list. * doc/lispref/debugging.texi (Internals of Debugger): Document debugger-stack-frame-as-list. * etc/NEWS: Mention 'debugger-stack-frame-as-list'.
Diffstat (limited to 'src')
-rw-r--r--src/eval.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index e08a25a31a0..407561082d1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3421,13 +3421,17 @@ Output stream used is value of `standard-output'. */)
3421 else 3421 else
3422 { 3422 {
3423 tem = backtrace_function (pdl); 3423 tem = backtrace_function (pdl);
3424 if (debugger_stack_frame_as_list)
3425 write_string ("(");
3424 Fprin1 (tem, Qnil); /* This can QUIT. */ 3426 Fprin1 (tem, Qnil); /* This can QUIT. */
3425 write_string ("("); 3427 if (!debugger_stack_frame_as_list)
3428 write_string ("(");
3426 { 3429 {
3427 ptrdiff_t i; 3430 ptrdiff_t i;
3428 for (i = 0; i < backtrace_nargs (pdl); i++) 3431 for (i = 0; i < backtrace_nargs (pdl); i++)
3429 { 3432 {
3430 if (i) write_string (" "); 3433 if (i || debugger_stack_frame_as_list)
3434 write_string(" ");
3431 Fprin1 (backtrace_args (pdl)[i], Qnil); 3435 Fprin1 (backtrace_args (pdl)[i], Qnil);
3432 } 3436 }
3433 } 3437 }
@@ -3850,6 +3854,10 @@ This is nil when the debugger is called under circumstances where it
3850might not be safe to continue. */); 3854might not be safe to continue. */);
3851 debugger_may_continue = 1; 3855 debugger_may_continue = 1;
3852 3856
3857 DEFVAR_BOOL ("debugger-stack-frame-as-list", debugger_stack_frame_as_list,
3858 doc: /* Non-nil means display call stack frames as lists. */);
3859 debugger_stack_frame_as_list = 0;
3860
3853 DEFVAR_LISP ("debugger", Vdebugger, 3861 DEFVAR_LISP ("debugger", Vdebugger,
3854 doc: /* Function to call to invoke debugger. 3862 doc: /* Function to call to invoke debugger.
3855If due to frame exit, args are `exit' and the value being returned; 3863If due to frame exit, args are `exit' and the value being returned;