Mercurial > emacs
comparison lisp/term/internal.el @ 7233:da74d15b3571
Don't bind [mouse-1]; that's done elsewhere.
Define lower-upper case correspondence for the three mostly used code pages.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 30 Apr 1994 20:40:34 +0000 |
parents | e65b4acb9e6a |
children | 6ae78193650e |
comparison
equal
deleted
inserted
replaced
7232:25300b83f0dd | 7233:da74d15b3571 |
---|---|
1 ;; internal.el -- setup support for PC keyboards and screens, internal terminal | 1 ;; internal.el -- setup support for PC keyboards and screens, internal terminal |
2 | 2 |
3 ;; Copyright (C) 1993 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Morten Welinder <terra@diku.dk> | 5 ;; Author: Morten Welinder <terra@diku.dk> |
6 ;; Version: 1,01 | 6 ;; Version: 1,02 |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
9 | 9 |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | 10 ;; GNU Emacs is free software; you can redistribute it and/or modify |
11 ;; it under the terms of the GNU General Public License as published by | 11 ;; it under the terms of the GNU General Public License as published by |
24 ;; screen setup -- that's easy! | 24 ;; screen setup -- that's easy! |
25 (standard-display-8bit 127 254) | 25 (standard-display-8bit 127 254) |
26 ;; --------------------------------------------------------------------------- | 26 ;; --------------------------------------------------------------------------- |
27 ;; keyboard setup -- that's simple! | 27 ;; keyboard setup -- that's simple! |
28 (set-input-mode nil nil 0) | 28 (set-input-mode nil nil 0) |
29 (define-key global-map [mouse-1] 'mouse-set-point) | |
30 (define-key function-key-map [backspace] "\177") ; Normal behaviour for BS | 29 (define-key function-key-map [backspace] "\177") ; Normal behaviour for BS |
31 (define-key function-key-map [delete] "\C-d") ; ... and Delete | 30 (define-key function-key-map [delete] "\C-d") ; ... and Delete |
32 (define-key function-key-map [tab] [?\t]) | 31 (define-key function-key-map [tab] [?\t]) |
33 (define-key function-key-map [linefeed] [?\n]) | 32 (define-key function-key-map [linefeed] [?\n]) |
34 (define-key function-key-map [clear] [11]) | 33 (define-key function-key-map [clear] [11]) |
47 (put 'linefeed 'ascii-character ?\n) | 46 (put 'linefeed 'ascii-character ?\n) |
48 (put 'clear 'ascii-character 12) | 47 (put 'clear 'ascii-character 12) |
49 (put 'return 'ascii-character 13) | 48 (put 'return 'ascii-character 13) |
50 (put 'escape 'ascii-character ?\e) | 49 (put 'escape 'ascii-character ?\e) |
51 ;; --------------------------------------------------------------------------- | 50 ;; --------------------------------------------------------------------------- |
52 ;; We want to do this when Emacs is started because one day it will depend | 51 ;; We want to do this when Emacs is started because it depends on the |
53 ;; on the country code. | 52 ;; country code. |
54 (let* ((i 128) | 53 (let* ((i 128) |
55 (modify (function | 54 (modify (function |
56 (lambda (ch sy) | 55 (lambda (ch sy) |
57 (modify-syntax-entry ch sy text-mode-syntax-table) | 56 (modify-syntax-entry ch sy text-mode-syntax-table) |
58 (if (boundp 'tex-mode-syntax-table) | 57 (if (boundp 'tex-mode-syntax-table) |
59 (modify-syntax-entry ch sy tex-mode-syntax-table)) | 58 (modify-syntax-entry ch sy tex-mode-syntax-table)) |
60 (modify-syntax-entry ch sy (standard-syntax-table)) | 59 (modify-syntax-entry ch sy (standard-syntax-table)) |
61 ))) | 60 ))) |
62 (downs (car (standard-case-table))) | 61 (downs (car (standard-case-table))) |
63 (ups (car (cdr (standard-case-table)))) | 62 (ups (car (cdr (standard-case-table)))) |
64 (chars "A AEEEIIIOOUĢUY AĄIĒOĢUĪĨ")) | 63 ;; The following are strings of letters, first lower then upper case. |
64 ;; This will look funny on terminals which display other code pages. | |
65 (chars | |
66 (cond | |
67 ((= dos-codepage 850) | |
68 "ķ ·ÆĮ ĩŌÓÔØŨÞĄÖâãĒāęĢéëYėíĄIĢéĪĨÐŅįč") | |
69 ((= dos-codepage 865) | |
70 "A AEEEIIIOOUĢUY AĄIĒOĢUĪĨ") | |
71 ;; default is 437 | |
72 (t "A AEEEIIIOOUĢUY AĄIĒOĢUĪĨ")))) | |
73 | |
65 (while (< i 256) | 74 (while (< i 256) |
66 (funcall modify i "_") | 75 (funcall modify i "_") |
67 (setq i (1+ i))) | 76 (setq i (1+ i))) |
68 | 77 |
69 (setq i 0) | 78 (setq i 0) |
78 (setq i (+ i 2)))) | 87 (setq i (+ i 2)))) |
79 (let ((table (list downs ups nil nil))) | 88 (let ((table (list downs ups nil nil))) |
80 (save-excursion | 89 (save-excursion |
81 (mapcar (lambda (b) (progn (set-buffer b) (set-case-table table))) | 90 (mapcar (lambda (b) (progn (set-buffer b) (set-case-table table))) |
82 (buffer-list))) | 91 (buffer-list))) |
83 (set-standard-case-table table)) | 92 (set-standard-case-table table))) |
84 ) |