aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorAlan Mackenzie2022-08-11 19:31:09 +0000
committerAlan Mackenzie2022-08-11 19:31:09 +0000
commit48215c41d16fadb69e85121b3baca0dfca82cc44 (patch)
tree1c410ce8b1b63d20cc02810078acb337af29a2b1 /etc
parente7f1d4f6e106576f3d8de4074290dc4e8c7c544f (diff)
downloademacs-48215c41d16fadb69e85121b3baca0dfca82cc44.tar.gz
emacs-48215c41d16fadb69e85121b3baca0dfca82cc44.zip
New debugging facility: backtraces from errors in Lisp called from redisplay
Setting backtrace-on-redisplay-error to non-nil enables the generation of a Lisp backtrace in buffer *Redisplay-trace* following an error in Lisp called from redisplay. * doc/lispref/debugging.texi (Debugging Redisplay): New subsection. (Error Debugging): Reference to the new subsection. * etc/NEWS: New entry for the new facility. * src/eval.c (redisplay_deep_handler): New variable. (init_eval): Initialize redisplay_deep_handler. (call_debugger): Don't throw to top-level after calling debug-early (internal_condition_case_n): "Bind" redisplay_deep_handler to the current handler. (backtrace_yet): New boolean variable. (signal_or_quit): New code section to handle Lisp errors occurring in redisplay. (syms_of_eval): New DEFVAR_BOOL backtrace-on-redisplay-error. * src/keyboard.c (command_loop_1): Set backtrace_yet to false each time around the loop. (safe_run_hooks_error): Allow args to be up to four Lisp_Objects long. (safe_run_hooks_2): New function. * src/lisp.h (top level): declare as externs backtrace_yet and safe_run_hooks_2. * src/xdisp.c (run_window_scroll_functions): Replace a call to run_hook_with_args_2 with one to safe_run_hooks_2.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 8d54ccc0dc8..2747cec18c5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1339,6 +1339,13 @@ When invoked with a non-zero prefix argument, as in 'C-u C-x C-e',
1339this command will pop up a new buffer and show the full pretty-printed 1339this command will pop up a new buffer and show the full pretty-printed
1340value there. 1340value there.
1341 1341
1342+++
1343*** You can now generate a backtrace from Lisp errors in redisplay.
1344To do this, set the new variable 'backtrace-on-redisplay-error' to a
1345non-nil value. The backtrace will be written to buffer
1346*Redisplay-trace*. This buffer will not be automatically displayed in
1347a window.
1348
1342** Compile 1349** Compile
1343 1350
1344+++ 1351+++