aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/mac-win.el43
1 files changed, 23 insertions, 20 deletions
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 7e4ec6546c8..684de49c4ea 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1058,28 +1058,31 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
1058 1058
1059;;;; Function keys 1059;;;; Function keys
1060 1060
1061(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
1062 global-map)
1063
1064(defun x-setup-function-keys (frame) 1061(defun x-setup-function-keys (frame)
1065 "Setup Function Keys for mac." 1062 "Setup Function Keys for mac."
1066;; Map certain keypad keys into ASCII characters 1063 ;; Don't do this twice on the same display, or it would break
1067;; that people usually expect. 1064 ;; normal-erase-is-backspace-mode.
1068(define-key local-function-key-map [backspace] [?\d]) 1065 (unless (terminal-parameter frame 'x-setup-function-keys)
1069(define-key local-function-key-map [delete] [?\d]) 1066 (with-selected-frame frame
1070(define-key local-function-key-map [tab] [?\t]) 1067 ;; Map certain keypad keys into ASCII characters
1071(define-key local-function-key-map [linefeed] [?\n]) 1068 ;; that people usually expect.
1072(define-key local-function-key-map [clear] [?\C-l]) 1069 (define-key local-function-key-map [backspace] [?\d])
1073(define-key local-function-key-map [return] [?\C-m]) 1070 (define-key local-function-key-map [delete] [?\d])
1074(define-key local-function-key-map [escape] [?\e]) 1071 (define-key local-function-key-map [tab] [?\t])
1075(define-key local-function-key-map [M-backspace] [?\M-\d]) 1072 (define-key local-function-key-map [linefeed] [?\n])
1076(define-key local-function-key-map [M-delete] [?\M-\d]) 1073 (define-key local-function-key-map [clear] [?\C-l])
1077(define-key local-function-key-map [M-tab] [?\M-\t]) 1074 (define-key local-function-key-map [return] [?\C-m])
1078(define-key local-function-key-map [M-linefeed] [?\M-\n]) 1075 (define-key local-function-key-map [escape] [?\e])
1079(define-key local-function-key-map [M-clear] [?\M-\C-l]) 1076 (define-key local-function-key-map [M-backspace] [?\M-\d])
1080(define-key local-function-key-map [M-return] [?\M-\C-m]) 1077 (define-key local-function-key-map [M-delete] [?\M-\d])
1081(define-key local-function-key-map [M-escape] [?\M-\e]) 1078 (define-key local-function-key-map [M-tab] [?\M-\t])
1082) 1079 (define-key local-function-key-map [M-linefeed] [?\M-\n])
1080 (define-key local-function-key-map [M-clear] [?\M-\C-l])
1081 (define-key local-function-key-map [M-return] [?\M-\C-m])
1082 (define-key local-function-key-map [M-escape] [?\M-\e])
1083 (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
1084 local-function-key-map global-map))
1085 (set-terminal-parameter frame 'x-setup-function-keys t))))
1083 1086
1084;; These tell read-char how to convert 1087;; These tell read-char how to convert
1085;; these special chars to ASCII. 1088;; these special chars to ASCII.