diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/xt-mouse.el | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b401bf7582..a42c0127ff5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-07-28 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * xt-mouse.el (xterm-mouse-event-read): Try to recover the raw | ||
| 4 | character. (Bug#6594) | ||
| 5 | |||
| 1 | 2011-07-12 Chong Yidong <cyd@stupidchicken.com> | 6 | 2011-07-12 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * window.el (split-window-horizontally): Doc fix (Bug#9060). | 8 | * window.el (split-window-horizontally): Doc fix (Bug#9060). |
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 5a70e6a6808..f917287d2d9 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -121,10 +121,17 @@ | |||
| 121 | 121 | ||
| 122 | ;; read xterm sequences above ascii 127 (#x7f) | 122 | ;; read xterm sequences above ascii 127 (#x7f) |
| 123 | (defun xterm-mouse-event-read () | 123 | (defun xterm-mouse-event-read () |
| 124 | ;; We get the characters decoded by the keyboard coding system. Try | ||
| 125 | ;; to recover the raw character. | ||
| 124 | (let ((c (read-char))) | 126 | (let ((c (read-char))) |
| 125 | (if (> c #x3FFF80) | 127 | (cond ;; If meta-flag is t we get a meta character |
| 126 | (+ 128 (- c #x3FFF80)) | 128 | ((>= c ?\M-\^@) |
| 127 | c))) | 129 | (- c (- ?\M-\^@ 128))) |
| 130 | ;; Reencode the character in the keyboard coding system, if | ||
| 131 | ;; this is a non-ASCII character. | ||
| 132 | ((>= c #x80) | ||
| 133 | (aref (encode-coding-string (string c) (keyboard-coding-system)) 0)) | ||
| 134 | (t c)))) | ||
| 128 | 135 | ||
| 129 | (defun xterm-mouse-truncate-wrap (f) | 136 | (defun xterm-mouse-truncate-wrap (f) |
| 130 | "Truncate with wrap-around." | 137 | "Truncate with wrap-around." |