Mercurial > emacs
comparison lisp/term/xterm.el @ 98437:d35e240a4622
(xterm-turn-on-modify-other-keys)
(xterm-turn-off-modify-other-keys, xterm-remove-modify-other-keys):
Don't forget to pass `terminal' to `send-string-to-terminal'.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 30 Sep 2008 21:59:26 +0000 |
parents | f3ab0c2464f5 |
children | fdc9da3de755 |
comparison
equal
deleted
inserted
replaced
98436:d8cdfd24ed84 | 98437:d35e240a4622 |
---|---|
622 ;; Modifying color mappings means realized faces don't use the | 622 ;; Modifying color mappings means realized faces don't use the |
623 ;; right colors, so clear them. | 623 ;; right colors, so clear them. |
624 (clear-face-cache))) | 624 (clear-face-cache))) |
625 | 625 |
626 (defun xterm-turn-on-modify-other-keys () | 626 (defun xterm-turn-on-modify-other-keys () |
627 "Turn on the modifyOtherKeys feature of xterm." | 627 "Turn the modifyOtherKeys feature of xterm back on." |
628 (let ((terminal (frame-terminal (selected-frame)))) | 628 (let ((terminal (frame-terminal (selected-frame)))) |
629 (when (and (terminal-live-p terminal) | 629 (when (and (terminal-live-p terminal) |
630 (memq terminal xterm-modify-other-keys-terminal-list)) | 630 (memq terminal xterm-modify-other-keys-terminal-list)) |
631 (send-string-to-terminal "\e[>4;1m")))) | 631 (send-string-to-terminal "\e[>4;1m" terminal)))) |
632 | 632 |
633 (defun xterm-turn-off-modify-other-keys (&optional frame) | 633 (defun xterm-turn-off-modify-other-keys (&optional frame) |
634 "Turn off the modifyOtherKeys feature of xterm." | 634 "Temporarily turn off the modifyOtherKeys feature of xterm." |
635 (let ((terminal (when frame (frame-terminal frame)))) | 635 (let ((terminal (when frame (frame-terminal frame)))) |
636 (when (and (frame-live-p terminal) | 636 (when (and (terminal-live-p terminal) |
637 (memq terminal xterm-modify-other-keys-terminal-list)) | 637 (memq terminal xterm-modify-other-keys-terminal-list)) |
638 (send-string-to-terminal "\e[>4m")))) | 638 (send-string-to-terminal "\e[>4m" terminal)))) |
639 | 639 |
640 (defun xterm-remove-modify-other-keys (&optional terminal) | 640 (defun xterm-remove-modify-other-keys (&optional terminal) |
641 "Turn off the modifyOtherKeys feature of xterm and remove frame from consideration." | 641 "Turn off the modifyOtherKeys feature of xterm for good." |
642 (setq terminal (and terminal (frame-terminal (selected-frame)))) | 642 (setq terminal (and terminal (frame-terminal (selected-frame)))) |
643 (when (and (terminal-live-p terminal) | 643 (when (and (terminal-live-p terminal) |
644 (memq terminal xterm-modify-other-keys-terminal-list)) | 644 (memq terminal xterm-modify-other-keys-terminal-list)) |
645 (setq xterm-modify-other-keys-terminal-list | 645 (setq xterm-modify-other-keys-terminal-list |
646 (delq terminal xterm-modify-other-keys-terminal-list)) | 646 (delq terminal xterm-modify-other-keys-terminal-list)) |
647 (send-string-to-terminal "\e[>4m"))) | 647 (send-string-to-terminal "\e[>4m" terminal))) |
648 | 648 |
649 ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a | 649 ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a |
650 ;;; xterm.el ends here | 650 ;;; xterm.el ends here |