diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/term/mac-win.el | 43 |
2 files changed, 29 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4d04952b62e..ef4f67bf37c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-11-20 Dan Nicolaescu <dann@ics.uci.edu> + + * term/mac-win.el (x-setup-function-keys): Only setup + local-function-key-map if it has not been setup already for the + current frame. Move the suspend-emacs processing here. + 2007-11-20 Juanma Barranquero <lekktu@gmail.com> * progmodes/grep.el (xargs-program): New variable. 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") ;;;; Function keys -(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame - global-map) - (defun x-setup-function-keys (frame) "Setup Function Keys for mac." -;; Map certain keypad keys into ASCII characters -;; that people usually expect. -(define-key local-function-key-map [backspace] [?\d]) -(define-key local-function-key-map [delete] [?\d]) -(define-key local-function-key-map [tab] [?\t]) -(define-key local-function-key-map [linefeed] [?\n]) -(define-key local-function-key-map [clear] [?\C-l]) -(define-key local-function-key-map [return] [?\C-m]) -(define-key local-function-key-map [escape] [?\e]) -(define-key local-function-key-map [M-backspace] [?\M-\d]) -(define-key local-function-key-map [M-delete] [?\M-\d]) -(define-key local-function-key-map [M-tab] [?\M-\t]) -(define-key local-function-key-map [M-linefeed] [?\M-\n]) -(define-key local-function-key-map [M-clear] [?\M-\C-l]) -(define-key local-function-key-map [M-return] [?\M-\C-m]) -(define-key local-function-key-map [M-escape] [?\M-\e]) -) + ;; Don't do this twice on the same display, or it would break + ;; normal-erase-is-backspace-mode. + (unless (terminal-parameter frame 'x-setup-function-keys) + (with-selected-frame frame + ;; Map certain keypad keys into ASCII characters + ;; that people usually expect. + (define-key local-function-key-map [backspace] [?\d]) + (define-key local-function-key-map [delete] [?\d]) + (define-key local-function-key-map [tab] [?\t]) + (define-key local-function-key-map [linefeed] [?\n]) + (define-key local-function-key-map [clear] [?\C-l]) + (define-key local-function-key-map [return] [?\C-m]) + (define-key local-function-key-map [escape] [?\e]) + (define-key local-function-key-map [M-backspace] [?\M-\d]) + (define-key local-function-key-map [M-delete] [?\M-\d]) + (define-key local-function-key-map [M-tab] [?\M-\t]) + (define-key local-function-key-map [M-linefeed] [?\M-\n]) + (define-key local-function-key-map [M-clear] [?\M-\C-l]) + (define-key local-function-key-map [M-return] [?\M-\C-m]) + (define-key local-function-key-map [M-escape] [?\M-\e]) + (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame + local-function-key-map global-map)) + (set-terminal-parameter frame 'x-setup-function-keys t)))) ;; These tell read-char how to convert ;; these special chars to ASCII. |