GNU bug report logs -
#17378
24.3.1: xterm-mouse-event: Wrong type argument: wholenump, -6
Previous Next
Reported by: Ishmael <noone.junkmail <at> gmail.com>
Date: Wed, 30 Apr 2014 22:13:02 UTC
Severity: normal
Tags: fixed
Found in version 24.3.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #41 received at 17378 <at> debbugs.gnu.org (full text, mbox):
> Here's the backtrace.
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
> xterm-mouse--read-event-sequence-1000()
> xterm-mouse-event(nil)
> xterm-mouse-translate-1()
> xterm-mouse-translate(nil)
Good, thanks. Just one more detail:
do M-x load-library RET xt-mouse.el RET
before producing the backtrace, so we get the backtrace of the
uncompiled code, which should give us many more details.
My guess is that xterm-mouse-last is somehow still nil sometimes (and
other times its value comes from yet elsewhere).
So the patch below should hopefully avoid the crash. It will probably
end up generating incorrect events instead (e.g. mouse-1 when you
release the mouse-3 button).
Stefan
=== modified file 'lisp/xt-mouse.el'
--- lisp/xt-mouse.el 2014-04-20 02:29:38 +0000
+++ lisp/xt-mouse.el 2014-05-05 01:40:59 +0000
@@ -161,10 +161,10 @@
(cond ((>= code 64)
(format "mouse-%d" (- code 60)))
((memq code '(8 9 10))
- (setq xterm-mouse-last code)
+ (setq xterm-mouse-last (- code 8))
(format "M-down-mouse-%d" (- code 7)))
((= code 11)
- (format "M-mouse-%d" (- xterm-mouse-last 7)))
+ (format "M-mouse-%d" (+ 1 (or xterm-mouse-last 0))))
((= code 3)
;; For buttons > 5 xterm only reports a
;; button-release event. Avoid error by mapping
This bug report was last modified 4 years and 242 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.