annotate lisp/term/internal.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 376386a54a3c
children a4f53d9b3154
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;; internal.el -- setup support for PC keyboards and screens, internal terminal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; Author: Morten Welinder <terra@diku.dk>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; Version: 1,02
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;; ---------------------------------------------------------------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;; screen setup -- that's easy!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 (standard-display-8bit 127 254)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;; ---------------------------------------------------------------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;; keyboard setup -- that's simple!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 (set-input-mode nil nil 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 (define-key function-key-map [backspace] "\177") ; Normal behaviour for BS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 (define-key function-key-map [delete] "\C-d") ; ... and Delete
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 (define-key function-key-map [tab] [?\t])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (define-key function-key-map [linefeed] [?\n])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 (define-key function-key-map [clear] [11])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (define-key function-key-map [return] [13])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 (define-key function-key-map [escape] [?\e])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 (define-key function-key-map [M-backspace] [?\M-\d])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (define-key function-key-map [M-delete] [?\M-\d])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (define-key function-key-map [M-tab] [?\M-\t])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (define-key function-key-map [M-linefeed] [?\M-\n])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (define-key function-key-map [M-clear] [?\M-\013])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (define-key function-key-map [M-return] [?\M-\015])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (define-key function-key-map [M-escape] [?\M-\e])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ;; ---------------------------------------------------------------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 ;; We want to do this when Emacs is started because it depends on the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 ;; country code.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (let* ((i 128)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (modify (function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (lambda (ch sy)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (modify-syntax-entry ch sy text-mode-syntax-table)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (if (boundp 'tex-mode-syntax-table)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (modify-syntax-entry ch sy tex-mode-syntax-table))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (modify-syntax-entry ch sy (standard-syntax-table))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (table (standard-case-table))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 ;; The following are strings of letters, first lower then upper case.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 ;; This will look funny on terminals which display other code pages.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (chars
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 ((= dos-codepage 850)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 "‡€š‚ƒķ„Ž…·†ÆĮ ĩˆŌ‰ÓŠÔ‹ØŒŨÞĄÖ‘’“â”™•ãĒā›–ęĢé—ë˜YėíĄIĢéĪĨÐŅįč")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 ((= dos-codepage 865)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 "‡€š‚ƒA„Ž…A†ˆE‰EŠE‹IŒII‘’“O”™•O–UĢU˜Y› AĄIĒOĢUĪĨ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 ;; default is 437
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (t "‡€š‚ƒA„Ž…A†ˆE‰EŠE‹IŒII‘’“O”™•O–UĢU˜Y AĄIĒOĢUĪĨ"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (while (< i 256)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (funcall modify i "_")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (setq i (1+ i)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (setq i 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (while (< i (length chars))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (let ((ch1 (aref chars i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 (ch2 (aref chars (1+ i))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 (if (> ch2 127)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 (set-case-syntax-pair ch2 ch1 table))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (setq i (+ i 2))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 (mapcar (lambda (b) (set-buffer b) (set-case-table table))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 (buffer-list)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (set-standard-case-table table))