mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
Fix debugging of string-match-p errors
* src/eval.c (call_debugger): Bind inhibit-changing-match-data to nil so that debugger code that needs to do regexp match won't break (Bug #23949, Bug #24166, Bug#16294).
This commit is contained in:
parent
2c0506173d
commit
7fb75680b3
@ -300,6 +300,11 @@ call_debugger (Lisp_Object arg)
|
||||
specbind (Qinhibit_redisplay, Qnil);
|
||||
specbind (Qinhibit_debugger, Qt);
|
||||
|
||||
/* If we are debugging an error while `inhibit-changing-match-data'
|
||||
is bound to non-nil (e.g., within a call to `string-match-p'),
|
||||
then make sure debugger code can still use match data. */
|
||||
specbind (Qinhibit_changing_match_data, Qnil);
|
||||
|
||||
#if 0 /* Binding this prevents execution of Lisp code during
|
||||
redisplay, which necessarily leads to display problems. */
|
||||
specbind (Qinhibit_eval_during_redisplay, Qt);
|
||||
|
@ -3390,6 +3390,7 @@ or other such regexp constructs are not replaced with this.
|
||||
A value of nil (which is the normal value) means treat spaces literally. */);
|
||||
Vsearch_spaces_regexp = Qnil;
|
||||
|
||||
DEFSYM (Qinhibit_changing_match_data, "inhibit-changing-match-data");
|
||||
DEFVAR_LISP ("inhibit-changing-match-data", Vinhibit_changing_match_data,
|
||||
doc: /* Internal use only.
|
||||
If non-nil, the primitive searching and matching functions
|
||||
|
Loading…
Reference in New Issue
Block a user