[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100618: Fixes: debbugs:6594
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100618: Fixes: debbugs:6594 |
Date: |
Thu, 28 Jul 2011 20:40:28 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 100618
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Thu 2011-07-28 20:40:28 +0200
message:
Fixes: debbugs:6594
* lisp/xt-mouse.el (xterm-mouse-event-read): Try to recover the raw
character.
modified:
lisp/ChangeLog
lisp/xt-mouse.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-07-16 20:06:21 +0000
+++ b/lisp/ChangeLog 2011-07-28 18:40:28 +0000
@@ -1,3 +1,8 @@
+2011-07-28 Andreas Schwab <address@hidden>
+
+ * xt-mouse.el (xterm-mouse-event-read): Try to recover the raw
+ character. (Bug#6594)
+
2011-07-12 Chong Yidong <address@hidden>
* window.el (split-window-horizontally): Doc fix (Bug#9060).
=== modified file 'lisp/xt-mouse.el'
--- a/lisp/xt-mouse.el 2011-01-02 23:50:46 +0000
+++ b/lisp/xt-mouse.el 2011-07-28 18:40:28 +0000
@@ -121,10 +121,17 @@
;; read xterm sequences above ascii 127 (#x7f)
(defun xterm-mouse-event-read ()
+ ;; We get the characters decoded by the keyboard coding system. Try
+ ;; to recover the raw character.
(let ((c (read-char)))
- (if (> c #x3FFF80)
- (+ 128 (- c #x3FFF80))
- c)))
+ (cond ;; If meta-flag is t we get a meta character
+ ((>= c ?\M-\^@)
+ (- c (- ?\M-\^@ 128)))
+ ;; Reencode the character in the keyboard coding system, if
+ ;; this is a non-ASCII character.
+ ((>= c #x80)
+ (aref (encode-coding-string (string c) (keyboard-coding-system)) 0))
+ (t c))))
(defun xterm-mouse-truncate-wrap (f)
"Truncate with wrap-around."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100618: Fixes: debbugs:6594,
Andreas Schwab <=