diff options
author | Noam Postavsky <npostavs@gmail.com> | 2016-08-05 22:11:00 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2016-08-07 10:24:40 -0400 |
commit | 7fb75680b38fe0805c2ff7e9cca3bec8121ba984 (patch) | |
tree | 9c086324af4e640e897de8c70efc5cf6622e2c12 /src/eval.c | |
parent | 2c0506173d92dd9d6de409a045668c6b5cf1fcef (diff) |
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).
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 33b82f74b6..d182f7f693 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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); |