Subject: Re: bug#16294: 24.3.50; debugger error: "button-at: Args out of range: 0"

From: [email-masked]
Date: Thu, 14 Jul 2016 19:59:11 -0400

merge 16294 23949
quit

Drew Adams <[email-masked]> writes:

> In the debugger (`debug', not `edebug'), I get to this:
>
> (cond ((string-match-p "\\`[0-9a-fA-F]+\\'" input)
>        (string-to-number input 16))
>       ((string-match-p "^#" input)
>        (read input))
>       (t
>        (cddr (assoc-string input mctized-cands t))))
>
> Then, when it tried to evaluate this sexp:
> (string-match-p "\\`[0-9a-fA-F]+\\'" input), which I can evaluate with
> no problem using `e', the debugger is exited in error, with the
> message "button-at: Args out of range: 0".

This is actually the same bug as 23949, the problem is that
string-match-p let-binds inhibit-changing-match-data and causes problems
for the debugger code.
(http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23949#56)

In version 24.5, emacs -Q then evaluate (string-match-p "." nil) gives
"button-at: Args out of range: 0".  In version 25.0.95 it gives
"find-auto-coding: Wrong type argument: stringp, nil"; presumably the
specifics of the code the debugger runs changed somewhat.