Mercurial > emacs
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 |
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 | 2 |
74509 | 3 ;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, |
100908 | 4 ;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
74509 | 5 |
25841 | 6 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
7 ;; Keywords: terminals | |
8 | |
9 ;; This file is part of GNU Emacs. | |
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 | 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 | 15 |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
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 | 23 |
24 ;;; Commentary: | |
25 | |
26 ;; Uses the Emacs 19 terminal initialization features --- won't work with 18. | |
27 | |
28 ;;; Code: | |
29 | |
83353
532e0a9335a9
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
diff
changeset
|
30 (defun terminal-init-AT386 () |
532e0a9335a9
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
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>
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>
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>
diff
changeset
|
35 (error "What? Your AT386 termcap/terminfo has no keycaps in it")) |
25841 | 36 |
83353
532e0a9335a9
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
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>
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>
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>
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>
diff
changeset
|
41 ;; (define-key AT386-keypad-map "D" [left]) |
25841 | 42 |
83353
532e0a9335a9
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
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>
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>
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>
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>
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>
diff
changeset
|
48 (define-key AT386-keypad-map "@" [insert]) ;; Ins key |
25841 | 49 |
83353
532e0a9335a9
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
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>
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>
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>
diff
changeset
|
53 (define-key AT386-keypad-map "T" [kp-add]) |
25841 | 54 |
83353
532e0a9335a9
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
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>
diff
changeset
|
58 )) |
25841 | 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 | 61 ;;; AT386.el ends here |