diff options
| author | Stefan Monnier | 2014-07-01 12:10:02 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-07-01 12:10:02 -0400 |
| commit | 854b22ea18090cc226703c4a828a3fc0bfaa0ccd (patch) | |
| tree | 0189621ae31693c9b157d3b3bc7e5edb7f918ec6 | |
| parent | 005f996739e9b59e01b3c10f153efb4c4e54353d (diff) | |
| download | emacs-854b22ea18090cc226703c4a828a3fc0bfaa0ccd.tar.gz emacs-854b22ea18090cc226703c4a828a3fc0bfaa0ccd.zip | |
* lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal
is suspended.
Fixes: debbugs:17857
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/xt-mouse.el | 19 |
2 files changed, 23 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 776925f28b4..054bef5697d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-07-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) | ||
| 4 | (turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal | ||
| 5 | is suspended (bug#17857). | ||
| 6 | |||
| 1 | 2014-07-01 Michael Albinus <michael.albinus@gmx.de> | 7 | 2014-07-01 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): | 9 | * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): |
| @@ -40,8 +46,7 @@ | |||
| 40 | Don't call c-parse-state when c++-template-syntax-table is active. | 46 | Don't call c-parse-state when c++-template-syntax-table is active. |
| 41 | * progmodes/cc-engine.el (c-guess-continued-construct CASE G) | 47 | * progmodes/cc-engine.el (c-guess-continued-construct CASE G) |
| 42 | (c-guess-basic-syntax CASE 5D.3): Rearrange so that | 48 | (c-guess-basic-syntax CASE 5D.3): Rearrange so that |
| 43 | c-syntactic-skip-backwards isn't called with the pertinent syntax | 49 | c-syntactic-skip-backwards isn't called with the pertinent syntax table. |
| 44 | table. | ||
| 45 | 50 | ||
| 46 | 2014-06-28 Stephen Berman <stephen.berman@gmx.net> | 51 | 2014-06-28 Stephen Berman <stephen.berman@gmx.net> |
| 47 | 52 | ||
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index f9e89880dae..e5e77405b02 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -312,7 +312,8 @@ terminals that support it.") | |||
| 312 | "Enable xterm mouse tracking on TERMINAL." | 312 | "Enable xterm mouse tracking on TERMINAL." |
| 313 | (when (and xterm-mouse-mode (eq t (terminal-live-p terminal)) | 313 | (when (and xterm-mouse-mode (eq t (terminal-live-p terminal)) |
| 314 | ;; Avoid the initial terminal which is not a termcap device. | 314 | ;; Avoid the initial terminal which is not a termcap device. |
| 315 | ;; FIXME: is there more elegant way to detect the initial terminal? | 315 | ;; FIXME: is there more elegant way to detect the initial |
| 316 | ;; terminal? | ||
| 316 | (not (string= (terminal-name terminal) "initial_terminal"))) | 317 | (not (string= (terminal-name terminal) "initial_terminal"))) |
| 317 | (unless (terminal-parameter terminal 'xterm-mouse-mode) | 318 | (unless (terminal-parameter terminal 'xterm-mouse-mode) |
| 318 | ;; Simulate selecting a terminal by selecting one of its frames | 319 | ;; Simulate selecting a terminal by selecting one of its frames |
| @@ -320,7 +321,13 @@ terminals that support it.") | |||
| 320 | (with-selected-frame (car (frames-on-display-list terminal)) | 321 | (with-selected-frame (car (frames-on-display-list terminal)) |
| 321 | (define-key input-decode-map "\e[M" 'xterm-mouse-translate) | 322 | (define-key input-decode-map "\e[M" 'xterm-mouse-translate) |
| 322 | (define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended)) | 323 | (define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended)) |
| 323 | (send-string-to-terminal xterm-mouse-tracking-enable-sequence terminal) | 324 | (condition-case err |
| 325 | (send-string-to-terminal xterm-mouse-tracking-enable-sequence | ||
| 326 | terminal) | ||
| 327 | ;; FIXME: This should use a dedicated error signal. | ||
| 328 | (error (if (equal (cadr err) "Terminal is currently suspended") | ||
| 329 | nil ;The sequence will be sent upon resume. | ||
| 330 | (signal (car err) (cdr err))))) | ||
| 324 | (push xterm-mouse-tracking-enable-sequence | 331 | (push xterm-mouse-tracking-enable-sequence |
| 325 | (terminal-parameter nil 'tty-mode-set-strings)) | 332 | (terminal-parameter nil 'tty-mode-set-strings)) |
| 326 | (push xterm-mouse-tracking-disable-sequence | 333 | (push xterm-mouse-tracking-disable-sequence |
| @@ -338,7 +345,13 @@ terminals that support it.") | |||
| 338 | ;; command too many times (or to catch an unintended key sequence), than | 345 | ;; command too many times (or to catch an unintended key sequence), than |
| 339 | ;; to send it too few times (or to fail to let xterm-mouse events | 346 | ;; to send it too few times (or to fail to let xterm-mouse events |
| 340 | ;; pass by untranslated). | 347 | ;; pass by untranslated). |
| 341 | (send-string-to-terminal xterm-mouse-tracking-disable-sequence terminal) | 348 | (condition-case err |
| 349 | (send-string-to-terminal xterm-mouse-tracking-disable-sequence | ||
| 350 | terminal) | ||
| 351 | ;; FIXME: This should use a dedicated error signal. | ||
| 352 | (error (if (equal (cadr err) "Terminal is currently suspended") | ||
| 353 | nil | ||
| 354 | (signal (car err) (cdr err))))) | ||
| 342 | (setf (terminal-parameter nil 'tty-mode-set-strings) | 355 | (setf (terminal-parameter nil 'tty-mode-set-strings) |
| 343 | (remq xterm-mouse-tracking-enable-sequence | 356 | (remq xterm-mouse-tracking-enable-sequence |
| 344 | (terminal-parameter nil 'tty-mode-set-strings))) | 357 | (terminal-parameter nil 'tty-mode-set-strings))) |