Subject: bug#24166: With --eval, errors in string-match-p do not produce backtraces (but errors in string-match do?!)

From: [email-masked]
Date: Fri, 05 Aug 2016 22:15:09 -0400

merge 23949 24166
quit

Clément Pit--Claudel <[email-masked]> writes:

> Hey bug-gnu-emacs,
> Is the following a bug?

Yes, it's another instance of #23949

Actually, I wonder why the trivial fix suggested there wasn't applied already:

>From d7c19f35861f12a16e7571340f3f0802a7e85adb Mon Sep 17 00:00:00 2001
From: Noam Postavsky <[email-masked]>
Date: Fri, 5 Aug 2016 22:11:00 -0400
Subject: [PATCH v1] Fix debugging of string-match-p errors

* lisp/emacs-lisp/debug.el (debug): 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).
---
 lisp/emacs-lisp/debug.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 22a3f39..22f86e4 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -177,6 +177,7 @@ debug
 	     (or enable-recursive-minibuffers (> (minibuffer-depth) 0)))
 	    (standard-input t) (standard-output t)
 	    inhibit-redisplay
+            inhibit-changing-match-data
 	    (cursor-in-echo-area nil)
 	    (window-configuration (current-window-configuration)))
 	(unwind-protect
-- 
2.8.0