diff options
| author | Stefan Monnier | 2008-03-29 02:06:31 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-03-29 02:06:31 +0000 |
| commit | b20ef5aa72c9ac27ac7a1364bce7d79abdaf6334 (patch) | |
| tree | 369ed9cca493439bc5576a5573b7010dd83964a5 | |
| parent | 58555d8187f3425f69e57316cfcd296f8fe08433 (diff) | |
| download | emacs-b20ef5aa72c9ac27ac7a1364bce7d79abdaf6334.tar.gz emacs-b20ef5aa72c9ac27ac7a1364bce7d79abdaf6334.zip | |
(terminal-init-xterm): Use delete-terminal-functions.
(xterm-turn-on-modify-other-keys, xterm-turn-off-modify-other-keys)
(xterm-remove-modify-other-keys): Lookup terminal rather than frame
in xterm-modify-other-keys-terminal-list.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/term/xterm.el | 27 |
2 files changed, 18 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5daece7c0a..972aa057d18 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2008-03-29 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-03-29 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * term/xterm.el (terminal-init-xterm): Use delete-terminal-functions. | ||
| 4 | (xterm-turn-on-modify-other-keys, xterm-turn-off-modify-other-keys) | ||
| 5 | (xterm-remove-modify-other-keys): Lookup terminal rather than frame | ||
| 6 | in xterm-modify-other-keys-terminal-list. | ||
| 7 | |||
| 3 | * vc-bzr.el (vc-bzr-state-heuristic): Fix last change for when there | 8 | * vc-bzr.el (vc-bzr-state-heuristic): Fix last change for when there |
| 4 | are conflicts. | 9 | are conflicts. |
| 5 | 10 | ||
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 648b4fdb52d..96681cff1ce 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -500,7 +500,7 @@ | |||
| 500 | (add-hook 'suspend-hook 'xterm-turn-off-modify-other-keys) | 500 | (add-hook 'suspend-hook 'xterm-turn-off-modify-other-keys) |
| 501 | (add-hook 'suspend-resume-hook 'xterm-turn-on-modify-other-keys) | 501 | (add-hook 'suspend-resume-hook 'xterm-turn-on-modify-other-keys) |
| 502 | (add-hook 'kill-emacs-hook 'xterm-remove-modify-other-keys) | 502 | (add-hook 'kill-emacs-hook 'xterm-remove-modify-other-keys) |
| 503 | (add-hook 'delete-frame-functions 'xterm-remove-modify-other-keys) | 503 | (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys) |
| 504 | ;; Add the selected frame to the list of frames that | 504 | ;; Add the selected frame to the list of frames that |
| 505 | ;; need to deal with modify-other-keys. | 505 | ;; need to deal with modify-other-keys. |
| 506 | (push (frame-terminal (selected-frame)) | 506 | (push (frame-terminal (selected-frame)) |
| @@ -627,26 +627,25 @@ versions of xterm." | |||
| 627 | 627 | ||
| 628 | (defun xterm-turn-on-modify-other-keys () | 628 | (defun xterm-turn-on-modify-other-keys () |
| 629 | "Turn on the modifyOtherKeys feature of xterm." | 629 | "Turn on the modifyOtherKeys feature of xterm." |
| 630 | (let ((frame (selected-frame))) | 630 | (let ((terminal (frame-terminal (selected-frame)))) |
| 631 | (when (and (frame-live-p frame) | 631 | (when (and (terminal-live-p terminal) |
| 632 | (memq frame xterm-modify-other-keys-terminal-list)) | 632 | (memq terminal xterm-modify-other-keys-terminal-list)) |
| 633 | (send-string-to-terminal "\e[>4;1m")))) | 633 | (send-string-to-terminal "\e[>4;1m")))) |
| 634 | 634 | ||
| 635 | (defun xterm-turn-off-modify-other-keys (&optional frame) | 635 | (defun xterm-turn-off-modify-other-keys (&optional frame) |
| 636 | "Turn off the modifyOtherKeys feature of xterm." | 636 | "Turn off the modifyOtherKeys feature of xterm." |
| 637 | (setq frame (and frame (selected-frame))) | 637 | (let ((terminal (when frame (frame-terminal frame)))) |
| 638 | (when (and (frame-live-p frame) | 638 | (when (and (frame-live-p terminal) |
| 639 | (memq frame xterm-modify-other-keys-terminal-list)) | 639 | (memq terminal xterm-modify-other-keys-terminal-list)) |
| 640 | (send-string-to-terminal "\e[>4m"))) | 640 | (send-string-to-terminal "\e[>4m")))) |
| 641 | 641 | ||
| 642 | (defun xterm-remove-modify-other-keys (&optional frame) | 642 | (defun xterm-remove-modify-other-keys (&optional terminal) |
| 643 | "Turn off the modifyOtherKeys feature of xterm and remove frame from consideration." | 643 | "Turn off the modifyOtherKeys feature of xterm and remove frame from consideration." |
| 644 | (setq frame (and frame (selected-frame))) | 644 | (setq terminal (and terminal (frame-terminal (selected-frame)))) |
| 645 | (when (and (frame-live-p frame) | 645 | (when (and (terminal-live-p terminal) |
| 646 | (memq frame xterm-modify-other-keys-terminal-list)) | 646 | (memq terminal xterm-modify-other-keys-terminal-list)) |
| 647 | (setq xterm-modify-other-keys-terminal-list | 647 | (setq xterm-modify-other-keys-terminal-list |
| 648 | (delq (frame-terminal frame) | 648 | (delq terminal xterm-modify-other-keys-terminal-list)) |
| 649 | xterm-modify-other-keys-terminal-list)) | ||
| 650 | (send-string-to-terminal "\e[>4m"))) | 649 | (send-string-to-terminal "\e[>4m"))) |
| 651 | 650 | ||
| 652 | ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a | 651 | ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a |