Subject: 24.3.50; debugger error: "button-at: Args out of range: 0"

From: Drew Adams <[email-masked]>
Date: Sun, 29 Dec 2013 14:39:33 -0800 (PST)

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".

FWIW, the value of INPUT was this (a propertized string):
#("DEVICE CONTROL FOUR	^T" 0 1 (face nil) 1 21 (face nil))

(The "^T" is actually the single control character Control-T.  Changed
to the string "^T" for the bug report.)

Evaluating it using `e' returns nil, as expected.  Similarly, using `e'
I can evaluate (string-match-p "^#" input), to nil.

If I turn off debugging, the code works fine.  The debugger itself seems
to have a problem with it.

(Var `lexical-binding' is nil, here.  The code uses dynamic scoping.)

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-12-27 on ODIEONE
Bzr revision: 115778 [email-masked]
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'