aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNoam Postavsky2016-08-05 22:11:00 -0400
committerNoam Postavsky2016-08-07 10:24:40 -0400
commit7fb75680b38fe0805c2ff7e9cca3bec8121ba984 (patch)
tree9c086324af4e640e897de8c70efc5cf6622e2c12 /src
parent2c0506173d92dd9d6de409a045668c6b5cf1fcef (diff)
downloademacs-7fb75680b38fe0805c2ff7e9cca3bec8121ba984.tar.gz
emacs-7fb75680b38fe0805c2ff7e9cca3bec8121ba984.zip
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')
-rw-r--r--src/eval.c5
-rw-r--r--src/search.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 33b82f74b64..d182f7f693d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -300,6 +300,11 @@ call_debugger (Lisp_Object arg)
300 specbind (Qinhibit_redisplay, Qnil); 300 specbind (Qinhibit_redisplay, Qnil);
301 specbind (Qinhibit_debugger, Qt); 301 specbind (Qinhibit_debugger, Qt);
302 302
303 /* If we are debugging an error while `inhibit-changing-match-data'
304 is bound to non-nil (e.g., within a call to `string-match-p'),
305 then make sure debugger code can still use match data. */
306 specbind (Qinhibit_changing_match_data, Qnil);
307
303#if 0 /* Binding this prevents execution of Lisp code during 308#if 0 /* Binding this prevents execution of Lisp code during
304 redisplay, which necessarily leads to display problems. */ 309 redisplay, which necessarily leads to display problems. */
305 specbind (Qinhibit_eval_during_redisplay, Qt); 310 specbind (Qinhibit_eval_during_redisplay, Qt);
diff --git a/src/search.c b/src/search.c
index 5dc4d355304..9b8fc584120 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3390,6 +3390,7 @@ or other such regexp constructs are not replaced with this.
3390A value of nil (which is the normal value) means treat spaces literally. */); 3390A value of nil (which is the normal value) means treat spaces literally. */);
3391 Vsearch_spaces_regexp = Qnil; 3391 Vsearch_spaces_regexp = Qnil;
3392 3392
3393 DEFSYM (Qinhibit_changing_match_data, "inhibit-changing-match-data");
3393 DEFVAR_LISP ("inhibit-changing-match-data", Vinhibit_changing_match_data, 3394 DEFVAR_LISP ("inhibit-changing-match-data", Vinhibit_changing_match_data,
3394 doc: /* Internal use only. 3395 doc: /* Internal use only.
3395If non-nil, the primitive searching and matching functions 3396If non-nil, the primitive searching and matching functions