Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position

From: Alex <[email-masked]>
Date: Thu, 05 Oct 2017 18:03:31 -0600

Eli Zaretskii <[email-masked]> writes:

>> P.S. Why is the error prefixed by `xterm-mouse-translate-1' instead of
>> `xterm-mouse-event'?
>
> Can you show the full backtrace?

  Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
    xterm-mouse-event(1006)
    xterm-mouse-translate-1(1006)
    xterm-mouse-translate-extended(nil)

So the backtrace acknowledges xterm-mouse-event is the culprit, but
without `debug-on-error' set the error message blames
xterm-mouse-translate-1.

If I don't use the bytecode versions of the procedures, though, then the
error message becomes:

  setq: Wrong type argument: number-or-marker-p, nil

which is better, but I believe it should message:

  1+: Wrong type argument: number-or-marker-p, nil

Which is what the debugger shows if I don't use the bytecode versions:

  Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
    1+(nil)
    (setq click-count (1+ click-count))
    ...
    xterm-mouse-event(1006)
    (let* ((event (xterm-mouse-event extension)) (ev-command (nth 0 event)) (ev-data (nth 1 event)) (ev-where (nth 1 ev-$
    (save-excursion (let* ((event (xterm-mouse-event extension)) (ev-command (nth 0 event)) (ev-data (nth 1 event)) (ev-$
    xterm-mouse-translate-1(1006)
    xterm-mouse-translate-extended(nil)