aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2007-11-20 22:22:06 +0000
committerJason Rumney2007-11-20 22:22:06 +0000
commita49e5cc32093a1ed3670b84c2b86fc03b956c378 (patch)
treeeab31fa6f21b7fbde50b19949407c114ed24689d
parent8281b9f9c90630aa32f04e667a9cb5d5a38c2f3d (diff)
downloademacs-a49e5cc32093a1ed3670b84c2b86fc03b956c378.tar.gz
emacs-a49e5cc32093a1ed3670b84c2b86fc03b956c378.zip
(x-setup-function-keys): Protect against
multiple calls on the same terminal.
-rw-r--r--lisp/term/w32-win.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 4a3a685f8c0..7ea8f08a67e 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")
1057 1057
1058(defun x-setup-function-keys (frame) 1058(defun x-setup-function-keys (frame)
1059 "Setup Function Keys for w32." 1059 "Setup Function Keys for w32."
1060 (with-selected-frame frame 1060 ;; Don't do this twice on the same display, or it would break
1061 (define-key local-function-key-map [f10] 'menu-bar-open) 1061 ;; normal-erase-is-backspace-mode (maybe - this is copied from X).
1062 (unless (terminal-parameter frame 'x-setup-function-keys)
1063 (with-selected-frame frame
1064 (define-key local-function-key-map [f10] 'menu-bar-open)
1062 1065
1063 (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame 1066 (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
1064 local-function-key-map global-map) 1067 local-function-key-map global-map)
1065 1068
1066 (define-key local-function-key-map [S-tab] [backtab])) 1069 (define-key local-function-key-map [S-tab] [backtab]))
1067 (set-terminal-parameter frame 'x-setup-function-keys t)) 1070 (set-terminal-parameter frame 'x-setup-function-keys t)))
1068 1071
1069 1072
1070;; W32 systems have different fonts than commonly found on X, so 1073;; W32 systems have different fonts than commonly found on X, so