Commit 854b22ea authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* 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
parent 005f9967
2014-07-01 Stefan Monnier <monnier@iro.umontreal.ca>
* 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 (bug#17857).
2014-07-01 Michael Albinus <michael.albinus@gmx.de> 2014-07-01 Michael Albinus <michael.albinus@gmx.de>
   
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
...@@ -40,8 +46,7 @@ ...@@ -40,8 +46,7 @@
Don't call c-parse-state when c++-template-syntax-table is active. Don't call c-parse-state when c++-template-syntax-table is active.
* progmodes/cc-engine.el (c-guess-continued-construct CASE G) * progmodes/cc-engine.el (c-guess-continued-construct CASE G)
(c-guess-basic-syntax CASE 5D.3): Rearrange so that (c-guess-basic-syntax CASE 5D.3): Rearrange so that
c-syntactic-skip-backwards isn't called with the pertinent syntax c-syntactic-skip-backwards isn't called with the pertinent syntax table.
table.
   
2014-06-28 Stephen Berman <stephen.berman@gmx.net> 2014-06-28 Stephen Berman <stephen.berman@gmx.net>
   
......
...@@ -312,7 +312,8 @@ terminals that support it.") ...@@ -312,7 +312,8 @@ terminals that support it.")
"Enable xterm mouse tracking on TERMINAL." "Enable xterm mouse tracking on TERMINAL."
(when (and xterm-mouse-mode (eq t (terminal-live-p terminal)) (when (and xterm-mouse-mode (eq t (terminal-live-p terminal))
;; Avoid the initial terminal which is not a termcap device. ;; Avoid the initial terminal which is not a termcap device.
;; FIXME: is there more elegant way to detect the initial terminal? ;; FIXME: is there more elegant way to detect the initial
;; terminal?
(not (string= (terminal-name terminal) "initial_terminal"))) (not (string= (terminal-name terminal) "initial_terminal")))
(unless (terminal-parameter terminal 'xterm-mouse-mode) (unless (terminal-parameter terminal 'xterm-mouse-mode)
;; Simulate selecting a terminal by selecting one of its frames ;; Simulate selecting a terminal by selecting one of its frames
...@@ -320,7 +321,13 @@ terminals that support it.") ...@@ -320,7 +321,13 @@ terminals that support it.")
(with-selected-frame (car (frames-on-display-list terminal)) (with-selected-frame (car (frames-on-display-list terminal))
(define-key input-decode-map "\e[M" 'xterm-mouse-translate) (define-key input-decode-map "\e[M" 'xterm-mouse-translate)
(define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended)) (define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended))
(send-string-to-terminal xterm-mouse-tracking-enable-sequence terminal) (condition-case err
(send-string-to-terminal xterm-mouse-tracking-enable-sequence
terminal)
;; FIXME: This should use a dedicated error signal.
(error (if (equal (cadr err) "Terminal is currently suspended")
nil ;The sequence will be sent upon resume.
(signal (car err) (cdr err)))))
(push xterm-mouse-tracking-enable-sequence (push xterm-mouse-tracking-enable-sequence
(terminal-parameter nil 'tty-mode-set-strings)) (terminal-parameter nil 'tty-mode-set-strings))
(push xterm-mouse-tracking-disable-sequence (push xterm-mouse-tracking-disable-sequence
...@@ -338,7 +345,13 @@ terminals that support it.") ...@@ -338,7 +345,13 @@ terminals that support it.")
;; command too many times (or to catch an unintended key sequence), than ;; command too many times (or to catch an unintended key sequence), than
;; to send it too few times (or to fail to let xterm-mouse events ;; to send it too few times (or to fail to let xterm-mouse events
;; pass by untranslated). ;; pass by untranslated).
(send-string-to-terminal xterm-mouse-tracking-disable-sequence terminal) (condition-case err
(send-string-to-terminal xterm-mouse-tracking-disable-sequence
terminal)
;; FIXME: This should use a dedicated error signal.
(error (if (equal (cadr err) "Terminal is currently suspended")
nil
(signal (car err) (cdr err)))))
(setf (terminal-parameter nil 'tty-mode-set-strings) (setf (terminal-parameter nil 'tty-mode-set-strings)
(remq xterm-mouse-tracking-enable-sequence (remq xterm-mouse-tracking-enable-sequence
(terminal-parameter nil 'tty-mode-set-strings))) (terminal-parameter nil 'tty-mode-set-strings)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment