annotate lisp/term/AT386.el @ 103109:44b3e50566c1

*** empty log message ***
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Wed, 29 Apr 2009 05:15:47 +0000
parents a9dc0e7c3f2b
children 1d1d5d9bd884
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47726
33d53d287ee4 Add "no-byte-compile: t" in first line.
Juanma Barranquero <lekktu@gmail.com>
parents: 38436
diff changeset
1 ;;; AT386.el --- terminal support package for IBM AT keyboards -*- no-byte-compile: t -*-
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
2
74509
f7702c5f335d Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68648
diff changeset
3 ;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005,
100908
a9dc0e7c3f2b Add 2009 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 94671
diff changeset
4 ;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
74509
f7702c5f335d Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68648
diff changeset
5
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
6 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
Dave Love <fx@gnu.org>
parents:
diff changeset
7 ;; Keywords: terminals
Dave Love <fx@gnu.org>
parents:
diff changeset
8
Dave Love <fx@gnu.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
10
94671
f3ab0c2464f5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
94671
f3ab0c2464f5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
13 ;; the Free Software Foundation, either version 3 of the License, or
f3ab0c2464f5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
14 ;; (at your option) any later version.
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
15
Dave Love <fx@gnu.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
Dave Love <fx@gnu.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
Dave Love <fx@gnu.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Dave Love <fx@gnu.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
Dave Love <fx@gnu.org>
parents:
diff changeset
20
Dave Love <fx@gnu.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
94671
f3ab0c2464f5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
23
Dave Love <fx@gnu.org>
parents:
diff changeset
24 ;;; Commentary:
Dave Love <fx@gnu.org>
parents:
diff changeset
25
Dave Love <fx@gnu.org>
parents:
diff changeset
26 ;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
Dave Love <fx@gnu.org>
parents:
diff changeset
27
Dave Love <fx@gnu.org>
parents:
diff changeset
28 ;;; Code:
Dave Love <fx@gnu.org>
parents:
diff changeset
29
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
30 (defun terminal-init-AT386 ()
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
31 "Terminal initialization function for AT386."
85552
cfd23169cbc0 (terminal-init-AT386): Use input-decode-map.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83648
diff changeset
32 (let ((AT386-keypad-map (lookup-key input-decode-map "\e[")))
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
33 ;; The terminal initialization should already have set up some keys
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
34 (if (not (keymapp AT386-keypad-map))
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
35 (error "What? Your AT386 termcap/terminfo has no keycaps in it"))
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
36
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
37 ;; Equivalents of these are set up automatically by termcap/terminfo
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
38 ;; (define-key AT386-keypad-map "A" [up])
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
39 ;; (define-key AT386-keypad-map "B" [down])
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
40 ;; (define-key AT386-keypad-map "C" [right])
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
41 ;; (define-key AT386-keypad-map "D" [left])
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
42
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
43 ;; These would be set up by terminfo, but not termcap
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
44 (define-key AT386-keypad-map "H" [home])
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
45 (define-key AT386-keypad-map "Y" [end])
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
46 (define-key AT386-keypad-map "U" [next]) ;; PgDn
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
47 (define-key AT386-keypad-map "V" [prior]) ;; PgUp
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
48 (define-key AT386-keypad-map "@" [insert]) ;; Ins key
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
49
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
50 ;; These are not normally set up by either
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
51 (define-key AT386-keypad-map "G" [kp-5]) ;; Unlabeled center key
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
52 (define-key AT386-keypad-map "S" [kp-subtract])
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
53 (define-key AT386-keypad-map "T" [kp-add])
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
54
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
55 ;; Arrange for the ALT key to be equivalent to ESC
85552
cfd23169cbc0 (terminal-init-AT386): Use input-decode-map.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83648
diff changeset
56 (define-key input-decode-map "\eN" [ALT])
cfd23169cbc0 (terminal-init-AT386): Use input-decode-map.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83648
diff changeset
57 (define-key local-function-key-map [ALT] [27])
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
58 ))
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
59
85552
cfd23169cbc0 (terminal-init-AT386): Use input-decode-map.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83648
diff changeset
60 ;; arch-tag: abec1b03-582f-49f8-b8cb-e2fd52ea4bd7
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
61 ;;; AT386.el ends here