annotate lisp/term/AT386.el @ 92482:83962f810455

(comint-exec-1): Don't change the coding-system for decoding to dos-like EOL. (comint-carriage-motion): Fully rewrite.
author Kenichi Handa <handa@m17n.org>
date Wed, 05 Mar 2008 01:57:57 +0000
parents 107ccd98fa12
children 606f2d163a64 f3ab0c2464f5
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,
79718
f1713f61ee49 Add 2008 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 78226
diff changeset
4 ;; 2006, 2007, 2008 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
Dave Love <fx@gnu.org>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
Dave Love <fx@gnu.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
78226
030ae62d5c57 Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 75347
diff changeset
13 ;; the Free Software Foundation; either version 3, or (at your option)
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
14 ;; any later version.
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
Dave Love <fx@gnu.org>
parents:
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64084
a8fa7c632ee4 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
a8fa7c632ee4 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
24 ;; Boston, MA 02110-1301, USA.
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
25
Dave Love <fx@gnu.org>
parents:
diff changeset
26 ;;; Commentary:
Dave Love <fx@gnu.org>
parents:
diff changeset
27
Dave Love <fx@gnu.org>
parents:
diff changeset
28 ;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
Dave Love <fx@gnu.org>
parents:
diff changeset
29
Dave Love <fx@gnu.org>
parents:
diff changeset
30 ;;; Code:
Dave Love <fx@gnu.org>
parents:
diff changeset
31
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
32 (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
33 "Terminal initialization function for AT386."
85552
cfd23169cbc0 (terminal-init-AT386): Use input-decode-map.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83648
diff changeset
34 (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
35 ;; 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
36 (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
37 (error "What? Your AT386 termcap/terminfo has no keycaps in it"))
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
38
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
39 ;; 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
40 ;; (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
41 ;; (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
42 ;; (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
43 ;; (define-key AT386-keypad-map "D" [left])
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
44
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
45 ;; 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
46 (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
47 (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
48 (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
49 (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
50 (define-key AT386-keypad-map "@" [insert]) ;; Ins key
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
51
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
52 ;; 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
53 (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
54 (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
55 (define-key AT386-keypad-map "T" [kp-add])
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
56
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346 64701
diff changeset
57 ;; 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
58 (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
59 (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
60 ))
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
61
85552
cfd23169cbc0 (terminal-init-AT386): Use input-decode-map.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83648
diff changeset
62 ;; arch-tag: abec1b03-582f-49f8-b8cb-e2fd52ea4bd7
25841
Dave Love <fx@gnu.org>
parents:
diff changeset
63 ;;; AT386.el ends here