diff options
| author | Dan Nicolaescu | 2009-02-05 07:12:27 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-02-05 07:12:27 +0000 |
| commit | 393439a343c910e8be4427a070ef35e877173c3d (patch) | |
| tree | 4bfc7d4aecca3bae187737d796128addc7d928b3 | |
| parent | 3208a64a70cab8e3cdb1231ae4355759ab88c464 (diff) | |
| download | emacs-393439a343c910e8be4427a070ef35e877173c3d.tar.gz emacs-393439a343c910e8be4427a070ef35e877173c3d.zip | |
(turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Do not turn on the
mode on the initial terminal.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/xt-mouse.el | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2ac853364f..d1eec646ea2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-02-05 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) | ||
| 4 | (turn-off-xterm-mouse-tracking-on-terminal): Do not turn on the | ||
| 5 | mode on the initial terminal. | ||
| 6 | |||
| 1 | 2009-02-05 Nick Roberts <nickrob@snap.net.nz> | 7 | 2009-02-05 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 8 | ||
| 3 | * vc-dir.el (vc-dir-find-file-other-window): Allow mouse events. | 9 | * vc-dir.el (vc-dir-find-file-other-window): Allow mouse events. |
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index f59ef8f7b65..86c28fa4734 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -236,7 +236,10 @@ down the SHIFT key while pressing the mouse button." | |||
| 236 | 236 | ||
| 237 | (defun turn-on-xterm-mouse-tracking-on-terminal (&optional terminal) | 237 | (defun turn-on-xterm-mouse-tracking-on-terminal (&optional terminal) |
| 238 | "Enable xterm mouse tracking on TERMINAL." | 238 | "Enable xterm mouse tracking on TERMINAL." |
| 239 | (when (and xterm-mouse-mode (eq t (terminal-live-p terminal))) | 239 | (when (and xterm-mouse-mode (eq t (terminal-live-p terminal)) |
| 240 | ;; Avoid the initial terminal which is not a termcap device. | ||
| 241 | ;; FIXME: is there more elegant way to detect the initial terminal? | ||
| 242 | (not (string= (terminal-name terminal) "initial_terminal"))) | ||
| 240 | (unless (terminal-parameter terminal 'xterm-mouse-mode) | 243 | (unless (terminal-parameter terminal 'xterm-mouse-mode) |
| 241 | ;; Simulate selecting a terminal by selecting one of its frames ;-( | 244 | ;; Simulate selecting a terminal by selecting one of its frames ;-( |
| 242 | (with-selected-frame (car (frames-on-display-list terminal)) | 245 | (with-selected-frame (car (frames-on-display-list terminal)) |
| @@ -249,7 +252,10 @@ down the SHIFT key while pressing the mouse button." | |||
| 249 | ;; Only send the disable command to those terminals to which we've already | 252 | ;; Only send the disable command to those terminals to which we've already |
| 250 | ;; sent the enable command. | 253 | ;; sent the enable command. |
| 251 | (when (and (terminal-parameter terminal 'xterm-mouse-mode) | 254 | (when (and (terminal-parameter terminal 'xterm-mouse-mode) |
| 252 | (eq t (terminal-live-p terminal))) | 255 | (eq t (terminal-live-p terminal)) |
| 256 | ;; Avoid the initial terminal which is not a termcap device. | ||
| 257 | ;; FIXME: is there more elegant way to detect the initial terminal? | ||
| 258 | (not (string= (terminal-name terminal) "initial_terminal"))) | ||
| 253 | ;; We could remove the key-binding and unset the `xterm-mouse-mode' | 259 | ;; We could remove the key-binding and unset the `xterm-mouse-mode' |
| 254 | ;; terminal parameter, but it seems less harmful to send this escape | 260 | ;; terminal parameter, but it seems less harmful to send this escape |
| 255 | ;; command too many times (or to catch an unintended key sequence), than | 261 | ;; command too many times (or to catch an unintended key sequence), than |