From: Francesco Potortì Date: Mon, 7 Apr 2003 14:05:11 +0000 (+0000) Subject: (xterm-mouse-event-read): New function. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dae0ddbe93ce88b25fa9464a0238edec097eb64f;p=emacs.git (xterm-mouse-event-read): New function. (xterm-mouse-event): Use it to get xterm sequences above #x7f. Suggested by Aman Bhargava . --- diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 061830fa5c6..689fc6dbb11 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -113,11 +113,18 @@ (setcdr pos (cons xterm-mouse-x xterm-mouse-y)) pos) +;; read xterm sequences above ascii 127 (#x7f) +(defun xterm-mouse-event-read () + (let ((c (read-char))) + (if (< c 0) + (+ c #x8000000 128) + c))) + (defun xterm-mouse-event () "Convert XTerm mouse event to Emacs mouse event." - (let* ((type (- (read-char) #o40)) - (x (- (read-char) #o40 1)) - (y (- (read-char) #o40 1)) + (let* ((type (- (xterm-mouse-event-read) #o40)) + (x (- (xterm-mouse-event-read) #o40 1)) + (y (- (xterm-mouse-event-read) #o40 1)) (point (cons x y)) (window (window-at x y)) (where (if window