[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109989: * src/eval.c: Add `inhibit-d
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109989: * src/eval.c: Add `inhibit-debugger'. |
Date: |
Tue, 11 Sep 2012 20:14:50 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109989
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2012-09-11 20:14:50 -0400
message:
* src/eval.c: Add `inhibit-debugger'.
(Qinhibit_debugger): New symbol.
(call_debugger): Bind it instead of Qdebug_on_error.
(maybe_call_debugger): Test Vinhibit_debugger.
(syms_of_eval): Define inhibit-debugger.
* src/xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
(syms_of_xdisp): Remove inhibit-debug-on-message.
* lisp/emacs-lisp/debug.el (debug): Don't bind debug-on-error since
inhibit-debugger is bound instead.
modified:
etc/NEWS
lisp/ChangeLog
lisp/emacs-lisp/debug.el
src/ChangeLog
src/composite.h
src/eval.c
src/keyboard.c
src/xdisp.c
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2012-09-11 02:28:27 +0000
+++ b/etc/NEWS 2012-09-12 00:14:50 +0000
@@ -675,7 +675,15 @@
** New error type and new function `user-error'. Doesn't trigger the debugger.
-** New option `debugger-bury-or-kill'.
+** 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.
+
+*** New var `inhibit-debugger', automatically set to prevent accidental
+recursive invocations.
+++
** New utility function `buffer-narrowed-p'.
@@ -1977,10 +1985,6 @@
*** Set `debug-on-event' to enter the debugger on events like SIGUSR1.
This can be useful when `inhibit-quit' is set.
-*** 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.
-
** The new function `server-eval-at' allows evaluation of Lisp forms on
named Emacs server instances.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-11 16:45:31 +0000
+++ b/lisp/ChangeLog 2012-09-12 00:14:50 +0000
@@ -1,3 +1,8 @@
+2012-09-12 Stefan Monnier <address@hidden>
+
+ * emacs-lisp/debug.el (debug): Don't bind debug-on-error since
+ inhibit-debugger is bound instead.
+
2012-09-11 Bastien Guerry <address@hidden>
* subr.el (set-temporary-overlay-map): Add a docstring.
@@ -24,8 +29,8 @@
2012-09-10 Dan Nicolaescu <address@hidden>
- * vc/diff-mode.el (diff-mode-menu): Bind
- diff-remove-trailing-whitespace.
+ * vc/diff-mode.el (diff-mode-menu):
+ Bind diff-remove-trailing-whitespace.
2012-09-10 Stefan Monnier <address@hidden>
=== modified file 'lisp/emacs-lisp/debug.el'
--- a/lisp/emacs-lisp/debug.el 2012-09-08 13:28:11 +0000
+++ b/lisp/emacs-lisp/debug.el 2012-09-12 00:14:50 +0000
@@ -162,8 +162,6 @@
(unless noninteractive
(message "Entering debugger..."))
(let (debugger-value
- (debug-on-error nil)
- (debug-on-quit nil)
(debugger-previous-state
(if (get-buffer "*Backtrace*")
(with-current-buffer (get-buffer "*Backtrace*")
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-09-11 23:50:28 +0000
+++ b/src/ChangeLog 2012-09-12 00:14:50 +0000
@@ -1,3 +1,13 @@
+2012-09-12 Stefan Monnier <address@hidden>
+
+ * eval.c: Add `inhibit-debugger'.
+ (Qinhibit_debugger): New symbol.
+ (call_debugger): Bind it instead of Qdebug_on_error.
+ (maybe_call_debugger): Test Vinhibit_debugger.
+ (syms_of_eval): Define inhibit-debugger.
+ * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
+ (syms_of_xdisp): Remove inhibit-debug-on-message.
+
2012-09-11 Paul Eggert <address@hidden>
Avoid _setjmp/_longjmp problems with local nonvolatile variables.
=== modified file 'src/composite.h'
--- a/src/composite.h 2012-08-27 17:23:48 +0000
+++ b/src/composite.h 2012-09-12 00:14:50 +0000
@@ -113,7 +113,7 @@
&& (end - start) == COMPOSITION_LENGTH (prop))
/* Return the Nth glyph of composition specified by CMP. CMP is a
- pointer to `struct composition'. */
+ pointer to `struct composition'. */
#define COMPOSITION_GLYPH(cmp, n) \
XINT (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \
->key_and_value) \
=== modified file 'src/eval.c'
--- a/src/eval.c 2012-09-04 21:21:00 +0000
+++ b/src/eval.c 2012-09-12 00:14:50 +0000
@@ -69,7 +69,7 @@
Lisp_Object Qinhibit_quit;
Lisp_Object Qand_rest;
static Lisp_Object Qand_optional;
-static Lisp_Object Qdebug_on_error;
+static Lisp_Object Qinhibit_debugger;
static Lisp_Object Qdeclare;
Lisp_Object Qinternal_interpreter_environment, Qclosure;
@@ -229,7 +229,7 @@
specbind (intern ("debugger-may-continue"),
debug_while_redisplaying ? Qnil : Qt);
specbind (Qinhibit_redisplay, Qnil);
- specbind (Qdebug_on_error, Qnil);
+ specbind (Qinhibit_debugger, Qt);
#if 0 /* Binding this prevents execution of Lisp code during
redisplay, which necessarily leads to display problems. */
@@ -1725,6 +1725,7 @@
/* Don't try to run the debugger with interrupts blocked.
The editing loop would return anyway. */
! INPUT_BLOCKED_P
+ && NILP (Vinhibit_debugger)
/* Does user want to enter debugger for this kind of error? */
&& (EQ (sig, Qquit)
? debug_on_quit
@@ -3467,7 +3468,7 @@
DEFSYM (Qinhibit_quit, "inhibit-quit");
DEFSYM (Qautoload, "autoload");
- DEFSYM (Qdebug_on_error, "debug-on-error");
+ DEFSYM (Qinhibit_debugger, "inhibit-debugger");
DEFSYM (Qmacro, "macro");
DEFSYM (Qdeclare, "declare");
@@ -3482,6 +3483,12 @@
DEFSYM (Qclosure, "closure");
DEFSYM (Qdebug, "debug");
+ DEFVAR_LISP ("inhibit-debugger", Vinhibit_debugger,
+ doc: /* Non-nil means never enter the debugger.
+Normally set while the debugger is already active, to avoid recursive
+invocations. */);
+ Vinhibit_debugger = Qnil;
+
DEFVAR_LISP ("debug-on-error", Vdebug_on_error,
doc: /* Non-nil means enter debugger if an error is signaled.
Does not apply to errors handled by `condition-case' or those
@@ -3491,7 +3498,7 @@
When you evaluate an expression interactively, this variable
is temporarily non-nil if `eval-expression-debug-on-error' is non-nil.
The command `toggle-debug-on-error' toggles this.
-See also the variable `debug-on-quit'. */);
+See also the variable `debug-on-quit' and `inhibit-debugger'. */);
Vdebug_on_error = Qnil;
DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors,
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2012-09-11 22:59:50 +0000
+++ b/src/keyboard.c 2012-09-12 00:14:50 +0000
@@ -4133,7 +4133,7 @@
*used_mouse_menu = 1;
#endif
#ifdef HAVE_NS
- /* certain system events are non-key events */
+ /* Certain system events are non-key events. */
if (used_mouse_menu
&& event->kind == NS_NONKEY_EVENT)
*used_mouse_menu = 1;
@@ -4161,7 +4161,7 @@
so x remains nil. */
x = Qnil;
- /* XXX Can f or mouse_position_hook be NULL here? */
+ /* XXX Can f or mouse_position_hook be NULL here? */
if (f && FRAME_TERMINAL (f)->mouse_position_hook)
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, 0, &bar_window,
&part, &x, &y, &t);
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2012-09-11 04:22:03 +0000
+++ b/src/xdisp.c 2012-09-12 00:14:50 +0000
@@ -364,7 +364,6 @@
Lisp_Object Qcenter;
static Lisp_Object Qmargin, Qpointer;
static Lisp_Object Qline_height;
-static Lisp_Object Qinhibit_debug_on_message;
/* These setters are used only in this file, so they can be private. */
static inline void
@@ -10590,8 +10589,6 @@
set_message (const char *s, Lisp_Object string,
ptrdiff_t nbytes, int multibyte_p)
{
- ptrdiff_t count = SPECPDL_INDEX ();
-
message_enable_multibyte
= ((s && multibyte_p)
|| (STRINGP (string) && STRING_MULTIBYTE (string)));
@@ -10601,14 +10598,9 @@
message_buf_print = 0;
help_echo_showing_p = 0;
- if (NILP (Vinhibit_debug_on_message) && STRINGP (Vdebug_on_message)
+ if (STRINGP (Vdebug_on_message)
&& fast_string_match (Vdebug_on_message, string) >= 0)
- {
- specbind (Qinhibit_debug_on_message, Qt);
- call_debugger (list2 (Qerror, string));
- }
-
- unbind_to (count, Qnil);
+ call_debugger (list2 (Qerror, string));
}
@@ -12800,7 +12792,7 @@
return make_number (fringe_bitmap);
}
#endif
- return make_number (-1); /* Use default arrow bitmap */
+ return make_number (-1); /* Use default arrow bitmap. */
}
return overlay_arrow_string_or_property (var);
}
@@ -29316,11 +29308,6 @@
DEFVAR_LISP ("debug-on-message", Vdebug_on_message,
doc: /* If non-nil, debug if a message matching this regexp is
displayed. */);
Vdebug_on_message = Qnil;
-
- DEFVAR_LISP ("inhibit-debug-on-message", Vinhibit_debug_on_message,
- doc: /* If non-nil, inhibit `debug-on-message' from entering the
debugger. */);
- Vinhibit_debug_on_message = Qnil;
- DEFSYM(Qinhibit_debug_on_message, "inhibit-debug-on-message");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109989: * src/eval.c: Add `inhibit-debugger'.,
Stefan Monnier <=