bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23949: 25.0.95; Regression in handling error caused by (string-match


From: Eli Zaretskii
Subject: bug#23949: 25.0.95; Regression in handling error caused by (string-match-p "." nil)
Date: Wed, 13 Jul 2016 18:17:24 +0300

> From: Andreas Schwab <schwab@suse.de>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,  23949@debbugs.gnu.org,  
> kaushal.modi@gmail.com
> Date: Wed, 13 Jul 2016 17:03:22 +0200
> 
> > (defsubst string-match-p (regexp string &optional start)
> >   "\
> > Same as `string-match' except this function does not change the match data."
> >   (condition-case err
> >       (let ((inhibit-changing-match-data t))
> >     (string-match regexp string start))
> >     (error (signal (car err) (cdr err)))))
> 
> This optimizes for the rare case that string-match throws an error.
> Better would be to bind inhibit-changing-match-data in call_debugger.

Fine, let's do that, then.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]