annotate lisp/term/internal.el @ 12890:2a1edeeb13fb

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