]> git.eshelyaron.com Git - emacs.git/commitdiff
(terminal-init-xterm): Use delete-terminal-functions.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 29 Mar 2008 02:06:31 +0000 (02:06 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 29 Mar 2008 02:06:31 +0000 (02:06 +0000)
(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.

lisp/ChangeLog
lisp/term/xterm.el

index f5daece7c0ad2386722945f455157f9ed713e540..972aa057d18a640c7561e0582c476a4d76ece8b4 100644 (file)
@@ -1,5 +1,10 @@
 2008-03-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * term/xterm.el (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.
+
        * vc-bzr.el (vc-bzr-state-heuristic): Fix last change for when there
        are conflicts.
 
index 648b4fdb52d1b75a9634238409117741a7655b67..96681cff1ceebf5e67eb1b4bfb65fab9d03f63dd 100644 (file)
              (add-hook 'suspend-hook 'xterm-turn-off-modify-other-keys)
              (add-hook 'suspend-resume-hook 'xterm-turn-on-modify-other-keys)
              (add-hook 'kill-emacs-hook 'xterm-remove-modify-other-keys)
-             (add-hook 'delete-frame-functions 'xterm-remove-modify-other-keys)
+             (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys)
              ;; Add the selected frame to the list of frames that
              ;; need to deal with modify-other-keys.
              (push (frame-terminal (selected-frame))
@@ -627,26 +627,25 @@ versions of xterm."
 
 (defun xterm-turn-on-modify-other-keys ()
   "Turn on the modifyOtherKeys feature of xterm."
-  (let ((frame (selected-frame)))
-    (when (and (frame-live-p frame)
-              (memq frame xterm-modify-other-keys-terminal-list))
+  (let ((terminal (frame-terminal (selected-frame))))
+    (when (and (terminal-live-p terminal)
+              (memq terminal xterm-modify-other-keys-terminal-list))
       (send-string-to-terminal "\e[>4;1m"))))
 
 (defun xterm-turn-off-modify-other-keys (&optional frame)
   "Turn off the modifyOtherKeys feature of xterm."
-  (setq frame (and frame (selected-frame)))
-  (when (and (frame-live-p frame)
-            (memq frame xterm-modify-other-keys-terminal-list))
-    (send-string-to-terminal "\e[>4m")))
+  (let ((terminal (when frame (frame-terminal frame))))
+    (when (and (frame-live-p terminal)
+               (memq terminal xterm-modify-other-keys-terminal-list))
+      (send-string-to-terminal "\e[>4m"))))
 
-(defun xterm-remove-modify-other-keys (&optional frame)
+(defun xterm-remove-modify-other-keys (&optional terminal)
   "Turn off the modifyOtherKeys feature of xterm and remove frame from consideration."
-  (setq frame (and frame (selected-frame)))
-  (when (and (frame-live-p frame)
-            (memq frame xterm-modify-other-keys-terminal-list))
+  (setq terminal (and terminal (frame-terminal (selected-frame))))
+  (when (and (terminal-live-p terminal)
+            (memq terminal xterm-modify-other-keys-terminal-list))
     (setq xterm-modify-other-keys-terminal-list
-         (delq (frame-terminal frame)
-               xterm-modify-other-keys-terminal-list))
+         (delq terminal xterm-modify-other-keys-terminal-list))
     (send-string-to-terminal "\e[>4m")))
 
 ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a