summaryrefslogtreecommitdiff
path: root/lisp/term/wyse50.el
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2005-07-27 18:02:08 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2005-07-27 18:02:08 +0000
commit4f0c9ba732c47b273fdb409f258570eae51b94e9 (patch)
tree2b2f23fe3a7a598dd1ec0d82edf35bc9ef3ed808 /lisp/term/wyse50.el
parente890842c416274d634b715defeab4528cd260373 (diff)
downloademacs-4f0c9ba732c47b273fdb409f258570eae51b94e9.tar.gz
* term/apollo.el (terminal-init-apollo): New function containing
all former top level forms in the file. * term/bobcat.el (terminal-init-bobcat): * term/cygwin.el (terminal-init-cygwin): * term/iris-ansi.el (terminal-init-iris-ansi): * term/linux.el (terminal-init-linux): * term/news.el (terminal-init-news): * term/rxvt.el (terminal-init-rxvt): * term/sun.el (terminal-init-sun): * term/tvi970.el (terminal-init-tvi970): * term/vt100.el (terminal-init-vt100): * term/vt102.el (terminal-init-vt102): * term/vt125.el (terminal-init-vt125): * term/vt200.el (terminal-init-vt200): * term/vt201.el (terminal-init-vt201): * term/vt220.el (terminal-init-vt220): * term/vt240.el (terminal-init-vt240): * term/vt300.el (terminal-init-vt300): * term/vt320.el (terminal-init-vt320): * term/vt400.el (terminal-init-vt400): * term/vt420.el (terminal-init-vt420): * term/wyse50.el (terminal-init-wyse50): * term/xterm.el (terminal-init-xterm): Likewise. * term/README: Describe the terminal-init-* functionality. * startup.el (command-line): After loading the terminal initialization file call the corresponding terminal initialization function.
Diffstat (limited to 'lisp/term/wyse50.el')
-rw-r--r--lisp/term/wyse50.el173
1 files changed, 87 insertions, 86 deletions
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el
index 562f5c728c0..64c489d7204 100644
--- a/lisp/term/wyse50.el
+++ b/lisp/term/wyse50.el
@@ -1,6 +1,6 @@
;;; wyse50.el --- terminal support code for Wyse 50 -*- no-byte-compile: t -*-
-;; Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1993, 1994, 2005 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>,
;; Jim Blandy <jimb@occs.cs.oberlin.edu>
@@ -37,74 +37,92 @@
;;; Code:
-(define-key function-key-map "\C-a" (make-keymap))
-(mapcar (function (lambda (key-definition)
- (define-key function-key-map
- (car key-definition) (nth 1 key-definition))))
- '(
- ;; These might be set up by termcap and terminfo
- ("\C-k" [up])
- ("\C-j" [down])
- ("\C-l" [right])
- ("\C-h" [left])
- ("\^a@\^m" [f1])
- ("\^aA\^m" [f2])
- ("\^aB\^m" [f3])
- ("\^aC\^m" [f4])
- ("\^aD\^m" [f5])
- ("\^aE\^m" [f6])
- ("\^aF\^m" [f7])
- ("\^aG\^m" [f8])
- ("\^aH\^m" [f9])
-
- ;; These might be set up by terminfo
- ("\eK" [next])
- ("\eT" [clearline])
- ("\^^" [home])
- ("\e\^^" [end])
- ("\eQ" [insert])
- ("\eE" [insertline])
- ("\eR" [deleteline])
- ("\eP" [print])
- ("\er" [replace])
- ("\^aI\^m" [f10])
- ("\^aJ\^m" [f11])
- ("\^aK\^m" [f12])
- ("\^aL\^m" [f13])
- ("\^aM\^m" [f14])
- ("\^aN\^m" [f15])
- ("\^aO\^m" [f16])
- ("\^a`\^m" [f17])
- ("\^aa\^m" [f18])
- ("\^ab\^m" [f19])
- ("\^ac\^m" [f20])
- ("\^ad\^m" [f21])
- ("\^ae\^m" [f22])
- ("\^af\^m" [f23])
- ("\^ag\^m" [f24])
- ("\^ah\^m" [f25])
- ("\^ai\^m" [f26])
- ("\^aj\^m" [f27])
- ("\^ak\^m" [f28])
- ("\^al\^m" [f29])
- ("\^am\^m" [f30])
- ("\^an\^m" [f31])
- ("\^ao\^m" [f32])
-
- ;; Terminfo may know about these, but X won't
- ("\eI" [key-stab]) ;; Not an X keysym
- ("\eJ" [key-snext]) ;; Not an X keysym
- ("\eY" [key-clear]) ;; Not an X keysym
-
- ;; These are totally strange :-)
- ("\eW" [?\C-?]) ;; Not an X keysym
- ("\^a\^k\^m" [funct-up]) ;; Not an X keysym
- ("\^a\^j\^m" [funct-down]) ;; Not an X keysym
- ("\^a\^l\^m" [funct-right]) ;; Not an X keysym
- ("\^a\^h\^m" [funct-left]) ;; Not an X keysym
- ("\^a\^m\^m" [funct-return]) ;; Not an X keysym
- ("\^a\^i\^m" [funct-tab]) ;; Not an X keysym
-))
+(defun terminal-init-wyse50 ()
+ "Terminal initialization function for wyse50."
+ (define-key function-key-map "\C-a" (make-keymap))
+ (mapcar (function (lambda (key-definition)
+ (define-key function-key-map
+ (car key-definition) (nth 1 key-definition))))
+ '(
+ ;; These might be set up by termcap and terminfo
+ ("\C-k" [up])
+ ("\C-j" [down])
+ ("\C-l" [right])
+ ("\C-h" [left])
+ ("\^a@\^m" [f1])
+ ("\^aA\^m" [f2])
+ ("\^aB\^m" [f3])
+ ("\^aC\^m" [f4])
+ ("\^aD\^m" [f5])
+ ("\^aE\^m" [f6])
+ ("\^aF\^m" [f7])
+ ("\^aG\^m" [f8])
+ ("\^aH\^m" [f9])
+
+ ;; These might be set up by terminfo
+ ("\eK" [next])
+ ("\eT" [clearline])
+ ("\^^" [home])
+ ("\e\^^" [end])
+ ("\eQ" [insert])
+ ("\eE" [insertline])
+ ("\eR" [deleteline])
+ ("\eP" [print])
+ ("\er" [replace])
+ ("\^aI\^m" [f10])
+ ("\^aJ\^m" [f11])
+ ("\^aK\^m" [f12])
+ ("\^aL\^m" [f13])
+ ("\^aM\^m" [f14])
+ ("\^aN\^m" [f15])
+ ("\^aO\^m" [f16])
+ ("\^a`\^m" [f17])
+ ("\^aa\^m" [f18])
+ ("\^ab\^m" [f19])
+ ("\^ac\^m" [f20])
+ ("\^ad\^m" [f21])
+ ("\^ae\^m" [f22])
+ ("\^af\^m" [f23])
+ ("\^ag\^m" [f24])
+ ("\^ah\^m" [f25])
+ ("\^ai\^m" [f26])
+ ("\^aj\^m" [f27])
+ ("\^ak\^m" [f28])
+ ("\^al\^m" [f29])
+ ("\^am\^m" [f30])
+ ("\^an\^m" [f31])
+ ("\^ao\^m" [f32])
+
+ ;; Terminfo may know about these, but X won't
+ ("\eI" [key-stab]) ;; Not an X keysym
+ ("\eJ" [key-snext]) ;; Not an X keysym
+ ("\eY" [key-clear]) ;; Not an X keysym
+
+ ;; These are totally strange :-)
+ ("\eW" [?\C-?]) ;; Not an X keysym
+ ("\^a\^k\^m" [funct-up]) ;; Not an X keysym
+ ("\^a\^j\^m" [funct-down]) ;; Not an X keysym
+ ("\^a\^l\^m" [funct-right]) ;; Not an X keysym
+ ("\^a\^h\^m" [funct-left]) ;; Not an X keysym
+ ("\^a\^m\^m" [funct-return]) ;; Not an X keysym
+ ("\^a\^i\^m" [funct-tab]) ;; Not an X keysym
+ ))
+
+ ;; Miscellaneous hacks
+
+ ;; This is an ugly hack for a nasty problem:
+ ;; Wyse 50 takes one character cell to store video attributes (which seems to
+ ;; explain width 79 rather than 80, column 1 is not used!!!).
+ ;; On killing (C-x C-c) the end inverse code (on column 1 of line 24)
+ ;; of the mode line is overwritten AFTER all the y-or-n questions.
+ ;; This causes the attribute to remain in effect until the mode line has
+ ;; scrolled of the screen. Suspending (C-z) does not cause this problem.
+ ;; On such terminals, Emacs should sacrifice the first and last character of
+ ;; each mode line, rather than a whole screen column!
+ (add-hook 'kill-emacs-hook
+ (function (lambda () (interactive)
+ (send-string-to-terminal
+ (concat "\ea23R" (1+ (frame-width)) "C\eG0"))))))
(defun enable-arrow-keys ()
"To be called by term-setup-hook. Overrides 6 Emacs standard keys
@@ -131,22 +149,5 @@ M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar
("\er" nil)))
(fset 'enable-arrow-keys nil))
-
-;;; Miscellaneous hacks
-
-;;; This is an ugly hack for a nasty problem:
-;;; Wyse 50 takes one character cell to store video attributes (which seems to
-;;; explain width 79 rather than 80, column 1 is not used!!!).
-;;; On killing (C-x C-c) the end inverse code (on column 1 of line 24)
-;;; of the mode line is overwritten AFTER all the y-or-n questions.
-;;; This causes the attribute to remain in effect until the mode line has
-;;; scrolled of the screen. Suspending (C-z) does not cause this problem.
-;;; On such terminals, Emacs should sacrifice the first and last character of
-;;; each mode line, rather than a whole screen column!
-(add-hook 'kill-emacs-hook
- (function (lambda () (interactive)
- (send-string-to-terminal
- (concat "\ea23R" (1+ (frame-width)) "C\eG0")))))
-
;;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c
;;; wyse50.el ends here