diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-09-04 03:48:17 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-09-04 03:48:17 +0000 |
commit | fbf349734468d48b421c3d03074bb66dfcf3115b (patch) | |
tree | 0a7d1ee844b6c591a5a499d23e35931945106e5a /lisp/term/tvi970.el | |
parent | f0caabd962b662cccbea472995d86af718cc8d0b (diff) | |
parent | 4b5fa40e1f1ba3cafde672863a0331311d1c2695 (diff) | |
download | emacs-fbf349734468d48b421c3d03074bb66dfcf3115b.tar.gz |
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Patches applied:
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0
tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1
Add CVS metadata files.
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2
Update from CVS.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
Diffstat (limited to 'lisp/term/tvi970.el')
-rw-r--r-- | lisp/term/tvi970.el | 148 |
1 files changed, 75 insertions, 73 deletions
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index 30bc6184d7a..8d8ef51c4a1 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el @@ -3,7 +3,7 @@ ;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>, January 1992 ;; Keywords: terminals -;; Copyright (C) 1992 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -28,76 +28,80 @@ ;;; Code: -(or (lookup-key (terminal-local-value 'local-function-key-map nil) "\e[") - (define-key (terminal-local-value 'local-function-key-map nil) "\e[" (make-keymap))) -;; (or (lookup-key (terminal-local-value 'local-function-key-map nil) "\eO") -;; (define-key (terminal-local-value 'local-function-key-map nil) "\eO" (make-keymap))) - -;; Miscellaneous keys -(mapcar (function (lambda (key-binding) - (define-key (terminal-local-value 'local-function-key-map nil) - (car key-binding) (nth 1 key-binding)))) - '( - ;; These are set up by termcap or terminfo - ;; ("\eOP" [kp-f1]) - ;; ("\eOQ" [kp-f2]) - ;; ("\eOR" [kp-f3]) - ;; ("\eOS" [kp-f4]) - - ;; These might br set by terminfo - ("\e[H" [home]) - ("\e[Z" [backtab]) - ("\e[i" [print]) - ("\e[@" [insert]) - ("\e[L" [insertline]) - ("\e[M" [deleteline]) - ("\e[U" [next]) ;; actually the `page' key - - ;; These won't be set up by either - ("\eOm" [kp-subtract]) - ("\eOl" [kp-separator]) - ("\eOn" [kp-decimal]) - ("\eOM" [kp-enter]) - - ;; These won't be set up by either either - ("\e[K" [key_eol]) ;; Not an X keysym - ("\e[J" [key_eos]) ;; Not an X keysym - ("\e[2J" [key_clear]) ;; Not an X keysym - ("\e[P" [key_dc]) ;; Not an X keysym - ("\e[g" [S-tab]) ;; Not an X keysym - ("\e[2N" [clearentry]) ;; Not an X keysym - ("\e[2K" [S-clearentry]) ;; Not an X keysym - ("\e[E" [?\C-j]) ;; Not an X keysym - ("\e[g" [S-backtab]) ;; Not an X keysym - ("\e[?1i" [key_sprint]) ;; Not an X keysym - ("\e[4h" [key_sic]) ;; Not an X keysym - ("\e[4l" [S-delete]) ;; Not an X keysym - ("\e[Q" [S-insertline]) ;; Not an X keysym - ("\e[1Q" [key_sdl]) ;; Not an X keysym - ("\e[19l" [key_seol]) ;; Not an X keysym - ("\e[19h" [S-erasepage]) ;; Not an X keysym - ("\e[V" [S-page]) ;; Not an X keysym - ("\eS" [send]) ;; Not an X keysym - ("\e5" [S-send]) ;; Not an X keysym - )) - -;; The numeric keypad keys. -(let ((i 0)) - (while (< i 10) - (define-key (terminal-local-value 'local-function-key-map nil) - (format "\eO%c" (+ i ?p)) - (vector (intern (format "kp-%d" i)))) - (setq i (1+ i)))) -;; The numbered function keys. -(let ((i 0)) - (while (< i 16) - (define-key (terminal-local-value 'local-function-key-map nil) - (format "\e?%c" (+ i ?a)) - (vector (intern (format "f%d" (1+ i))))) - (define-key (terminal-local-value 'local-function-key-map nil) - (format "\e?%c" (+ i ?A)) - (vector (intern (format "S-f%d" (1+ i))))) - (setq i (1+ i)))) +(defun terminal-init-tvi970 () + "Terminal initialization function for tvi970." + (or (lookup-key (terminal-local-value 'local-function-key-map nil) "\e[") + (define-key (terminal-local-value 'local-function-key-map nil) "\e[" (make-keymap))) + ;; (or (lookup-key (terminal-local-value 'local-function-key-map nil) "\eO") + ;; (define-key (terminal-local-value 'local-function-key-map nil) "\eO" (make-keymap))) + + ;; Miscellaneous keys + (mapcar (function (lambda (key-binding) + (define-key (terminal-local-value 'local-function-key-map nil) + (car key-binding) (nth 1 key-binding)))) + '( + ;; These are set up by termcap or terminfo + ;; ("\eOP" [kp-f1]) + ;; ("\eOQ" [kp-f2]) + ;; ("\eOR" [kp-f3]) + ;; ("\eOS" [kp-f4]) + + ;; These might br set by terminfo + ("\e[H" [home]) + ("\e[Z" [backtab]) + ("\e[i" [print]) + ("\e[@" [insert]) + ("\e[L" [insertline]) + ("\e[M" [deleteline]) + ("\e[U" [next]) ;; actually the `page' key + + ;; These won't be set up by either + ("\eOm" [kp-subtract]) + ("\eOl" [kp-separator]) + ("\eOn" [kp-decimal]) + ("\eOM" [kp-enter]) + + ;; These won't be set up by either either + ("\e[K" [key_eol]) ;; Not an X keysym + ("\e[J" [key_eos]) ;; Not an X keysym + ("\e[2J" [key_clear]) ;; Not an X keysym + ("\e[P" [key_dc]) ;; Not an X keysym + ("\e[g" [S-tab]) ;; Not an X keysym + ("\e[2N" [clearentry]) ;; Not an X keysym + ("\e[2K" [S-clearentry]) ;; Not an X keysym + ("\e[E" [?\C-j]) ;; Not an X keysym + ("\e[g" [S-backtab]) ;; Not an X keysym + ("\e[?1i" [key_sprint]) ;; Not an X keysym + ("\e[4h" [key_sic]) ;; Not an X keysym + ("\e[4l" [S-delete]) ;; Not an X keysym + ("\e[Q" [S-insertline]) ;; Not an X keysym + ("\e[1Q" [key_sdl]) ;; Not an X keysym + ("\e[19l" [key_seol]) ;; Not an X keysym + ("\e[19h" [S-erasepage]) ;; Not an X keysym + ("\e[V" [S-page]) ;; Not an X keysym + ("\eS" [send]) ;; Not an X keysym + ("\e5" [S-send]) ;; Not an X keysym + )) + + ;; The numeric keypad keys. + (let ((i 0)) + (while (< i 10) + (define-key (terminal-local-value 'local-function-key-map nil) + (format "\eO%c" (+ i ?p)) + (vector (intern (format "kp-%d" i)))) + (setq i (1+ i)))) + ;; The numbered function keys. + (let ((i 0)) + (while (< i 16) + (define-key (terminal-local-value 'local-function-key-map nil) + (format "\e?%c" (+ i ?a)) + (vector (intern (format "f%d" (1+ i))))) + (define-key (terminal-local-value 'local-function-key-map nil) + (format "\e?%c" (+ i ?A)) + (vector (intern (format "S-f%d" (1+ i))))) + (setq i (1+ i)))) + + (tvi970-set-keypad-mode 1)) ;;; Should keypad numbers send ordinary digits or distinct escape sequences? @@ -121,7 +125,5 @@ With a negative argument, select numeric keypad mode." (> (prefix-numeric-value arg) 0))) (send-string-to-terminal (if tvi970-keypad-numeric "\e=" "\e>"))) -(tvi970-set-keypad-mode 1) - ;;; arch-tag: c1334cf0-1462-41c3-a963-c077d175f8f0 ;;; tvi970.el ends here |