diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-06-26 03:19:45 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-06-26 03:19:45 +0000 |
commit | 2bb819d593a8cbf989a84c5346ba9386b89f6960 (patch) | |
tree | 4cf40e4f6ae44ce0230c4ae9ff31484b1e068023 /lisp/term/lk201.el | |
parent | f01b6d17cc07655d6ce62a4ac5097947529b81a2 (diff) | |
download | emacs-2bb819d593a8cbf989a84c5346ba9386b89f6960.tar.gz |
Update Lisp code for a terminal-local `function-key-map'.
* lisp/term/x-win.el (x-setup-function-keys): New function. Move
function-key-map tweaks here.
* lisp/faces.el (x-create-frame-with-faces): Call x-setup-function-keys.
* lisp/term/iris-ansi.el: Update for terminal-local function-key-map.
* lisp/term/lk201.el: Ditto.
* lisp/term/news.el: Ditto.
* lisp/term/rxvt.el: Ditto.
* lisp/term/sun.el: Ditto.
* lisp/term/xterm.el: Ditto.
* lisp/startup.el: Cosmetic change.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-356
Diffstat (limited to 'lisp/term/lk201.el')
-rw-r--r-- | lisp/term/lk201.el | 129 |
1 files changed, 64 insertions, 65 deletions
diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index e09b176ba8f..735db12ba82 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el @@ -2,86 +2,85 @@ ;; Define function key sequences for DEC terminals. (defvar lk201-function-map nil - "Function key definitions for lk201.") + "Function key definitions for DEC terminals.") -;; Protect against reloads. +;; Make reloads faster. (unless lk201-function-map (setq lk201-function-map (make-sparse-keymap)) - ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey - ;; Termcap or terminfo should set these. - ;; (define-key function-key-map "\e[A" [up]) - ;; (define-key function-key-map "\e[B" [down]) - ;; (define-key function-key-map "\e[C" [right]) - ;; (define-key function-key-map "\e[D" [left]) + ;; (define-key lk201-function-map "\e[A" [up]) + ;; (define-key lk201-function-map "\e[B" [down]) + ;; (define-key lk201-function-map "\e[C" [right]) + ;; (define-key lk201-function-map "\e[D" [left]) - (define-key function-key-map "\e[1~" [find]) - (define-key function-key-map "\e[2~" [insert]) - (define-key function-key-map "\e[3~" [delete]) - (define-key function-key-map "\e[4~" [select]) - (define-key function-key-map "\e[5~" [prior]) - (define-key function-key-map "\e[6~" [next]) - (define-key function-key-map "\e[11~" [f1]) - (define-key function-key-map "\e[12~" [f2]) - (define-key function-key-map "\e[13~" [f3]) - (define-key function-key-map "\e[14~" [f4]) - (define-key function-key-map "\e[15~" [f5]) - (define-key function-key-map "\e[17~" [f6]) - (define-key function-key-map "\e[18~" [f7]) - (define-key function-key-map "\e[19~" [f8]) - (define-key function-key-map "\e[20~" [f9]) - (define-key function-key-map "\e[21~" [f10]) + (define-key lk201-function-map "\e[1~" [find]) + (define-key lk201-function-map "\e[2~" [insert]) + (define-key lk201-function-map "\e[3~" [delete]) + (define-key lk201-function-map "\e[4~" [select]) + (define-key lk201-function-map "\e[5~" [prior]) + (define-key lk201-function-map "\e[6~" [next]) + (define-key lk201-function-map "\e[11~" [f1]) + (define-key lk201-function-map "\e[12~" [f2]) + (define-key lk201-function-map "\e[13~" [f3]) + (define-key lk201-function-map "\e[14~" [f4]) + (define-key lk201-function-map "\e[15~" [f5]) + (define-key lk201-function-map "\e[17~" [f6]) + (define-key lk201-function-map "\e[18~" [f7]) + (define-key lk201-function-map "\e[19~" [f8]) + (define-key lk201-function-map "\e[20~" [f9]) + (define-key lk201-function-map "\e[21~" [f10]) ;; Customarily F11 is used as the ESC key. ;; The file that includes this one, takes care of that. - (define-key function-key-map "\e[23~" [f11]) - (define-key function-key-map "\e[24~" [f12]) - (define-key function-key-map "\e[25~" [f13]) - (define-key function-key-map "\e[26~" [f14]) - (define-key function-key-map "\e[28~" [help]) - (define-key function-key-map "\e[29~" [menu]) - (define-key function-key-map "\e[31~" [f17]) - (define-key function-key-map "\e[32~" [f18]) - (define-key function-key-map "\e[33~" [f19]) - (define-key function-key-map "\e[34~" [f20]) + (define-key lk201-function-map "\e[23~" [f11]) + (define-key lk201-function-map "\e[24~" [f12]) + (define-key lk201-function-map "\e[25~" [f13]) + (define-key lk201-function-map "\e[26~" [f14]) + (define-key lk201-function-map "\e[28~" [help]) + (define-key lk201-function-map "\e[29~" [menu]) + (define-key lk201-function-map "\e[31~" [f17]) + (define-key lk201-function-map "\e[32~" [f18]) + (define-key lk201-function-map "\e[33~" [f19]) + (define-key lk201-function-map "\e[34~" [f20]) ;; Termcap or terminfo should set these. - ;; (define-key function-key-map "\eOA" [up]) - ;; (define-key function-key-map "\eOB" [down]) - ;; (define-key function-key-map "\eOC" [right]) - ;; (define-key function-key-map "\eOD" [left]) + ;; (define-key lk201-function-map "\eOA" [up]) + ;; (define-key lk201-function-map "\eOB" [down]) + ;; (define-key lk201-function-map "\eOC" [right]) + ;; (define-key lk201-function-map "\eOD" [left]) ;; Termcap or terminfo should set these, but doesn't properly. ;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c - (define-key function-key-map "\eOP" [kp-f1]) - (define-key function-key-map "\eOQ" [kp-f2]) - (define-key function-key-map "\eOR" [kp-f3]) - (define-key function-key-map "\eOS" [kp-f4]) + (define-key lk201-function-map "\eOP" [kp-f1]) + (define-key lk201-function-map "\eOQ" [kp-f2]) + (define-key lk201-function-map "\eOR" [kp-f3]) + (define-key lk201-function-map "\eOS" [kp-f4]) - (define-key function-key-map "\eOI" [kp-tab]) - (define-key function-key-map "\eOj" [kp-multiply]) - (define-key function-key-map "\eOk" [kp-add]) - (define-key function-key-map "\eOl" [kp-separator]) - (define-key function-key-map "\eOM" [kp-enter]) - (define-key function-key-map "\eOm" [kp-subtract]) - (define-key function-key-map "\eOn" [kp-decimal]) - (define-key function-key-map "\eOo" [kp-divide]) - (define-key function-key-map "\eOp" [kp-0]) - (define-key function-key-map "\eOq" [kp-1]) - (define-key function-key-map "\eOr" [kp-2]) - (define-key function-key-map "\eOs" [kp-3]) - (define-key function-key-map "\eOt" [kp-4]) - (define-key function-key-map "\eOu" [kp-5]) - (define-key function-key-map "\eOv" [kp-6]) - (define-key function-key-map "\eOw" [kp-7]) - (define-key function-key-map "\eOx" [kp-8]) - (define-key function-key-map "\eOy" [kp-9]) + (define-key lk201-function-map "\eOI" [kp-tab]) + (define-key lk201-function-map "\eOj" [kp-multiply]) + (define-key lk201-function-map "\eOk" [kp-add]) + (define-key lk201-function-map "\eOl" [kp-separator]) + (define-key lk201-function-map "\eOM" [kp-enter]) + (define-key lk201-function-map "\eOm" [kp-subtract]) + (define-key lk201-function-map "\eOn" [kp-decimal]) + (define-key lk201-function-map "\eOo" [kp-divide]) + (define-key lk201-function-map "\eOp" [kp-0]) + (define-key lk201-function-map "\eOq" [kp-1]) + (define-key lk201-function-map "\eOr" [kp-2]) + (define-key lk201-function-map "\eOs" [kp-3]) + (define-key lk201-function-map "\eOt" [kp-4]) + (define-key lk201-function-map "\eOu" [kp-5]) + (define-key lk201-function-map "\eOv" [kp-6]) + (define-key lk201-function-map "\eOw" [kp-7]) + (define-key lk201-function-map "\eOx" [kp-8]) + (define-key lk201-function-map "\eOy" [kp-9])) - ;; Use inheritance to let the main keymap override these defaults. - ;; This way we don't override terminfo-derived settings or settings - ;; made in the .emacs file. - (set-keymap-parent lk201-function-map (keymap-parent function-key-map)) - (set-keymap-parent function-key-map lk201-function-map)) +;; Use inheritance to let the main keymap override these defaults. +;; This way we don't override terminfo-derived settings or settings +;; made in the .emacs file. +(let ((m (copy-keymap lk201-function-map))) + (set-keymap-parent m (keymap-parent function-key-map)) + (set-keymap-parent function-key-map m)) ;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d ;;; lk201.el ends here |