From 164f28b577c860f9a48733952fb5baaf8826eb9d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 10 Nov 2012 16:58:51 -0800 Subject: [PATCH] * doc/lispref/debugging.texi (Error Debugging): Mention debug-on-message. * etc/NEWS: Related markup. --- doc/lispref/ChangeLog | 2 ++ doc/lispref/debugging.texi | 8 ++++++++ etc/NEWS | 1 + 3 files changed, 11 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index bc48f74401f..0016258bcb5 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,7 @@ 2012-11-11 Glenn Morris + * debugging.texi (Error Debugging): Mention debug-on-message. + * control.texi (Signaling Errors): * debugging.texi (Error Debugging): * errors.texi (Standard Errors): Add user-error. diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 74000c2ba66..9a43cfeac5d 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -163,6 +163,14 @@ supported values correspond to the signals @code{SIGUSR1} and @code{inhibit-quit} is set and Emacs is not otherwise responding. @end defopt +@cindex message, finding what causes a particular message +@defvar debug-on-message +If you set @code{debug-on-message} to a regular expression, +Emacs will enter the debugger if it displays a matching message in the +echo area. For example, this can be useful when trying to find the +cause of a particular message. +@end defvar + To debug an error that happens during loading of the init file, use the option @samp{--debug-init}. This binds @code{debug-on-error} to @code{t} while loading the init file, and diff --git a/etc/NEWS b/etc/NEWS index 6ab23a4239d..42c639ef25b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -806,6 +806,7 @@ These do not trigger the debugger. *** New option `debugger-bury-or-kill'. ++++ *** Set `debug-on-message' to enter the debugger when a certain message is displayed in the echo area. This can be useful when trying to work out which code is doing something. -- 2.39.5