diff options
author | Jason Rumney <[email protected]> | 2007-11-20 22:22:06 +0000 |
---|---|---|
committer | Jason Rumney <[email protected]> | 2007-11-20 22:22:06 +0000 |
commit | a49e5cc32093a1ed3670b84c2b86fc03b956c378 (patch) | |
tree | eab31fa6f21b7fbde50b19949407c114ed24689d /lisp/term | |
parent | 8281b9f9c90630aa32f04e667a9cb5d5a38c2f3d (diff) |
(x-setup-function-keys): Protect against
multiple calls on the same terminal.
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/w32-win.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 4a3a685f8c..7ea8f08a67 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -1057,14 +1057,17 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") (defun x-setup-function-keys (frame) "Setup Function Keys for w32." - (with-selected-frame frame - (define-key local-function-key-map [f10] 'menu-bar-open) + ;; Don't do this twice on the same display, or it would break + ;; normal-erase-is-backspace-mode (maybe - this is copied from X). + (unless (terminal-parameter frame 'x-setup-function-keys) + (with-selected-frame frame + (define-key local-function-key-map [f10] 'menu-bar-open) - (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame - local-function-key-map global-map) + (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame + local-function-key-map global-map) - (define-key local-function-key-map [S-tab] [backtab])) - (set-terminal-parameter frame 'x-setup-function-keys t)) + (define-key local-function-key-map [S-tab] [backtab])) + (set-terminal-parameter frame 'x-setup-function-keys t))) ;; W32 systems have different fonts than commonly found on X, so |