diff options
Diffstat (limited to 'lisp/xt-mouse.el')
-rw-r--r-- | lisp/xt-mouse.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index b9d711a3e4b..349bfb3f764 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -43,6 +43,8 @@ ;;; Code: +(defvar xterm-mouse-debug-buffer nil) + (define-key function-key-map "\e[M" 'xterm-mouse-translate) (defvar xterm-mouse-last) @@ -95,6 +97,8 @@ (list (intern (format "drag-mouse-%d" (+ 1 xterm-mouse-last))) down-data click-data))))) + (if xterm-mouse-debug-buffer + (print unread-command-events xterm-mouse-debug-buffer)) (if (and (symbolp down-where) (consp down-where)) (vector (list down-where down-data) down) @@ -137,7 +141,6 @@ (fdiff (- f (* 1.0 maxwrap dbig)))) (+ (truncate fdiff) (* maxwrap dbig)))))) - (defun xterm-mouse-event () "Convert XTerm mouse event to Emacs mouse event." (let* ((type (- (xterm-mouse-event-read) #o40)) @@ -146,11 +149,11 @@ ;; Emulate timestamp information. This is accurate enough ;; for default value of mouse-1-click-follows-link (450msec). (timestamp (xterm-mouse-truncate-wrap - (* 1000 - (- (float-time) - (or xt-mouse-epoch - (setq xt-mouse-epoch (float-time))))))) - (mouse (intern + (* 1000 + (- (float-time) + (or xt-mouse-epoch + (setq xt-mouse-epoch (float-time))))))) + (mouse (intern ;; For buttons > 3, the release-event looks ;; differently (see xc/programs/xterm/button.c, ;; function EditorButton), and there seems to come in |